device_camera.py 903 B

123456789101112131415161718192021
  1. # -*- coding: utf-8 -*-
  2. """
  3. demeter database
  4. name:device_camera.py
  5. author:rabin
  6. """
  7. from .__load__ import *
  8. class Device_camera(Model):
  9. __table__ = 'device_camera'
  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. name = Fields(type='varchar(50)', comment='摄像机名')
  14. hardware_id = Fields(type='bigint', comment='硬件id')
  15. gateway_id = Fields(type='uuid', comment='网关id')
  16. type_id = Fields(type='int', comment='摄像机类型')
  17. pic = Fields(type='varchar(255)', comment='摄像机当前照片')
  18. status = Fields(type='boolean', default='False', comment='摄像机连接状态')
  19. state = Fields(type='boolean', default='True', comment='数据存在状态')
  20. cdate = Fields(type='int', default='time', comment='创建时间')