|
|
@@ -6,7 +6,8 @@ type DtMaterial struct {
|
|
|
Name string `json:"name" gorm:"column:name;type:varchar(128);not null;comment:文件名"`
|
|
|
Path string `json:"path" gorm:"column:path;type:varchar(512);not null;comment:文件路径"`
|
|
|
Url string `json:"url" gorm:"column:url;type:varchar(512);not null;comment:访问URL"`
|
|
|
- Type string `json:"type" gorm:"column:type;type:varchar(32);not null;index:idx_type;comment:类型: image/video/audio/document"`
|
|
|
+ Content string `json:"content" gorm:"column:content;type:text;comment:文字内容(type=text时使用)"`
|
|
|
+ Type string `json:"type" gorm:"column:type;type:varchar(32);not null;index:idx_type;comment:类型: image/video/audio/document/text"`
|
|
|
MimeType string `json:"mimeType" gorm:"column:mime_type;type:varchar(128);comment:MIME类型"`
|
|
|
Size int64 `json:"size" gorm:"column:size;type:bigint;default:0;comment:文件大小(字节)"`
|
|
|
Width int `json:"width" gorm:"column:width;type:int;default:0;comment:宽度(图片/视频)"`
|