chore: fix a small issue with video modes
This commit is contained in:
@@ -6,13 +6,13 @@ import (
|
||||
"gorm.io/datatypes"
|
||||
)
|
||||
|
||||
type Mode string
|
||||
type MediaType string
|
||||
|
||||
const (
|
||||
ModeUnspecified Mode = "unspecified"
|
||||
ModeVideo Mode = "video"
|
||||
ModePresentation Mode = "presentation"
|
||||
ModeInternet Mode = "internet"
|
||||
Unspecified MediaType = "unspecified"
|
||||
Video MediaType = "video"
|
||||
Presentation MediaType = "presentation"
|
||||
Internet MediaType = "internet"
|
||||
)
|
||||
|
||||
type State struct {
|
||||
@@ -21,7 +21,7 @@ type State struct {
|
||||
// video
|
||||
// presentation
|
||||
// internet URL
|
||||
Mode Mode `gorm:"type:varchar(20);not null"` // Must specify what kind of file it is
|
||||
MediaType MediaType `gorm:"type:varchar(20);not null"` // Must specify what kind of file it is
|
||||
Targets datatypes.JSON
|
||||
Location string // Must be the location where the file is downloadable on the API
|
||||
UpdatedAt time.Time
|
||||
@@ -39,8 +39,8 @@ type Device struct {
|
||||
}
|
||||
|
||||
type File struct {
|
||||
ID int `gorm:"primaryKey"`
|
||||
Mode Mode `gorm:"type:varchar(20);not null"`
|
||||
ID int `gorm:"primaryKey"`
|
||||
MediaType MediaType `gorm:"type:varchar(20);not null;"`
|
||||
GivenName string
|
||||
Filepath string
|
||||
Checksum string // base64 encoded sha512 checksum
|
||||
|
||||
Reference in New Issue
Block a user