farm.py 1.0 KB

123456789101112131415161718192021222324
  1. # -*- coding: utf-8 -*-
  2. """
  3. demeter database
  4. name:farm.py
  5. author:rabin
  6. """
  7. from .__load__ import *
  8. class Farm(Model):
  9. __table__ = 'farm'
  10. __comment__ = '园区主表'
  11. id = Fields(type='int', primaryKey=True, autoIncrement=True, comment='园区ID')
  12. name = Fields(type='varchar(200)', comment='园区名')
  13. info = Fields(type='text', comment='园区介绍')
  14. pic = Fields(type='varchar(255)', comment='园区图片')
  15. location = Fields(type='varchar(200)', comment='园区位置')
  16. tel = Fields(type='varchar(50)', comment='联系电话')
  17. address = Fields(type='varchar(200)', comment='联系地址')
  18. welcome = 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='用于大屏幕的设备设置')
  22. state = Fields(type='boolean', default='True', comment='数据存在状态')
  23. cdate = Fields(type='int', default='time', comment='创建时间')