diff --git a/routes.go b/routes.go index 676c79b6..079c055c 100644 --- a/routes.go +++ b/routes.go @@ -3,12 +3,26 @@ package headscale import ( "fmt" "net/netip" + + "gorm.io/gorm" ) const ( ErrRouteIsNotAvailable = Error("route is not available") ) +type Route struct { + gorm.Model + + MachineID uint64 + Machine Machine + Prefix IPPrefix + + Advertised bool + Enabled bool + IsPrimary bool +} + // Deprecated: use machine function instead // GetAdvertisedNodeRoutes returns the subnet routes advertised by a node (identified by // namespace and node name).