message.go 407 B

123456789101112131415161718
  1. package models
  2. import "time"
  3. type Message struct {
  4. Origin string `msg:origin` //来源
  5. //报警类型,更具来源判断;数据库中有表
  6. Level uint `msg:level` //等级
  7. Label string `msg:label` //标签
  8. Content string `msg:content` //内容
  9. CreateTime time.Time `msg:create_time` //创建时间
  10. }
  11. const (
  12. Ordinary = iota
  13. Importance
  14. VeryImportant
  15. )