2021-08-09 04:33:23 +00:00
|
|
|
package audit
|
|
|
|
|
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
|
|
|
|
"go.mongodb.org/mongo-driver/bson/primitive"
|
|
|
|
)
|
|
|
|
|
|
|
|
// Audit ...
|
|
|
|
type Audit struct {
|
|
|
|
ID primitive.ObjectID `bson:"_id" json:"id"`
|
|
|
|
Target string `bson:"target" json:"target"`
|
|
|
|
TargetID string `bson:"targetId" json:"targetId"`
|
|
|
|
Action string `bson:"action" json:"action"`
|
|
|
|
Data string `bson:"data" json:"data"`
|
|
|
|
Author Author `bson:"author" json:"author"`
|
|
|
|
CreatedAt time.Time `bson:"createdAt" json:"createdAt"`
|
2022-06-29 04:34:17 +00:00
|
|
|
Message string `bson:"message" json:"message"`
|
2021-08-09 04:33:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Author ...
|
|
|
|
type Author struct {
|
|
|
|
ID string `bson:"id" json:"id"`
|
|
|
|
Name string `bson:"name" json:"name"`
|
2022-06-29 09:57:33 +00:00
|
|
|
Type string `bson:"type" json:"type"`
|
2021-08-09 04:33:23 +00:00
|
|
|
}
|