169 lines
4.8 KiB
Go
169 lines
4.8 KiB
Go
package domain
|
|
|
|
import "time"
|
|
|
|
type SubCourseLevel string
|
|
|
|
const (
|
|
SubCourseLevelBeginner SubCourseLevel = "BEGINNER"
|
|
SubCourseLevelIntermediate SubCourseLevel = "INTERMEDIATE"
|
|
SubCourseLevelAdvanced SubCourseLevel = "ADVANCED"
|
|
)
|
|
|
|
type SubCourseSubLevel string
|
|
|
|
const (
|
|
SubCourseSubLevelA1 SubCourseSubLevel = "A1"
|
|
SubCourseSubLevelA2 SubCourseSubLevel = "A2"
|
|
SubCourseSubLevelA3 SubCourseSubLevel = "A3"
|
|
SubCourseSubLevelB1 SubCourseSubLevel = "B1"
|
|
SubCourseSubLevelB2 SubCourseSubLevel = "B2"
|
|
SubCourseSubLevelB3 SubCourseSubLevel = "B3"
|
|
SubCourseSubLevelC1 SubCourseSubLevel = "C1"
|
|
SubCourseSubLevelC2 SubCourseSubLevel = "C2"
|
|
SubCourseSubLevelC3 SubCourseSubLevel = "C3"
|
|
)
|
|
|
|
type ContentStatus string
|
|
|
|
const (
|
|
ContentStatusDraft ContentStatus = "DRAFT"
|
|
ContentStatusPublished ContentStatus = "PUBLISHED"
|
|
ContentStatusInactive ContentStatus = "INACTIVE"
|
|
ContentStatusArchived ContentStatus = "ARCHIVED"
|
|
)
|
|
|
|
type TreeSubCourse struct {
|
|
ID int64
|
|
Title string
|
|
Level string
|
|
SubLevel string
|
|
}
|
|
|
|
type TreeCourse struct {
|
|
ID int64
|
|
Title string
|
|
SubCourses []TreeSubCourse
|
|
}
|
|
|
|
type CourseCategory struct {
|
|
ID int64
|
|
Name string
|
|
IsActive bool
|
|
CreatedAt time.Time
|
|
}
|
|
|
|
type Course struct {
|
|
ID int64
|
|
CategoryID int64
|
|
Title string
|
|
Description *string
|
|
Thumbnail *string
|
|
IntroVideoURL *string
|
|
IsActive bool
|
|
}
|
|
|
|
type SubCourse struct {
|
|
ID int64
|
|
CourseID int64
|
|
Title string
|
|
Description *string
|
|
Thumbnail *string
|
|
DisplayOrder int32
|
|
Level string
|
|
SubLevel string
|
|
IsActive bool
|
|
}
|
|
|
|
type SubCourseVideo struct {
|
|
ID int64
|
|
SubCourseID int64
|
|
Title string
|
|
Description *string
|
|
VideoURL string
|
|
Duration int32
|
|
Resolution *string
|
|
InstructorID *string
|
|
Thumbnail *string
|
|
Visibility *string
|
|
DisplayOrder int32
|
|
IsPublished bool
|
|
PublishDate *time.Time
|
|
Status string
|
|
// Vimeo-specific fields
|
|
VimeoID *string
|
|
VimeoEmbedURL *string
|
|
VimeoPlayerHTML *string
|
|
VimeoStatus *string
|
|
}
|
|
|
|
type VideoHostProvider string
|
|
|
|
const (
|
|
VideoHostProviderDirect VideoHostProvider = "DIRECT"
|
|
VideoHostProviderVimeo VideoHostProvider = "VIMEO"
|
|
)
|
|
|
|
type VideoAccessBlock struct {
|
|
VideoID int64
|
|
Title string
|
|
DisplayOrder int32
|
|
}
|
|
|
|
// Learning Path types — full nested structure for a course
|
|
type LearningPathVideo struct {
|
|
ID int64 `json:"id"`
|
|
Title string `json:"title"`
|
|
Description *string `json:"description,omitempty"`
|
|
VideoURL string `json:"video_url"`
|
|
Duration int32 `json:"duration"`
|
|
Resolution *string `json:"resolution,omitempty"`
|
|
DisplayOrder int32 `json:"display_order"`
|
|
VimeoID *string `json:"vimeo_id,omitempty"`
|
|
VimeoEmbedURL *string `json:"vimeo_embed_url,omitempty"`
|
|
VideoHostProvider *string `json:"video_host_provider,omitempty"`
|
|
}
|
|
|
|
type LearningPathPractice struct {
|
|
ID int64 `json:"id"`
|
|
Title string `json:"title"`
|
|
Description *string `json:"description,omitempty"`
|
|
Persona *string `json:"persona,omitempty"`
|
|
Status string `json:"status"`
|
|
QuestionCount int64 `json:"question_count"`
|
|
}
|
|
|
|
type LearningPathPrerequisite struct {
|
|
SubCourseID int64 `json:"sub_course_id"`
|
|
Title string `json:"title"`
|
|
Level string `json:"level"`
|
|
SubLevel string `json:"sub_level"`
|
|
}
|
|
|
|
type LearningPathSubCourse struct {
|
|
ID int64 `json:"id"`
|
|
Title string `json:"title"`
|
|
Description *string `json:"description,omitempty"`
|
|
Thumbnail *string `json:"thumbnail,omitempty"`
|
|
DisplayOrder int32 `json:"display_order"`
|
|
Level string `json:"level"`
|
|
SubLevel string `json:"sub_level"`
|
|
PrerequisiteCount int64 `json:"prerequisite_count"`
|
|
VideoCount int64 `json:"video_count"`
|
|
PracticeCount int64 `json:"practice_count"`
|
|
Prerequisites []LearningPathPrerequisite `json:"prerequisites"`
|
|
Videos []LearningPathVideo `json:"videos"`
|
|
Practices []LearningPathPractice `json:"practices"`
|
|
}
|
|
|
|
type LearningPath struct {
|
|
CourseID int64 `json:"course_id"`
|
|
CourseTitle string `json:"course_title"`
|
|
Description *string `json:"description,omitempty"`
|
|
Thumbnail *string `json:"thumbnail,omitempty"`
|
|
IntroVideoURL *string `json:"intro_video_url,omitempty"`
|
|
CategoryID int64 `json:"category_id"`
|
|
CategoryName string `json:"category_name"`
|
|
SubCourses []LearningPathSubCourse `json:"sub_courses"`
|
|
}
|