24 lines
730 B
Go
24 lines
730 B
Go
package domain
|
|
|
|
const (
|
|
VideoContentKindLMSLesson = "lms_lesson"
|
|
VideoContentKindExamPrepLesson = "exam_prep_lesson"
|
|
)
|
|
|
|
const VideoCompletionThresholdPercent = 90
|
|
|
|
type VideoEngagementHeartbeatInput struct {
|
|
ContentKind string `json:"content_kind" validate:"required,oneof=lesson"`
|
|
ContentID int64 `json:"content_id" validate:"required,gt=0"`
|
|
PositionSec int `json:"position_sec" validate:"gte=0"`
|
|
DurationSec int `json:"duration_sec" validate:"gte=0"`
|
|
Ended bool `json:"ended"`
|
|
}
|
|
|
|
type VideoWatchSessionResponse struct {
|
|
SessionID int64 `json:"session_id"`
|
|
SessionNumber int `json:"session_number"`
|
|
MaxPositionSec int `json:"max_position_sec"`
|
|
Completed bool `json:"completed"`
|
|
}
|