device_set_loop.py 967 B

1234567891011121314151617181920212223
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. """
  4. demeter database
  5. name:device_set_loop.py
  6. author:rabin
  7. """
  8. from __load__ import *
  9. class Device_set_loop(Model):
  10. __table__ = 'device_set_loop'
  11. __comment__ = '设备周期设置表'
  12. id = Fields(type='uuid', primaryKey=True, comment='设置ID', uuid='farm_id')
  13. farm_id = Fields(type='int', default='setting.farm', comment='园区ID', match='not')
  14. devices = Fields(type='text', comment='设备id')
  15. looptype = Fields(type='smallint', comment='周期类型')
  16. oper = Fields(type='smallint', comment='操作')
  17. loop = Fields(type='varchar(200)', comment='周期')
  18. hour = Fields(type='smallint', comment='小时')
  19. minute = Fields(type='smallint', comment='分钟')
  20. status = Fields(type='boolean', default='True', comment='是否取消')
  21. state = Fields(type='boolean', default='True', comment='数据存在状态')
  22. cdate = Fields(type='int', default='time', comment='创建时间')