Finish the second step of work.

This commit is contained in:
zicla
2018-12-05 21:22:31 +08:00
parent ea1bd27aa8
commit b7e8a3c1a1
11 changed files with 182 additions and 93 deletions

View File

@ -5,13 +5,13 @@ package rest
*/
type ImageCache struct {
Base
UserUuid string `json:"userUuid"`
MatterUuid string `json:"matterUuid"`
Mode string `json:"mode"`
Md5 string `json:"md5"`
Size int64 `json:"size"`
Path string `json:"path"`
Matter *Matter `gorm:"-" json:"matter"`
UserUuid string `json:"userUuid" gorm:"type:char(36)"`
MatterUuid string `json:"matterUuid" gorm:"type:char(36);index:idx_mu"`
Mode string `json:"mode" gorm:"type:varchar(512)"`
Md5 string `json:"md5" gorm:"type:varchar(45)"`
Size int64 `json:"size" gorm:"type:bigint(20) not null;default:0"`
Path string `json:"path" gorm:"type:varchar(512)"`
Matter *Matter `json:"matter" gorm:"-"`
}
// set File's table name to be `profiles`