Make quick sale products on machines as orders paid when ready

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
2026-11-26 17:11:54 +02:00
co-authored by Claude Sonnet 5.5
parent 920fecdeb2
commit 38b8075a9c
58 changed files with 3435 additions and 26 deletions
@@ -0,0 +1,46 @@
<?php
namespace App\Modules\Sales\Infrastructure\Persistence\Eloquent;
use Illuminate\Database\Eloquent\Attributes\Fillable;
use Illuminate\Database\Eloquent\Attributes\Table;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Carbon;
/**
* Persistence model, used only inside the Sales Infrastructure layer.
*
* @property int $id
* @property int $quick_sale_order_id
* @property int $product_id
* @property string $product_name
* @property int $quantity
* @property int $unit_price_cents
* @property int $vat_basis_points
* @property list<array{machineId?: ?int, durationQuarters?: int, workTypeId?: int, materials?: list<array{stockItemId: int, quantityMilli: int}>}> $production_steps
* @property int|null $current_step
* @property Carbon|null $made_at
* @property int $sort_order
*/
#[Table('quick_sale_order_lines')]
#[Fillable(['quick_sale_order_id', 'product_id', 'product_name', 'quantity', 'unit_price_cents', 'vat_basis_points', 'production_steps', 'current_step', 'made_at', 'sort_order'])]
class QuickSaleOrderLineModel extends Model
{
/**
* @return array<string, string>
*/
protected function casts(): array
{
return [
'quick_sale_order_id' => 'integer',
'product_id' => 'integer',
'quantity' => 'integer',
'unit_price_cents' => 'integer',
'vat_basis_points' => 'integer',
'production_steps' => 'array',
'current_step' => 'integer',
'made_at' => 'immutable_datetime',
'sort_order' => 'integer',
];
}
}