You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
879 B
20 lines
879 B
package model
|
|
|
|
import "time"
|
|
|
|
// OperationLog 操作日志(审计)
|
|
type OperationLog struct {
|
|
ID int64 `gorm:"primaryKey;column:id;type:BIGINT;not null" json:"id"`
|
|
UserID int64 `gorm:"column:user_id;type:BIGINT;not null;index:idx_op_user" json:"userId"`
|
|
UserName string `gorm:"column:user_name;type:VARCHAR(32)" json:"userName"`
|
|
Module string `gorm:"column:module;type:VARCHAR(32)" json:"module"`
|
|
Action string `gorm:"column:action;type:VARCHAR(64)" json:"action"`
|
|
Detail string `gorm:"column:detail;type:VARCHAR(256)" json:"detail"`
|
|
Result string `gorm:"column:result;type:VARCHAR(16)" json:"result"`
|
|
IP string `gorm:"column:ip;type:VARCHAR(64)" json:"ip"`
|
|
CreatedAt time.Time `gorm:"column:created_at;index:idx_op_user" json:"createdAt"`
|
|
}
|
|
|
|
func (OperationLog) TableName() string {
|
|
return "operation_log"
|
|
}
|
|
|