Files
common/log/model/entity/log.go

18 lines
890 B
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package entity
import (
"gitee.com/red-future---jilin-g/common/beans"
)
// OperationLog 操作日志实体 - 用于记录数据增删改操作行为
type OperationLog struct {
beans.MongoBaseDO `bson:",inline"`
ServiceName string `bson:"service_name" json:"service_name"` // 服务名:具体的微服务名称
Collection string `bson:"collection" json:"collection"` // 集合名:数据所在的集合名称
CollectionID interface{} `bson:"collection_id" json:"collection_id"` // 数据ID具体操作的数据ID如订单号、钱包ID等
Operation string `bson:"operation" json:"operation"` // 操作类型create, update, delete
IPAddress string `bson:"ip_address" json:"ip_address"` // 操作IP地址
Data interface{} `bson:"data,omitempty" json:"data"` // 当前数据:操作时的数据状态
}