#!/usr/bin/env python # -*- coding: utf-8 -*- """ demeter database name:device_camera_pic.py author:rabin """ from __load__ import * class Device_camera_pic(Model): __table__ = 'device_camera_pic' __comment__ = '摄像机图片记录表' id = Fields(type='uuid', primaryKey=True, comment='图片ID', uuid='farm_id') farm_id = Fields(type='int', default='setting.farm', comment='园区ID', match='not') gateway_id = Fields(type='uuid', comment='网关id') camera_id = Fields(type='uuid', comment='摄像机id') pic = Fields(type='text', comment='图像记录') state = Fields(type='boolean', default='True', comment='数据存在状态') cdate = Fields(type='int', default='time', comment='创建时间')