def __init__(self, db_session): BaseFlow.__init__(self, db_session, CashFlowItem) self.table = Table(self.__table_name__, self.db_session.metadata, Column('id', Integer, primary_key=True), Column('type', Integer, nullable=False), Column('user_id', Integer), #ForeignKey('user.id')), Column('value', Float, nullable=False), #TODO: Change to real Type Column('day', Integer, nullable=False), Column('month', Integer, nullable=False), Column('year', Integer, nullable=False), Column('hour', String(8), nullable=False), Column('notes', Text) ) self.mapper = mapper(CashFlowItem, self.table)
def __init__(self, db_session): BaseFlow.__init__(self, db_session, HistoryItem) self.table = Table(self.__table_name__, self.db_session.metadata, Column('id', Integer, primary_key=True), Column('day', Integer, nullable=False), Column('month', Integer, nullable=False), Column('year', Integer, nullable=False), Column('machine_id', Integer), #ForeignKey('machine.id')), Column('time', String(8), nullable=False), Column('mac', String(20), nullable=False), Column('ip', String(16), nullable=False), Column('start_time', String(8), nullable=False), Column('end_time', String(8), nullable=False), Column('user_id', Integer), #ForeignKey('user.id')), ) self.mapper = mapper(HistoryItem, self.table)
def __init__(self, db_session): BaseFlow.__init__(self, db_session, OpenDebtOtherItem) self.table = Table(self.__table_name__, self.db_session.metadata, Column('id', Integer, primary_key=True), Column('day', Integer, nullable=False), Column('month', Integer, nullable=False), Column('year', Integer, nullable=False), Column('time', String(8), nullable=False), Column('start_time', String(8), nullable=False), Column('end_time', String(8), nullable=False), Column('user_id', Integer), #ForeignKey('user.id')), Column('value', Float, nullable=False), #TODO: Change to real Type Column('notes', Text), Column('id_description', Integer, ForeignKey('description_opendebts_other.id')) ) self.mapper = mapper(OpenDebtOtherItem, self.table, properties={'description_opendebts_other':relation(DescriptionOpenDebtsOther)})