mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-12 11:04:25 +00:00
33 lines
545 B
Go
33 lines
545 B
Go
|
package domain
|
||
|
|
||
|
import (
|
||
|
"golang.org/x/text/language"
|
||
|
|
||
|
"github.com/caos/zitadel/internal/eventstore/v1/models"
|
||
|
)
|
||
|
|
||
|
type CustomText struct {
|
||
|
models.ObjectRoot
|
||
|
|
||
|
State CustomTextState
|
||
|
Default bool
|
||
|
Template string
|
||
|
Key string
|
||
|
Language language.Tag
|
||
|
Text string
|
||
|
}
|
||
|
|
||
|
type CustomTextState int32
|
||
|
|
||
|
const (
|
||
|
CustomTextStateUnspecified CustomTextState = iota
|
||
|
CustomTextStateActive
|
||
|
CustomTextStateRemoved
|
||
|
|
||
|
customTextStateCount
|
||
|
)
|
||
|
|
||
|
func (m *CustomText) IsValid() bool {
|
||
|
return m.Key != "" && m.Language != language.Und && m.Text != ""
|
||
|
}
|