model

package
v0.0.0-...-eb2eea1 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DBMigrate

func DBMigrate(db *gorm.DB) *gorm.DB

Types

type Answer

type Answer struct {
	gorm.Model
	Question Question
	Answer   string `json:"answer"`
}

type Graph

type Graph struct {
	gorm.Model
	Group Group
	Nodes []Node
}

type Group

type Group struct {
	gorm.Model
	Name    string `json:"name"`
	Student []Student
}

Group model for the database

type Node

type Node struct {
	gorm.Model
	Student   Student
	Relevancy int `json:"relevancy"`
	Feeling   int `json:"feeling"`
	Edges     []Node
}

type Professor

type Professor struct {
	gorm.Model
	Name         string `json:"name"`
	Email        string `json:"email"`
	PasswordHash string `json:"password_hash"`
}

type Question

type Question struct {
	gorm.Model
	Question string `json:"question"`
}

type Student

type Student struct {
	gorm.Model
	Name string `json:"name"`
}

Jump to

Keyboard shortcuts

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