package database import ( "time" "gorm.io/datatypes" ) type Mode string const ( ModeUnspecified Mode = "unspecified" ModeVideo Mode = "video" ModePresentation Mode = "presentation" ModeInternet Mode = "internet" ) type State struct { ID int `gorm:"primaryKey"` // unspecified // video // presentation // internet URL Mode Mode `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 } type Device struct { ID int `gorm:"primaryKey"` DeviceType string Hostname string RemoteAddress string Alive bool Compliant bool CreatedAt time.Time UpdatedAt time.Time } type File struct { ID int `gorm:"primaryKey"` Mode Mode `gorm:"type:varchar(20);not null"` GivenName string Filepath string Checksum string // base64 encoded sha512 checksum CreatedAt time.Time UpdatedAt time.Time }