2024-05-31 09:54:39 +00:00
|
|
|
package storage
|
|
|
|
|
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
|
|
|
|
"gorm.io/gorm"
|
|
|
|
)
|
|
|
|
|
|
|
|
type RemoteServer struct {
|
2024-08-28 15:20:38 +00:00
|
|
|
ID string `gorm:"primarykey"` // ID is also server url
|
|
|
|
CreatedAt time.Time // When this entry was created
|
|
|
|
UpdatedAt time.Time // When this entry was last updated
|
2024-06-06 11:54:50 +00:00
|
|
|
// 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
|
2024-05-31 09:54:39 +00:00
|
|
|
DeletedAt gorm.DeletedAt `gorm:"index"`
|
|
|
|
ServerType RemoteServerType // What software the server is running. Useful for formatting
|
|
|
|
Name string // What the server wants to be known as (usually same as url)
|
|
|
|
Icon string // ID of a media file
|
|
|
|
IsSelf bool // Whether this server is yours truly
|
|
|
|
}
|