user_chat_record.go 568 B

1234567891011121314151617
  1. package llm
  2. import "time"
  3. // UserChatRecord 定义用户聊天记录结构体
  4. type UserChatRecord struct {
  5. Id int `gorm:"primaryKey;autoIncrement;comment:主键"`
  6. ChatId int `gorm:"comment:会话id"`
  7. ChatUserType string `gorm:"type:enum('user','assistant');comment:用户方"`
  8. SendTime time.Time `gorm:"comment:发送时间"`
  9. CreatedTime time.Time `gorm:"comment:创建时间"`
  10. UpdateTime time.Time `gorm:"autoUpdateTime;comment:更新时间"`
  11. }
  12. func (u *UserChatRecord) TableName() string {
  13. return "user_chat_record"
  14. }