[management] Add structs for new networks concept (#3006)

This commit is contained in:
Pascal Fischer
2024-12-09 19:25:58 +01:00
committed by GitHub
parent 2147bf75eb
commit 623fcb0535
8 changed files with 358 additions and 43 deletions

View 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,
}
}