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