chat_records.gen.go 1.7 KB

1234567891011121314151617181920212223242526272829303132
  1. // Code generated by gorm.io/gen. DO NOT EDIT.
  2. // Code generated by gorm.io/gen. DO NOT EDIT.
  3. // Code generated by gorm.io/gen. DO NOT EDIT.
  4. package model
  5. import (
  6. "time"
  7. "gorm.io/gorm"
  8. )
  9. const TableNameChatRecord = "chat_records"
  10. // ChatRecord 聊天历史记录
  11. type ChatRecord struct {
  12. ID int64 `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
  13. CreatedAt time.Time `gorm:"column:created_at;not null;comment:Create Time | 创建日期" json:"created_at"` // Create Time | 创建日期
  14. UpdatedAt time.Time `gorm:"column:updated_at;not null;comment:Update Time | 修改日期" json:"updated_at"` // Update Time | 修改日期
  15. DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;comment:Delete Time | 删除日期" json:"deleted_at"` // Delete Time | 删除日期
  16. Content string `gorm:"column:content;comment:内容" json:"content"` // 内容
  17. ContentType int64 `gorm:"column:content_type;default:1;comment:类型:1-提问 2-回答" json:"content_type"` // 类型:1-提问 2-回答
  18. SessionID int64 `gorm:"column:session_id;not null;comment:会话ID" json:"session_id"` // 会话ID
  19. UserID int64 `gorm:"column:user_id;not null;comment:用户ID" json:"user_id"` // 用户ID
  20. BotID int64 `gorm:"column:bot_id;not null;comment:聊天ID" json:"bot_id"` // 聊天ID
  21. BotType int64 `gorm:"column:bot_type;comment:用户类型:1-微信 2-小程序 3-智能体" json:"bot_type"` // 用户类型:1-微信 2-小程序 3-智能体
  22. }
  23. // TableName ChatRecord's table name
  24. func (*ChatRecord) TableName() string {
  25. return TableNameChatRecord
  26. }