mirror of
https://github.com/netbirdio/netbird.git
synced 2025-03-05 02:11:13 +01:00
30 lines
584 B
Go
30 lines
584 B
Go
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,
|
|
}
|
|
}
|
|
|
|
// Copy returns a copy of a posture checks.
|
|
func (n *Network) Copy() *Network {
|
|
return &Network{
|
|
ID: n.ID,
|
|
AccountID: n.AccountID,
|
|
Name: n.Name,
|
|
Description: n.Description,
|
|
}
|
|
}
|