|ItemProto newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|ItemProto newQuery() * @method static \Illuminate\Database\Eloquent\Builder|ItemProto query() * @method static \Illuminate\Database\Eloquent\Builder|ItemProto whereAddonType($value) * @method static \Illuminate\Database\Eloquent\Builder|ItemProto whereAntiflag($value) * @method static \Illuminate\Database\Eloquent\Builder|ItemProto whereApplytype0($value) * @method static \Illuminate\Database\Eloquent\Builder|ItemProto whereApplytype1($value) * @method static \Illuminate\Database\Eloquent\Builder|ItemProto whereApplytype2($value) * @method static \Illuminate\Database\Eloquent\Builder|ItemProto whereApplyvalue0($value) * @method static \Illuminate\Database\Eloquent\Builder|ItemProto whereApplyvalue1($value) * @method static \Illuminate\Database\Eloquent\Builder|ItemProto whereApplyvalue2($value) * @method static \Illuminate\Database\Eloquent\Builder|ItemProto whereFlag($value) * @method static \Illuminate\Database\Eloquent\Builder|ItemProto whereGold($value) * @method static \Illuminate\Database\Eloquent\Builder|ItemProto whereImmuneflag($value) * @method static \Illuminate\Database\Eloquent\Builder|ItemProto whereLimittype0($value) * @method static \Illuminate\Database\Eloquent\Builder|ItemProto whereLimittype1($value) * @method static \Illuminate\Database\Eloquent\Builder|ItemProto whereLimitvalue0($value) * @method static \Illuminate\Database\Eloquent\Builder|ItemProto whereLimitvalue1($value) * @method static \Illuminate\Database\Eloquent\Builder|ItemProto whereLocaleName($value) * @method static \Illuminate\Database\Eloquent\Builder|ItemProto whereMagicPct($value) * @method static \Illuminate\Database\Eloquent\Builder|ItemProto whereName($value) * @method static \Illuminate\Database\Eloquent\Builder|ItemProto whereRefineSet($value) * @method static \Illuminate\Database\Eloquent\Builder|ItemProto whereRefineSet2($value) * @method static \Illuminate\Database\Eloquent\Builder|ItemProto whereRefinedVnum($value) * @method static \Illuminate\Database\Eloquent\Builder|ItemProto whereShopBuyPrice($value) * @method static \Illuminate\Database\Eloquent\Builder|ItemProto whereSize($value) * @method static \Illuminate\Database\Eloquent\Builder|ItemProto whereSocket0($value) * @method static \Illuminate\Database\Eloquent\Builder|ItemProto whereSocket1($value) * @method static \Illuminate\Database\Eloquent\Builder|ItemProto whereSocket2($value) * @method static \Illuminate\Database\Eloquent\Builder|ItemProto whereSocket3($value) * @method static \Illuminate\Database\Eloquent\Builder|ItemProto whereSocket4($value) * @method static \Illuminate\Database\Eloquent\Builder|ItemProto whereSocket5($value) * @method static \Illuminate\Database\Eloquent\Builder|ItemProto whereSocketPct($value) * @method static \Illuminate\Database\Eloquent\Builder|ItemProto whereSpecular($value) * @method static \Illuminate\Database\Eloquent\Builder|ItemProto whereSubtype($value) * @method static \Illuminate\Database\Eloquent\Builder|ItemProto whereType($value) * @method static \Illuminate\Database\Eloquent\Builder|ItemProto whereValue0($value) * @method static \Illuminate\Database\Eloquent\Builder|ItemProto whereValue1($value) * @method static \Illuminate\Database\Eloquent\Builder|ItemProto whereValue2($value) * @method static \Illuminate\Database\Eloquent\Builder|ItemProto whereValue3($value) * @method static \Illuminate\Database\Eloquent\Builder|ItemProto whereValue4($value) * @method static \Illuminate\Database\Eloquent\Builder|ItemProto whereValue5($value) * @method static \Illuminate\Database\Eloquent\Builder|ItemProto whereVnum($value) * @method static \Illuminate\Database\Eloquent\Builder|ItemProto whereWearflag($value) * @method static \Illuminate\Database\Eloquent\Builder|ItemProto whereWeight($value) * * @mixin \Eloquent */ class ItemProto extends Model { /** * Indicates if the model should be timestamped. * * @var bool */ public $timestamps = false; /** * The table associated with the model. * * @var string */ protected $table = 'item_proto'; /** * The primary key for the model. * * @var string */ protected $primaryKey = 'vnum'; /** * The attributes that are mass assignable. * * @var array */ protected $fillable = [ 'name', ]; /** * The attributes that should be hidden for serialization. * * @var array */ protected $hidden = [ ]; /** * The attributes that should be cast. * * @var array */ protected $casts = [ 'type' => ItemTypesEnum::class, 'limittype0' => LimitTypesEnum::class, 'limittype1' => LimitTypesEnum::class, 'applytype0' => ApplyTypesEnum::class, 'applytype1' => ApplyTypesEnum::class, 'applytype2' => ApplyTypesEnum::class, ]; public function refineSet(): BelongsTo { return $this->belongsTo(RefineProto::class, 'refine_set'); } public function sellers(): BelongsToMany { return $this->belongsToMany( Shop::class, ShopItem::class, 'item_vnum', 'shop_vnum', 'vnum', 'vnum' ) ->where('npc_vnum', '!=', 0) ->withPivot('count'); } }