🆙 More fixes 🆙

This commit is contained in:
Remco
2026-01-19 21:02:53 +01:00
parent 6c42ec0edd
commit 451b7edda3
10 changed files with 39 additions and 9 deletions
@@ -11,6 +11,9 @@ class CatalogItem extends Model
public $timestamps = false;
/**
* @return BelongsTo<ItemBase, $this>
*/
public function itemBase(): BelongsTo
{
return $this->belongsTo(ItemBase::class, 'item_ids', 'id');
@@ -11,6 +11,9 @@ class CatalogPage extends Model
public $timestamps = false;
/**
* @return HasMany<CatalogItem, $this>
*/
public function catalogItems(): HasMany
{
return $this->hasMany(CatalogItem::class, 'page_id');
@@ -12,6 +12,9 @@ class Item extends Model
public $timestamps = false;
/**
* @return BelongsTo<User, $this>
*/
public function user(): BelongsTo
{
return $this->belongsTo(User::class);
@@ -18,6 +18,9 @@ class ItemBase extends Model
return sprintf('%s/%s_icon.png', setting('furniture_icons_path'), $this->item_name);
}
/**
* @return HasMany<CatalogItem, $this>
*/
public function catalogItems(): HasMany
{
return $this->hasMany(CatalogItem::class, 'item_ids', 'id');