febus982/bootstrap-python-fastapi

View on GitHub
src/domains/books/dto.py

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
from typing import Union

from pydantic import BaseModel


class BookData(BaseModel):
    title: str
    author_name: str


class Book(BookData):
    book_id: Union[int, None] = None