2025-12-30 16:14:15 +08:00
|
|
|
|
package entity
|
|
|
|
|
|
|
|
|
|
|
|
import (
|
2025-12-31 11:03:21 +08:00
|
|
|
|
"gitee.com/red-future---jilin-g/common/beans"
|
2025-12-30 16:14:15 +08:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
// OperationLog 操作日志实体 - 用于记录数据增删改操作行为
|
|
|
|
|
|
type OperationLog struct {
|
2025-12-31 11:03:21 +08:00
|
|
|
|
beans.MongoBaseDO `bson:",inline"`
|
2025-12-30 16:14:15 +08:00
|
|
|
|
|
2025-12-30 18:18:56 +08:00
|
|
|
|
ServiceName string `bson:"service_name" json:"service_name"` // 服务名:具体的微服务名称
|
|
|
|
|
|
Collection string `bson:"collection" json:"collection"` // 集合名:数据所在的集合名称
|
|
|
|
|
|
CollectionID string `bson:"collection_id" json:"collection_id"` // 数据ID:具体操作的数据ID,如订单号、钱包ID等
|
|
|
|
|
|
Operation string `bson:"operation" json:"operation"` // 操作类型:create, update, delete
|
|
|
|
|
|
UserName string `bson:"user_name" json:"user_name"` // 操作人名称
|
|
|
|
|
|
IPAddress string `bson:"ip_address" json:"ip_address"` // 操作IP地址
|
|
|
|
|
|
Data map[string]interface{} `bson:"data,omitempty" json:"data"` // 当前数据:操作时的数据状态
|
2025-12-30 16:14:15 +08:00
|
|
|
|
}
|