mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 07:47:32 +00:00
chore: move the go code into a subfolder
This commit is contained in:
49
apps/api/internal/domain/project.go
Normal file
49
apps/api/internal/domain/project.go
Normal file
@@ -0,0 +1,49 @@
|
||||
package domain
|
||||
|
||||
import (
|
||||
"github.com/zitadel/zitadel/internal/eventstore/v1/models"
|
||||
)
|
||||
|
||||
type Project struct {
|
||||
models.ObjectRoot
|
||||
|
||||
State ProjectState
|
||||
Name string
|
||||
ProjectRoleAssertion bool
|
||||
ProjectRoleCheck bool
|
||||
HasProjectCheck bool
|
||||
PrivateLabelingSetting PrivateLabelingSetting
|
||||
}
|
||||
|
||||
type ProjectState int32
|
||||
|
||||
const (
|
||||
ProjectStateUnspecified ProjectState = iota
|
||||
ProjectStateActive
|
||||
ProjectStateInactive
|
||||
ProjectStateRemoved
|
||||
|
||||
projectStateMax
|
||||
)
|
||||
|
||||
func (s ProjectState) Valid() bool {
|
||||
return s > ProjectStateUnspecified && s < projectStateMax
|
||||
}
|
||||
|
||||
type PrivateLabelingSetting int32
|
||||
|
||||
const (
|
||||
PrivateLabelingSettingUnspecified PrivateLabelingSetting = iota
|
||||
PrivateLabelingSettingEnforceProjectResourceOwnerPolicy
|
||||
PrivateLabelingSettingAllowLoginUserResourceOwnerPolicy
|
||||
|
||||
privateLabelingSettingMax
|
||||
)
|
||||
|
||||
func (s PrivateLabelingSetting) Valid() bool {
|
||||
return s >= PrivateLabelingSettingUnspecified && s < privateLabelingSettingMax
|
||||
}
|
||||
|
||||
func (o *Project) IsValid() bool {
|
||||
return o.Name != ""
|
||||
}
|
Reference in New Issue
Block a user