
from project import db

class History(db.Model):

    __tablename__ = "history"

    id=db.Column(db.Integer, primary_key=True)
    record_date = db.Column(db.Date)
    total_assets = db.Column(db.Numeric(10,2))
    liabilities = db.Column(db.Numeric(10,2))
    net_worth = db.Column(db.Numeric(10,2))
    reserves = db.Column(db.Numeric(10,2))
    taxable_funds = db.Column(db.Numeric(10,2))
    deferred_funds = db.Column(db.Numeric(10,2))
    roth_funds = db.Column(db.Numeric(10,2))
    hsa_funds = db.Column(db.Numeric(10,2))

    def __init__(self, 
            record_date, 
            total_assets, 
            liabilities, 
            net_worth,
            reserves,
            taxable_funds,
            deferred_funds,
            roth_funds,
            hsa_funds):

            self.record_date = record_date
            self.total_assets = total_assets
            self.liabilities = liabilities
            self.net_worth = net_worth
            self.reserves = reserves
            self.taxable_funds = taxable_funds,
            self.deferred_funds = deferred_funds,
            self.roth_funds = roth_funds,
            self.hsa_funds = hsa_funds

