23 lines
774 B
Go
23 lines
774 B
Go
|
package storage
|
||
|
|
||
|
import (
|
||
|
"time"
|
||
|
|
||
|
"gorm.io/gorm"
|
||
|
)
|
||
|
|
||
|
type MediaFile struct {
|
||
|
ID string `gorm:"primarykey"`
|
||
|
CreatedAt time.Time
|
||
|
UpdatedAt time.Time
|
||
|
DeletedAt gorm.DeletedAt `gorm:"index"`
|
||
|
Remote bool // whether the attachment is a remote one
|
||
|
Link string // url if remote attachment, identifier if local
|
||
|
// Whether this media has been cached locally
|
||
|
// Only really used for user and server icons, not attachments
|
||
|
// Reason: Attachments would take way to much space considering that they are often only loaded a few times at most
|
||
|
// And caching a file for those few times would be a waste of storage
|
||
|
// Caching user and server icons locally however should reduce burden on remote servers by quite a bit though
|
||
|
LocallyCached bool
|
||
|
}
|