update
This commit is contained in:
34
internal/dto/ingest.go
Normal file
34
internal/dto/ingest.go
Normal file
@ -0,0 +1,34 @@
|
||||
package dto
|
||||
|
||||
// 入库类型(payload.Kind)。
|
||||
const (
|
||||
IngestKindRunway = "runway" // 走秀(默认,需 brand_uid)
|
||||
IngestKindStreet = "street" // 街拍(无品牌,需 city/title)
|
||||
)
|
||||
|
||||
// RunwayIngest 爬虫上报的单场载荷(ingest_jobs.payload 的 JSON 结构)。
|
||||
//
|
||||
// 设计:爬虫只传「元数据 + 图片 source_url 列表」,不传图、不直写业务表;
|
||||
// 下载与存储上传由后台 worker 完成。
|
||||
//
|
||||
// 通用字段:
|
||||
// - Kind: runway | street(决定 worker 走哪条晋升管线;缺省 runway)
|
||||
// - SourceURL: 采集来源链接(去重 / 溯源,必填)
|
||||
// - Images: 图片原始 URL 列表(worker 下载)
|
||||
//
|
||||
// runway 专属:BrandUID(品牌 hashid 编码,必填)、TitleEn/TitleCn、Description*、Year、Season、CollectionType。
|
||||
// street 专属:City(地区/城市)、TitleEn(单标题)。
|
||||
type RunwayIngest struct {
|
||||
Kind string `json:"kind"` // runway | street,缺省 runway
|
||||
BrandUID string `json:"brand_uid"` // 品牌编码 id(hashid),runway 必填
|
||||
TitleEn string `json:"title_en"` // 英文标题(runway 优先;street 作为单标题)
|
||||
TitleCn string `json:"title_cn"` // 中文标题(可空)
|
||||
DescriptionEn string `json:"description_en"` // 英文描述(可空)
|
||||
DescriptionCn string `json:"description_cn"` // 中文描述(可空)
|
||||
Year uint16 `json:"year"` // 年份,如 2026
|
||||
Season string `json:"season"` // spring / fall
|
||||
CollectionType string `json:"collection_type"` // rtw / menswear / couture / resort / pre_fall
|
||||
City string `json:"city"` // 地区/城市(street 用)
|
||||
SourceURL string `json:"source_url"` // 采集来源链接(去重 / 溯源,必填)
|
||||
Images []string `json:"images"` // 图片原始 URL 列表(worker 下载)
|
||||
}
|
||||
Reference in New Issue
Block a user