#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
    demeter database
    name:device_page.py
    author:rabin
"""
from __load__ import *
class Device_page(Model):
	__table__ = 'device_page'
	__comment__ = '设备页面管理'
	id = Fields(type='uuid', primaryKey=True, comment='页面ID', uuid='farm_id')
	farm_id = Fields(type='int', default='setting.farm', comment='园区ID', match='not')
	#name = Fields(type='varchar(50)', comment='页面名', match='not', manage='list,update', index='using gin(name gin_trgm_ops)', indexs='yes')
	name = Fields(type='varchar(50)', comment='页面名', match='not', manage='list,update')
	ico = Fields(type='varchar(50)', comment='图标')
	inorder = Fields(type='int', default='0', comment='排序', match='number|排序必须是数字')
	stat = Fields(type='boolean', default='False', comment='是否显示趋势图')
	state = Fields(type='boolean', default='True', comment='数据存在状态')
	cdate = Fields(type='int', default='time', comment='创建时间', manage='list')