from typing import Literal, Optional
from app.utils.schemas_utils import CustomModel


class CarpentryCreate(CustomModel):
    
    formate_type : str
    type_of_feature : int
    store_formate_type : Literal["Store Formate A", "Store Formate B"] = "Store Formate A"
    number_of_units : int
    cost_per_unit : int
    remark : str
    group_id : int
    
    
class CarpentryResponses(CustomModel):
    
    carpentry_id : int
    formate_type : str
    type_of_feature : int
    store_formate_type : Literal["Store Formate A", "Store Formate B"] = "Store Formate A"
    number_of_units : int
    cost_per_unit : int
    total : int
    remark : str
    group_id : int
    
class CarpentrySums(CustomModel):
    group_id: int
    store_formate_type: str
    total_sum: Optional[int] = None
    
class CarpentryUpdate(CustomModel):
    
    carpentry_id : Optional[int] = None
    formate_type : Optional[str] = None
    type_of_feature : Optional[int] = None
    store_formate_type : Optional[Literal["Store Formate A", "Store Formate B"]] = "Store Formate A"
    number_of_units : Optional[int] = None
    cost_per_unit : Optional[int] = None
    remark : Optional[str] = None
    group_id : Optional[int] = None