package model // BrandRunwayImage 走秀图片。 type BrandRunwayImage struct { ID uint32 `gorm:"primaryKey;column:id" json:"id"` CreatedAt uint32 `gorm:"column:created_at" json:"created_at"` UpdatedAt uint32 `gorm:"column:updated_at" json:"updated_at"` IsDeleted uint8 `gorm:"column:is_deleted" json:"is_deleted"` Image string `gorm:"column:image" json:"image"` RunwayID uint32 `gorm:"column:runway_id" json:"runway_id"` BrandID uint32 `gorm:"column:brand_id" json:"brand_id"` Name string `gorm:"column:name" json:"name"` SortOrder uint32 `gorm:"column:sort_order" json:"sort_order"` // 拖拽排序用,由迁移脚本新增 IsDetail uint8 `gorm:"column:is_detail" json:"is_detail"` // 0=主图 1=细节图 // 主副图分组(列由 db/migrations/2026-09-24-01-runway-parent-image-id.sql 添加): // 与 street_snap_images 同构——is_detail=0 为主图(parent_image_id=0); // =1 为细节图,parent_image_id 指向同 runway 内主图的行 id。Look 序号对产品无意义,已移除。 ParentImageID uint32 `gorm:"column:parent_image_id;not null;default:0" json:"parent_image_id"` // 原图大小(字节):worker 下载图片时记录源文件字节数,供后台「图集原图总大小」展示。 // 历史已入库图片为 0(未重爬、无源数据),后台按「—」处理;重爬后自动补齐。 ImageSize int64 `gorm:"column:image_size;not null;default:0" json:"image_size"` } // TableName 指定表名。 func (BrandRunwayImage) TableName() string { return "brand_runway_images" }