farm_work.py 863 B

123456789101112131415161718192021
  1. # -*- coding: utf-8 -*-
  2. """
  3. demeter database
  4. name:farm_work.py
  5. author:rabin
  6. """
  7. from .__load__ import *
  8. class Farm_work(Model):
  9. __table__ = 'farm_work'
  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. amount = Fields(type='varchar(150)', comment='劳作用量')
  14. category_id = Fields(type='uuid', comment='劳作分类id')
  15. method_id = Fields(type='uuid', comment='劳作具体内容id')
  16. land_id = Fields(type='uuid', comment='地块id')
  17. pic = Fields(type='varchar(255)', comment='图像记录')
  18. workdate = Fields(type='int', comment='劳作时间')
  19. state = Fields(type='boolean', default='True', comment='数据存在状态')
  20. cdate = Fields(type='int', default='time', comment='创建时间')