model

package
v0.0.0-...-086fe20 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Contributor Roles
	Instructor           = "INS"
	TeachingAssistant    = "TA"
	CommunityContributor = "CC"
)

Variables

View Source
var DB *gorm.DB

Functions

func Setup

func Setup()

Setup 初始化数据库

Types

type Chapter

type Chapter struct {
	ChapterID          int64
	ChapterName        string
	ResourceCollection []Resource
}

type Contributor

type Contributor struct {
	// Contributor ID, auto generate.
	ID int64
	// Contributor Name, required.
	Name string
	// Contributor's Organization. Optional.
	Org string

	// The Role of Contributor in Course.
	// including Instructor, TeachingAssistant, CommunityContributor
	Role string
}

type ContributorTeam

type ContributorTeam struct {
	ID int64

	Name string

	Contributors []Contributor
}

ContributorTeam

type Course

type Course struct {
	ID int64
	// Name, required, contains the lecture code and lecture name
	Name string
	// Publisher The contribution Team or person.
	// ContributorTeam ContributorTeam
	ContributorTeamID int64
	// Discipline: Categories of Courses.
	Discipline  string
	License     string
	Origination string
	// Version, optional, defined the version of lecture
	// example: `23 fall`, `24 spring`, `2023`, `2024`.
	Version string

	// ResourceAddr: Course Website Link.
	ResourceAddr string
}

type LectureDesc

type LectureDesc struct {
	Overview        string
	Prerequisites   string
	CourseGoals     string
	FollowupCourses string
}

type Resource

type Resource struct {
}

type TimestampedModel

type TimestampedModel struct {
	CreatedAt time.Time
	UpdatedAt time.Time
	DeletedAt gorm.DeletedAt `gorm:"index"`
}

Jump to

Keyboard shortcuts

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