Comment all new code
Some checks are pending
/ test (push) Waiting to run

This commit is contained in:
Melody Becker 2025-04-02 15:33:07 +02:00
parent b6f12b7acf
commit 8f8ad3035a
Signed by: mstar
SSH key fingerprint: SHA256:9VAo09aaVNTWKzPW7Hq2LW+ox9OdwmTSHRoD4mlz1yI
33 changed files with 166 additions and 111 deletions

View file

@ -6,9 +6,10 @@ import (
"gorm.io/gorm"
)
// Metadata for describing some media
// Media is, at least for Linstrom, always stored on a separate server,
// be that the remote server it originated from or an s3 bucket
// MediaMetadata contains metadata about some media file.
// These files are never stored directly by Linstrom.
// Instead, they are either stored on the remote server they originated from
// or an s3 bucket if uploaded to Linstrom.
type MediaMetadata struct {
ID string `gorm:"primarykey;type:uuid;default:gen_random_uuid()"` // The unique ID of this media file
CreatedAt time.Time // When this entry was created
@ -17,7 +18,7 @@ type MediaMetadata struct {
// 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
DeletedAt gorm.DeletedAt `gorm:"index"`
OwnedBy string // Account id this media belongs to
OwnedById string // Account id this media belongs to
Remote bool // whether the attachment is a remote one
// Where the media is stored. Url
Location string