{backup,snapshot}: Log and display in control

This commit is contained in:
Tom Wiesing 2022-10-03 11:22:45 +02:00
parent 3b112f1b8e
commit 630da9e12f
No known key found for this signature in database
17 changed files with 294 additions and 44 deletions

View file

@ -0,0 +1,18 @@
package models
import "time"
// SnapshotTable is the name of the table the [SnapshotLog] model is stored in
const SnapshotTable = "snapshot"
// Snapshot represents an entry in the snapshot log
type Snapshot struct {
Pk uint `gorm:"column:pk;primaryKey"`
Slug string `gorm:"column:slug"` // slug of instance
Created time.Time `gorm:"column:created"` // time the backup was created
Path string `gorm:"column:path;not null"` // path the backup is stored at
Packed bool `gorm:"column:packed;not null"` // was the backup packed, or was it staging only?
}