2025-12-26 13:59:02 +08:00
|
|
|
|
package entity
|
|
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
|
"oss/consts"
|
2025-12-31 11:19:30 +08:00
|
|
|
|
|
2026-02-24 16:49:31 +08:00
|
|
|
|
"gitea.com/red-future/common/beans"
|
2025-12-26 13:59:02 +08:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
// File 存储文件实体
|
|
|
|
|
|
type File struct {
|
2025-12-31 11:19:30 +08:00
|
|
|
|
beans.MongoBaseDO `bson:",inline"` // 嵌入基础字段:Id, Creator, CreatedAt, Updater, UpdatedAt, TenantId, IsDeleted
|
2025-12-26 13:59:02 +08:00
|
|
|
|
// 基础信息
|
2025-12-30 18:45:37 +08:00
|
|
|
|
FileURL string `bson:"fileURL" json:"fileURL"` // 图URL
|
|
|
|
|
|
FileSize int `bson:"fileSize" json:"fileSize"`
|
2025-12-26 13:59:02 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// CollectionName 存储集合名称
|
|
|
|
|
|
func (File) CollectionName() string {
|
|
|
|
|
|
return consts.FileCollection
|
|
|
|
|
|
}
|