18 lines
649 B
Go
18 lines
649 B
Go
package models
|
|
|
|
import "time"
|
|
|
|
// DownloadCache 下载缓存模型(SQLite 持久化)
|
|
type DownloadCache struct {
|
|
ID uint `gorm:"primaryKey"`
|
|
Transport string `gorm:"not null;size:10;index:idx_cache_lookup"`
|
|
ConnID string `gorm:"not null;index:idx_cache_lookup"`
|
|
RemotePath string `gorm:"not null;index:idx_cache_lookup"`
|
|
FileSize int64 `gorm:"not null;index:idx_cache_lookup"`
|
|
ModTime string `gorm:"not null;index:idx_cache_lookup"`
|
|
LocalPath string `gorm:"not null"`
|
|
DownloadedAt time.Time `gorm:"not null"`
|
|
}
|
|
|
|
func (DownloadCache) TableName() string { return "download_cache" }
|