mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-30 22:26:42 +00:00
[management] Add structs for new networks concept (#3006)
This commit is contained in:
19
management/server/networks/network.go
Normal file
19
management/server/networks/network.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package networks
|
||||
|
||||
import "github.com/rs/xid"
|
||||
|
||||
type Network struct {
|
||||
ID string `gorm:"index"`
|
||||
AccountID string `gorm:"index"`
|
||||
Name string
|
||||
Description string
|
||||
}
|
||||
|
||||
func NewNetwork(accountId, name, description string) *Network {
|
||||
return &Network{
|
||||
ID: xid.New().String(),
|
||||
AccountID: accountId,
|
||||
Name: name,
|
||||
Description: description,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user