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 }