feat: 添加oss api
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package system
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type Oss struct {
|
||||
//global.BaseModel
|
||||
Id string `gorm:"size:50;primaryKey" json:"id"` // 主键ID
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
DeletedAt gorm.DeletedAt `gorm:"index" json:"-"` // 删除时间
|
||||
Name string `json:"name" form:"name" gorm:"column:name;comment:文件名"`
|
||||
Url string `json:"url" form:"url" gorm:"column:url;comment:文件地址"`
|
||||
Tag string `json:"tag" form:"tag" gorm:"column:tag;comment:文件标签"`
|
||||
Key string `json:"key" form:"key" gorm:"column:key;comment:文件key"`
|
||||
Suffix string `json:"suffix" form:"suffix" gorm:"column:suffix;comment:文件后缀"`
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package request
|
||||
|
||||
import common "sundynix-go/model/commom/request"
|
||||
|
||||
type GetOssFileList struct {
|
||||
common.PageInfo
|
||||
Name string `json:"name" form:"name"`
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package response
|
||||
|
||||
import "sundynix-go/model/system"
|
||||
|
||||
type UploadFileResponse struct {
|
||||
File system.Oss `json:"file"`
|
||||
}
|
||||
Reference in New Issue
Block a user