| 1 |
<?php |
| 2 |
|
| 3 |
namespace App\Billingo\Factories; |
| 4 |
|
| 5 |
|
| 6 |
use App\Billingo\Enums\CurrencyEnum; |
| 7 |
|
| 8 |
class BankAccountFactory extends BaseFactory |
| 9 |
{ |
| 10 |
|
| 11 |
public function definition(): array |
| 12 |
{ |
| 13 |
return [ |
| 14 |
'id' => $this->faker->optional()->numberBetween(1, 1000), |
| 15 |
'name' => $this->faker->name(), |
| 16 |
'account_number' => $this->faker->regexify('[A-Z]{2}--[0-9]{6}'), |
| 17 |
'account_number_iban' => $this->faker->optional()->regexify('[A-Z]{2}--[0-9]{6}'), |
| 18 |
'swift' => $this->faker->boolean |
| 19 |
? strtoupper($this->faker->lexify('????').$this->faker->numerify('####')) |
| 20 |
: null, |
| 21 |
'currency' => $this->faker->randomElement(getEnumValues(CurrencyEnum::class)), |
| 22 |
]; |
| 23 |
} |
| 24 |
} |
| 25 |
|