package llm import ( "eta/eta_api/global" "eta/eta_api/utils" "time" ) type UserLlmChat struct { Id int `gorm:"primaryKey;autoIncrement;comment:会话主键"` UserId int `gorm:"comment:用户id"` ChatTitle string `gorm:"comment:会话标题"` IsDeleted int `gorm:"comment:是否删除"` CreatedTime time.Time `gorm:"comment:创建时间"` UpdateTime time.Time `gorm:"autoUpdateTime;comment:更新时间"` } func (u *UserLlmChat) TableName() string { return "user_llm_chat" } func (u *UserLlmChat) CreateChatSession() (err error) { o := global.DbMap[utils.DbNameAI] err = o.Create(u).Error return }