33 lines
1.0 KiB
Go
33 lines
1.0 KiB
Go
package srv_contentexcel
|
|
|
|
import "videoweb/pub/pubdef"
|
|
|
|
const (
|
|
ContentTypeVideo = "video"
|
|
)
|
|
|
|
// ExportReq 导出查询参数。
|
|
type ExportReq struct {
|
|
Type string `form:"type" binding:"required"` // video
|
|
StartTime string `form:"startTime"` // 可选,按 createdAt 筛选,格式 2006-01-02 或 2006-01-02 15:04:05
|
|
EndTime string `form:"endTime"` // 可选,按 createdAt 筛选
|
|
Status *pubdef.InformationStatus `form:"status"` // 可选,0初始化 1上架 2下架,不传查全部
|
|
Ids []int64 // 可选,按 ID 筛选,支持 ids=1&ids=2 或 ids=1,2,3
|
|
}
|
|
|
|
// ImportResult 导入结果。
|
|
type ImportResult struct {
|
|
Total int `json:"total"`
|
|
Success int `json:"success"`
|
|
Failed int `json:"failed"`
|
|
Errors []string `json:"errors,omitempty"`
|
|
}
|
|
|
|
// ContentRow Excel 单行数据。
|
|
type ContentRow struct {
|
|
ID int64
|
|
Title string
|
|
Desc string
|
|
Keyworld []string
|
|
}
|