#!/usr/bin/env python # -*- coding: utf-8 -*- """ demeter database name:device_pic.py author:rabin """ from __load__ import * class Device_pic(Model): __table__ = 'device_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') device_id = Fields(type='uuid', comment='设备id') pic = Fields(type='text', comment='图像记录') spic = Fields(type='text', comment='原图地址') sdate = Fields(type='int', comment='原图创建时间') state = Fields(type='boolean', default='True', comment='数据存在状态') cdate = Fields(type='int', default='time', comment='创建时间')