mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 20:40:49 +08:00
[admin] add grant props
This commit is contained in:
@@ -10,7 +10,6 @@ class UserMeta extends NexusModel
|
||||
|
||||
const STATUS_NORMAL = 0;
|
||||
|
||||
|
||||
const META_KEY_PERSONALIZED_USERNAME = 'PERSONALIZED_USERNAME';
|
||||
|
||||
const META_KEY_CHANGE_USERNAME = 'CHANGE_USERNAME';
|
||||
@@ -21,6 +20,19 @@ class UserMeta extends NexusModel
|
||||
'deadline' => 'datetime',
|
||||
];
|
||||
|
||||
public static array $metaKeys = [
|
||||
self::META_KEY_PERSONALIZED_USERNAME => ['text' => 'PERSONALIZED_USERNAME', 'multiple' => false],
|
||||
self::META_KEY_CHANGE_USERNAME => ['text' => 'CHANGE_USERNAME', 'multiple' => false],
|
||||
];
|
||||
|
||||
public static function listProps()
|
||||
{
|
||||
return [
|
||||
self::META_KEY_PERSONALIZED_USERNAME => nexus_trans('label.user_meta.meta_keys.' . self::META_KEY_PERSONALIZED_USERNAME),
|
||||
self::META_KEY_CHANGE_USERNAME => nexus_trans('label.user_meta.meta_keys.' . self::META_KEY_CHANGE_USERNAME),
|
||||
];
|
||||
}
|
||||
|
||||
public function getMetaKeyTextAttribute()
|
||||
{
|
||||
return nexus_trans('label.user_meta.meta_keys.' . $this->meta_key) ?? '';
|
||||
|
||||
Reference in New Issue
Block a user