33 lines
1.2 KiB
Go
33 lines
1.2 KiB
Go
package admission
|
|
|
|
import "time"
|
|
|
|
type Result struct {
|
|
DeviceID string `gorm:"size:36;primaryKey"`
|
|
Address string `gorm:"size:1024;not null"`
|
|
Status string `gorm:"size:32;not null;index"`
|
|
Detail string `gorm:"size:512;not null"`
|
|
CheckedAt time.Time `gorm:"not null"`
|
|
UpdatedAt time.Time
|
|
Profiles []Profile `gorm:"foreignKey:DeviceID;references:DeviceID;constraint:OnDelete:CASCADE"`
|
|
}
|
|
|
|
func (Result) TableName() string { return "sense_admission_results" }
|
|
|
|
type Profile struct {
|
|
DeviceID string `gorm:"size:36;primaryKey"`
|
|
Token string `gorm:"size:255;primaryKey"`
|
|
Name string `gorm:"size:255;not null"`
|
|
Width int `gorm:"not null"`
|
|
Height int `gorm:"not null"`
|
|
Encoding string `gorm:"size:32;not null"`
|
|
StreamURI string `gorm:"size:2048;not null"`
|
|
Kind string `gorm:"size:16;not null"`
|
|
VerificationStatus string `gorm:"size:32;not null"`
|
|
VerificationLatencyMS int64 `gorm:"not null"`
|
|
VerificationDetail string `gorm:"size:512;not null"`
|
|
UpdatedAt time.Time
|
|
}
|
|
|
|
func (Profile) TableName() string { return "sense_admission_profiles" }
|