This commit is contained in:
toom1996
2026-10-18 17:42:10 +08:00
parent 1b06bd5bda
commit 1de1ec46a6
58 changed files with 5281 additions and 19191 deletions

View File

@ -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 指定表名。