2021-01-05 08:33:45 +00:00
|
|
|
package domain
|
|
|
|
|
2022-04-26 23:01:45 +00:00
|
|
|
import "github.com/zitadel/zitadel/internal/eventstore/v1/models"
|
2021-01-05 08:33:45 +00:00
|
|
|
|
|
|
|
type Machine struct {
|
|
|
|
models.ObjectRoot
|
|
|
|
|
2021-01-15 08:32:59 +00:00
|
|
|
Username string
|
|
|
|
State UserState
|
2021-01-05 08:33:45 +00:00
|
|
|
Name string
|
|
|
|
Description string
|
|
|
|
}
|
|
|
|
|
2021-01-15 08:32:59 +00:00
|
|
|
func (m Machine) GetUsername() string {
|
|
|
|
return m.Username
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m Machine) GetState() UserState {
|
|
|
|
return m.State
|
|
|
|
}
|
|
|
|
|
2021-01-05 08:33:45 +00:00
|
|
|
func (sa *Machine) IsValid() bool {
|
2021-03-19 10:12:56 +00:00
|
|
|
return sa.Name != "" && sa.Username != ""
|
2021-01-05 08:33:45 +00:00
|
|
|
}
|