feat: set cache_expiration for each storage (close #1455)

This commit is contained in:
Noah Hsu
2022-08-07 13:33:53 +08:00
parent 5b40254e3b
commit 2e8322e99b
4 changed files with 30 additions and 22 deletions

View File

@ -3,14 +3,15 @@ package model
import "time"
type Storage struct {
ID uint `json:"id" gorm:"primaryKey"` // unique key
MountPath string `json:"mount_path" gorm:"unique" binding:"required"` // must be standardized
Index int `json:"index"` // use to sort
Driver string `json:"driver"` // driver used
Status string `json:"status"`
Addition string `json:"addition" gorm:"type:text"` // Additional information, defined in the corresponding driver
Remark string `json:"remark"`
Modified time.Time `json:"modified"`
ID uint `json:"id" gorm:"primaryKey"` // unique key
MountPath string `json:"mount_path" gorm:"unique" binding:"required"` // must be standardized
Index int `json:"index"` // use to sort
Driver string `json:"driver"` // driver used
CacheExpiration int `json:"cache_expiration"` // cache expire time
Status string `json:"status"`
Addition string `json:"addition" gorm:"type:text"` // Additional information, defined in the corresponding driver
Remark string `json:"remark"`
Modified time.Time `json:"modified"`
Sort
Proxy
}