Files
Epicnabbo-Catalogus-Updated…/Updated_Cms/app/Models/Community/RareValue/WebsiteRareValue.php
T
Remco 8d3115678c 🆙 More fixes 🆙
2026-01-19 21:04:53 +01:00

45 lines
980 B
PHP

<?php
namespace App\Models\Community\RareValue;
use App\Models\Game\Furniture\CatalogItem;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class WebsiteRareValue extends Model
{
protected $guarded = ['id', 'created_at', 'updated_at'];
protected function casts()
{
return [
'currency_type' => 'integer',
];
}
/**
* @return BelongsTo<WebsiteRareValueCategory, $this>
*/
public function category(): BelongsTo
{
return $this->belongsTo(WebsiteRareValueCategory::class, 'category_id');
}
/**
* @return BelongsTo<CatalogItem, $this>
*/
public function item(): BelongsTo
{
return $this->belongsTo(CatalogItem::class, 'item_id', 'item_ids');
}
public function isLimitedEdition(): bool
{
if (is_null($this->item)) {
return false;
}
return $this->item->limited_stack > 0;
}
}