mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-15 05:00:49 +08:00
user medal add more bulk actions
This commit is contained in:
@@ -9,11 +9,19 @@ class UserMedal extends NexusModel
|
||||
const STATUS_NOT_WEARING = 0;
|
||||
const STATUS_WEARING = 1;
|
||||
|
||||
public function getWearingStatusTextAttribute()
|
||||
public function getWearingStatusTextAttribute(): string
|
||||
{
|
||||
return nexus_trans("medal.wearing_status_text." . $this->status);
|
||||
}
|
||||
|
||||
public static function listWearingStatusLabels(): array
|
||||
{
|
||||
return [
|
||||
self::STATUS_WEARING => nexus_trans("medal.wearing_status_text." . self::STATUS_WEARING),
|
||||
self::STATUS_NOT_WEARING => nexus_trans("medal.wearing_status_text." . self::STATUS_NOT_WEARING),
|
||||
];
|
||||
}
|
||||
|
||||
public function medal()
|
||||
{
|
||||
return $this->belongsTo(Medal::class, 'medal_id');
|
||||
|
||||
Reference in New Issue
Block a user