feat: more reorganisation and keys endpoint
This commit is contained in:
@@ -1,18 +1,10 @@
|
||||
package database
|
||||
|
||||
import (
|
||||
"orbits-server/internal/shared/utility"
|
||||
"time"
|
||||
)
|
||||
|
||||
type MediaType string
|
||||
|
||||
const (
|
||||
Video MediaType = "video"
|
||||
Presentation MediaType = "presentation"
|
||||
Internet MediaType = "internet"
|
||||
Unspecified MediaType = "unspecified"
|
||||
)
|
||||
|
||||
type Timestamps struct {
|
||||
CreatedAt time.Time `gorm:"not null;"`
|
||||
UpdatedAt time.Time `gorm:"not null;"`
|
||||
@@ -26,10 +18,10 @@ type Command struct {
|
||||
// video
|
||||
// presentation
|
||||
// internet URL
|
||||
MediaType MediaType `gorm:"type:varchar(20);not null"` // Must specify what kind of file it is
|
||||
MediaType utility.MediaType `gorm:"type:varchar(20);not null;"` // Must specify what kind of file it is
|
||||
// Must be target list who are compelled to listen to the command
|
||||
// can be none when there is no targets specified (init stage)
|
||||
Targets []string `gorm:"type:json"`
|
||||
Targets []string `gorm:"type:json;"`
|
||||
// Must be the location where the file is downloadable on the API
|
||||
// can be none when there is no media specified (init stage)
|
||||
Location string
|
||||
@@ -64,7 +56,7 @@ type File struct {
|
||||
// video
|
||||
// presentation
|
||||
// internet URL
|
||||
MediaType MediaType `gorm:"type:varchar(20);not null;"`
|
||||
MediaType utility.MediaType `gorm:"type:varchar(20);not null;"`
|
||||
// the name given by the user
|
||||
MetaName string
|
||||
FileName string `gorm:"not null;"`
|
||||
|
||||
Reference in New Issue
Block a user