alist/internal/model/account.go

34 lines
841 B
Go
Raw Normal View History

2022-06-06 13:48:53 +00:00
package model
2022-06-09 15:05:27 +00:00
import "time"
2022-06-06 13:48:53 +00:00
type Account struct {
2022-06-09 15:05:27 +00:00
ID uint `json:"id" gorm:"primaryKey"`
VirtualPath string `json:"virtual_path" gorm:"unique" binding:"required"`
Index int `json:"index"`
Driver string `json:"driver"`
Status string `json:"status"`
Addition string `json:"addition"`
Remark string `json:"remark"`
Modified time.Time `json:"modified"`
2022-06-07 08:38:31 +00:00
Sort
Proxy
}
type Sort struct {
OrderBy string `json:"order_by"`
OrderDirection string `json:"order_direction"`
ExtractFolder string `json:"extract_folder"`
}
type Proxy struct {
WebProxy string `json:"web_proxy"`
WebdavProxy bool `json:"webdav_proxy"`
WebdavDirect bool `json:"webdav_direct"`
DownProxyUrl string `json:"down_proxy_url"`
2022-06-06 13:48:53 +00:00
}
2022-06-08 08:20:58 +00:00
func (a Account) GetAccount() Account {
return a
}