package gorm_model import ( "time" ) type YounggeeProductPhoto struct { ProductPhotoId int `gorm:"column:product_photo_id;type:int(11);primary_key" json:"product_photo_id"` // 商品图片id PhotoUrl string `gorm:"column:photo_url;type:varchar(1000)" json:"photo_url"` // 图片或视频url Symbol int `gorm:"column:symbol;type:tinyint(4)" json:"symbol"` // 图片为主图或详情图标志位,1为主图,2为详情图,3为视频 ProductId int `gorm:"column:product_id;type:int(11)" json:"product_id"` // 所属商品id CreatedAt time.Time `gorm:"column:created_at;type:datetime" json:"created_at"` // 创建时间 } func (m *YounggeeProductPhoto) TableName() string { return "younggee_product_photo" }