Deploy Ladill POS / deploy (push) Successful in 56s
Token-gated full-screen customer view shows order, payment QR, tips, signature, receipt, and promo phases while the till keeps operator UI.
58 lines
1.2 KiB
PHP
58 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class PosCustomerDisplay extends Model
|
|
{
|
|
public const PHASE_IDLE = 'idle';
|
|
|
|
public const PHASE_CART = 'cart';
|
|
|
|
public const PHASE_PAYMENT = 'payment';
|
|
|
|
public const PHASE_TIP = 'tip';
|
|
|
|
public const PHASE_SIGNATURE = 'signature';
|
|
|
|
public const PHASE_RECEIPT = 'receipt';
|
|
|
|
public const PHASE_PROMO = 'promo';
|
|
|
|
public const PHASES = [
|
|
self::PHASE_IDLE,
|
|
self::PHASE_CART,
|
|
self::PHASE_PAYMENT,
|
|
self::PHASE_TIP,
|
|
self::PHASE_SIGNATURE,
|
|
self::PHASE_RECEIPT,
|
|
self::PHASE_PROMO,
|
|
];
|
|
|
|
protected $fillable = [
|
|
'location_id',
|
|
'owner_ref',
|
|
'token',
|
|
'phase',
|
|
'payload',
|
|
'customer_action',
|
|
'last_pushed_at',
|
|
];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'payload' => 'array',
|
|
'customer_action' => 'array',
|
|
'last_pushed_at' => 'datetime',
|
|
];
|
|
}
|
|
|
|
public function location(): BelongsTo
|
|
{
|
|
return $this->belongsTo(PosLocation::class, 'location_id');
|
|
}
|
|
}
|