package model import "time" import "gorm.io/datatypes" type Log struct { Id int `gorm:"primary"` TraceId string Uid int64 RequestIp string Api string UserAgent string StatusCode int Message string ExtraData datatypes.JSON `gorm:"type:json"` CreatedAt time.Time UpdatedAt time.Time } func (m *Log) TableName() string { return "log" }