update
This commit is contained in:
@ -1,7 +1,5 @@
|
||||
package model
|
||||
|
||||
import "database/sql"
|
||||
|
||||
// BrandRunwayImage 走秀图片。
|
||||
type BrandRunwayImage struct {
|
||||
ID uint32 `gorm:"primaryKey;column:id" json:"id"`
|
||||
@ -23,13 +21,6 @@ type BrandRunwayImage struct {
|
||||
// 原图大小(字节):worker 下载图片时记录源文件字节数,供后台「图集原图总大小」展示。
|
||||
// 历史已入库图片为 0(未重爬、无源数据),后台按「—」处理;重爬后自动补齐。
|
||||
ImageSize int64 `gorm:"column:image_size;not null;default:0" json:"image_size"`
|
||||
|
||||
// 去重字段(近重复 + 语义 embedding 留痕):
|
||||
// phash 为 dHash 的 pgvector 二进制向量(vector(64)),NULL 表示无法解码(如 webp),不参与检索;
|
||||
// is_duplicate / dup_of 仅在命中近重复时标记,供人工审核留痕,不阻断入库。
|
||||
Phash sql.NullString `gorm:"column:phash;type:vector(64)" json:"phash"`
|
||||
IsDuplicate uint8 `gorm:"column:is_duplicate;not null;default:0" json:"is_duplicate"`
|
||||
DupOf string `gorm:"column:dup_of;type:varchar(32);not null;default:''" json:"dup_of"`
|
||||
}
|
||||
|
||||
// TableName 指定表名。
|
||||
|
||||
@ -1,7 +1,5 @@
|
||||
package model
|
||||
|
||||
import "database/sql"
|
||||
|
||||
// StreetSnap 街拍主表(对应 db_dev.street_snaps)。
|
||||
//
|
||||
// 字段对齐 db_dev 约定:INT UNSIGNED 主键、int unsigned 时间戳、is_deleted 软删、varchar(255)。
|
||||
@ -41,11 +39,6 @@ type StreetSnapImage struct {
|
||||
CreatedAt uint32 `gorm:"column:created_at" json:"created_at"`
|
||||
UpdatedAt uint32 `gorm:"column:updated_at" json:"updated_at"`
|
||||
|
||||
// 去重字段:见 BrandRunwayImage 注释。phash 为 vector(64) 二进制向量(NULL=无法解码)。
|
||||
Phash sql.NullString `gorm:"column:phash;type:vector(64)" json:"phash"`
|
||||
IsDuplicate uint8 `gorm:"column:is_duplicate;not null;default:0" json:"is_duplicate"`
|
||||
DupOf string `gorm:"column:dup_of;type:varchar(32);not null;default:''" json:"dup_of"`
|
||||
|
||||
// 主副图分组(列由 db/migrations/2026-09-21-01-street-main-detail.sql 添加):
|
||||
// is_detail=0 为主图(parent_image_id=0);=1 为副图,parent_image_id 指向同专辑内主图的行 id。
|
||||
IsDetail uint8 `gorm:"column:is_detail;not null;default:0" json:"is_detail"`
|
||||
|
||||
Reference in New Issue
Block a user