mirror of
https://github.com/FutureOfMedTech-FITM-hack/backend.git
synced 2024-11-21 22:16:33 +03:00
28 lines
386 B
Python
28 lines
386 B
Python
from pydantic import BaseModel
|
|
|
|
from med_backend.auth.schemas import UserPublicInfo
|
|
|
|
|
|
class BasePost(BaseModel):
|
|
name: str
|
|
|
|
|
|
class PostCreate(BasePost):
|
|
description: str
|
|
|
|
|
|
class PostList(BasePost):
|
|
id: int
|
|
|
|
class Config:
|
|
orm_mode = True
|
|
|
|
|
|
class Post(BasePost):
|
|
id: int
|
|
description: str
|
|
user: UserPublicInfo
|
|
|
|
class Config:
|
|
orm_mode = True
|