123456789101112131415161718192021222324252627 |
- # -*- coding: utf-8 -*-
- """
- demeter database
- name:device_mul_queue.py
- author:rabin
- """
- from .__load__ import *
- class Device_mul_queue(Model):
- __table__ = 'device_mul_queue'
- __comment__ = '设备批量控制队列表'
- id = Fields(type='uuid', primaryKey=True, comment='ID', uuid='farm_id')
- farm_id = Fields(type='int', default='setting.farm', comment='园区ID', match='not')
- mul_id = Fields(type='uuid', comment='批量控制id')
- device_id = Fields(type='uuid', comment='设备id')
- value = Fields(type='int', comment='当前的值')
- status = Fields(type='int', default='1', comment='数据执行状态,1为队列中,2为执行成功,3执行失败')
- operstate = Fields(type='boolean', default='False', comment='数据执行状态,True为已执行,False为未执行')
- operdate = Fields(type='int', comment='操作时间')
- oper = Fields(type='varchar(500)', comment='操作说明')
- state = Fields(type='boolean', default='True', comment='数据存在状态')
- cdate = Fields(type='int', default='time', comment='创建时间')
- inorder = Fields(type='int', default='0', comment='设备的排序')
- udate = Fields(type='int', comment='接入时间,仅做排序用')
- hardware_id = Fields(type='bigint', comment='硬件id仅做排序用')
- #ALTER TABLE device_mul_queue ADD inorder int default 100;
|