Files
pj0235-eai_agentplatform/eai_ap_app/backend-go/internal/model/certificate.go
T
eaiadmin 4e8817d768 init: 数字员工平台初始代码
包含前端(Vue3 + VueFlow 画布)、后端(Go)、文档体系。
- 工作台画布:节点拖放、连线模式、右键菜单、AI 助手
- 后端:连接器 API、专员种子数据
- 导航:左侧导航、工坊、市场、控制台
2026-08-18 20:19:58 +08:00

21 lines
977 B
Go

package model
import "time"
// Certificate 考试合格证书:正式考试通过后自动颁发,供培训验收与留存。
// 每张证书对应一条正式考试记录(同一学员同一试卷仅一次正式考,故不会重复发证)。
type Certificate struct {
ID uint `gorm:"primaryKey" json:"id"`
UserID uint `gorm:"not null;index" json:"user_id"`
ExamRecordID uint `gorm:"not null;index" json:"exam_record_id"`
UserName string `gorm:"size:64;not null" json:"user_name"`
ExamName string `gorm:"size:128;not null" json:"exam_name"`
Score int `gorm:"not null" json:"score"`
TotalScore int `gorm:"not null" json:"total_score"`
PassScore int `gorm:"not null" json:"pass_score"`
CertNo string `gorm:"size:64;not null;uniqueIndex" json:"cert_no"`
IssuedAt time.Time `gorm:"not null" json:"issued_at"`
}
func (Certificate) TableName() string { return "certificate" }