| 1234567891011121314151617181920 | #!/usr/bin/env python# -*- coding: utf-8 -*-"""    demeter database    name:hardware.py    author:rabin"""from __load__ import *class Hardware(Model):	__table__ = 'hardware'	__comment__ = '硬件设备表'	id = Fields(type='uuid', primaryKey=True, comment='硬件设备表ID', uuid='farm_id')	farm_id = Fields(type='int', default='setting.farm', comment='园区ID', match='not')	hardware_id = Fields(type='bigint', comment='硬件id', unique=True)	hardware_type = Fields(type='int', comment='硬件类型')	device_id = Fields(type='uuid', comment='设备id')	gateway_id = Fields(type='uuid', comment='网关id')	state = Fields(type='boolean', default='True', comment='数据存在状态')	cdate = Fields(type='int', default='time', comment='创建时间')
 |