created design pattern
This commit is contained in:
0
ApiServices/BuildingService/Validations/__init__.py
Normal file
0
ApiServices/BuildingService/Validations/__init__.py
Normal file
@@ -0,0 +1,33 @@
|
||||
|
||||
from pydantic import BaseModel
|
||||
from typing import Optional
|
||||
|
||||
|
||||
class REQUESTEWFAZCDMPVZHIWOKZEJBIEUDAFBNXFEEAEGSELVGGCDMWLQPYMRAEEABSRQJUFBIMFEEADXK(BaseModel):
|
||||
gov_address_code: str
|
||||
build_name: str
|
||||
build_no: str
|
||||
max_floor: int
|
||||
underground_floor: int
|
||||
build_date: str
|
||||
decision_period_date: str
|
||||
tax_no: str
|
||||
lift_count: int
|
||||
heating_system: bool
|
||||
cooling_system: bool
|
||||
hot_water_system: bool
|
||||
block_service_man_count: int
|
||||
security_service_man_count: int
|
||||
garage_count: int
|
||||
management_room_id: int
|
||||
site_uu_id: str
|
||||
address_uu_id: str
|
||||
|
||||
|
||||
class REQUESTOCARDAJXLDANCXQAJWDBDIWXHUAEKQNUOSBZOCWXDAFGLAAVRBSADHUBDXAREUSESYGNGKBR(BaseModel):
|
||||
pass
|
||||
|
||||
|
||||
class REQUESTAEKUDAILSFMCCLOERBHBFRCIKFCSNCBOSENCAEOIDACPRFZCCWGEDBHBFBMZBFCJHCBVKEFC(BaseModel):
|
||||
pass
|
||||
|
||||
26
ApiServices/BuildingService/Validations/lists/validations.py
Normal file
26
ApiServices/BuildingService/Validations/lists/validations.py
Normal file
@@ -0,0 +1,26 @@
|
||||
from pydantic import BaseModel
|
||||
from typing import Optional
|
||||
|
||||
|
||||
class ListOptions(BaseModel):
|
||||
"""
|
||||
Query for list option abilities
|
||||
"""
|
||||
|
||||
page: Optional[int] = 1
|
||||
size: Optional[int] = 10
|
||||
order_field: Optional[str] = "id"
|
||||
order_type: Optional[str] = "asc"
|
||||
# include_joins: Optional[list] = None
|
||||
query: Optional[dict] = None
|
||||
|
||||
|
||||
class PaginateOnly(BaseModel):
|
||||
"""
|
||||
Query for list option abilities
|
||||
"""
|
||||
|
||||
page: Optional[int] = 1
|
||||
size: Optional[int] = 10
|
||||
order_field: Optional[str] = "id"
|
||||
order_type: Optional[str] = "asc"
|
||||
Reference in New Issue
Block a user