21 lines
826 B
Python
21 lines
826 B
Python
from sqlalchemy import Column, Integer, String, Text
|
|
|
|
from core.extensions import db
|
|
|
|
|
|
class BudgetItem(db.Model):
|
|
__tablename__ = 'BUDGET_ITEM'
|
|
id = Column('ID', Integer, primary_key=True)
|
|
budget_id = Column('BUDGET_ID', Integer, default='', comment='预算id')
|
|
name = Column('NAME', String(128), default='', comment='名称')
|
|
meta = Column('META', Text, default='', comment='数据')
|
|
quantity = Column('QUANTITY', Integer, default='', comment='数量')
|
|
unit = Column('UNIT', Text, default='', comment='单位')
|
|
unit_Price = Column('UNIT_PRICE', Integer, default='', comment='单价')
|
|
total_Price = Column('TOTAL_PRICE', Integer, default='', comment='总价')
|
|
|
|
# __table_args__ = (
|
|
# UniqueConstraint(name, date, name='Idx_key'),
|
|
# {'comment': '预算细项'},
|
|
# )
|