修改结构体

This commit is contained in:
Kayee 2025-12-17 09:54:35 +08:00
parent 5e88d21413
commit 7abcad0396

View File

@ -10,7 +10,7 @@ type House struct {
Name string `json:"name" gorm:"size:128;not null;index;comment:名字"` Name string `json:"name" gorm:"size:128;not null;index;comment:名字"`
Title string `json:"title" gorm:"size:128;not null;index;comment:标题"` Title string `json:"title" gorm:"size:128;not null;index;comment:标题"`
Cover string `json:"cover" gorm:"size:2048;not null;comment:封面"` Cover string `json:"cover" gorm:"size:2048;not null;comment:封面"`
Price int64 `json:"price" gorm:"size:11;comment:价格"` Price string `json:"price" gorm:"comment:价格"`
Labels *[]string `json:"labels" gorm:"serializer:json;comment:标签数组"` Labels *[]string `json:"labels" gorm:"serializer:json;comment:标签数组"`
Images *[]string `json:"images" gorm:"serializer:json;comment:详图数组"` Images *[]string `json:"images" gorm:"serializer:json;comment:详图数组"`
Videos *[]string `json:"videos" gorm:"serializer:json;comment:视频数组"` Videos *[]string `json:"videos" gorm:"serializer:json;comment:视频数组"`
@ -112,7 +112,7 @@ type HouseForm struct {
Name string `json:"name" ` Name string `json:"name" `
Title string `json:"title" ` Title string `json:"title" `
Cover string `json:"cover" ` Cover string `json:"cover" `
Price int64 `json:"price" ` Price string `json:"price" `
Labels *[]string `json:"labels" ` Labels *[]string `json:"labels" `
Images *[]string `json:"images" ` Images *[]string `json:"images" `
Videos *[]string `json:"videos"` Videos *[]string `json:"videos"`