12345678910111213141516171819 |
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
- """
- demeter database
- name:device_type.py
- author:rabin
- """
- from __load__ import *
- class Device_type(Model):
- __table__ = '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='表达式')
- state = Fields(type='boolean', default='True', comment='数据存在状态')
- cdate = Fields(type='int', default='time', comment='创建时间')
|