- 将skuName中的图片外移至dataResource

This commit is contained in:
gazebo
2019-09-26 08:35:26 +08:00
parent 1766adf203
commit 7f46072cc5
15 changed files with 507 additions and 171 deletions

View File

@@ -1,12 +1,13 @@
package model
var (
ValideMimeTypes = map[string]int{
"image/jpeg": 1,
"image/png": 1,
ValidMimeTypes = map[string][]string{
"image/jpeg": []string{"jpeg", "jpg"},
"image/png": []string{"png"},
"image/gif": []string{"gif"},
"video/mpeg": 1,
"video/mp4": 1,
"video/mpeg": []string{"mpeg", "mpg"},
"video/mp4": []string{"mp4", "m4v"},
}
)
@@ -17,6 +18,7 @@ type DataResource struct {
ResoureType string `orm:"size(48)" json:"resoureType"` // 资料的mime type
Name string `orm:"size(48);index" json:"name"`
IsVendor int8 `json:"isVendor"` // 是否是平台需要的(平台需要才会上传到平台)
MainURL string `orm:"size(512);column(main_url);unique" json:"mainURL"`
QiniuURL string `orm:"size(512);column(qiniu_url);index" json:"qiniuURL"`