123456789101112131415161718192021222324 |
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
- """
- demeter database
- name:farm.py
- author:rabin
- """
- from __load__ import *
- class Farm(Model):
- __table__ = 'farm'
- __comment__ = '园区主表'
- id = Fields(type='int', primaryKey=True, autoIncrement=True, comment='园区ID')
- name = Fields(type='varchar(200)', comment='园区名')
- info = Fields(type='text', comment='园区介绍')
- pic = Fields(type='text', comment='园区图片')
- location = Fields(type='varchar(200)', comment='园区位置')
- tel = Fields(type='varchar(50)', comment='联系电话')
- address = Fields(type='varchar(200)', comment='联系地址')
- master_name = Fields(type='varchar(50)', comment='农场主姓名')
- master_pic = Fields(type='varchar(255)', comment='农场主照片')
- gateway = Fields(type='text', comment='网关ID')
- state = Fields(type='boolean', default='True', comment='数据存在状态')
- cdate = Fields(type='int', default='time', comment='创建时间')
|