This commit is contained in:
Melody 2024-08-28 17:20:38 +02:00
parent 94197780e1
commit 2977f09245
32 changed files with 763 additions and 936 deletions

View file

@ -7,9 +7,9 @@ import (
)
type MediaFile struct {
ID string `gorm:"primarykey"` // The unique ID of this media file
CreatedAt time.Time // When this entry was created
UpdatedAt time.Time // When this entry was last updated
ID string `gorm:"primarykey"` // The unique ID of this media file
CreatedAt time.Time // When this entry was created
UpdatedAt time.Time // When this entry was last updated
// When this entry was deleted (for soft deletions)
// Soft delete means that this entry still exists in the db, but gorm won't include it anymore unless specifically told to
// If not null, this entry is marked as deleted
@ -25,12 +25,3 @@ type MediaFile struct {
// Caching user and server icons locally however should reduce burden on remote servers by quite a bit though
LocallyCached bool
}
// Placeholder media file. Acts as placeholder for media file fields that have not been initialised yet but need a value
var placeholderMediaFile = &MediaFile{
ID: "placeholder",
Remote: false,
Link: "placeholder", // TODO: Replace this with a file path to a staticly included image
Type: "image/png",
LocallyCached: true,
}