mirror of
https://github.com/StepanovPlaton/torrent_backend.git
synced 2026-04-04 04:40:40 +04:00
Update database architecture. Add genres and actors
This commit is contained in:
15
database/schemas/movie_actors.py
Normal file
15
database/schemas/movie_actors.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from pydantic import BaseModel, ConfigDict, Field
|
||||
|
||||
|
||||
class MovieActorBase(BaseModel):
|
||||
actor: str = Field(default=None, examples=["Мэттью Макконахи"])
|
||||
|
||||
|
||||
class MovieActorCreate(MovieActorBase):
|
||||
pass
|
||||
|
||||
|
||||
class MovieActor(MovieActorBase):
|
||||
id: int = Field(examples=[1])
|
||||
|
||||
model_config = ConfigDict(from_attributes=True)
|
||||
Reference in New Issue
Block a user