Enth\u00e4lt gemischt: Laravel-10-Upgrade + Phase 1 (Contacts-Modul, Duplicats-Commands, Soft-Delete+Merge-Fields) + Phase 2 Code-Umstellungen (inquiry_id, $table='contacts'/'inquiries') + Offers-Modul (Migrationen, Models, offer_id in Booking, offer-Disk in filesystems.php). Phase 2 + Offers werden im folgenden Commit nach dev/backups/phase2-offers-2026-04-17/ verschoben, damit der Workspace auf Phase-1-only (= Test-System-Stand) reduziert ist und direkt auf Live deploybar wird. Tarball-Backup zus\u00e4tzlich unter: ../backups-safety/workspace-pre-phase1-rollback-2026-04-17.tar.gz Made-with: Cursor
50 lines
1.8 KiB
PHP
50 lines
1.8 KiB
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\Customer;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
/**
|
|
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Customer>
|
|
*/
|
|
class CustomerFactory extends Factory
|
|
{
|
|
protected $model = Customer::class;
|
|
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'salutation_id' => 1,
|
|
'title' => '',
|
|
'name' => fake()->lastName(),
|
|
'firstname' => fake()->firstName(),
|
|
'birthdate' => fake()->dateTimeBetween('-80 years', '-18 years')->format('Y-m-d'),
|
|
'company' => '',
|
|
'street' => fake()->streetAddress(),
|
|
'zip' => fake()->postcode(),
|
|
'city' => fake()->city(),
|
|
'email' => fake()->unique()->safeEmail(),
|
|
'phone' => fake()->phoneNumber(),
|
|
'phonebusiness' => '',
|
|
'phonemobile' => fake()->phoneNumber(),
|
|
'fax' => '',
|
|
'bank' => '',
|
|
'bank_code' => '',
|
|
'bank_account_number' => '',
|
|
'credit_card_type_id' => null,
|
|
'credit_card_number' => '',
|
|
'credit_card_expiration_date'=> null,
|
|
'participants_remarks' => '',
|
|
'miscellaneous_remarks' => '',
|
|
'country_id' => null,
|
|
];
|
|
}
|
|
|
|
public function company(): static
|
|
{
|
|
return $this->state(fn (array $attributes) => [
|
|
'company' => fake()->company(),
|
|
]);
|
|
}
|
|
}
|