mirror of
https://github.com/yawaflua/BiahadHakatonProject.git
synced 2026-02-04 10:14:12 +02:00
0
db_repository/schemas/__init__.py
Normal file
0
db_repository/schemas/__init__.py
Normal file
12
db_repository/schemas/apartment.py
Normal file
12
db_repository/schemas/apartment.py
Normal 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
|
||||
6
db_repository/schemas/base.py
Normal file
6
db_repository/schemas/base.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from pydantic import BaseModel
|
||||
from typing import List, Optional
|
||||
|
||||
|
||||
class BaseSchema(BaseModel):
|
||||
id: Optional[int] = None
|
||||
6
db_repository/schemas/needy.py
Normal file
6
db_repository/schemas/needy.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from .user import UserSchema
|
||||
|
||||
|
||||
class NeedySchema(UserSchema):
|
||||
region: str
|
||||
how_much_peoples: int
|
||||
6
db_repository/schemas/user.py
Normal file
6
db_repository/schemas/user.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from .base import BaseSchema
|
||||
|
||||
|
||||
class UserSchema(BaseSchema):
|
||||
name: str
|
||||
contact: str
|
||||
5
db_repository/schemas/volunteer.py
Normal file
5
db_repository/schemas/volunteer.py
Normal file
@@ -0,0 +1,5 @@
|
||||
from .user import UserSchema
|
||||
|
||||
|
||||
class VolunteerSchema(UserSchema):
|
||||
pass
|
||||
Reference in New Issue
Block a user