12345678910111213141516171819202122 |
- # -*- coding: utf-8 -*-
- """
- demeter database
- name:device_set_condition.py
- author:rabin
- """
- from .__load__ import *
- class Device_set_condition(Model):
- __table__ = 'device_set_condition'
- __comment__ = '设备条件设置表'
- id = Fields(type='uuid', primaryKey=True, comment='设置ID', uuid='farm_id')
- farm_id = Fields(type='int', default='setting.farm', comment='园区ID', match='not')
- devices = Fields(type='text', comment='设备id')
- device_id = Fields(type='uuid', comment='设备条件里的设备id')
- oper = Fields(type='smallint', comment='操作')
- condition = Fields(type='smallint', comment='条件')
- value = Fields(type='varchar(100)', comment='条件的值')
- notice = Fields(type='boolean', default='False', comment='是否报警')
- status = Fields(type='boolean', default='True', comment='是否取消')
- state = Fields(type='boolean', default='True', comment='数据存在状态')
- cdate = Fields(type='int', default='time', comment='创建时间')
|