medal add priority

This commit is contained in:
xiaomlove
2025-04-21 11:52:05 +07:00
parent d990723ebc
commit e3673ef3da
4 changed files with 48 additions and 6 deletions

View File

@@ -18,7 +18,7 @@ class Medal extends NexusModel
protected $fillable = [
'name', 'description', 'image_large', 'image_small', 'price', 'duration', 'get_type',
'display_on_medal_page', 'sale_begin_time', 'sale_end_time', 'inventory', 'bonus_addition_factor',
'gift_fee_factor',
'gift_fee_factor', 'priority'
];
public $timestamps = true;
@@ -48,6 +48,11 @@ class Medal extends NexusModel
return nexus_trans("medal.get_types." . $this->get_type);
}
public function getInventoryTextAttribute(): string
{
return $this->inventory ?? nexus_trans("label.infinite");
}
public function getDurationTextAttribute($value): string
{
if ($this->duration > 0) {