🚧 添加model

This commit is contained in:
微凉
2021-03-04 23:50:51 +08:00
parent 9cb548d4f7
commit 389226662c
9 changed files with 183 additions and 2 deletions

View File

@@ -40,4 +40,14 @@ type Config struct {
RefreshToken string `yaml:"refresh_token"`
MaxFilesCount int `yaml:"max_files_count"`
} `yaml:"ali_drive"`
Database struct{
Type string `yaml:"type"`
User string `yaml:"user"`
Password string `yaml:"password"`
Host string `yaml:"host"`
Port int `yaml:"port"`
Name string `yaml:"name"`
TablePrefix string `yaml:"tablePrefix"`
DBFile string `yaml:"dBFile"`
} `yaml:"database"`
}

View File

@@ -2,6 +2,7 @@ package conf
import (
"github.com/patrickmn/go-cache"
"gorm.io/gorm"
"net/http"
)
@@ -17,6 +18,8 @@ var(
Cache *cache.Cache // cache
DB *gorm.DB
Origins []string // allow origins
)