models

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OpenDbConnection

func OpenDbConnection() (*gorm.DB, error)

Types

type Course

type Course struct {
	Id uint64 `json:"id,omitempty" gorm:"primaryKey;autoIncrement"`

	Name string `json:"name,omitempty"`

	Description string `json:"description,omitempty"`

	Teacher uint64 `json:"teacher,omitempty"`

	Students []User `json:"students,omitempty" gorm:"many2many:course_students;"`
}

type StudentSatisfaction

type StudentSatisfaction struct {
	CourseId int64 `json:"course_id,omitempty"`

	StudentId int64 `json:"student_id,omitempty"`

	Satisfaction int64 `json:"satisfaction,omitempty"`
}

type StudentWorkload

type StudentWorkload struct {
	WorkloadId int64 `json:"workload_id,omitempty"`

	StudentId int64 `json:"student_id,omitempty"`

	Completion int64 `json:"completion,omitempty"`
}

type User

type User struct {
	ID         uint64         `json:"id,omitempty" gorm:"primaryKey;autoIncrement"`
	Name       string         `json:"name"`
	Mail       string         `json:"mail"`
	Popularity int64          `json:"popularity,omitempty"`
	Role       string         `json:"role"`
	CreatedAt  time.Time      `json:"created_at,omitempty"`
	UpdatedAt  time.Time      `json:"updated_at,omitempty"`
	DeletedAt  gorm.DeletedAt `json:"deleted_at,omitempty" gorm:"index"`
}

type Workload

type Workload struct {
	CourseId int64 `json:"course_id,omitempty"`

	Type_ string `json:"type,omitempty"`
}

Jump to

Keyboard shortcuts

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