47 lines
2.0 KiB
Go
47 lines
2.0 KiB
Go
package request
|
|
|
|
import (
|
|
"git.echol.cn/loser/lckt/model/common/request"
|
|
)
|
|
|
|
type GetList struct {
|
|
request.PageInfo
|
|
Title string `json:"title" form:"title"` // 文章标题
|
|
// 分类ID
|
|
CategoryId int `json:"categoryId" form:"categoryId"` // 分类ID
|
|
TeacherId int `json:"teacherId" form:"teacherId"` // 讲师ID
|
|
Status int `json:"status" form:"status"` // 状态 0-草稿 1-已发布 2-待审核 3-审核不通过
|
|
UserId uint `json:"userId" form:"userId"` // 用户ID
|
|
}
|
|
|
|
type DeleteIds struct {
|
|
Ids []int `json:"ids" form:"ids" binding:"required"`
|
|
}
|
|
|
|
type BulkUpload struct {
|
|
Files []string `json:"files" form:"files" binding:"required"`
|
|
Title string `json:"title" form:"title" binding:"required"`
|
|
Desc string `json:"desc" form:"desc" binding:"required"`
|
|
Price float64 `json:"price" form:"price" binding:"required"` // 价格,单位分
|
|
// 分类ID
|
|
CategoryId int `json:"categoryId" form:"categoryId" binding:"required"` // 分类ID
|
|
// 发布时间
|
|
PublishTime string `json:"publishTime" form:"publishTime"` // 发布时间
|
|
IsFree *int `json:"isFree" form:"isFree"` // 是否免费
|
|
FreeTime string `json:"freeTime" form:"freeTime"` // 设置为免费时,免费时间段
|
|
}
|
|
|
|
type CreateArticle struct {
|
|
Title string `json:"title" form:"title" binding:"required"`
|
|
Desc string `json:"desc" form:"desc" binding:"required"`
|
|
Content string `json:"content" form:"content" binding:"required"`
|
|
CoverImg string `json:"coverImg" form:"coverImg" binding:"required"`
|
|
TeacherId int `json:"teacherId" form:"teacherId" binding:"required"`
|
|
TeacherName string `json:"teacherName" form:"teacherName" binding:"required"`
|
|
Price int64 `json:"price" form:"price" binding:"required"` // 价格,单位分
|
|
IsFree *int `json:"isFree" form:"isFree"` // 是否免费 0-否 1-是
|
|
// 分类ID
|
|
CategoryId int `json:"categoryId" form:"categoryId" binding:"required"` // 分类ID
|
|
PublishTime string `json:"publishTime" form:"publishTime"` // 发布时间
|
|
}
|