|
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)
|
|
userProfileId = Column(Integer, ForeignKey("UserProfiles.userProfileId"))
|
|
userId = Column(Integer, ForeignKey("Users.userId"))
|
|
userEmploymentAndIncomeId = Column(
|
|
Integer, ForeignKey("UserEmploymentAndIncomes.userEmploymentAndIncomeId")
|
|
)
|
|
|
|
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)
|
|
|