Files
book_library_server/fastapi_book_server/app/services/author.py

14 lines
347 B
Python

from app.models import Author
from app.services.common import TRGMSearchService
class AuthorTGRMSearchService(TRGMSearchService):
MODEL_CLASS = Author
FIELDS = [
Author.Meta.table.c.last_name,
Author.Meta.table.c.first_name,
Author.Meta.table.c.middle_name
]
PREFETCH_RELATED = ["source", "annotations"]