refactor: 将数据库从MongoDB迁移至PostgreSQL
This commit is contained in:
@@ -11,6 +11,12 @@ type UploadFileReq struct {
|
||||
File *ghttp.UploadFile `json:"file" type:"file"` // 文件URL
|
||||
}
|
||||
|
||||
type UploadFile struct {
|
||||
TenantId uint64 `json:"tenantId"`
|
||||
FileURL string `json:"fileURL"`
|
||||
FileSize int `json:"fileSize"`
|
||||
}
|
||||
|
||||
// UploadFileRes 上传文件响应
|
||||
type UploadFileRes struct {
|
||||
FileURL string `json:"fileURL" dc:"上传地址"`
|
||||
@@ -18,8 +24,8 @@ type UploadFileRes struct {
|
||||
}
|
||||
|
||||
type TenantOssTotal struct {
|
||||
TenantId interface{} `json:"tenantId"`
|
||||
UsedOssSize int `json:"usedOssSize"`
|
||||
TotalOssSize int `json:"totalOssSize"`
|
||||
Updater interface{} `json:"updater"`
|
||||
TenantId uint64 `json:"tenantId"`
|
||||
UsedOssSize int `json:"usedOssSize"`
|
||||
TotalOssSize int `json:"totalOssSize"`
|
||||
Updater string `json:"updater"`
|
||||
}
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
package dto
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"oss/model/entity"
|
||||
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// GetByTenantIdReq 根据租户id获取存储总量请求
|
||||
@@ -20,10 +21,10 @@ type GetByTenantIdRes struct {
|
||||
type UpdateUsedOssReq struct {
|
||||
g.Meta `path:"/GetOneByTenantId" method:"get" tags:"租户存储总量管理" summary:"更新使用存储总量" dc:"更新使用存储总量"`
|
||||
|
||||
TenantId interface{} `json:"tenantId" v:"required#租户id不能为空"`
|
||||
UsedOssSize int `bson:"usedOssSize" json:"usedOssSize"`
|
||||
TotalOssSize int `bson:"totalOssSize" json:"totalOssSize"`
|
||||
Updater interface{} `json:"updater" v:"required#更新人不能为空"`
|
||||
TenantId uint64 `json:"tenantId" v:"required#租户id不能为空"`
|
||||
UsedOssSize int `json:"usedOssSize"`
|
||||
TotalOssSize int `json:"totalOssSize"`
|
||||
Updater string `json:"updater" v:"required#更新人不能为空"`
|
||||
}
|
||||
|
||||
// UpdateUsedOssRes 更新使用存储总量响应
|
||||
|
||||
Reference in New Issue
Block a user