| 123456789101112131415161718192021 | #!/usr/bin/env python# -*- coding: utf-8 -*-"""    demeter database    name:device_gateway.py    author:rabin"""from __load__ import *class Device_gateway(Model):	__table__ = 'device_gateway'	__comment__ = '设备网关管理'	id = Fields(type='uuid', primaryKey=True, comment='网关ID', uuid='farm_id')	farm_id = Fields(type='int', default='setting.farm', comment='园区ID', match='not')	name = Fields(type='varchar(50)', comment='网关名')	hardware_id = Fields(type='bigint', comment='硬件id', match='number|硬件id必须是数字')	pic = Fields(type='varchar(255)', comment='设备分布图纸')	camera = Fields(type='varchar(500)', comment='摄像头实时流地址')	stat = Fields(type='boolean', default='False', comment='是否显示趋势图')	state = Fields(type='boolean', default='True', comment='数据存在状态')	cdate = Fields(type='int', default='time', comment='创建时间')
 |