Files
ReSendit/internal/file/model.go
2026-03-21 03:12:13 +01:00

32 lines
1.1 KiB
Go

package file
import (
"time"
)
type FileRecord struct {
ID string `gorm:"primaryKey" json:"id"`
DeletionID string `json:"deletion_id"`
ViewID string `json:"view_id"`
Filename string `json:"filename"`
Path string `json:"-"` // file path on disk (not exposed via JSON)
ExpiresAt time.Time `json:"expires_at"`
DeleteAfterDownload bool `json:"delete_after_download"`
Size int64 `json:"size"`
DownloadCount int `json:"download_count"`
Deleted bool `json:"deleted"`
CreatedAt time.Time `json:"created_at"`
}
type ImportFileRecord struct {
ID string `json:"id"`
DeletionID string `json:"deletion_id"`
Filename string `json:"filename"`
ExpiresAt time.Time `json:"expires_at"`
DeleteAfterDownload bool `json:"delete_after_download"`
Size int64 `json:"size"`
DownloadCount int `json:"download_count"`
Deleted bool `json:"deleted"`
CreatedAt time.Time `json:"created_at"`
}