mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-13 11:34:26 +00:00
20 lines
432 B
Go
20 lines
432 B
Go
|
package model
|
||
|
|
||
|
import es_models "github.com/caos/zitadel/internal/eventstore/models"
|
||
|
|
||
|
type ProjectRole struct {
|
||
|
es_models.ObjectRoot
|
||
|
|
||
|
Key string
|
||
|
DisplayName string
|
||
|
Group string
|
||
|
}
|
||
|
|
||
|
func NewProjectRole(projectID, key string) *ProjectRole {
|
||
|
return &ProjectRole{ObjectRoot: es_models.ObjectRoot{AggregateID: projectID}, Key: key}
|
||
|
}
|
||
|
|
||
|
func (p *ProjectRole) IsValid() bool {
|
||
|
return p.AggregateID != "" && p.Key != ""
|
||
|
}
|