You've already forked Atomcms-edit
Initial commit
This commit is contained in:
Executable
+56
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Game\Furniture;
|
||||
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
|
||||
/**
|
||||
* @property int $id
|
||||
* @property string $item_name
|
||||
* @property string $public_name
|
||||
* @property int $width
|
||||
* @property int $length
|
||||
* @property float $stack_height
|
||||
* @property bool $allow_stack
|
||||
* @property bool $allow_sit
|
||||
* @property bool $allow_lay
|
||||
* @property bool $allow_walk
|
||||
* @property string $sprite_id
|
||||
* @property bool $allow_recycle
|
||||
* @property bool $allow_trade
|
||||
* @property bool $allow_marketplace_sell
|
||||
* @property bool $allow_gift
|
||||
* @property bool $allow_inventory_stack
|
||||
* @property string $interaction_type
|
||||
* @property int $vending_ids
|
||||
* @property int $is_ambience
|
||||
* @property bool $no_effect
|
||||
* @property int $effect_id
|
||||
* @property-read Collection<int, CatalogItem> $catalogItems
|
||||
*
|
||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemBase whereIn($column, $values, $boolean = 'and', $not = false)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder<static>|ItemBase get($columns = ['*'])
|
||||
*/
|
||||
class ItemBase extends Model
|
||||
{
|
||||
#[\Override]
|
||||
protected $table = 'items_base';
|
||||
|
||||
#[\Override]
|
||||
protected $guarded = ['id', 'created_at', 'updated_at', 'sprite_id', 'public_name'];
|
||||
|
||||
#[\Override]
|
||||
public $timestamps = false;
|
||||
|
||||
public function icon(): string
|
||||
{
|
||||
return sprintf('%s/%s_icon.png', setting('furniture_icons_path'), $this->item_name);
|
||||
}
|
||||
|
||||
public function catalogItems(): HasMany
|
||||
{
|
||||
return $this->hasMany(CatalogItem::class, 'item_ids', 'id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user