Files
jx-callback/business/model/common.go
2019-09-27 09:23:11 +08:00

33 lines
1002 B
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package model
const (
ImgTypeMain = 1 // 商品主图
ImgTypeDesc = 2 // 商品描述详情
)
var (
ValidMimeTypes = map[string][]string{
"image/jpeg": []string{"jpeg", "jpg"},
"image/png": []string{"png"},
// "image/gif": []string{"gif"}, // 美团不支持GIF
"video/mpeg": []string{"mpeg", "mpg"},
"video/mp4": []string{"mp4", "m4v"},
}
)
type DataResource struct {
ModelIDCUL
HashCode string `orm:"size(48);unique" json:"hashCode"`
ResourceType string `orm:"size(48)" json:"resourceType"` // 资料的mime type
Name string `orm:"size(48);index" json:"name"`
UseType int8 `json:"isVendor"` // 图资源使用方式大于0才可能需要上传至平台
MainURL string `orm:"size(512);column(main_url);unique" json:"mainURL"`
QiniuURL string `orm:"size(512);column(qiniu_url);index" json:"qiniuURL"`
EbaiURL string `orm:"size(512);column(ebai_url);index" json:"ebaiURL"`
MtwmURL string `orm:"size(512);column(mtwm_url);index" json:"mtwmURL"`
}