Add enterprise support
This change adds enterprise support throughout garm. Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
parent
f40420bfb6
commit
296333412a
34 changed files with 2028 additions and 112 deletions
|
|
@ -71,6 +71,9 @@ type Pool struct {
|
|||
OrgID uuid.UUID `gorm:"index"`
|
||||
Organization Organization `gorm:"foreignKey:OrgID"`
|
||||
|
||||
EnterpriseID uuid.UUID `gorm:"index"`
|
||||
Enterprise Enterprise `gorm:"foreignKey:EnterpriseID"`
|
||||
|
||||
Instances []Instance `gorm:"foreignKey:PoolID"`
|
||||
}
|
||||
|
||||
|
|
@ -93,6 +96,15 @@ type Organization struct {
|
|||
Pools []Pool `gorm:"foreignKey:OrgID"`
|
||||
}
|
||||
|
||||
type Enterprise struct {
|
||||
Base
|
||||
|
||||
CredentialsName string
|
||||
Name string `gorm:"index:idx_ent_name_nocase,collate:nocase"`
|
||||
WebhookSecret []byte
|
||||
Pools []Pool `gorm:"foreignKey:EnterpriseID"`
|
||||
}
|
||||
|
||||
type Address struct {
|
||||
Base
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue