log.py 600 B

123456789101112131415161718
  1. # -*- coding: utf-8 -*-
  2. """
  3. demeter database
  4. name:log.py
  5. author:rabin
  6. """
  7. from .__load__ import *
  8. class Log(Model):
  9. __table__ = 'log'
  10. __comment__ = '网关日志表'
  11. id = Fields(type='uuid', primaryKey=True, comment='日志ID', uuid='farm_id')
  12. farm_id = Fields(type='int', default='setting.farm', comment='园区ID')
  13. gateway_id = Fields(type='uuid', comment='网关ID')
  14. content = Fields(type='text', comment='内容')
  15. state = Fields(type='boolean', default='True', comment='数据存在状态')
  16. cdate = Fields(type='int', default='time', comment='创建时间')