#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
    demeter database
    name:device_type.py
    author:rabin
"""
from .__load__ import *

class Setting_device_type(Model):
	__table__ = 'setting_device_type'
	__comment__ = '设备类型'
	id = Fields(type='int', primaryKey=True, autoIncrement=True, comment='设备类型ID')
	name = Fields(type='varchar(50)', comment='设备类型名')
	key = Fields(type='varchar(50)', comment='设备标识', unique=True)
	unit = Fields(type='varchar(20)', comment='设备单位')
	exp = Fields(type='varchar(300)', comment='表达式')
	data_type = Fields(type='int', comment='数据类型')
	data_option = Fields(type='text', comment='数据类型选项')
	state = Fields(type='boolean', default='True', comment='数据存在状态')
	cdate = Fields(type='int', default='time', comment='创建时间')