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