faq.go 678 B

1234567891011121314151617
  1. package models
  2. import (
  3. "time"
  4. )
  5. // FAQ 常见问题/事件记录模型
  6. // 用于存储客服常见问题的问答记录
  7. type FAQ struct {
  8. ID uint `json:"id" gorm:"primarykey"`
  9. Question string `json:"question" gorm:"type:text;not null"` // 问题
  10. Answer string `json:"answer" gorm:"type:text;not null"` // 答案
  11. Keywords string `json:"keywords" gorm:"type:varchar(500)"` // 关键词,用逗号或空格分隔,用于搜索
  12. CreatedAt time.Time `json:"created_at"` // 创建时间
  13. UpdatedAt time.Time `json:"updated_at"` // 更新时间
  14. }