from typing import Optional
from api_validations.core_validations import BaseModelRegular
from api_validations.validations_request import (
    PydanticBaseModel,
    ListOptions,
)


class BuildAreaValidation:

    tr = {
        "area_name": "Alan Adı",
        "area_code": "Alan Kodu",
        "area_type": "Alan Tipi",
        "area_direction": "Alan Yönü",
        "area_gross_size": "Brüt Alan",
        "area_net_size": "Net Alan",
        "width": "Genişlik",
        "size": "En",
    }
    en = {
        "area_name": "Area Name",
        "area_code": "Area Code",
        "area_type": "Area Type",
        "area_direction": "Area Direction",
        "area_gross_size": "Gross Size",
        "area_net_size": "Net Size",
        "width": "Width",
        "size": "Size",
    }


class InsertBuildArea(BaseModelRegular, BuildAreaValidation):

    build_uu_id: str
    area_name: str
    area_code: str
    area_type: str
    area_direction: Optional[str] = None
    area_gross_size: Optional[float] = None
    area_net_size: Optional[float] = None
    width: Optional[int] = None
    size: Optional[int] = None


class UpdateBuildArea(PydanticBaseModel, BuildAreaValidation):

    area_name: Optional[str] = None
    area_code: Optional[str] = None
    area_type: Optional[str] = None
    area_direction: Optional[str] = None
    area_gross_size: Optional[float] = None
    area_net_size: Optional[float] = None
    width: Optional[int] = None
    size: Optional[int] = None


class BuildSites:
    tr = {"address_uu_id": "Adres UU ID", "site_name": "Site Adı", "site_no": "Site No"}
    en = {
        "address_uu_id": "Address UU ID",
        "site_name": "Site Name",
        "site_no": "Site No",
    }


class InsertBuildSites(BaseModelRegular, BuildSites):

    address_uu_id: str
    site_name: str
    site_no: str


class UpdateBuildSites(PydanticBaseModel, BuildSites):

    site_name: Optional[str] = None
    site_no: Optional[str] = None
