model

package
v0.0.0-...-0ea846c Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const TableNameAlumni = "alumni"
View Source
const TableNameAlumniAssignment = "alumni_assignments"
View Source
const TableNameAlumniSubject = "alumni_subjects"
View Source
const TableNameAssignment = "assignments"
View Source
const TableNameAssignmentCodeTemplate = "assignment_code_templates"
View Source
const TableNameAssignmentExample = "assignment_examples"
View Source
const TableNameExecution = "executions"
View Source
const TableNameProfessor = "professors"
View Source
const TableNameSubject = "subjects"

Variables

This section is empty.

Functions

This section is empty.

Types

type Alumni

type Alumni struct {
	ID             int32          `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
	FirstName      string         `gorm:"column:first_name" json:"first_name"`
	LastName       string         `gorm:"column:last_name" json:"last_name"`
	Email          string         `gorm:"column:email" json:"email"`
	GraduationYear int32          `gorm:"column:graduation_year" json:"graduation_year"`
	CreatedAt      time.Time      `gorm:"column:created_at;default:CURRENT_TIMESTAMP" json:"created_at"`
	UpdatedAt      time.Time      `gorm:"column:updated_at;default:CURRENT_TIMESTAMP" json:"updated_at"`
	DeletedAt      gorm.DeletedAt `gorm:"column:deleted_at" json:"deleted_at"`
	Subjects       []Subject      `gorm:"many2many:alumni_subjects" json:"subjects"`
}

Alumni mapped from table <alumni>

func (*Alumni) TableName

func (*Alumni) TableName() string

TableName Alumni's table name

type AlumniAssignment

type AlumniAssignment struct {
	AlumniID     int32  `gorm:"column:alumni_id;primaryKey" json:"alumni_id"`
	AssignmentID int32  `gorm:"column:assignment_id;primaryKey" json:"assignment_id"`
	Grade        string `gorm:"column:grade" json:"grade"`
}

AlumniAssignment mapped from table <alumni_assignments>

func (*AlumniAssignment) TableName

func (*AlumniAssignment) TableName() string

TableName AlumniAssignment's table name

type AlumniSubject

type AlumniSubject struct {
	AlumniID  int32 `gorm:"column:alumni_id;primaryKey" json:"alumni_id"`
	SubjectID int32 `gorm:"column:subject_id;primaryKey" json:"subject_id"`
}

AlumniSubject mapped from table <alumni_subjects>

func (*AlumniSubject) TableName

func (*AlumniSubject) TableName() string

TableName AlumniSubject's table name

type Assignment

type Assignment struct {
	ID                    int32                    `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
	AssignmentTitle       string                   `gorm:"column:assignment_title" json:"assignment_title"`
	AssignmentDescription string                   `gorm:"column:assignment_description" json:"assignment_description"`
	SubjectID             int32                    `gorm:"column:subject_id" json:"subject_id"`
	ProfessorID           int32                    `gorm:"column:professor_id" json:"professor_id"`
	CreatedAt             time.Time                `gorm:"column:created_at;default:CURRENT_TIMESTAMP" json:"created_at"`
	UpdatedAt             time.Time                `gorm:"column:updated_at;default:CURRENT_TIMESTAMP" json:"updated_at"`
	DeletedAt             gorm.DeletedAt           `gorm:"column:deleted_at" json:"deleted_at"`
	Examples              []AssignmentExample      `gorm:"foreignKey:assignment_id" json:"examples"`
	CodeTemplates         []AssignmentCodeTemplate `gorm:"foreignKey:assignment_id" json:"code_templates"`
}

Assignment mapped from table <assignments>

func (*Assignment) TableName

func (*Assignment) TableName() string

TableName Assignment's table name

type AssignmentCodeTemplate

