From cfb7c6b011e72b143277b964a1cb21d040aec6fe Mon Sep 17 00:00:00 2001 From: Cold <16419454+cold502@user.noreply.gitee.com> Date: Sun, 4 Jan 2026 09:20:53 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=9F=E4=B8=80MongoDB=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E5=91=BD=E5=90=8D=E4=B8=BAsnake=5Fcase?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- beans/beans.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/beans/beans.go b/beans/beans.go index 53edaa7..07d8340 100644 --- a/beans/beans.go +++ b/beans/beans.go @@ -18,14 +18,14 @@ type Page struct { type MongoBaseDO struct { Id bson.ObjectID `bson:"_id,omitempty" json:"id"` // MongoDB 默认 ID Creator interface{} `bson:"creator,omitempty" json:"creator"` - CreatedAt time.Time `bson:"createdAt,omitempty" json:"createdAt"` + CreatedAt time.Time `bson:"created_at,omitempty" json:"createdAt"` Updater interface{} `bson:"updater,omitempty" json:"updater"` - UpdatedAt time.Time `bson:"updatedAt,omitempty" json:"updatedAt"` - TenantId interface{} `bson:"tenantId" json:"tenantId" default:"1"` // 租户ID - IsDeleted bool `bson:"isDeleted" json:"isDeleted" default:"false"` + UpdatedAt time.Time `bson:"updated_at,omitempty" json:"updatedAt"` + TenantId interface{} `bson:"tenant_id" json:"tenantId" default:"1"` // 租户ID + IsDeleted bool `bson:"is_deleted" json:"isDeleted" default:"false"` } type User struct { - UserName interface{} `bson:"userName" json:"userName"` // MongoDB 默认 ID - TenantId interface{} `bson:"tenantId" json:"tenantId"` // 租户ID + UserName interface{} `bson:"user_name" json:"userName"` // MongoDB 默认 ID + TenantId interface{} `bson:"tenant_id" json:"tenantId"` // 租户ID }