validation requester updated
This commit is contained in:
parent
4308f1e7b1
commit
a61efdf473
|
|
@ -2,11 +2,50 @@ from typing import Optional
|
|||
from api_validations.core_validations import BaseModelRegular
|
||||
from api_validations.validations_request import (
|
||||
PydanticBaseModel,
|
||||
PydanticBaseModelValidation,
|
||||
ListOptions,
|
||||
)
|
||||
|
||||
class BuildValidation:
|
||||
tr = {
|
||||
"gov_address_code": "Devlet Adres Kodu",
|
||||
"build_name": "Bina Adı",
|
||||
"build_types_uu_id": "Bina Tipi",
|
||||
"max_floor": "Kat Sayısı",
|
||||
"underground_floor": "Bodrum Kat Sayısı",
|
||||
"address_uu_id": "Adres",
|
||||
"build_date": "Yapım Tarihi",
|
||||
"decision_period_date": "Karar Tarihi",
|
||||
"tax_no": "Vergi No",
|
||||
"lift_count": "Asansör Sayısı",
|
||||
"heating_system": "Isıtma Sistemi",
|
||||
"cooling_system": "Soğutma Sistemi",
|
||||
"hot_water_system": "Sıcak Su Sistemi",
|
||||
"block_service_man_count": "Hizmet Görevlisi Sayısı",
|
||||
"security_service_man_count": "Güvenlik Görevlisi Sayısı",
|
||||
"garage_count": "Garaj Sayısı",
|
||||
}
|
||||
en = {
|
||||
"gov_address_code": "Government Address Code",
|
||||
"build_name": "Building Name",
|
||||
"build_types_uu_id": "Building Type",
|
||||
"max_floor": "Number of Floors",
|
||||
"underground_floor": "Number of Basement Floors",
|
||||
"address_uu_id": "Address",
|
||||
"build_date": "Construction Date",
|
||||
"decision_period_date": "Decision Date",
|
||||
"tax_no": "Tax No",
|
||||
"lift_count": "Number of Elevators",
|
||||
"heating_system": "Heating System",
|
||||
"cooling_system": "Cooling System",
|
||||
"hot_water_system": "Hot Water System",
|
||||
"block_service_man_count": "Number of Service Officers",
|
||||
"security_service_man_count": "Number of Security Officers",
|
||||
"garage_count": "Number of Garages",
|
||||
}
|
||||
|
||||
class InsertBuild(BaseModelRegular):
|
||||
|
||||
class InsertBuild(BaseModelRegular, BuildValidation):
|
||||
gov_address_code: str
|
||||
build_name: str
|
||||
build_types_uu_id: str
|
||||
|
|
@ -26,7 +65,18 @@ class InsertBuild(BaseModelRegular):
|
|||
garage_count: Optional[int] = None
|
||||
|
||||
|
||||
class UpdateBuild(PydanticBaseModel):
|
||||
class BuildUpdateValidation:
|
||||
tr = {
|
||||
**BuildValidation.tr,
|
||||
**PydanticBaseModelValidation.tr,
|
||||
}
|
||||
en = {
|
||||
**BuildValidation.en,
|
||||
**PydanticBaseModelValidation.en,
|
||||
}
|
||||
|
||||
|
||||
class UpdateBuild(PydanticBaseModel, BuildUpdateValidation):
|
||||
gov_address_code: Optional[str] = None
|
||||
build_name: Optional[str] = None
|
||||
build_no: Optional[str] = None
|
||||
|
|
|
|||
|
|
@ -2,11 +2,25 @@ from typing import Optional, List
|
|||
from api_validations.core_validations import BaseModelRegular
|
||||
from api_validations.validations_request import (
|
||||
PydanticBaseModel,
|
||||
PydanticBaseModelValidation,
|
||||
ListOptions,
|
||||
)
|
||||
|
||||
class CompanyValidation:
|
||||
tr = {
|
||||
"formal_name": "Resmi Ad",
|
||||
"company_type": "Şirket Tipi",
|
||||
"commercial_type": "Ticari Tip",
|
||||
"tax_no": "Vergi No",
|
||||
"public_name": "Halka Açık Ad",
|
||||
"company_tag": "Şirket Etiketi",
|
||||
"default_lang_type": "Varsayılan Dil Tipi",
|
||||
"default_money_type": "Varsayılan Para Tipi",
|
||||
"official_address_uu_id": "Resmi Adres UU ID",
|
||||
}
|
||||
|
||||
class InsertCompany(BaseModelRegular):
|
||||
|
||||
class InsertCompany(BaseModelRegular, CompanyValidation):
|
||||
formal_name: str
|
||||
company_type: str
|
||||
commercial_type: str
|
||||
|
|
@ -19,7 +33,18 @@ class InsertCompany(BaseModelRegular):
|
|||
# parent_uu_id: Optional[int] = None
|
||||
|
||||
|
||||
class UpdateCompany(PydanticBaseModel):
|
||||
class CompanyUpdateValidation:
|
||||
tr = {
|
||||
**CompanyValidation.tr,
|
||||
**PydanticBaseModelValidation.tr,
|
||||
}
|
||||
en = {
|
||||
**CompanyValidation.tr,
|
||||
**PydanticBaseModelValidation.en,
|
||||
}
|
||||
|
||||
|
||||
class UpdateCompany(PydanticBaseModel, CompanyUpdateValidation):
|
||||
company_uu_id: str
|
||||
public_name: Optional[str] = None
|
||||
formal_name: Optional[str] = None
|
||||
|
|
@ -30,6 +55,20 @@ class UpdateCompany(PydanticBaseModel):
|
|||
official_address_uu_id: Optional[str] = None
|
||||
|
||||
|
||||
class MatchCompany2Company(PydanticBaseModel):
|
||||
class MatchCompany2CompanyValidation:
|
||||
tr = {
|
||||
**PydanticBaseModelValidation.tr,
|
||||
"match_company_uu_id": "Eşleşen Şirket UU ID",
|
||||
"duty_uu_id": "Görev UU ID",
|
||||
}
|
||||
en = {
|
||||
**PydanticBaseModelValidation.en,
|
||||
"match_company_uu_id": "Match Company UU ID",
|
||||
"duty_uu_id": "Duty UU ID",
|
||||
}
|
||||
|
||||
|
||||
class MatchCompany2Company(PydanticBaseModel, MatchCompany2CompanyValidation):
|
||||
match_company_uu_id: List[str]
|
||||
duty_uu_id: str
|
||||
show_only: Optional[bool] = None
|
||||
|
|
|
|||
|
|
@ -5,19 +5,54 @@ from api_validations.validations_request import (
|
|||
ListOptions,
|
||||
)
|
||||
|
||||
class DecisionBookDecisionBookInvitationsValidation:
|
||||
tr = {
|
||||
"build_decision_book_uu_id": "Karar Defteri UUID",
|
||||
"message": "Mesaj",
|
||||
"planned_date": "Planlanan Tarih",
|
||||
}
|
||||
en = {
|
||||
"build_decision_book_uu_id": "Decision Book UUID",
|
||||
"message": "Message",
|
||||
"planned_date": "Planned Date",
|
||||
}
|
||||
|
||||
class DecisionBookDecisionBookInvitations(BaseModelRegular):
|
||||
|
||||
class DecisionBookDecisionBookInvitations(BaseModelRegular, DecisionBookDecisionBookInvitationsValidation):
|
||||
build_decision_book_uu_id: str
|
||||
message: str
|
||||
planned_date: str
|
||||
|
||||
|
||||
class DecisionBookDecisionBookInvitationsAttend(BaseModelRegular):
|
||||
class DecisionBookDecisionBookInvitationsAttendValidation:
|
||||
tr = {
|
||||
"token": "Token",
|
||||
"is_attend": "Katılacak mı?",
|
||||
}
|
||||
en = {
|
||||
"token": "Token",
|
||||
"is_attend": "Is Attend?",
|
||||
}
|
||||
|
||||
|
||||
class DecisionBookDecisionBookInvitationsAttend(BaseModelRegular, DecisionBookDecisionBookInvitationsAttendValidation):
|
||||
token: str
|
||||
is_attend: bool
|
||||
|
||||
|
||||
class DecisionBookDecisionBookInvitationsAssign(BaseModelRegular):
|
||||
class DecisionBookDecisionBookInvitationsAssignValidation:
|
||||
tr = {
|
||||
"token": "Token",
|
||||
"build_living_space_uu_id": "Yapı Yaşam Alanı UUID",
|
||||
"occupant_type_uu_id": "Sakin Tipi UUID",
|
||||
}
|
||||
en = {
|
||||
"token": "Token",
|
||||
"build_living_space_uu_id": "Build Living Space UUID",
|
||||
"occupant_type_uu_id": "Occupant Type UUID",
|
||||
}
|
||||
|
||||
class DecisionBookDecisionBookInvitationsAssign(BaseModelRegular, DecisionBookDecisionBookInvitationsAssignValidation):
|
||||
token: str
|
||||
build_living_space_uu_id: str
|
||||
occupant_type_uu_id: str
|
||||
|
|
|
|||
Loading…
Reference in New Issue