product_photo.go 861 B

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