type AssignmentCodeTemplate struct {
	ID             int32          `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
	AssignmentID   int32          `gorm:"column:assignment_id" json:"assignment_id"`
	Language       string         `gorm:"column:language" json:"language"`
	Code           string         `gorm:"column:code" json:"code"`
	TestRunnerCode string         `gorm:"column:test_runner_code" json:"test_runner_code"`
	CreatedAt      time.Time      `gorm:"column:created_at;default:CURRENT_TIMESTAMP" json:"created_at"`
	UpdatedAt      time.Time      `gorm:"column:updated_at;default:CURRENT_TIMESTAMP" json:"updated_at"`
	DeletedAt      gorm.DeletedAt `gorm:"column:deleted_at" json:"deleted_at"`
}

AssignmentCodeTemplate mapped from table <assignment_code_templates>

func (*AssignmentCodeTemplate) TableName

func (*AssignmentCodeTemplate) TableName() string

TableName AssignmentCodeTemplate's table name

type AssignmentExample

type AssignmentExample struct {
	ID                 int32          `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
	AssignmentID       int32          `gorm:"column:assignment_id" json:"assignment_id"`
	ExampleTitle       string         `gorm:"column:example_title" json:"example_title"`
	ExampleDescription string         `gorm:"column:example_description" json:"example_description"`
	CreatedAt          time.Time      `gorm:"column:created_at;default:CURRENT_TIMESTAMP" json:"created_at"`
	UpdatedAt          time.Time      `gorm:"column:updated_at;default:CURRENT_TIMESTAMP" json:"updated_at"`
	DeletedAt          gorm.DeletedAt `gorm:"column:deleted_at" json:"deleted_at"`
}

AssignmentExample mapped from table <assignment_examples>

func (*AssignmentExample) TableName

func (*AssignmentExample) TableName() string

TableName AssignmentExample's table name

type Execution

type Execution struct {
	ID           int32          `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
	Language     string         `gorm:"column:language" json:"language"`
	WorkflowID   string         `gorm:"column:workflow_id" json:"workflow_id"`
	RunID        string         `gorm:"column:run_id" json:"run_id"`
	Code         string         `gorm:"column:code" json:"code"`
	AssignmentID int32          `gorm:"column:assignment_id" json:"assignment_id"`
	CreatedAt    time.Time      `gorm:"column:created_at;default:CURRENT_TIMESTAMP" json:"created_at"`
	UpdatedAt    time.Time      `gorm:"column:updated_at;default:CURRENT_TIMESTAMP" json:"updated_at"`
	DeletedAt    gorm.DeletedAt `gorm:"column:deleted_at" json:"deleted_at"`
}

Execution mapped from table <executions>

func (*Execution) TableName

func (*Execution) TableName() string

TableName Execution's table name

type Professor

type Professor struct {
	ID        int32          `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
	FirstName string         `gorm:"column:first_name" json:"first_name"`
	LastName  string         `gorm:"column:last_name" json:"last_name"`
	Email     string         `gorm:"column:email" json:"email"`
	CreatedAt time.Time      `gorm:"column:created_at;default:CURRENT_TIMESTAMP" json:"created_at"`
	UpdatedAt time.Time      `gorm:"column:updated_at;default:CURRENT_TIMESTAMP" json:"updated_at"`
	DeletedAt gorm.DeletedAt `gorm:"column:deleted_at" json:"deleted_at"`
	Subjects  []Subject      `gorm:"foreignKey:professor_id" json:"subjects"`
}

Professor mapped from table <professors>

func (*Professor) TableName

func (*Professor) TableName() string

TableName Professor's table name

type Subject

type Subject struct {
	ID          int32          `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
	SubjectName string         `gorm:"column:subject_name" json:"subject_name"`
	Semester    int32          `gorm:"column:semester" json:"semester"`
	ProfessorID int32          `gorm:"column:professor_id" json:"professor_id"`
	CreatedAt   time.Time      `gorm:"column:created_at;default:CURRENT_TIMESTAMP" json:"created_at"`
	UpdatedAt   time.Time      `gorm:"column:updated_at;default:CURRENT_TIMESTAMP" json:"updated_at"`
	DeletedAt   gorm.DeletedAt `gorm:"column:deleted_at" json:"deleted_at"`
	Assignments []Assignment   `gorm:"foreignKey:subject_id" json:"assignments"`
}

Subject mapped from table <subjects>

func (*Subject) TableName

func (*Subject) TableName() string

TableName Subject's table name

Jump to

Keyboard shortcuts

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