content.py 774 B

123456789101112131415161718192021
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. """
  4. demeter database
  5. name:content.py
  6. author:rabin
  7. """
  8. from __load__ import *
  9. class Content(Base):
  10. __table__ = 'content'
  11. __comment__ = '首页资料表'
  12. id = Fields(type='int', primaryKey=True, autoIncrement=True, comment='内容ID')
  13. name = Fields(type='varchar(255)', comment='标题')
  14. subname = Fields(type='varchar(255)', comment='首页小标题')
  15. product = Fields(type='text', comment='内容描述')
  16. weixin = Fields(type='text', comment='内容描述')
  17. demo = Fields(type='text', comment='内容描述')
  18. pic = Fields(type='varchar(255)', comment='图片')
  19. state = Fields(type='boolean', default='True', comment='数据存在状态')
  20. cdate = Fields(type='int', default='time', comment='创建时间')