from sqlalchemy import Column, Integer, DateTime from src.infrastructure.models.user_model import Base class KWCappingModel(Base): """SQLAlchemy ORM model mapping to 'kw_installation_records' table. Each row represents one KW tier (e.g. 5 KW, 10 KW) and the maximum loan amount approved for a solar installation of that capacity. Note: the column name 'KW' is uppercase — this matches the existing Laravel schema and must not be changed. """ __tablename__ = "kw_installation_records" id = Column(Integer, primary_key=True) KW = Column(Integer, nullable=False) # uppercase — original schema max_approved_value = Column(Integer, nullable=False) updated_by = Column(Integer, nullable=True) created_at = Column(DateTime, nullable=True) updated_at = Column(DateTime, nullable=True) deleted_at = Column(DateTime, nullable=True)