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


class InsertBuildDecisionBookProjects(PydanticBaseModel):
    build_decision_book_item_uu_id: str
    project_response_person_uu_id: str
    project_name: str
    project_start_date: str
    project_stop_date: str
    project_type: str

    is_out_sourced: Optional[bool] = False
    project_note: Optional[str] = None
    decision_book_pdf_path: Optional[str] = None
    resp_company_fix_wage: Optional[float] = None
    contact_agreement_path: Optional[str] = None
    contact_agreement_date: Optional[str] = None
    meeting_date: Optional[str] = None
    bid_price: Optional[float] = None
    approved_price: Optional[float] = None
    final_price: Optional[float] = None
    resp_company_uu_id: Optional[str] = None


class UpdateBuildDecisionBookProjects(PydanticBaseModel):
    resp_company_uu_id: Optional[str] = None

    project_response: Optional[str] = None
    project_name: Optional[str] = None
    project_type: Optional[str] = None
    project_note: Optional[str] = None
    decision_book_pdf_path: Optional[str] = None
    resp_company_fix_wage: Optional[float] = None
    is_out_sourced: Optional[bool] = None
    contact_agreement_path: Optional[str] = None
    contact_agreement_date: Optional[str] = None
    meeting_date: Optional[str] = None
    bid_price: Optional[float] = None
    approved_price: Optional[float] = None
    final_price: Optional[float] = None


class InsertBuildDecisionBookProjectItems(PydanticBaseModel):
    item_order: int
    item_comment: str
    build_decision_book_project_uu_id: str
    item_objection: Optional[str] = None


class UpdateBuildDecisionBookProjectItems(PydanticBaseModel):
    item_comment: Optional[str] = None
    item_objection: Optional[str] = None


class InsertBuildDecisionBookProjectItemDebits(PydanticBaseModel):
    build_decision_book_project_item_uu_id: str
    payment_date: str
    dues_values: dict
    is_official: Optional[bool] = False
    discount_value: Optional[float] = None
    discount_fix: Optional[float] = None
    decision_taken: Optional[bool] = None


class UpdateBuildDecisionBookProjectItemDebits(PydanticBaseModel):
    dues_values: Optional[str] = None
    discount_value: Optional[float] = None
    discount_fix: Optional[float] = None
    decision_taken: Optional[bool] = None
    is_official: Optional[bool] = None
