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


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