Documentation
¶
Index ¶
- type Account
- type Admin
- type AdminUser
- type Career
- type Channel
- type Commit
- type CommonModel
- type Coordinator
- type Department
- type Entity
- type GSPModel
- func (gsp GSPModel) Bind(v interface{})
- func (gsp *GSPModel) Clear()
- func (gsp *GSPModel) GetID() int64
- func (gsp *GSPModel) GetUID() string
- func (gsp *GSPModel) InitGSP(t string)
- func (gsp GSPModel) New() *GSPModel
- func (gsp *GSPModel) SetID(id int64)
- func (gsp *GSPModel) SetInvalid()
- func (gsp *GSPModel) ToString() string
- type IProfile
- type Link
- type LinkType
- type Meet
- type Milestone
- type Model
- type Progress
- type Project
- type ProjectState
- type ProjectType
- type Review
- type Rubric
- type Student
- type Subject
- type Teacher
- type TeacherUser
- type UType
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct {
GSPModel
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
Nick string `json:"nick"`
RUT string `json:"rut"`
Email string `json:"email"`
Password string `json:"password"`
AccountType string `json:"account_type"`
}
func (*Account) CheckPassword ¶
type Admin ¶
type Admin struct {
GSPModel
AccountID int64 `json:"account_id" mapstructure:"account_id"`
Account Account `json:"account" mapstructure:"account"`
EntryYear int `json:"entry_year" mapstructure:"entry_year"`
}
Admin is a DBModel for Admin Entity
type Career ¶
type Career struct {
GSPModel
Code int64 `json:"code" mapstructure:"code" gorm:"unique"`
Name string `json:"name" mapstructure:"name"`
Department *Department `json:"department,omitempty" mapstructure:"department" gorm:"foreignKey:DepartmentID"`
DepartmentID int64 `json:"department_id,omitempty" mapstructure:"department_id" gorm:"column:department_id"`
Students []Student `json:"students" mapstructure:"students" gorm:"->"`
}
Career has many students and one Department associated
type Channel ¶
type Commit ¶
type Commit struct {
GSPModel
Title string `json:"title" mapstructure:"title"`
Desc string `gorm:"type:text" json:"desc" mapstructure:"desc"`
Solved bool `json:"solved" mapstructure:"solved"`
SolvedAt *time.Time `json:"solved_at,omitempty" mapstructure:"solved_at"`
LimitDate *time.Time `json:"limit_date" mapstructure:"limit_date"`
Project Project `json:"project" mapstructure:"project"`
ProjectID int64 `json:"project_id" mapstructure:"project_id"`
}
type CommonModel ¶
type Coordinator ¶
type Coordinator struct {
GSPModel
AccountID int64 `json:"account_id" mapstructure:"account_id"`
Account Account `json:"account" mapstructure:"account"`
EntryYear int `json:"entry_year" mapstructure:"entry_year"`
}
Coordinator is a DBModel for Coordinator Entity
type Department ¶
type Department struct {
GSPModel
Name string `json:"name" mapstructure:"name"`
Careers []Career `json:"careers" gorm:"->"`
}
Department embeds multiple careers
func (Department) Bind ¶
func (d Department) Bind(v interface{})
func (Department) New ¶
func (d Department) New() Model
type GSPModel ¶
type GSPModel struct {
CommonModel
Entity string `mapstructure:"entity" json:"entity"`
UID string `json:"uid" mapstructure:"uid"`
IsValid bool `json:"is_valid" gorm:"default:1"`
}
type Link ¶
type Link struct {
GSPModel
URL string `mapstructure:"url" json:"url"`
LinkTypeID int64 `mapstructure:"link_type_id" json:"link_type_id"`
LinkType LinkType `mapstructure:"link_type" json:"link_type"`
Project Project `mapstructure:"project" json:"project" gorm:"foreignKey:ProjectID"`
ProjectID int64 `mapstructure:"project_id" json:"project_id,omitempty" gorm:"column:project_id"`
}
type LinkType ¶
type LinkType struct {
GSPModel
Name string `mapstructure:"name" json:"name"`
Icon string `mapstructure:"icon" json:"icon"`
}
func NewLinkType ¶
type Meet ¶
type Meet struct {
GSPModel
Name string `mapstructure:"name" json:"name"`
Date *time.Time `mapstructure:"date" json:"date"`
ChannelID int64 `mapstructure:"channel_id" json:"channel_id"`
Channel *Channel `mapstructure:"channel" json:"channel"`
Done bool `mapstructure:"done" json:"done"`
Project Project `mapstructure:"project" json:"project"`
ProjectID int64 `mapstructure:"project_id" json:"project_id"`
}
type Milestone ¶
type Milestone struct {
GSPModel
Title string `json:"title" mapstructure:"title"`
Desc string `gorm:"type:text" json:"desc" mapstructure:"desc"`
FileURL string `json:"file_url" mapstructure:"file_url"`
Solved bool `json:"solved" mapstructure:"solved"`
Date *time.Time `json:"date" mapstructure:"date"`
Project Project `json:"project" mapstructure:"project"`
ProjectID int64 `json:"project_id" mapstructure:"project_id"`
}
Milestone ...
type Progress ¶
type Progress struct {
GSPModel
Name string `json:"name" mapstructure:"name"`
Project Project `json:"project" mapstructure:"project"`
ProjectID int64 `json:"project_id" mapstructure:"project_id"`
}
func NewProgress ¶
type Project ¶
type Project struct {
GSPModel
ProjectState ProjectState `json:"project_state" mapstructure:"project_state"`
ProjectStateID int64 `json:"project_state_id,omitempty" mapstructure:"project_state_id"`
Title string `json:"title" mapstructure:"title"`
ProjectTypeID int64 `json:"project_type_id" mapstructure:"project_type_id"`
ProjectType ProjectType `json:"project_type" mapstructure:"project_type"`
Desc string `gorm:"type:text" json:"desc" mapstructure:"desc"`
Authors []Student `gorm:"many2many:project_authors;" json:"authors" mapstructure:"authors"`
Guides []Teacher `gorm:"many2many:project_guides" json:"guides" mapstructure:"guides"`
Links []Link `json:"links" mapstructure:"links"`
Subjects []Subject `gorm:"many2many:project_subjects" json:"subjects" mapstructure:"subjects"`
Meets []Meet `json:"meets" mapstructure:"meets"`
Milestones []Milestone `json:"milestones" mapstructure:"milestones"`
Progress []Progress `json:"progress" mapstructure:"progress"`
Tags string `json:"tags" mapstructure:"tags"`
Commits []Commit `json:"commits" mapstructure:"commits"`
Reviews []Review `json:"reviews" mapstructure:"reviews"`
}
func NewProject ¶
type ProjectState ¶
type ProjectState struct {
GSPModel
Name string `json:"name" mapstructure:"name"`
Projects []Project `json:"projects" mapstructure:"projects"`
}
func NewProjectState ¶
func NewProjectState(n string) ProjectState
func (ProjectState) Bind ¶
func (s ProjectState) Bind(v interface{})
func (ProjectState) New ¶
func (ProjectState) New() Model
type ProjectType ¶
type ProjectType struct {
GSPModel
Name string `json:"name" mapstructure:"name"`
Projects []Project `json:"projects" mapstructure:"projects"`
}
func NewProjectType ¶
func NewProjectType(n string) ProjectType
func (ProjectType) Bind ¶
func (t ProjectType) Bind(v interface{})
func (ProjectType) New ¶
func (ProjectType) New() Model
type Review ¶
type Review struct {
GSPModel
Name string `mapstructure:"name" json:"name"`
RubricID int64 `json:"rubric_id" mapstructure:"rubric_id"`
Rubric Rubric `mapstructure:"rubric" json:"rubric"`
Project Project `json:"project" mapstructure:"project"`
ProjectID int64 `json:"project_id" mapstructure:"project_id"`
FileURL string `mapstructure:"file_url" json:"file_url"`
Score *float32 `json:"score" mapstructure:"score"`
ReviewerID int64 `json:"reviewer_id" mapstructure:"reviewer_id"`
Reviewer Teacher `mapstructure:"reviewer" json:"reviewer"`
Comment string `json:"comment" mapstructure:"comment"`
}
type Rubric ¶
type Student ¶
type Student struct {
GSPModel
FirstName string `mapstructure:"first_name" json:"first_name"`
LastName string `mapstructure:"last_name" json:"last_name"`
RUT string `mapstructure:"rut" json:"rut"`
CareerID int64 `mapstructure:"career_id" json:"career_id"`
Career *Career `mapstructure:"career" json:"career"`
EntryYear int `mapstructure:"entry_year" json:"entry_year"`
Projects []Project `json:"projects" mapstructure:"projects" gorm:"many2many:project_authors;"`
}
Student has one associated Career
type Subject ¶
type Subject struct {
GSPModel
Name string `json:"name" mapstructure:"name"`
Icon string `json:"icon" mapstructure:"icon"`
}
func NewSubject ¶
type Teacher ¶
type Teacher struct {
GSPModel
AccountID int64 `json:"account_id" mapstructure:"account_id"`
Account Account `json:"account" mapstructure:"account"`
EntryYear int `json:"entry_year" mapstructure:"entry_year"`
Projects []Project `gorm:"many2many:project_guides" json:"projects" mapstructure:"projects"`
}
Teacher is a DBModel for Teacher Entity
func NewTeacher ¶
type TeacherUser ¶
func NewTeacherUser ¶
func NewTeacherUser(t *Teacher) TeacherUser
func (*TeacherUser) GetAccount ¶
func (t *TeacherUser) GetAccount() Account
Click to show internal directories.
Click to hide internal directories.