12345678910111213141516171819 |
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
- """
- demeter database
- name:farm.py
- author:rabin
- """
- from __load__ import *
- class Article(Base):
- __table__ = 'article'
- __comment__ = '文章表'
- id = Fields(type='uuid', primaryKey=True, comment='文章ID', uuid='farm_id')
- farm_id = Fields(type='int', default='setting.farm', comment='园区ID', match='not')
- category_id = Fields(type='uuid', comment='分类ID', match='not')
- name = Fields(type='varchar(255)', comment='文章名')
- content = Fields(type='text', comment='文章内容')
- state = Fields(type='boolean', default='True', comment='数据存在状态')
- cdate = Fields(type='int', default='time', comment='创建时间')
|