1/app/api/v1/schemas/and.py
2025-03-20 10:46:50 +01:00

13 lines
280 B
Python

from typing import Optional
from pydantic import BaseModel
# AndCreate Schema
class AndCreate(BaseModel):
title: str
body: str
# And Schema
class And(AndCreate):
id: int
is_published: bool
rating: Optional[int] = None
class Config:
orm_mode = True