Private
Public Access
1
0
Files
u-desk/internal/storage/models/download_cache.go

18 lines
649 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 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" }