mirror of
https://github.com/StepanovPlaton/torrent_backend.git
synced 2026-04-03 20:30:38 +04:00
16 lines
342 B
Python
16 lines
342 B
Python
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)
|