From 79e777ae7592a1ba4aa8119688a89a9754ec99dd Mon Sep 17 00:00:00 2001 From: Matrix-X Date: Tue, 3 Dec 2024 12:06:47 +0800 Subject: [PATCH] refact(model): media resource and user fields for brainx --- internal/model/media/mediaresource.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/model/media/mediaresource.go b/internal/model/media/mediaresource.go index 93e05f82..5ff59b62 100644 --- a/internal/model/media/mediaresource.go +++ b/internal/model/media/mediaresource.go @@ -10,8 +10,8 @@ import ( type MediaResource struct { powermodel.PowerUUIDModel - TenantUUID uuid.UUID `gorm:"type:uuid;foreignKey:TenantUUID;references:UUID"` - CreatedUserBy uuid.UUID `gorm:"type:uuid;foreignKey:CreatedUserBy;references:UUID;"` + TenantUUID uuid.UUID `gorm:"type:uuid;foreignKey:TenantUUID;references:UUID" json:"tenantUUID"` + CreatedUserBy uuid.UUID `gorm:"type:uuid;foreignKey:CreatedUserBy;references:UUID;" json:"createdUserBy"` CustomerId int64 `gorm:"comment:客户Id; index" json:"customerId"` Filename string `gorm:"comment:名称" json:"filename"` Size int64 `gorm:"comment:尺寸" json:"size"` @@ -22,6 +22,7 @@ type MediaResource struct { IsLocalStored bool `gorm:"comment:是否本地存储" json:"isLocalStored"` ContentType string `gorm:"comment:内容类型" json:"contentType"` ResourceType string `gorm:"comment:媒体类型" json:"mediaType"` + SortIndex int `gorm:"comment:排序索引" json:"sortIndex"` } type MediaSet struct {