saw-go/proto/file_req.go

35 lines
1.2 KiB
Go
Raw Normal View History

package proto
2025-03-29 13:38:30 +08:00
import (
"time"
)
type FileUploadReq struct {
UploadType string `json:"upload_type" form:"upload_type" binding:"required"`
AuthType string `json:"auth_type" form:"auth_type"`
Md5 string `json:"md5" form:"md5"` //文件md5值
Type string `json:"type" form:"type"` //类型im,avatar,file,config,config为系统文件
}
type ConfigFileReq struct {
ID int `json:"id" form:"id"`
Type string `json:"type" form:"type"` //查询类型one,all
DelFile bool `json:"del_file"` //删除文件
FileName string `json:"file_name" form:"file_name"`
FilePath string `json:"file_path" form:"file_path"`
Content string `json:"content" form:"content"`
}
type AddConfigFileReq struct {
FileName string `json:"file_name" form:"file_name" required:"true"`
FilePath string `json:"file_path" form:"file_path" required:"true"`
}
type SearchOneConfigFileResp struct {
ID uint `json:"id" form:"id"`
CreatedAt time.Time `json:"created_at" form:"created_at"`
UpdatedAt time.Time `json:"updated_at" form:"updated_at"`
FileName string `json:"file_name" form:"file_name"`
FilePath string `json:"file_path" form:"file_path"`
Content string `json:"content" form:"content"`
}