farm_product.py 986 B

1234567891011121314151617181920212223
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. """
  4. demeter database
  5. name:farm_product.py
  6. author:rabin
  7. """
  8. from __load__ import *
  9. class Farm_product(Model):
  10. __table__ = 'farm_product'
  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(50)', comment='产品名')
  15. area = Fields(type='varchar(30)', comment='种植面积')
  16. yields = Fields(type='varchar(30)', comment='平均亩产')
  17. charact = Fields(type='varchar(200)', comment='特点')
  18. notice = Fields(type='varchar(200)', comment='使用须知')
  19. pic = Fields(type='varchar(255)', comment='图片')
  20. status = Fields(type='boolean', default='True', comment='正常、隐藏')
  21. state = Fields(type='boolean', default='True', comment='数据存在状态')
  22. cdate = Fields(type='int', default='time', comment='创建时间')