farm.py 808 B

123456789101112131415161718192021
  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(Base):
  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='varchar(500)', comment='园区介绍')
  15. pic = Fields(type='varchar(255)', comment='园区图片')
  16. tel = Fields(type='varchar(50)', comment='联系电话')
  17. address = Fields(type='varchar(200)', comment='农场地址')
  18. master_name = Fields(type='varchar(50)', comment='联系人')
  19. state = Fields(type='boolean', default='True', comment='数据存在状态')
  20. cdate = Fields(type='int', default='time', comment='创建时间')