feat: 添加存储配置管理功能
- 添加存储配置管理页面(列表、创建、编辑) - 支持本地存储、S3、WebDAV、FTP、SFTP 等存储类型 - 添加存储配置测试连接功能 - 本地存储自动初始化且禁止删除 - 修复 Switch 组件状态显示问题 - 添加更新存储配置时的 status 字段支持
This commit is contained in:
@@ -80,6 +80,41 @@ type PaymentChannel struct {
|
||||
DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`
|
||||
}
|
||||
|
||||
type EmailConfig struct {
|
||||
ID uint `gorm:"primaryKey" json:"id"`
|
||||
Name string `gorm:"size:100;not null" json:"name"`
|
||||
SMTPHost string `gorm:"size:100;not null" json:"smtp_host"`
|
||||
SMTPPort int `gorm:"not null" json:"smtp_port"`
|
||||
SMTPUser string `gorm:"size:100;not null" json:"smtp_user"`
|
||||
SMTPPassword string `gorm:"size:255" json:"smtp_password"`
|
||||
SMTPFrom string `gorm:"size:100;not null" json:"smtp_from"`
|
||||
SMTPFromName string `gorm:"size:100" json:"smtp_from_name"`
|
||||
Encryption string `gorm:"size:20;default:tls" json:"encryption"`
|
||||
Status string `gorm:"size:20;default:active" json:"status"`
|
||||
Remark string `gorm:"size:500" json:"remark"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`
|
||||
}
|
||||
|
||||
type StorageConfig struct {
|
||||
ID uint `gorm:"primaryKey" json:"id"`
|
||||
Name string `gorm:"size:100;not null" json:"name"`
|
||||
Type string `gorm:"size:20;not null" json:"type"`
|
||||
Endpoint string `gorm:"size:255" json:"endpoint"`
|
||||
Bucket string `gorm:"size:100" json:"bucket"`
|
||||
AccessKey string `gorm:"size:255" json:"access_key"`
|
||||
SecretKey string `gorm:"size:255" json:"secret_key"`
|
||||
Region string `gorm:"size:50" json:"region"`
|
||||
PathPrefix string `gorm:"size:255" json:"path_prefix"`
|
||||
IsDefault bool `gorm:"default:false" json:"is_default"`
|
||||
Status string `gorm:"size:20;default:active" json:"status"`
|
||||
Remark string `gorm:"size:500" json:"remark"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`
|
||||
}
|
||||
|
||||
// DynamicCode 动态代码模型
|
||||
type DynamicCode struct {
|
||||
ID uint `gorm:"primaryKey" json:"id"`
|
||||
|
||||
Reference in New Issue
Block a user