'boolean', 'printer_paper_mm' => 'integer', 'printer_auto_print' => 'boolean', ]; } public function isRestaurant(): bool { return $this->service_style === self::STYLE_RESTAURANT; } public function receiptLogoUrl(): ?string { if (! $this->receipt_logo_path) { return null; } return Storage::disk('public')->url($this->receipt_logo_path); } public function customerPromoImageUrl(): ?string { if ($this->customer_promo_image_path) { return Storage::disk('public')->url($this->customer_promo_image_path); } return $this->receiptLogoUrl(); } /** Default idle-screen promo for the customer-facing display. */ public function customerPromo(): array { return [ 'headline' => $this->customer_promo_headline ?: $this->name, 'body' => $this->customer_promo_body ?: 'Thank you for shopping with us.', 'image_url' => $this->customerPromoImageUrl(), ]; } public function products(): HasMany { return $this->hasMany(PosProduct::class, 'location_id'); } public function tables(): HasMany { return $this->hasMany(PosTable::class, 'location_id'); } public function sales(): HasMany { return $this->hasMany(PosSale::class, 'location_id'); } public function scopeOwned(Builder $query, string $ownerRef): Builder { return $query->where('owner_ref', $ownerRef); } }