88 lines
1.5 KiB
Go
88 lines
1.5 KiB
Go
package structs
|
|
|
|
import "time"
|
|
|
|
const (
|
|
LessonStateActive = 1
|
|
LessonStateDraft = 2
|
|
)
|
|
|
|
// swagger:model LessonResponse
|
|
type LessonResponse struct {
|
|
Id string
|
|
State uint8
|
|
Title string
|
|
ThumbnailUrl string
|
|
QuestionsCount int `gorm:"-"`
|
|
CreatorUserId string
|
|
CreatedAt time.Time
|
|
}
|
|
|
|
// swagger:model CreateLessonResponse
|
|
type CreateLessonResponse struct {
|
|
Id string
|
|
}
|
|
|
|
// swagger:model LessonSettings
|
|
type LessonSettings struct {
|
|
Title string
|
|
ThumbnailUrl string
|
|
State uint8
|
|
}
|
|
|
|
// swagger:model UpdateLessonPreviewTitleRequest
|
|
type UpdateLessonPreviewTitleRequest struct {
|
|
Title string
|
|
}
|
|
|
|
// swagger:model UpdateLessonStateRequest
|
|
type UpdateLessonStateRequest struct {
|
|
State uint8
|
|
}
|
|
|
|
// swagger:model AddLessonContentRequest
|
|
type AddLessonContentRequest struct {
|
|
Type uint8
|
|
Data string
|
|
}
|
|
|
|
// swagger:model AddLessonContentResponse
|
|
type AddLessonContentResponse struct {
|
|
Id string
|
|
}
|
|
|
|
// swagger:model UpdateLessonContentRequest
|
|
type UpdateLessonContentRequest struct {
|
|
Type uint8
|
|
Data string
|
|
}
|
|
|
|
// swagger:model UpdateLessonContentResponse
|
|
type LessonIdParam struct {
|
|
LessonId string
|
|
}
|
|
|
|
type LessonIdAndContentIdParam struct {
|
|
LessonId string
|
|
ContentId string
|
|
}
|
|
|
|
// swagger:model GetLessonContentsResponse
|
|
type GetLessonContentsResponse struct {
|
|
Id string
|
|
Page uint16
|
|
Position uint16
|
|
Type uint8
|
|
Data string
|
|
}
|
|
|
|
type UpdateLessonContentPositionRequest struct {
|
|
Position uint16
|
|
}
|
|
|
|
type UploadLessonContentFileParam struct {
|
|
LessonId string
|
|
ContentId string
|
|
Type string
|
|
}
|