Files
yatm/internal/executor/restore/file.go
T
Samuel Cui 4fef653b71 Prepare YATM v1.0.0-alpha.2
Unify file queries and Scan execution, retain indexed Identical results,
improve Job and Preview workflows, and verify release packaging.
2026-10-05 19:08:49 +08:00

33 lines
1.1 KiB
Go

package restore
// File freezes one selected version and its final output.
// It reserves an item's final path across indexing and transfer retries.
type File struct {
ItemID int64 `gorm:"primaryKey;autoIncrement:false"`
Path string `gorm:"not null;uniqueIndex:idx_restore_file_path,where:path <> ''"`
FileID int64 `gorm:"index"`
FileVersionID int64
ParentID int64
Name string
Reconnect bool
LastArchivedAtNS *int64 `json:"last_archived_at_ns,string,omitempty"`
DesiredPath string
Signature []byte `gorm:"type:varbinary(256)"`
Hash []byte `gorm:"type:varbinary(32)"`
Size int64
Mode uint32
MtimeNS int64 `json:"mtime_ns,string"`
Completed bool
ResultFileID int64
Linked bool
Damaged bool
ActualHash []byte `gorm:"type:varbinary(32)"`
ActualSize int64
ResultMessage string
Ready bool
Finalized bool
ReadMediaID int64
}
func (File) TableName() string { return "files" }