public function getDefaults(): array
{ return [ 'timeZone' => 'UTC',
];
} protected function defineProtections(): EntityProtectionCollection
{ return new EntityProtectionCollection([new WriteProtection(Context::SYSTEM_SCOPE
)]);
} protected function defineFields(): FieldCollection
{ return new FieldCollection([ (new IdField('id', 'id'
))->
addFlags(new PrimaryKey(),
new Required()),
(new FkField('locale_id', 'localeId', LocaleDefinition::
class))->
addFlags(new Required()),
(new StringField('username', 'username'
))->
addFlags(new Required(),
new SearchRanking(SearchRanking::HIGH_SEARCH_RANKING
)),
(new PasswordField('password', 'password', \PASSWORD_DEFAULT,
[], PasswordField::FOR_ADMIN
))->
removeFlag(ApiAware::
class)->
addFlags(new Required()),
(new StringField('first_name', 'firstName'
))->
addFlags(new Required(),
new SearchRanking(SearchRanking::HIGH_SEARCH_RANKING
)),
(new StringField('last_name', 'lastName'
))->
addFlags(new Required(),
new SearchRanking(SearchRanking::HIGH_SEARCH_RANKING
)),
(