2026-03-18 21:51:17 +08:00
|
|
|
package models
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"time"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// OperationLog 操作日志模型
|
|
|
|
|
type OperationLog struct {
|
2026-03-19 05:11:44 +08:00
|
|
|
ID uint `gorm:"primarykey" json:"id"`
|
2026-03-18 21:51:17 +08:00
|
|
|
|
|
|
|
|
// 操作信息
|
2026-03-19 05:11:44 +08:00
|
|
|
OperationType string `gorm:"type:varchar(50);index;comment:操作方式" json:"operation_type"`
|
2026-03-18 21:51:17 +08:00
|
|
|
|
|
|
|
|
// 操作人信息
|
|
|
|
|
Operator string `gorm:"type:varchar(100);index;comment:操作账号" json:"operator"`
|
|
|
|
|
OperatorUUID string `gorm:"type:varchar(36);index;comment:操作账号UUID" json:"operator_uuid"`
|
|
|
|
|
|
2026-03-19 05:11:44 +08:00
|
|
|
Details string `gorm:"type:text;comment:操作详情" json:"details"`
|
|
|
|
|
|
|
|
|
|
CreatedAt time.Time `gorm:"index;comment:创建时间" json:"created_at"`
|
|
|
|
|
}
|