2021-06-10 11:49:10 +00:00
|
|
|
package domain
|
|
|
|
|
|
|
|
import (
|
|
|
|
"golang.org/x/text/language"
|
|
|
|
|
2022-04-26 23:01:45 +00:00
|
|
|
"github.com/zitadel/zitadel/internal/eventstore/v1/models"
|
2021-06-10 11:49:10 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
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 != ""
|
|
|
|
}
|