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

class InsertPersonValidation:
    tr = {
        "firstname": "İsim",
        "surname": "Soyisim",
        "sex_code": "Cinsiyet",
        "national_identity_id": "T.C. Kimlik Numarası",
        "middle_name": "Orta İsim",
        "father_name": "Baba Adı",
        "mother_name": "Anne Adı",
        "country_code": "Ülke Kodu",
        "birth_place": "Doğum Yeri",
        "birth_date": "Doğum Tarihi",
        "tax_no": "Vergi Numarası",
        "ref_id": "Referans ID",
    }


class InsertPerson(BaseModelRegular, InsertPersonValidation):
    firstname: str
    surname: str
    sex_code: str
    national_identity_id: str
    middle_name: Optional[str] = None
    father_name: Optional[str] = None
    mother_name: Optional[str] = None
    country_code: Optional[str] = "TR"
    birth_place: Optional[str] = None
    birth_date: Optional[str] = None
    tax_no: Optional[str] = None
    ref_id: Optional[str] = None


class UpdatePersonValidation:
    tr = {
        **PydanticBaseModelValidation.tr,
        **InsertPersonValidation.tr,
    }
    en = {
        **PydanticBaseModelValidation.en,
        **InsertPersonValidation.tr,
    }

class UpdatePerson(PydanticBaseModel, UpdatePersonValidation):
    firstname: Optional[str] = None
    surname: Optional[str] = None
    middle_name: Optional[str]
    father_name: Optional[str] = None
    mother_name: Optional[str] = None
    sex_code: Optional[str] = None
    country_code: Optional[str] = None
    national_identity_id: Optional[str] = None
    birth_place: Optional[str] = None
    birth_date: Optional[str] = None
    tax_no: Optional[str] = None


#
# class QueryPeople(PydanticBaseModel):
#     uu_id: Optional[str] = None
#
#
# class InsertPeople(PydanticBaseModel):
#     key_id: Optional[str] = None
#     query: Optional[dict] = None
#     data: Optional[_InsertPerson] = None
#
#
# class UpdatePeople(PydanticBaseModel):
#     key_id: Optional[str] = None
#     query: Optional[QueryPeople] = None
#     data: Optional[_UpdatePerson] = None
#
#
# class DeletePeople(PydanticBaseModel):
#     key_id: Optional[str] = None
#     query: Optional[List[QueryPeople]] = None
#     data: Optional[dict] = None
#
#
# class ListPeople(PydanticBaseModel):
#     key_id: Optional[str] = None
#     query: Optional[QueryPeople] = None
#     data: Optional[ListOptions] = None
#
#
# class ActivePeople(PydanticBaseModel):
#     key_id: Optional[str] = None
#     query: Optional[List[QueryPeople]] = None
#     data: Optional[dict] = None
