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

class InfoTechCreate(CustomModel):
    
    type : str
    units : int
    cost_per_unit : int
    store_format_type : Literal["Store Format A", "Store Format B"]= Field(default="Store Format A")
    # category : Literal["Software", "Hardware", "Physical Component"]
    # other_type : str
    other_catrgory : Literal["Software","Hardware","Physical Component"]
    remark : str
    group_id : int
    
    
class InfoTechResponses(InfoTechCreate):
    infotech_id : int
    # type : Literal["Cash Tills/POS Equipment", "Scanner", "Computer"]
    # units : int
    # cost_per_unit : int
    total : int 
    # store_formate_type : Literal["Store Formate A", "Store Formate B"] = Field(default="Store Formate A")
    # remark : str
    # group_id : int
    
class InfoTechUpdate(CustomModel):
    infotech_id : Optional[int] = None
    type : str
    units : Optional[int] = None
    cost_per_unit : Optional[int] = None
    store_format_type : Optional[Literal["Store Format A", "Store Format B"]] = Field(default="Store Format A")
    # category : Optional[Literal["Software", "Hardware", "Physical Component"]]
    # other_type : Optional[str] = None
    other_catrgory : Optional[Literal["Software","Hardware","Physical Component"]]
    remark : Optional[str] = None
    group_id : Optional[int] = None
    
class InfoTechSum(CustomModel):
    group_id: int
    store_format_type: str
    total_sum: Optional[int] = None
    