This commit is contained in:
toom1996
2026-08-30 10:45:34 +08:00
parent a6724265ad
commit 9c3403a903
23 changed files with 284 additions and 508 deletions

View File

@ -8,10 +8,9 @@ type Brand 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"`
Name string `gorm:"column:name" json:"name"`
ShowName string `gorm:"column:show_name" json:"show_name"`
// i18n 列(方案 A):name_en 为规范拉丁名,A-Z 排序/搜索统一基于它;
// name_cn 为中文名;二者皆为空的服务端按 locale 回落。
// (原通用 name / show_name 列已删除,统一由 *_en/*_cn 取代。)
NameEn string `gorm:"column:name_en" json:"name_en"`
NameCn string `gorm:"column:name_cn" json:"name_cn"`
IsDeleted uint8 `gorm:"column:is_deleted" json:"is_deleted"`

View File

@ -2,11 +2,10 @@ package model
// BrandRunway 走秀档案(对外称"文章")。
type BrandRunway struct {
ID uint32 `gorm:"primaryKey;column:id" json:"id"`
Title string `gorm:"column:title" json:"title"`
Description string `gorm:"column:description" json:"description"`
ID uint32 `gorm:"primaryKey;column:id" json:"id"`
// i18n 列(方案 A):*_en 为规范英文(当前数据全英文),*_cn 为中文;
// 服务端按 locale 选列,缺翻译回落另一语言。
// (原通用 title / description 列已删除,统一由 *_en/*_cn 取代。)
TitleEn string `gorm:"column:title_en" json:"title_en"`
TitleCn string `gorm:"column:title_cn" json:"title_cn"`
DescriptionEn string `gorm:"column:description_en" json:"description_en"`
@ -31,15 +30,12 @@ func (BrandRunway) TableName() string { return "brand_runway" }
// RunwayRow 走秀档案的查询投影行。
//
// 独立于 BrandRunway 定义,是为了承载 JOIN brand 得到的 brand_name ——
// 该字段不属于 brand_runway 表,混进实体会污染模型语义。
// 独立于 BrandRunway 定义,是为了承载 JOIN brand 得到的品牌名(en/cn 两列)。
type RunwayRow struct {
ID uint32 `gorm:"column:id"`
BrandID uint32 `gorm:"column:brand_id"`
Title string `gorm:"column:title"`
TitleEn string `gorm:"column:title_en"`
TitleCn string `gorm:"column:title_cn"`
Description string `gorm:"column:description"`
DescriptionEn string `gorm:"column:description_en"`
DescriptionCn string `gorm:"column:description_cn"`
Cover string `gorm:"column:cover"`
@ -50,7 +46,6 @@ type RunwayRow struct {
SeasonCode string `gorm:"column:season_code"`
CreatedAt uint32 `gorm:"column:created_at"`
SourceURL string `gorm:"column:source_url"`
BrandName string `gorm:"column:brand_name"`
BrandNameEn string `gorm:"column:brand_name_en"`
BrandNameCn string `gorm:"column:brand_name_cn"`
}