新增: SFTP直连+网站预览+OSS区域嗅探+热键+BGM播放
This commit is contained in:
12
internal/storage/models/bgm_playlist.go
Normal file
12
internal/storage/models/bgm_playlist.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package models
|
||||
|
||||
// BgmPlaylist BGM 播放列表持久化
|
||||
type BgmPlaylist struct {
|
||||
ID uint `gorm:"primaryKey"`
|
||||
Name string `gorm:"not null;size:255"`
|
||||
Path string `gorm:"not null;size:500;uniqueIndex"`
|
||||
ProfileID string `gorm:"type:varchar(50)" json:"profile_id"`
|
||||
Sort uint `gorm:"not null"`
|
||||
}
|
||||
|
||||
func (BgmPlaylist) TableName() string { return "bgm_playlist" }
|
||||
@@ -11,7 +11,8 @@ type ConnectionProfile struct {
|
||||
Username string `gorm:"type:varchar(100);default:root" json:"username"`
|
||||
Password string `gorm:"type:text" json:"password"`
|
||||
KeyPath string `gorm:"type:text" json:"key_path"`
|
||||
Type string `gorm:"type:varchar(20);not null;index" json:"type"` // local|remote|sftp|qiniu|aliyun
|
||||
Type string `gorm:"type:varchar(20);not null;index" json:"type"` // local|remote|sftp|oss
|
||||
Provider string `gorm:"type:varchar(20)" json:"provider"` // qiniu|aliyun (仅 type=oss)
|
||||
Token string `gorm:"type:text" json:"token"`
|
||||
AccessKey string `gorm:"type:text" json:"access_key"`
|
||||
SecretKey string `gorm:"type:text" json:"secret_key"`
|
||||
|
||||
17
internal/storage/models/download_cache.go
Normal file
17
internal/storage/models/download_cache.go
Normal file
@@ -0,0 +1,17 @@
|
||||
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" }
|
||||
Reference in New Issue
Block a user