mirror of
https://github.com/Awuqing/BackupX.git
synced 2026-05-07 06:32:48 +08:00
Three community-requested features: 1. CLI password reset: `backupx reset-password --username admin --password xxx` Docker users can run via `docker exec`. No full app init needed. 2. Audit logging: async fire-and-forget audit trail for all key operations (login, CRUD on tasks/targets/records, settings changes). New UI page at /audit with category filter and pagination. 3. Multi-source path backup: file backup tasks now support multiple source directories packed into a single tar archive. Backward compatible with existing single sourcePath field.
24 lines
1.1 KiB
Go
24 lines
1.1 KiB
Go
package model
|
|
|
|
import "time"
|
|
|
|
type StorageTarget struct {
|
|
ID uint `gorm:"primaryKey" json:"id"`
|
|
Name string `gorm:"size:128;uniqueIndex;not null" json:"name"`
|
|
Type string `gorm:"size:32;index;not null" json:"type"`
|
|
Description string `gorm:"size:255" json:"description"`
|
|
Enabled bool `gorm:"not null;default:true" json:"enabled"`
|
|
Starred bool `gorm:"not null;default:false" json:"starred"`
|
|
ConfigCiphertext string `gorm:"column:config_ciphertext;type:text;not null" json:"-"`
|
|
ConfigVersion int `gorm:"not null;default:1" json:"configVersion"`
|
|
LastTestedAt *time.Time `gorm:"column:last_tested_at" json:"lastTestedAt,omitempty"`
|
|
LastTestStatus string `gorm:"column:last_test_status;size:32;not null;default:'unknown'" json:"lastTestStatus"`
|
|
LastTestMessage string `gorm:"column:last_test_message;size:512" json:"lastTestMessage"`
|
|
CreatedAt time.Time `json:"createdAt"`
|
|
UpdatedAt time.Time `json:"updatedAt"`
|
|
}
|
|
|
|
func (StorageTarget) TableName() string {
|
|
return "storage_targets"
|
|
}
|