You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1.9 KiB

package model
import "bkb-seller/global"
type SourceFile struct {
global.MG_MODEL
UserID string `gorm:"size:50" json:"userId"` // 用户id
Level int `gorm:"size:2;default:1" json:"level"` //文件层级
ParentID uint `gorm:"size:10" json:"parentId"` //父级id
Type string `gorm:"size:4" json:"type"` //文件类型 1=图片 2=视频 3=文件 4-文件夹
FileLen int `gorm:"" json:"fileLen"` //文件时长
FileSize int `gorm:"type:int(20)" json:"fileSize"` //文件大小
FileUrl string `gorm:"size:255" json:"fileUrl"` //文件在服务器端的地址
FileName string `gorm:"size:255" json:"fileName"` //文件名称
Md5 string `gorm:"size:255" json:"md5"` //文件md5
UrlMd5 string `gorm:"size:32"` //文件url md5
Height int `gorm:"" json:"height"` //尺寸高
Width int `gorm:"" json:"width"` //尺寸宽
Ratio string `gorm:"size:30" json:"ratio"` //比例
Status string `gorm:"size:4" json:"status"` //状态 1-已上传 0-正在上传 2-上传失败
Remark string `gorm:"size:255" json:"remark"` //备注
global.MG_Video
}
type SourceFileList struct {
SourceFile
ConvertUrl string `gorm:"-" json:"convertUrl"`
global.TIME_MODEL_VIEW
}
type SourceFileTreeList struct {
global.MG_MODEL
FileName string `gorm:"size:255" json:"fileName"` //文件名称
ParentID uint `gorm:"size:10" json:"parentId"` //父级id
FileUrl string `gorm:"size:255" json:"fileUrl"` //文件在服务器端的地址
Height int `gorm:"" json:"height"` //尺寸高
Width int `gorm:"" json:"width"` //尺寸宽
FileSize int `gorm:"type:int(20)" json:"fileSize"` //文件大小
Children []SourceFileTreeList
}
func (SourceFile) TableName() string {
return "source_file"
}
func (SourceFileList) TableName() string {
return "source_file"
}