1234567891011121314151617181920 |
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
- """
- demeter database
- name:farm.py
- author:rabin
- """
- from __load__ import *
- class Web_article(Model):
- __table__ = 'web_article'
- __comment__ = '文章表'
- id = Fields(type='int', primaryKey=True, autoIncrement=True, comment='ID')
- category_id = Fields(type='int', comment='分类ID', match='not')
- name = Fields(type='varchar(255)', comment='文章名')
- link = Fields(type='varchar(255)', comment='文章外链')
- content = Fields(type='text', comment='文章内容')
- pic = Fields(type='varchar(255)', comment='文章配图')
- state = Fields(type='boolean', default='True', comment='数据存在状态')
- cdate = Fields(type='int', default='time', comment='创建时间')
|