2023-10-26 14:56:36 +02:00
|
|
|
package database
|
|
|
|
|
|
|
|
import (
|
|
|
|
"git.jmbit.de/jmb/patchman/common"
|
|
|
|
"github.com/google/uuid"
|
|
|
|
"gorm.io/gorm"
|
|
|
|
"time"
|
|
|
|
)
|
|
|
|
|
|
|
|
type Endpoint struct {
|
|
|
|
gorm.Model
|
|
|
|
ID uuid.UUID `gorm:"primaryKey"`
|
|
|
|
Name string
|
2023-10-26 17:26:09 +02:00
|
|
|
LastConnection *time.Time
|
|
|
|
RegisteredDate *time.Time
|
2023-10-26 14:56:36 +02:00
|
|
|
OSInfo common.OSInfo
|
2023-10-26 17:26:09 +02:00
|
|
|
Enabled bool
|
|
|
|
SecretHash string
|
2023-10-26 14:56:36 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
type PackageList struct {
|
|
|
|
gorm.Model
|
|
|
|
ID uuid.UUID `gorm:"primaryKey"`
|
|
|
|
}
|
2023-10-26 17:26:09 +02:00
|
|
|
|
|
|
|
type RegistrationToken struct {
|
|
|
|
gorm.Model
|
|
|
|
Hash string
|
|
|
|
}
|