44 lines
1.8 KiB
Go
44 lines
1.8 KiB
Go
![]() |
// Package mycourse
|
|||
|
// @Link https://github.com/bufanyun/hotgo
|
|||
|
// @Copyright Copyright (c) 2023 HotGo CLI
|
|||
|
// @Author Yl <yl@example.com>
|
|||
|
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
|||
|
package mycourse
|
|||
|
|
|||
|
import (
|
|||
|
"hotgo/internal/model/input/form"
|
|||
|
|
|||
|
"github.com/gogf/gf/v2/frame/g"
|
|||
|
"github.com/gogf/gf/v2/os/gtime"
|
|||
|
)
|
|||
|
|
|||
|
// MyCourseListReq 我的课程列表请求
|
|||
|
type MyCourseListReq struct {
|
|||
|
g.Meta `path:"/mycourse/list" method:"get" tags:"我的课程" summary:"获取我的课程列表"`
|
|||
|
form.PageReq
|
|||
|
StudyStatus int `json:"study_status" dc:"学习状态:0全部课程 1学习中 2已完结"`
|
|||
|
}
|
|||
|
|
|||
|
type MyCourseListRes struct {
|
|||
|
List []*MyCourseListModel `json:"list" dc:"课程列表"`
|
|||
|
form.PageRes
|
|||
|
}
|
|||
|
|
|||
|
type MyCourseListModel struct {
|
|||
|
Id uint64 `json:"id" dc:"用户课程关联ID"`
|
|||
|
CourseId uint64 `json:"course_id" dc:"课程ID"`
|
|||
|
Title string `json:"title" dc:"课程标题"`
|
|||
|
Subtitle string `json:"subtitle" dc:"课程副标题"`
|
|||
|
CoverImage string `json:"cover_image" dc:"课程封面"`
|
|||
|
Instructor string `json:"instructor" dc:"讲师"`
|
|||
|
Subject string `json:"subject" dc:"学科"`
|
|||
|
Description string `json:"description" dc:"课程描述"`
|
|||
|
TotalEpisodes int `json:"total_episodes" dc:"总集数"`
|
|||
|
TotalLessons int `json:"total_lessons" dc:"总节数"`
|
|||
|
TotalDuration string `json:"total_duration" dc:"总时长"`
|
|||
|
StudiedDuration string `json:"studied_duration" dc:"已学时长"`
|
|||
|
StudyStatus int `json:"study_status" dc:"学习状态:1学习中 2已完结"`
|
|||
|
StudyStatusText string `json:"study_status_text" dc:"学习状态文本"`
|
|||
|
EnrollmentTime *gtime.Time `json:"enrollment_time" dc:"报名时间"`
|
|||
|
}
|