1234567891011121314151617181920212223242526272829 |
- package aimod
- import (
- "github.com/beego/beego/v2/client/orm"
- "time"
- )
- type FileUploadRecord struct {
- FileUploadRecordId int `orm:"column(file_upload_record_id);pk"`
- AdminId int `description:"用户id"`
- FileUrl string `description:"文件地址"`
- FileName string `description:"文件名称"`
- OpenaiFileId string `description:"openai返回的文件id"`
- OpenaiFileName string `description:"openai返回的文件名称"`
- OpenaiObject string `description:"openai返回的文件对象"`
- OpenaiStatus string `description:"openai返回的文件状态"`
- OpenaiPurpose string `description:"openai返回的提示词"`
- OpenaiStatusDetails string `description:"openai返回的文件状态详情"`
- OpenaiCreatedAt int64 `description:"openai返回的创建时间"`
- CreateTime time.Time `description:"创建时间"`
- ModifyTime time.Time `description:"修改时间"`
- }
- // AddAiChatTopic 新增上传文件记录
- func (obj *FileUploadRecord) AddFileUploadRecord() (lastId int64, err error) {
- o := orm.NewOrmUsingDB("ai")
- lastId, err = o.Insert(obj)
- return
- }
|