origin_batch.py 1.0 KB

123456789101112131415161718192021222324
  1. # -*- coding: utf-8 -*-
  2. """
  3. demeter database
  4. name:origin_batch.py
  5. author:rabin
  6. """
  7. from .__load__ import *
  8. class Origin_batch(Model):
  9. __table__ = 'origin_batch'
  10. __comment__ = '溯源批次表'
  11. id = Fields(type='uuid', primaryKey=True, comment='批次ID', uuid='farm_id')
  12. farm_id = Fields(type='int', default='setting.farm', comment='园区ID', match='not')
  13. name = Fields(type='varchar(150)', comment='产品名')
  14. zzdate = Fields(type='int', comment='种植时间')
  15. csdate = Fields(type='int', comment='采收时间')
  16. devices = Fields(type='text', comment='设备id')
  17. land_id = Fields(type='uuid', comment='地块id')
  18. product_id = Fields(type='uuid', comment='产品id')
  19. device_camera_id = Fields(type='uuid', comment='摄像头设备id')
  20. amount = Fields(type='varchar(150)', comment='本批产量')
  21. number = Fields(type='varchar(32)', comment='批号')
  22. state = Fields(type='boolean', default='True', comment='数据存在状态')
  23. cdate = Fields(type='int', default='time', comment='创建时间')