# -*- 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='varchar(255)', comment='园区图片') location = Fields(type='varchar(200)', comment='园区位置') tel = Fields(type='varchar(50)', comment='联系电话') address = Fields(type='varchar(200)', comment='联系地址') welcome = Fields(type='varchar(200)', comment='欢迎语') master_name = Fields(type='varchar(50)', comment='农场主姓名') master_pic = Fields(type='varchar(255)', comment='农场主照片') gateway = Fields(type='text', comment='用于大屏幕的设备设置') state = Fields(type='boolean', default='True', comment='数据存在状态') cdate = Fields(type='int', default='time', comment='创建时间') eros_status = Fields(type='int', default='2', comment='本地控制器是否开启') eros_server = Fields(type='varchar(600)', comment='本地服务地址') #ALTER TABLE demeter_farm ADD eros_status boolean; #ALTER TABLE demeter_farm ADD eros_server varchar(600);