27 lines
1.2 KiB
Go
27 lines
1.2 KiB
Go
package models
|
|
|
|
import "time"
|
|
|
|
const (
|
|
GitPublishModeRoom = "room"
|
|
GitPublishModeStudent = "student"
|
|
)
|
|
|
|
// StaffGitHubRepo — repo GitHub do giáo viên tạo qua Simple Care
|
|
type StaffGitHubRepo struct {
|
|
ID uint `gorm:"primaryKey" json:"id"`
|
|
StaffID uint `gorm:"column:staff_id;not null;index" json:"staffId"`
|
|
OwnerLogin string `gorm:"column:owner_login;size:128;not null" json:"ownerLogin"`
|
|
RepoName string `gorm:"column:repo_name;size:128;not null" json:"repoName"`
|
|
RepoHTMLURL string `gorm:"column:repo_html_url;size:512;not null" json:"repoHtmlUrl"`
|
|
ExamRoomID *uint `gorm:"column:exam_room_id;index" json:"examRoomId,omitempty"`
|
|
ExamRoomName string `gorm:"-" json:"examRoomName,omitempty"`
|
|
SubmissionID *uint `gorm:"column:submission_id;index" json:"submissionId,omitempty"`
|
|
StudentLabel string `gorm:"column:student_label;size:255" json:"studentLabel,omitempty"`
|
|
PublishMode string `gorm:"column:publish_mode;size:16;not null;default:room" json:"publishMode"`
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
UpdatedAt time.Time `json:"updatedAt"`
|
|
}
|
|
|
|
func (StaffGitHubRepo) TableName() string { return "staff_github_repos" }
|