Browse Source

新增主题id

hongze 1 year ago
parent
commit
ac3810fce0
2 changed files with 9 additions and 7 deletions
  1. 1 0
      controllers/ai/ai_file.go
  2. 8 7
      models/resource.go

+ 1 - 0
controllers/ai/ai_file.go

@@ -202,6 +202,7 @@ func (this *AiFileController) FileUpload() {
 		}
 		resp.OpenaiFileId = uploadObj.OpenaiFileId
 	}
+	resp.AiChatTopicId = aiChatTopicId
 	br.Msg = "上传成功"
 	br.Ret = 200
 	br.Success = true

+ 8 - 7
models/resource.go

@@ -13,13 +13,14 @@ type Resource struct {
 }
 
 type ResourceResp struct {
-	Id           int64  `orm:"column(id);" description:"用户id"`
-	ResourceUrl  string `description:"资源地址"`
-	PlaySeconds  uint32 `description:"播放时长,单位秒"`
-	Source       string
-	CacheKey     string
-	ResourceName string `description:"资源名称"`
-	OpenaiFileId string `description:"openai返回的文件id"`
+	Id            int64  `orm:"column(id);" description:"用户id"`
+	ResourceUrl   string `description:"资源地址"`
+	PlaySeconds   uint32 `description:"播放时长,单位秒"`
+	Source        string
+	CacheKey      string
+	ResourceName  string `description:"资源名称"`
+	OpenaiFileId  string `description:"openai返回的文件id"`
+	AiChatTopicId int    `description:"主题id"`
 }
 
 func AddResource(item *Resource) (newId int64, err error) {