farm.py 1.1 KB

12345678910111213141516171819202122232425
  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='varchar(255)', comment='园区图片')
  16. location = Fields(type='varchar(200)', comment='园区位置')
  17. tel = Fields(type='varchar(50)', comment='联系电话')
  18. address = Fields(type='varchar(200)', comment='联系地址')
  19. welcome = Fields(type='varchar(200)', comment='欢迎语')
  20. master_name = Fields(type='varchar(50)', comment='农场主姓名')
  21. master_pic = Fields(type='varchar(255)', comment='农场主照片')
  22. gateway = Fields(type='text', comment='用于大屏幕的设备设置')
  23. state = Fields(type='boolean', default='True', comment='数据存在状态')
  24. cdate = Fields(type='int', default='time', comment='创建时间')