包含前端(Vue3 + VueFlow 画布)、后端(Go)、文档体系。 - 工作台画布:节点拖放、连线模式、右键菜单、AI 助手 - 后端:连接器 API、专员种子数据 - 导航:左侧导航、工坊、市场、控制台
21 lines
987 B
Go
21 lines
987 B
Go
package model
|
|
|
|
import "time"
|
|
|
|
// Question 题目表
|
|
type Question struct {
|
|
ID uint `gorm:"primaryKey" json:"id"`
|
|
Domain string `gorm:"size:16;not null;index" json:"domain"` // company / product / sales
|
|
CourseID *uint `gorm:"index" json:"course_id"`
|
|
Type string `gorm:"size:16;not null" json:"type"` // single / multiple / judge
|
|
Stem string `gorm:"type:text;not null" json:"stem"`
|
|
Options string `gorm:"type:text;not null" json:"options"` // JSON 数组:["A","B","C"]
|
|
Answer string `gorm:"type:text;not null" json:"answer"` // JSON 数组:single=[索引] multiple=[索引...] judge=[bool]
|
|
Explanation string `gorm:"type:text;default:''" json:"explanation"`
|
|
Status string `gorm:"size:16;not null;default:active;index" json:"status"` // active / inactive
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|
|
|
|
func (Question) TableName() string { return "question" }
|