from sqlalchemy import Column, Integer, String from . import Base from typing import Any from app.utils.utility import to_dict class Application(Base): __tablename__ = "Applications" applicationId = Column(Integer, primary_key=True) applicationStatusId = Column( Integer, nullable=False ) borrowerId = Column(Integer, nullable=False) userId = Column(Integer, nullable=False) lenderId = Column(Integer, nullable=False) propertyAddress = Column(String, nullable=False) cityId = Column(Integer) stateId = Column(Integer) zipCode = Column(Integer) loanPurposeId = Column(Integer) applicationTypeId = Column(Integer) createdBy = Column(Integer) def dict(self) -> dict[str, Any]: return to_dict(self)