device_mul_queue.py 1.3 KB

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