web_article.py 711 B

12345678910111213141516171819
  1. # -*- coding: utf-8 -*-
  2. """
  3. demeter database
  4. name:farm.py
  5. author:rabin
  6. """
  7. from .__load__ import *
  8. class Web_article(Model):
  9. __table__ = 'web_article'
  10. __comment__ = '文章表'
  11. id = Fields(type='int', primaryKey=True, autoIncrement=True, comment='ID')
  12. category_id = Fields(type='int', comment='分类ID', match='not')
  13. name = Fields(type='varchar(255)', comment='文章名')
  14. link = Fields(type='varchar(255)', comment='文章外链')
  15. content = Fields(type='text', comment='文章内容')
  16. pic = Fields(type='varchar(255)', comment='文章配图')
  17. state = Fields(type='boolean', default='True', comment='数据存在状态')
  18. cdate = Fields(type='int', default='time', comment='创建时间')