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='采收时间')
- land_id = Fields(type='uuid', comment='地块id')
- gateway_id = Fields(type='uuid', comment='网关id')
- number = Fields(type='varchar(32)', comment='批号')
- pic = Fields(type='text', comment='图像记录')
- state = Fields(type='boolean', default='True', comment='数据存在状态')
- cdate = Fields(type='int', default='time', comment='创建时间')
- pic_id = Fields(type='uuid', comment='摄像头设备id')
- #ALTER TABLE demeter_origin_batch ADD pic_id uuid;
|