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