This commit is contained in:
parent
b6f12b7acf
commit
8f8ad3035a
33 changed files with 166 additions and 111 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue