Files
pj0235-eai_agentplatform/eai_agentplatform/backend-go/internal/model/certificate.go
T
eaiadminandClaude Code 0455f064ac feat: 新增语音转文字(ASR)功能
- 后端:新增 /api/audio/transcribe 接口,调用 Ollama whisper 进行语音识别
- 前端:新增 AudioTranscribePage.vue 页面,支持 MP3/WAV/M4A/OGG/FLAC 等格式
- 注册路由、工具卡片、智能助手欢迎语更新

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-09-14 00:53:36 +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" }