update backend
This commit is contained in:
@ -2,10 +2,10 @@ package model
|
||||
|
||||
import "database/sql"
|
||||
|
||||
// StreetSnap 街拍主表(对应 db_dev.street_snap)。
|
||||
// StreetSnap 街拍主表(对应 db_dev.street_snaps)。
|
||||
//
|
||||
// 字段对齐 db_dev 约定:INT UNSIGNED 主键、int unsigned 时间戳、is_deleted 软删、varchar(255)。
|
||||
// 与 brand_runway 双表同构,但**无 brand_id**(街拍不关联品牌,模块自治)。
|
||||
// 与 brand_runways 双表同构,但**无 brand_id**(街拍不关联品牌,模块自治)。
|
||||
type StreetSnap struct {
|
||||
ID uint32 `gorm:"primaryKey;column:id" json:"id"`
|
||||
Title string `gorm:"column:title" json:"title"`
|
||||
@ -19,7 +19,7 @@ type StreetSnap struct {
|
||||
}
|
||||
|
||||
// TableName 指定主表名。
|
||||
func (StreetSnap) TableName() string { return "street_snap" }
|
||||
func (StreetSnap) TableName() string { return "street_snaps" }
|
||||
|
||||
// StreetSnapImage 街拍图片表(对应 db_dev.street_snap_images)。
|
||||
//
|
||||
@ -35,7 +35,6 @@ type StreetSnapImage struct {
|
||||
UpdatedAt uint32 `gorm:"column:updated_at" json:"updated_at"`
|
||||
|
||||
// 去重字段:见 BrandRunwayImage 注释。phash 为 vector(64) 二进制向量(NULL=无法解码)。
|
||||
ContentSha1 string `gorm:"column:content_sha1;type:varchar(64);not null;default:''" json:"content_sha1"`
|
||||
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"`
|
||||
|
||||
Reference in New Issue
Block a user