product_photo.go 679 B

12345678910111213141516
  1. package entity
  2. import "time"
  3. type ProductPhoto struct {
  4. ProductPhotoID int64 `gorm:"column:product_photo_id;primary_key;AUTO_INCREMENT"` // 商品图片id
  5. PhotoUrl string `gorm:"column:photo_url"` // 图片或视频url
  6. PhotoUid string `gorm:"column:photo_uid"`
  7. Symbol int64 `gorm:"column:symbol"` // 图片为主图或详情图标志位,1为主图,2为详情图,3为视频
  8. ProductID int64 `gorm:"column:product_id"` // 所属商品id
  9. CreatedAt time.Time `gorm:"column:created_at"` // 创建时间
  10. }
  11. func (m *ProductPhoto) TableName() string {
  12. return "younggee_product_photo"
  13. }