setting_server.py 816 B

12345678910111213141516171819
  1. # -*- coding: utf-8 -*-
  2. """
  3. demeter database
  4. name:hardware.py
  5. author:rabin
  6. """
  7. from .__load__ import *
  8. class Setting_server(Model):
  9. __table__ = 'setting_server'
  10. __comment__ = '服务配置表'
  11. id = Fields(type='int', primaryKey=True, autoIncrement=True, comment='服务id')
  12. name = Fields(type='varchar(50)', comment='服务名称')
  13. server_type = Fields(type='int', comment='服务协议类型1mqtt2modbus_tcp3modbus_rtu')
  14. server_host = Fields(type='varchar(50)', comment='服务地址')
  15. server_port = Fields(type='varchar(50)', comment='服务端口')
  16. server_time = Fields(type='varchar(50)', comment='每次请求时间间隔,直接填写秒数')
  17. state = Fields(type='boolean', default='True', comment='数据存在状态')
  18. cdate = Fields(type='int', default='time', comment='创建时间')