'integer', 'current_sale_id' => 'integer', 'position' => 'integer', ]; } public function location(): BelongsTo { return $this->belongsTo(PosLocation::class, 'location_id'); } public function currentSale(): BelongsTo { return $this->belongsTo(PosSale::class, 'current_sale_id'); } public function isFree(): bool { return $this->status === self::STATUS_FREE; } public function scopeOwned(Builder $query, string $ownerRef): Builder { return $query->where('owner_ref', $ownerRef); } }