diff --git a/internal/data/model/collect_task.gen.go b/internal/data/model/collect_task.gen.go index 6353355..484069b 100644 --- a/internal/data/model/collect_task.gen.go +++ b/internal/data/model/collect_task.gen.go @@ -12,19 +12,15 @@ const TableNameCollectTask = "collect_task" // CollectTask mapped from table type CollectTask struct { - ID int64 `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"` - RequestID string `gorm:"column:request_id;not null" json:"request_id"` - CollectID int32 `gorm:"column:collect_id;not null" json:"collect_id"` - ScriptTime string `gorm:"column:script_time;not null" json:"script_time"` - Platform int32 `gorm:"column:platform;not null" json:"platform"` - CollectData int32 `gorm:"column:collect_data;not null" json:"collect_data"` - ShareURL string `gorm:"column:share_url;not null;default:0" json:"share_url"` - ImgURL string `gorm:"column:img_url;not null" json:"img_url"` - PointKeyword string `gorm:"column:point_keyword;not null" json:"point_keyword"` - Res string `gorm:"column:res" json:"res"` - CreatedAt time.Time `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP" json:"created_at"` - UpdatedAt time.Time `gorm:"column:updated_at;not null;default:CURRENT_TIMESTAMP" json:"updated_at"` - Status int32 `gorm:"column:status;not null" json:"status"` + ID int64 `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"` + CollectCode string `gorm:"column:collect_code;not null;default:0" json:"collect_code"` + AiPlatformIndex string `gorm:"column:ai_platform_index;not null;default:0" json:"ai_platform_index"` + ContentHTML string `gorm:"column:content_html;not null" json:"content_html"` + ShareURL string `gorm:"column:share_url;not null;default:0" json:"share_url"` + Source string `gorm:"column:source" json:"source"` + CreatedAt time.Time `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP" json:"created_at"` + UpdatedAt time.Time `gorm:"column:updated_at;not null;default:CURRENT_TIMESTAMP" json:"updated_at"` + Status int32 `gorm:"column:status;not null;default:1" json:"status"` } // TableName CollectTask's table name diff --git a/internal/service/product.go b/internal/service/product.go index e852781..844454d 100644 --- a/internal/service/product.go +++ b/internal/service/product.go @@ -235,7 +235,23 @@ func (p *ProductService) CreateProductInfoByDocx(c *fiber.Ctx) error { return pkg.HandleResponse(c, productInfo) } +type CollectInfo struct { + AIPlatformIndex string `json:"ai_platform_index"` + ContentHtml string `json:"content_html"` + ShareUrl string `json:"share_url"` + Source []Source `json:"source"` +} + +type Source struct { + Title string `json:"name"` + Url string `json:"url"` + PlatformName string `json:"platform"` + PlatformIcon string `json:"Platform_icon"` +} + func (p *ProductService) Collect(c *fiber.Ctx, req *entitys.ProductCollectRequest) error { + + return nil _, err := p.authBiz.ValidateAccessToken(c.UserContext(), req.AccessToken) if err != nil { return err