origin_batch.py 872 B

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