feat: 添加租户ID字段并重构文件上传逻辑

This commit is contained in:
2026-03-24 16:17:22 +08:00
parent bb88eb1e47
commit 3cf301275f
5 changed files with 67 additions and 43 deletions

View File

@@ -41,6 +41,7 @@ type MongoBaseDO struct {
// SQLBaseDO SQL数据库基础实体
type SQLBaseDO struct {
Id int64 `orm:"id" json:"id"` // 主键ID
TenantId uint64 `orm:"tenant_id" json:"tenantId"` // 租户ID
Creator string `orm:"creator" json:"creator"` // 创建人
CreatedAt *gtime.Time `orm:"created_at" json:"createdAt"` // 创建时间
Updater string `orm:"updater" json:"updater"` // 更新人
@@ -51,6 +52,7 @@ type SQLBaseDO struct {
type SQLBaseCol struct {
Id string
TenantId string
Creator string
CreatedAt string
Updater string
@@ -61,6 +63,7 @@ type SQLBaseCol struct {
var DefSQLBaseCol = SQLBaseCol{
Id: "id",
TenantId: "tenant_id",
Creator: "creator",
CreatedAt: "created_at",
Updater: "updater",