23 lines
1012 B
Python
23 lines
1012 B
Python
from sqlalchemy import Column, Integer, String
|
|
from sqlalchemy.dialects.mysql import MEDIUMTEXT
|
|
|
|
from commons.models.mixin.operation_track import OperationTrackMixin
|
|
from commons.models.model import Model
|
|
from core.extensions import db
|
|
|
|
|
|
class MaterialTask(db.Model, OperationTrackMixin, Model):
|
|
id = Column('ID', Integer, primary_key=True)
|
|
name = Column('NAME', String(128), default='', comment='任务名称')
|
|
status = Column('STATUS', Integer, default=0, comment='状态(待采集、已采集、采集中)')
|
|
file = Column('FILE', String(256), default='', comment='文件路径')
|
|
type = Column('TYPE', Integer, default=0, comment='类型(网络爬取、文件上传)')
|
|
year = Column('YEAR', Integer, default=0, comment='采集年份')
|
|
month = Column('MONTH', Integer, default=0, comment='采集月份')
|
|
content = Column('CONTENT', MEDIUMTEXT, comment='数据内容')
|
|
|
|
__tablename__ = 'MATERIAL_TASK'
|
|
__table_args__ = (
|
|
{'comment': '采集任务'},
|
|
)
|