15 lines
216 B
Python
15 lines
216 B
Python
from pydantic import BaseModel
|
|
|
|
class AndBase(BaseModel):
|
|
title: str
|
|
body: str
|
|
|
|
class AndCreate(AndBase):
|
|
pass
|
|
|
|
class And(AndBase):
|
|
id: int
|
|
owner_id: int
|
|
|
|
class Config:
|
|
orm_mode = True |