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