|
- <?php
-
- declare(strict_types=1);
-
- namespace App\ViewModels;
-
- class CustomerViewModel
- {
- public string $title = 'Customers';
- public bool $saved = false;
- public bool $deleted = false;
-
- /** @var array{customer_type_id: int|string, attribute_values: array<string, string>} */
- public array $form = [
- 'customer_type_id' => 0,
- 'attribute_values' => [],
- ];
-
- /** @var array<string, list<string>> */
- public array $errors = [];
-
- /** @var array<string, mixed>|null */
- public ?array $customer = null;
-
- /**
- * All customer types with attributes decoded.
- * @var list<array{id: int, name: string, attributes: list<array{name: string, type: string}>}>
- */
- public array $customerTypes = [];
- }
|