סיימתי את זה

Signed-off-by: Dmitri Shimanski <dshiafeed@gmail.com>
This commit is contained in:
Dmitri Shimanski
2025-04-08 17:09:27 +03:00
parent d63b8d70e9
commit e12fd15e71
20 changed files with 532 additions and 14 deletions

View File

View File

@@ -0,0 +1,12 @@
from .base import BaseSchema
from typing import List
class ApartmentSchema(BaseSchema):
owner: str
location: str
rooms: int
has_mamad: str
price: str
accepted_regions: str
is_available: bool = True

View File

@@ -0,0 +1,6 @@
from pydantic import BaseModel
from typing import List, Optional
class BaseSchema(BaseModel):
id: Optional[int] = None

View File

@@ -0,0 +1,6 @@
from .user import UserSchema
class NeedySchema(UserSchema):
region: str
how_much_peoples: int

View File

@@ -0,0 +1,6 @@
from .base import BaseSchema
class UserSchema(BaseSchema):
name: str
contact: str

View File

@@ -0,0 +1,5 @@
from .user import UserSchema
class VolunteerSchema(UserSchema):
pass