init
This commit is contained in:
20
web/commons/models/budget.py
Normal file
20
web/commons/models/budget.py
Normal file
@@ -0,0 +1,20 @@
|
||||
from sqlalchemy import Column, Integer, String, Date, Text
|
||||
|
||||
from core.extensions import db
|
||||
|
||||
|
||||
class Budget(db.Model):
|
||||
__tablename__ = 'BUDGET'
|
||||
id = Column('ID', Integer, primary_key=True)
|
||||
name = Column('NAME', String(128), default='', comment='名称')
|
||||
amount = Column('AMOUNT', Integer, default='', comment='总数')
|
||||
min_amount = Column('MIN_AMOUNT', Integer, default='', comment='最小值')
|
||||
max_amount = Column('MAX_AMOUNT', Integer, default='', comment='最大值')
|
||||
year = Column('YEAR', Integer, default=0, comment='年份')
|
||||
months = Column('MONTHS', Text, default='', comment='月份')
|
||||
date = Column('DATE', Date, comment='日期')
|
||||
|
||||
# __table_args__ = (
|
||||
# UniqueConstraint(name, date, name='Idx_key'),
|
||||
# {'comment': '预算'},
|
||||
# )
|
Reference in New Issue
Block a user