domain

package
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AsgDeadLine

type AsgDeadLine interface {
	AsgDeadLine() string
}

Assignment DeadLine

func NewAsgDeadLine

func NewAsgDeadLine(v string) (AsgDeadLine, error)

type AsgDesc

type AsgDesc interface {
	AsgDesc() string
}

Assignment Desc

func NewAsgDesc

func NewAsgDesc(v string) (AsgDesc, error)

type AsgName

type AsgName interface {
	AsgName() string
}

Assignment Name

func NewAsgName

func NewAsgName(v string) (AsgName, error)

type Assignment

type Assignment struct {
	Id       string
	Name     AsgName
	Desc     URL
	DeadLine AsgDeadLine
}

Assignment

type City

type City interface {
	City() string
}

City

func NewCity

func NewCity(v string) (City, error)

type Course

type Course struct {
	CourseSummary

	Teacher   URL
	Doc       URL
	Forum     URL
	PassScore CoursePassScore
	Cert      URL
	Sections  []Section
}

func (*Course) IsApplyed

func (c *Course) IsApplyed(p *Player) bool

func (*Course) IsOver

func (c *Course) IsOver() bool

func (*Course) IsPreliminary

func (c *Course) IsPreliminary() bool

type CourseAppliedEvent

type CourseAppliedEvent struct {
	Account    types.Account
	CourseName CourseName
}

CourseAppliedEvent

type CourseDesc

type CourseDesc interface {
	CourseDesc() string
}

CourseDesc

func NewCourseDesc

func NewCourseDesc(v string) (CourseDesc, error)

type CourseDuration

type CourseDuration interface {
	CourseDuration() string
}

CourseDuration

func NewCourseDuration

func NewCourseDuration(v string) (CourseDuration, error)

type CourseHost

type CourseHost interface {
	CourseHost() string
}

CourseHost

func NewCourseHost

func NewCourseHost(v string) (CourseHost, error)

type CourseHours

type CourseHours interface {
	CourseHours() int
}

CourseHours

func NewCourseHours

func NewCourseHours(v int) (CourseHours, error)

type CourseName

type CourseName interface {
	CourseName() string
}

CourseName

func NewCourseName

func NewCourseName(v string) (CourseName, error)

type CoursePassScore

type CoursePassScore interface {
	CoursePassScore() float32
}

CoursePassScore

func NewCoursePassScore

func NewCoursePassScore(v float32) (CoursePassScore, error)

type CourseProject

type CourseProject struct {
	Owner       types.Account
	RepoRouting string
}

CourseRepo

func NewCourseProject

func NewCourseProject(owner types.Account, r string) CourseProject

type CourseStatus

type CourseStatus interface {
	CourseStatus() string
	IsEnabled() bool
	IsOver() bool
	IsPreliminary() bool
}

CourseStatus

func NewCourseStatus

func NewCourseStatus(v string) (CourseStatus, error)

type CourseSummary

type CourseSummary struct {
	Id    string
	Name  CourseName
	Desc  CourseDesc
	Host  CourseHost
	Hours CourseHours

	Type     CourseType
	Status   CourseStatus
	Duration CourseDuration
	Poster   URL
}

Course

type CourseTime

type CourseTime interface {
	CourseTime() int64
}

Time

func NewCourseTime

func NewCourseTime(v int64) (CourseTime, error)

type CourseType

type CourseType interface {
	CourseType() string
}

CourseType

func NewCourseType

func NewCourseType(v string) (CourseType, error)

type Lesson

type Lesson struct {
	Id    string
	Name  LessonName
	Desc  LessonDesc
	Video LessonURL

	Points []Point
}

Lesson

func (*Lesson) HasPoints

func (l *Lesson) HasPoints() bool

type LessonDesc

type LessonDesc interface {
	LessonDesc() string
}

LessonDesc

func NewLessonDesc

func NewLessonDesc(v string) (LessonDesc, error)

type LessonId

type LessonId interface {
	LessonId() string
}

LessonId

func NewLessonId

func NewLessonId(v string) (LessonId, error)

type LessonName

type LessonName interface {
	LessonName() string
}

LessonName

func NewLessonName

func NewLessonName(v string) (LessonName, error)

type LessonURL

type LessonURL interface {
	LessonURL() string
}

LessonURL

func NewLessonURL

func NewLessonURL(v string) (LessonURL, error)

type Phone

type Phone interface {
	Phone() string
}

Phone

func NewPhone

func NewPhone(v string) (Phone, error)

type Player

type Player struct {
	Student

	Id             string
	CourseId       string
	CreatedAt      CourseTime
	RelatedProject string
}

func (*Player) CreateToday

func (p *Player) CreateToday() (err error)

func (*Player) NewId

func (p *Player) NewId()

type Point

type Point struct {
	Id    string
	Name  PointName
	Video URL
}

Point

type PointName

type PointName interface {
	PointName() string
}

PointName

func NewPointName

func NewPointName(v string) (PointName, error)

type Province

type Province interface {
	Province() string
}

Province

func NewProvince

func NewProvince(v string) (Province, error)

type Record

type Record struct {
	Cid         string
	User        types.Account
	SectionId   SectionId
	LessonId    LessonId
	PointId     string
	PlayCount   int
	FinishCount int
}

PlayRecord

type Section

type Section struct {
	Id   string
	Name SectionName

	Lessons []Lesson
}

Section

type SectionId

type SectionId interface {
	SectionId() string
}

SectionId

func NewSectionId

func NewSectionId(v string) (SectionId, error)

type SectionName

type SectionName interface {
	SectionName() string
}

SectionName

func NewSectionName

func NewSectionName(v string) (SectionName, error)

type Student

type Student struct {
	Account  types.Account
	Name     StudentName
	City     City
	Email    types.Email
	Phone    Phone
	Identity StudentIdentity
	Province Province
	Detail   map[string]string
}

type StudentIdentity

type StudentIdentity interface {
	StudentIdentity() string
}

StudentIdentity

func NewStudentIdentity

func NewStudentIdentity(v string) (StudentIdentity, error)

type StudentName

type StudentName interface {
	StudentName() string
}

StudentName

func NewStudentName

func NewStudentName(v string) (StudentName, error)

type URL

type URL interface {
	URL() string
}

URL

func NewURL

func NewURL(v string) (URL, error)

type Work

type Work struct {
	PlayerId string
	CourseId string
	AsgId    string
	Score    float32
	Status   string
	Version  int
}

type WorkScore

type WorkScore interface {
	WorkScore() float32
}

Work Score

func NewWorkScore

func NewWorkScore(v float32) (WorkScore, error)

type WorkStatus

type WorkStatus interface {
	WorkStatus() string
	IsFinished() bool
}

Work Status

func NewWorkStatus

func NewWorkStatus(v string) (WorkStatus, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL