linked device, device tasks and certs in database

This commit is contained in:
tdv
2025-10-13 20:04:54 +03:00
parent 2895c6afdd
commit bdb89f0966
5 changed files with 30 additions and 11 deletions

View File

@@ -13,6 +13,7 @@ type DeviceCertificate struct {
NotAfter time.Time
PemCert string `gorm:"type:text"` // PEM of leaf cert
CreatedAt time.Time
Device Device `gorm:"constraint:OnDelete:CASCADE;foreignKey:DeviceGUID;references:GUID"`
}
// “Instant kill” list checked by the mTLS guard before allowing access.