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


class BindEmployees2PeopleValidation:
    tr = {
        **PydanticBaseModelValidation.tr,
        "staff_uu_id": "Kadro UUID",
        "people_uu_id": "Kişi UUID",
        "expiry_starts": "Başlangıç Tarihi",
    }
    en = {
        **PydanticBaseModelValidation.en,
        "staff_uu_id": "Staff UUID",
        "people_uu_id": "People UUID",
        "expiry_starts": "Start Date",
    }


class BindEmployees2People(PydanticBaseModel, BindEmployees2PeopleValidation):
    staff_uu_id: str
    people_uu_id: str
    expiry_starts: Optional[str] = None


class UnBindEmployees2PeopleValidation:
    tr = {
        **PydanticBaseModelValidation.tr,
        "people_uu_id": "Kişi UUID",
        "expiry_ends": "Bitiş Tarihi",
    }
    en = {
        **PydanticBaseModelValidation.en,
        "people_uu_id": "People UUID",
        "expiry_ends": "End Date",
    }


class UnBindEmployees2People(PydanticBaseModel, UnBindEmployees2PeopleValidation):
    people_uu_id: str
    expiry_ends: str


class InsertEmployeesValidation:
    tr = {
        "staff_uu_id": "Kadro UUID",
        "people_uu_id": "Kişi UUID",
    }
    en = {
        "staff_uu_id": "Staff UUID",
        "people_uu_id": "People UUID",
    }


class InsertEmployees(BaseModelRegular, InsertEmployeesValidation):
    staff_uu_id: str
    people_uu_id: Optional[str] = None


class InsertCompanyDutyValidation:
    tr = {
        "duty_code": "Görev Kodu",
        "duty_name": "Görev Adı",
        "duty_description": "Görev Açıklaması",
    }
    en = {
        "duty_code": "Duty Code",
        "duty_name": "Duty Name",
        "duty_description": "Duty Description",
    }


class InsertCompanyDuty(BaseModelRegular, InsertCompanyDutyValidation):
    duty_code: str
    duty_name: str
    duty_description: Optional[str] = None


class SelectDutiesValidation:
    tr = {
        "duty_uu_id": "Görev UUID",
    }
    en = {
        "duty_uu_id": "Duty UUID",
    }

class SelectDuties(BaseModelRegular, SelectDutiesValidation):
    duty_uu_id: Optional[str] = None


class InsertDutiesValidation:
    tr = {
        "duties_uu_id": "Görev UUID",
        "department_uu_id": "Departman UUID",
        "is_default_duty": "Varsayılan Görev",
    }
    en = {
        "duties_uu_id": "Duty UUID",
        "department_uu_id": "Department UUID",
        "is_default_duty": "Default Duty",
    }


class InsertDuties(BaseModelRegular, InsertDutiesValidation):
    duties_uu_id: str
    department_uu_id: str
    is_default_duty: Optional[bool] = False


class UpdateDutiesValidation:
    tr = {
        **PydanticBaseModelValidation.tr,
        "duties_uu_id": "Görev UUID",
        "department_uu_id": "Departman UUID",
        "is_default_duty": "Varsayılan Görev",
    }
    en = {
        **PydanticBaseModelValidation.en,
        "duties_uu_id": "Duty UUID",
        "department_uu_id": "Department UUID",
        "is_default_duty": "Default Duty",
    }

class UpdateDuties(PydanticBaseModel):
    duties_uu_id: Optional[str] = None
    department_uu_id: Optional[str] = None
    is_default_duty: Optional[bool] = None


class UpdateCompanyDutyValidation:
    tr = {
        **PydanticBaseModelValidation.tr,
        "duty_code": "Görev Kodu",
        "duty_name": "Görev Adı",
        "duty_description": "Görev Açıklaması",
    }
    en = {
        **PydanticBaseModelValidation.en,
        "duty_code": "Duty Code",
        "duty_name": "Duty Name",
        "duty_description": "Duty Description",
    }


class UpdateCompanyDuty(PydanticBaseModel):
    duty_code: Optional[str] = None
    duty_name: Optional[str] = None
    duty_description: Optional[str] = None


class InsertCompanyEmployeesSalariesValidation:
    tr = {
        "gross_salary": "Brüt Maaş",
        "net_salary": "Net Maaş",
        "start_date": "Başlangıç Tarihi",
        "stop_date": "Bitiş Tarihi",
        "people_id": "Kişi ID",
    }
    en = {
        "gross_salary": "Gross Salary",
        "net_salary": "Net Salary",
        "start_date": "Start Date",
        "stop_date": "Stop Date",
        "people_id": "People ID",
    }


class InsertCompanyEmployeesSalaries(BaseModelRegular):
    gross_salary: float
    net_salary: float
    start_date: str
    stop_date: Optional[str] = None
    people_id: int


class UpdateCompanyEmployeesSalariesValidation:
    tr = {
        **PydanticBaseModelValidation.tr,
        "gross_salary": "Brüt Maaş",
        "net_salary": "Net Maaş",
        "start_date": "Başlangıç Tarihi",
        "stop_date": "Bitiş Tarihi",
        "people_id": "Kişi ID",
    }
    en = {
        **PydanticBaseModelValidation.en,
        "gross_salary": "Gross Salary",
        "net_salary": "Net Salary",
        "start_date": "Start Date",
        "stop_date": "Stop Date",
        "people_id": "People ID",
    }


class UpdateCompanyEmployeesSalaries(PydanticBaseModel):
    gross_salary: Optional[float] = None
    net_salary: Optional[float] = None
    start_date: Optional[str] = None
    stop_date: Optional[str] = None
    people_id: Optional[int] = None


class InsertCompanyEmployeesValidation:
    tr = {
        "employee_description": "Çalışan Açıklaması",
        "person_uu_id": "Kişi UUID",
        "duty_uu_id": "Görev UUID",
        "start_date": "Başlangıç Tarihi",
        "stop_date": "Bitiş Tarihi",
    }
    en = {
        "employee_description": "Employee Description",
        "person_uu_id": "Person UUID",
        "duty_uu_id": "Duty UUID",
        "start_date": "Start Date",
        "stop_date": "Stop Date",
    }

class InsertCompanyEmployees(BaseModelRegular, InsertCompanyEmployeesValidation):

    employee_description: Optional[str] = None
    person_uu_id: str
    duty_uu_id: str

    start_date: Optional[str] = None
    stop_date: Optional[str] = None


class UpdateCompanyEmployeesValidation:
    tr = {
        **PydanticBaseModelValidation.tr,
        "stop_date": "Bitiş Tarihi",
        "employee_description": "Çalışan Açıklaması",
    }
    en = {
        **PydanticBaseModelValidation.en,
        "stop_date": "Stop Date",
        "employee_description": "Employee Description",
    }

class UpdateCompanyEmployees(PydanticBaseModel, UpdateCompanyEmployeesValidation):
    stop_date: Optional[str] = None
    employee_description: Optional[str] = None
