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:
16
database/schemas/game_genres.py
Normal file
16
database/schemas/game_genres.py
Normal file
@@ -0,0 +1,16 @@
|
||||
from typing import Optional
|
||||
from pydantic import BaseModel, ConfigDict, Field
|
||||
|
||||
|
||||
class GameGenreBase(BaseModel):
|
||||
genre: str = Field(default=None, examples=["Стратегия"])
|
||||
|
||||
|
||||
class GameGenreCreate(GameGenreBase):
|
||||
pass
|
||||
|
||||
|
||||
class GameGenre(GameGenreBase):
|
||||
id: int = Field(examples=[1])
|
||||
|
||||
model_config = ConfigDict(from_attributes=True)
|
||||
Reference in New Issue
Block a user