123456789101112131415161718192021 |
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
- """
- demeter database
- name:device_gateway.py
- author:rabin
- """
- from __load__ import *
- class Device_gateway(Base):
- __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')
- power_num = Fields(type='smallint', comment='电源数值')
- power_status = Fields(type='boolean', default='False', comment='电源连接状态')
- status = Fields(type='boolean', default='False', comment='网关连接状态')
- state = Fields(type='boolean', default='True', comment='数据存在状态')
- cdate = Fields(type='int', default='time', comment='创建时间')
|