from sqlalchemy import func
from sqlalchemy.orm import Session
from app.api.civil import service
from app.dependency.authantication import JWTPayloadSchema
from app.models.main.carpentry import TblCarpentry
from app.models.main.civil import TblCivil
from app.models.main.display_racking_unit import TblDisplayRackingUnit




class StoreInvestmantService:
    def __init__(self, db: Session, token: JWTPayloadSchema):
        self.db = db
        self.token = token
        
    # async def get_store_investment_summary_A(self,capital_total:int):
    #     get_store_investment_summary = (
    #         self.db.query(
    #             TblCivil.store_format_type,
    #             TblDisplayRackingUnit.store_format_type,
    #             TblCarpentry.store_formate_type,
    #             func.sum(capital_total)
    #         )
    #         .group_by(TblCivil.store_format_type, TblDisplayRackingUnit.store_format_type, TblCarpentry.store_formate_type)
    #         .all()
    #     )
    #     return get_store_investment_summary
    
    # async def get_store_investment_summary_A(self,capital_total:int):
    #     get_store_investment_summary = (
    #         self.db.query(
    #             service.get_subtotal_by_store_format,
                
    #         )
    #     )