Files
book_library_server/fastapi_book_server/app/services/author.py
2021-11-14 10:38:47 +03:00

14 lines
326 B
Python

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