log.go 385 B

1234567891011121314151617181920212223
  1. package model
  2. import "time"
  3. import "gorm.io/datatypes"
  4. type Log struct {
  5. Id int `gorm:"primary"`
  6. TraceId string
  7. Uid int64
  8. RequestIp string
  9. Api string
  10. UserAgent string
  11. StatusCode int
  12. Message string
  13. ExtraData datatypes.JSON `gorm:"type:json"`
  14. CreatedAt time.Time
  15. UpdatedAt time.Time
  16. }
  17. func (m *Log) TableName() string {
  18. return "log"
  19. }