mirror of
https://github.com/StepanovPlaton/torrent_backend.git
synced 2026-04-03 20:30:38 +04:00
Update database architecture. Add genres and actors
This commit is contained in:
15
database/schemas/movie_genres.py
Normal file
15
database/schemas/movie_genres.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from pydantic import BaseModel, ConfigDict, Field
|
||||
|
||||
|
||||
class MovieGenreBase(BaseModel):
|
||||
genre: str = Field(default=None, examples=["Фантастика"])
|
||||
|
||||
|
||||
class MovieGenreCreate(MovieGenreBase):
|
||||
pass
|
||||
|
||||
|
||||
class MovieGenre(MovieGenreBase):
|
||||
id: int = Field(examples=[1])
|
||||
|
||||
model_config = ConfigDict(from_attributes=True)
|
||||
Reference in New Issue
Block a user