MIRA_LABS_AI / miralabs-backend /ai-service /app /models /income_analytic_updation.py
ans123's picture
Initial upload from Colab
ef1ad9e verified
from typing import Any
from sqlalchemy import Boolean, Column, ForeignKey, Integer, String
from sqlalchemy.orm import declarative_base
from app.models.base import Base
from app.utils.utility import to_dict
class IncomeAnalyticUpdation(Base):
__tablename__ = "IncomeAnalyticUpdation"
incomeAnalyticUpdationId = Column(Integer, primary_key=True) # Primary key
userProfileId = Column(Integer, ForeignKey("UserProfiles.userProfileId")) # Foreign key to UserProfiles
userId = Column(Integer, ForeignKey("Users.userId")) # Foreign key to Users
userEmploymentAndIncomeId = Column(
Integer, ForeignKey("UserEmploymentAndIncomes.userEmploymentAndIncomeId")
) # Foreign key to UserEmploymentAndIncomes
baseIncome = Column(Integer)
baseIncomeCalculation = Column(String)
OTIncome = Column(Integer)
OTIncomeCalculation = Column(String)
bonusIncome = Column(Integer)
bonusIncomeCalculation = Column(String)
otherIncome = Column(Integer)
otherIncomeCalculation = Column(String)
isNewUpdate = Column(Boolean)
def dict(self) -> dict[str, Any]:
return to_dict(self)