增加Mongo基础字段结构体

This commit is contained in:
2025-11-28 15:19:02 +08:00
parent 7e2884414d
commit 302336a769

14
do/base_do.go Normal file
View File

@@ -0,0 +1,14 @@
package do
import (
"go.mongodb.org/mongo-driver/v2/bson"
"time"
)
type MongoBaseDO struct {
Creator bson.ObjectID `bson:"creator" json:"creator"`
CreatedAt time.Time `bson:"createdAt" json:"createdAt"`
Updater bson.ObjectID `bson:"updater" json:"updater"`
UpdatedAt time.Time `bson:"updatedAt" json:"updatedAt"`
TenantId bson.ObjectID `bson:"tenantId" json:"tenantId"`
}