farm.py 986 B

123456789101112131415161718192021222324
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. """
  4. demeter database
  5. name:farm.py
  6. author:rabin
  7. """
  8. from __load__ import *
  9. class Farm(Model):
  10. __table__ = 'farm'
  11. __comment__ = '园区主表'
  12. id = Fields(type='int', primaryKey=True, autoIncrement=True, comment='园区ID')
  13. name = Fields(type='varchar(200)', comment='园区名')
  14. info = Fields(type='text', comment='园区介绍')
  15. pic = Fields(type='text', comment='园区图片')
  16. location = Fields(type='varchar(200)', comment='园区位置')
  17. tel = Fields(type='varchar(50)', comment='联系电话')
  18. address = Fields(type='varchar(200)', comment='联系地址')
  19. master_name = Fields(type='varchar(50)', comment='农场主姓名')
  20. master_pic = Fields(type='varchar(255)', comment='农场主照片')
  21. gateway = Fields(type='text', comment='网关ID')
  22. state = Fields(type='boolean', default='True', comment='数据存在状态')
  23. cdate = Fields(type='int', default='time', comment='创建时间')