git feature
This commit is contained in:
@@ -18,8 +18,11 @@ type ExamRoom struct {
|
||||
StartTime time.Time `gorm:"column:start_time;not null;index" json:"startTime"`
|
||||
EndTime time.Time `gorm:"column:end_time;not null;index" json:"endTime"`
|
||||
AllowedApps string `gorm:"column:allowed_apps;type:text" json:"allowedApps"`
|
||||
QuizURL string `gorm:"column:quiz_url;size:1024" json:"quizUrl"`
|
||||
Status string `gorm:"column:status;size:16;not null;default:draft;index" json:"status"`
|
||||
QuizURL string `gorm:"column:quiz_url;size:1024" json:"quizUrl"`
|
||||
GitRepoURL string `gorm:"column:git_repo_url;size:512" json:"gitRepoUrl"`
|
||||
GitBranch string `gorm:"column:git_branch;size:64;default:main" json:"gitBranch"`
|
||||
GitPublishURL string `gorm:"column:git_publish_url;size:1024" json:"gitPublishUrl,omitempty"`
|
||||
Status string `gorm:"column:status;size:16;not null;default:draft;index" json:"status"`
|
||||
}
|
||||
|
||||
func (ExamRoom) TableName() string { return "exam_rooms" }
|
||||
|
||||
15
server/internal/models/staff_github.go
Normal file
15
server/internal/models/staff_github.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package models
|
||||
|
||||
import "time"
|
||||
|
||||
// StaffGitHubAuth — token OAuth GitHub của từng giáo viên
|
||||
type StaffGitHubAuth struct {
|
||||
StaffID uint `gorm:"primaryKey;column:staff_id" json:"staffId"`
|
||||
GitHubLogin string `gorm:"column:github_login;size:128;not null" json:"githubLogin"`
|
||||
AccessTokenEnc string `gorm:"column:access_token_enc;type:text;not null" json:"-"`
|
||||
Scope string `gorm:"column:scope;size:255" json:"scope"`
|
||||
ConnectedAt time.Time `gorm:"column:connected_at;not null" json:"connectedAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
}
|
||||
|
||||
func (StaffGitHubAuth) TableName() string { return "staff_github_auth" }
|
||||
Reference in New Issue
Block a user