tank/rest/matter_model.go
2018-07-23 21:29:50 +08:00

25 lines
701 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package rest
/**
* 文件。alien表示是否是应用内使用的文件比如说蓝眼云盘的头像alien = true 这种文件在上传时不需要指定存放目录,会统一放在同一个文件夹下。
*/
type Matter struct {
Base
Puuid string `json:"puuid"`
UserUuid string `json:"userUuid"`
Dir bool `json:"dir"`
Alien bool `json:"alien"`
Name string `json:"name"`
Md5 string `json:"md5"`
Size int64 `json:"size"`
Privacy bool `json:"privacy"`
Path string `json:"path"`
Parent *Matter `gorm:"-" json:"parent"`
}
// set File's table name to be `profiles`
func (Matter) TableName() string {
return TABLE_PREFIX + "matter"
}