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


class BuildLivingSpaceValidation:
    tr = {
        "person_uu_id": "Kişi UUID'si",
        "build_parts_uu_id": "Bina UUID'si",
        "occupant_type_uu_id": "Mülk Sahibi UUID'si",
        "expiry_starts": "Geçerlilik Başlangıç Tarihi",
        "expiry_ends": "Geçerlilik Bitiş Tarihi",
    }
    en = {
        "person_uu_id": "Person UUID",
        "build_parts_uu_id": "Build UUID",
        "occupant_type_uu_id": "Occupant UUID",
        "expiry_starts": "Expiry Starts",
        "expiry_ends": "Expiry Ends",
    }


class PydanticBaseModelValidationUpdate:
    tr = {
        **PydanticBaseModelValidation.tr,
        "is_tenant_live": "Kiracı mı?",
        "build_parts_uu_id": "Bina UUID'si",
        "person_uu_id": "Kişi UUID'si",
    }
    en = {
        **PydanticBaseModelValidation.en,
        "is_tenant_live": "Is Tenant Live?",
        "build_parts_uu_id": "Build UUID",
        "person_uu_id": "Person UUID",
    }


class InsertBuildLivingSpace(BaseModelRegular, BuildLivingSpaceValidation):
    person_uu_id: str
    build_parts_uu_id: str
    occupant_type_uu_id: str
    expiry_starts: str
    expiry_ends: Optional[str] = None


class UpdateBuildLivingSpace(PydanticBaseModel, BuildLivingSpaceValidation):
    is_tenant_live: Optional[bool] = None
    build_parts_uu_id: Optional[str] = None
    person_uu_id: Optional[str] = None
