Private
Public Access
1
0

新增: SFTP直连+网站预览+OSS区域嗅探+热键+BGM播放

This commit is contained in:
2026-05-12 11:06:28 +08:00
parent 545d7a864d
commit 2a363fd729
62 changed files with 6687 additions and 660 deletions

View 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" }

View File

@@ -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"`

View 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" }