audit/db_model.go

25 lines
648 B
Go
Raw Permalink Normal View History

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"`
}
// Author ...
type Author struct {
ID string `bson:"id" json:"id"`
Name string `bson:"name" json:"name"`
}