mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-10-13 13:33:44 +08:00
发布v2.8.4版本,更新内容请查看:https://github.com/bufanyun/hotgo/tree/v2.0/docs/guide-zh-CN/addon-version-upgrade.md
This commit is contained in:
@@ -6,35 +6,74 @@
|
||||
package sysin
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
"hotgo/internal/library/storager"
|
||||
"hotgo/internal/model/entity"
|
||||
"hotgo/internal/model/input/form"
|
||||
"hotgo/utility/validate"
|
||||
)
|
||||
|
||||
// AttachmentDeleteInp 删除附件
|
||||
type AttachmentDeleteInp struct {
|
||||
Id interface{}
|
||||
Id interface{} `json:"id" v:"required#附件ID不能为空" dc:"附件ID"`
|
||||
}
|
||||
|
||||
type AttachmentDeleteModel struct{}
|
||||
|
||||
// AttachmentViewInp 获取附件信息
|
||||
type AttachmentViewInp struct {
|
||||
Id int64
|
||||
Id int64 `json:"id" v:"required#附件ID不能为空" dc:"附件ID"`
|
||||
}
|
||||
|
||||
type AttachmentViewModel struct {
|
||||
entity.SysAttachment
|
||||
}
|
||||
|
||||
// AttachmentClearKindInp 清空上传类型
|
||||
type AttachmentClearKindInp struct {
|
||||
Kind string `json:"kind" v:"required#上传类型不能为空" dc:"上传类型"`
|
||||
}
|
||||
|
||||
func (in *AttachmentClearKindInp) Filter(ctx context.Context) (err error) {
|
||||
if !validate.InSlice(storager.KindSlice, in.Kind) {
|
||||
err = gerror.New("上传类型是无效的")
|
||||
return
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// AttachmentListInp 获取附件列表
|
||||
type AttachmentListInp struct {
|
||||
form.PageReq
|
||||
form.RangeDateReq
|
||||
form.StatusReq
|
||||
MemberId int64
|
||||
Drive string
|
||||
MemberId int64 `json:"member_id" dc:"用户ID"`
|
||||
Name string `json:"name" dc:"文件名称"`
|
||||
Drive string `json:"drive" dc:"驱动"`
|
||||
Kind string `json:"kind" dc:"上传类型"`
|
||||
UpdatedAt []*gtime.Time `json:"updatedAt" dc:"更新时间"`
|
||||
}
|
||||
|
||||
type AttachmentListModel struct {
|
||||
entity.SysAttachment
|
||||
SizeFormat string `json:"sizeFormat" description:"长度"`
|
||||
SizeFormat string `json:"sizeFormat" dc:"大小"`
|
||||
}
|
||||
|
||||
// AttachmentChooserListInp 获取附件列表
|
||||
type AttachmentChooserListInp struct {
|
||||
form.PageReq
|
||||
Drive string `json:"drive" dc:"驱动"`
|
||||
Kind string `json:"kind" dc:"上传类型"`
|
||||
UpdatedAt []int64 `json:"updatedAt" dc:"更新时间"`
|
||||
}
|
||||
|
||||
type AttachmentChooserListModel struct {
|
||||
entity.SysAttachment
|
||||
SizeFormat string `json:"sizeFormat" dc:"大小"`
|
||||
}
|
||||
|
||||
// AttachmentClearInp 清空分类
|
||||
type AttachmentClearInp struct {
|
||||
Kind string `json:"kind" dc:"上传类型"`
|
||||
}
|
||||
|
Reference in New Issue
Block a user