77 lines
1.6 KiB
PHP
77 lines
1.6 KiB
PHP
<?php
|
|
|
|
namespace App\Models\Game\Player;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
/**
|
|
* @property int $vnum
|
|
* @property string $name
|
|
* @property int $npc_vnum
|
|
*
|
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|Shop newModelQuery()
|
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|Shop newQuery()
|
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|Shop query()
|
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|Shop whereName($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|Shop whereNpcVnum($value)
|
|
* @method static \Illuminate\Database\Eloquent\Builder<static>|Shop whereVnum($value)
|
|
*
|
|
* @mixin \Eloquent
|
|
*/
|
|
class Shop extends Model
|
|
{
|
|
/**
|
|
* Indicates if the model should be timestamped.
|
|
*
|
|
* @var bool
|
|
*/
|
|
public $timestamps = false;
|
|
|
|
/**
|
|
* The table associated with the model.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $table = 'shop';
|
|
|
|
/**
|
|
* The primary key for the model.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $primaryKey = 'vnum';
|
|
|
|
/**
|
|
* The attributes that are mass assignable.
|
|
*
|
|
* @var array<int, string>
|
|
*/
|
|
protected $fillable = [
|
|
|
|
];
|
|
|
|
/**
|
|
* The attributes that should be hidden for serialization.
|
|
*
|
|
* @var array<int, string>
|
|
*/
|
|
protected $hidden = [
|
|
|
|
];
|
|
|
|
/**
|
|
* The attributes that should be cast.
|
|
*
|
|
* @var array<string, string>
|
|
*/
|
|
protected $casts = [
|
|
|
|
];
|
|
|
|
public function mob(): BelongsTo
|
|
{
|
|
return $this->belongsTo(MobProto::class, 'npc_vnum', 'vnum');
|
|
}
|
|
}
|