12345678910111213141516171819202122232425 |
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
- """
- demeter database
- name:origin_batch.py
- author:rabin
- """
- from __load__ import *
- class Origin_batch(Model):
- __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='采收时间')
- devices = Fields(type='text', comment='设备id')
- land_id = Fields(type='uuid', comment='地块id')
- product_id = Fields(type='uuid', comment='产品id')
- device_camera_id = Fields(type='uuid', comment='摄像头设备id')
- amount = Fields(type='varchar(150)', comment='本批产量')
- number = Fields(type='varchar(32)', comment='批号')
- state = Fields(type='boolean', default='True', comment='数据存在状态')
- cdate = Fields(type='int', default='time', comment='创建时间')
|