#!/usr/bin/env python # -*- coding: utf-8 -*- """ demeter database name:origin_batch.py author:rabin """ from __load__ import * class Origin_batch(Base): __table__ = 'origin_batch' __comment__ = '溯源批次表' id = Fields(type='uuid', primaryKey=True, comment='批次ID', uuid='farm_id') farm_id = Fields(type='int', default='setting.farm', comment='园区ID', match='not') name = Fields(type='varchar(150)', comment='产品名') zzdate = Fields(type='int', comment='种植时间') csdate = Fields(type='int', comment='采收时间') device_id = Fields(type='uuid', comment='设备id') land_id = Fields(type='uuid', comment='地块id') pic = Fields(type='text', comment='图片') state = Fields(type='boolean', default='True', comment='数据存在状态') cdate = Fields(type='int', default='time', comment='创建时间')