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


class AccountValidation:
    tr = {
        "iban": "IBAN Numarası",
        "bank_date": "Bank Tarih",
        "currency_value": "Para Değeri",
        "bank_balance": "Banka Bakiye",
        "currency": "Para Birimi",
        "additional_balance": "Ek Bakiye",
        "channel_branch": "Kanal Şubesi",
        "process_name": "İşlem Adı",
        "process_type": "İşlem Tipi",
        "process_comment": "İşlem Yorum",
        "bank_reference_code": "Banka Referans Kodu",
        "add_comment_note": "Yorum Not",
        "is_receipt_mail_send": "Fiş Mail Gönderildi",
        "found_from": "Bulunduğu Yer",
        "similarity": "Benzerlik",
        "remainder_balance": "Kalan Bakiye",
        "bank_date_y": "Bank Tarih Yıl",
        "bank_date_m": "Bank Tarih Ay",
        "bank_date_w": "Bank Tarih Hafta",
        "bank_date_d": "Bank Tarih Gün",
        "approving_accounting_record": "Onaylayan Muhasebe Kaydı",
        "accounting_receipt_date": "Muhasebe Fiş Tarihi",
        "accounting_receipt_number": "Muhasebe Fiş Numarası",
        "approved_record": "Onaylanmış Kayıt",
        "import_file_name": "İçe Aktarım Dosya Adı",
        "receive_debit_uu_id": "Alacak UUID",
        "budget_type_uu_id": "Bütçe Tipi UUID",
        "company_uu_id": "Şirket UUID",
        "send_company_uu_id": "Gönderen Şirket UUID",
        "customer_id": "Müşteri ID",
        "customer_uu_id": "Müşteri UUID",
        "send_person_uu_id": "Gönderen Kişi UUID",
        "approving_accounting_person_uu_id": "Onaylayan Muhasebe Kişi UUID",
        "build_parts_uu_id": "Daire UUID",
        "build_decision_book_uu_id": "Karar Defteri UUID",
    }
    en = {
        "iban": "IBAN Number",
        "bank_date": "Bank Date",
        "currency_value": "Currency Value",
        "bank_balance": "Bank Balance",
        "currency": "Currency",
        "additional_balance": "Additional Balance",
        "channel_branch": "Channel Branch",
        "process_name": "Process Name",
        "process_type": "Process Type",
        "process_comment": "Process Comment",
        "bank_reference_code": "Bank Reference Code",
        "add_comment_note": "Comment Note",
        "is_receipt_mail_send": "Receipt Mail Send",
        "found_from": "Found From",
        "similarity": "Similarity",
        "remainder_balance": "Remainder Balance",
        "bank_date_y": "Bank Date Year",
        "bank_date_m": "Bank Date Month",
        "bank_date_w": "Bank Date Week",
        "bank_date_d": "Bank Date Day",
        "approving_accounting_record": "Approving Accounting Record",
        "accounting_receipt_date": "Accounting Receipt Date",
        "accounting_receipt_number": "Accounting Receipt Number",
        "approved_record": "Approved Record",
        "import_file_name": "Import File Name",
        "receive_debit_uu_id": "Receive Debit UUID",
        "budget_type_uu_id": "Budget Type UUID",
        "company_uu_id": "Company UUID",
        "send_company_uu_id": "Send Company UUID",
        "customer_id": "Customer ID",
        "customer_uu_id": "Customer UUID",
        "send_person_uu_id": "Send Person UUID",
        "approving_accounting_person_uu_id": "Approving Accounting Person UUID",
        "build_parts_uu_id": "Build Parts UUID",
        "build_decision_book_uu_id": "Build Decision Book UUID",
    }


class InsertAccountRecord(BaseModelRegular, AccountValidation):

    iban: str
    bank_date: str
    currency_value: float
    bank_balance: float
    currency: str
    additional_balance: float
    channel_branch: str
    process_name: str
    process_type: str
    process_comment: str
    bank_reference_code: str

    add_comment_note: Optional[str] = None
    is_receipt_mail_send: Optional[bool] = None
    found_from: Optional[str] = None
    similarity: Optional[float] = None
    remainder_balance: Optional[float] = None
    bank_date_y: Optional[int] = None
    bank_date_m: Optional[int] = None
    bank_date_w: Optional[int] = None
    bank_date_d: Optional[int] = None
    approving_accounting_record: Optional[bool] = None
    accounting_receipt_date: Optional[str] = None
    accounting_receipt_number: Optional[int] = None
    approved_record: Optional[bool] = None
    import_file_name: Optional[str] = None
    # receive_debit_uu_id: Optional[str] = None
    budget_type_uu_id: Optional[str] = None
    company_uu_id: Optional[str] = None
    send_company_uu_id: Optional[str] = None
    customer_id: Optional[str] = None
    customer_uu_id: Optional[str] = None
    send_person_uu_id: Optional[str] = None
    approving_accounting_person_uu_id: Optional[str] = None
    build_parts_uu_id: Optional[str] = None
    build_decision_book_uu_id: Optional[str] = None


class UpdateAccountRecord(PydanticBaseModel, AccountValidation):

    iban: Optional[str] = None
    bank_date: Optional[str] = None
    currency_value: Optional[float] = None
    bank_balance: Optional[float] = None
    currency: Optional[str] = None
    additional_balance: Optional[float] = None
    channel_branch: Optional[str] = None
    process_name: Optional[str] = None
    process_type: Optional[str] = None
    process_comment: Optional[str] = None
    bank_reference_code: Optional[str] = None

    add_comment_note: Optional[str] = None
    is_receipt_mail_send: Optional[bool] = None
    found_from: Optional[str] = None
    similarity: Optional[float] = None
    remainder_balance: Optional[float] = None
    bank_date_y: Optional[int] = None
    bank_date_m: Optional[int] = None
    bank_date_w: Optional[int] = None
    bank_date_d: Optional[int] = None
    approving_accounting_record: Optional[bool] = None
    accounting_receipt_date: Optional[str] = None
    accounting_receipt_number: Optional[int] = None
    approved_record: Optional[bool] = None
    import_file_name: Optional[str] = None
    receive_debit_uu_id: Optional[str] = None
    budget_type_uu_id: Optional[str] = None
    company_uu_id: Optional[str] = None
    send_company_uu_id: Optional[str] = None
    customer_id: Optional[str] = None
    customer_uu_id: Optional[str] = None
    send_person_uu_id: Optional[str] = None
    approving_accounting_person_uu_id: Optional[str] = None
    build_parts_uu_id: Optional[str] = None
    build_decision_book_uu_id: Optional[str] = None
