audit.go 843 B

123456789101112131415161718192021222324252627
  1. package model
  2. const (
  3. AuditActionNew = "new"
  4. AuditActionClose = "close"
  5. )
  6. type AuditConn struct {
  7. IdModel
  8. Action string `json:"action" gorm:"default:'';not null;"`
  9. ConnId int64 `json:"conn_id" gorm:"default:0;not null;index"`
  10. PeerId string `json:"peer_id" gorm:"default:'';not null;index"`
  11. FromPeer string `json:"from_peer" gorm:"default:'';not null;"`
  12. FromName string `json:"from_name" gorm:"default:'';not null;"`
  13. Ip string `json:"ip" gorm:"default:'';not null;"`
  14. SessionId string `json:"session_id" gorm:"default:'';not null;"`
  15. Type int `json:"type" gorm:"default:0;not null;"`
  16. Uuid string `json:"uuid" gorm:"default:'';not null;"`
  17. CloseTime int64 `json:"close_time" gorm:"default:0;not null;"`
  18. TimeModel
  19. }
  20. type AuditConnList struct {
  21. AuditConns []*AuditConn `json:"list"`
  22. Pagination
  23. }