rabin 7 years ago
parent
commit
0f34ebf175
2 changed files with 19 additions and 0 deletions
  1. 1 0
      model/device_mul.py
  2. 18 0
      model/device_mul_queue.py

+ 1 - 0
model/device_mul.py

@@ -14,6 +14,7 @@ class Device_mul(Model):
 	farm_id = Fields(type='int', default='setting.farm', comment='园区ID', match='not')
 	name = Fields(type='varchar(50)', comment='分组名')
 	devices = Fields(type='text', comment='设备id,逗号隔开')
+	oper = Fields(type='varchar(500)', comment='操作状态')
 	value = Fields(type='varchar(10)', comment='开关状态')
 	state = Fields(type='boolean', default='True', comment='数据存在状态')
 	cdate = Fields(type='int', default='time', comment='创建时间')

+ 18 - 0
model/device_mul_queue.py

@@ -0,0 +1,18 @@
+#!/usr/bin/env python
+# -*- 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')
+	state = Fields(type='boolean', default='True', comment='数据存在状态')
+	cdate = Fields(type='int', default='time', comment='创建时间')