- 菜谱相关
This commit is contained in:
31
business/model/common.go
Normal file
31
business/model/common.go
Normal file
@@ -0,0 +1,31 @@
|
||||
package model
|
||||
|
||||
var (
|
||||
ValideMimeTypes = map[string]int{
|
||||
"image/jpeg": 1,
|
||||
"image/png": 1,
|
||||
|
||||
"video/mpeg": 1,
|
||||
"video/mp4": 1,
|
||||
}
|
||||
)
|
||||
|
||||
type DataResource struct {
|
||||
ModelIDCUL
|
||||
|
||||
HashCode string `orm:"size(48);unique" json:"hash_code"`
|
||||
ResoureType string // 资料的mime type
|
||||
|
||||
Name string `orm:"size(48)" json:"name"`
|
||||
|
||||
MainURL string
|
||||
QiniuURL string
|
||||
EbaiURL string
|
||||
MtwmURL string
|
||||
}
|
||||
|
||||
func (*DataResource) TableUnique() [][]string {
|
||||
return [][]string{
|
||||
[]string{"HashCode", "ResoureType"},
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user