device_type.py 683 B

123456789101112131415161718
  1. # -*- coding: utf-8 -*-
  2. """
  3. demeter database
  4. name:device_type.py
  5. author:rabin
  6. """
  7. from .__load__ import *
  8. class Device_type(Model):
  9. __table__ = 'device_type'
  10. __comment__ = '设备类型'
  11. id = Fields(type='int', primaryKey=True, autoIncrement=True, comment='设备类型ID')
  12. name = Fields(type='varchar(50)', comment='设备类型名')
  13. key = Fields(type='varchar(50)', comment='设备标识', unique=True)
  14. unit = Fields(type='varchar(20)', comment='设备单位')
  15. exp = Fields(type='varchar(300)', comment='表达式')
  16. state = Fields(type='boolean', default='True', comment='数据存在状态')
  17. cdate = Fields(type='int', default='time', comment='创建时间')