| 1 |
<?php |
| 2 |
|
| 3 |
namespace App\Billingo\Factories; |
| 4 |
|
| 5 |
use App\Billingo\Enums\CurrencyEnum; |
| 6 |
use App\Billingo\Enums\Spending\CategoryEnum; |
| 7 |
use App\Billingo\Enums\Spending\SpendingPaymentMethodEnum; |
| 8 |
|
| 9 |
class SpendingSaveFactory extends BaseFactory |
| 10 |
{ |
| 11 |
|
| 12 |
public function definition(): array |
| 13 |
{ |
| 14 |
return [ |
| 15 |
'currency' => $this->faker->randomElement(getEnumValues(CurrencyEnum::class)), |
| 16 |
'conversion_rate' => $this->faker->numberBetween(1, 10), |
| 17 |
'total_gross' => $this->faker->numberBetween(1, 1000), |
| 18 |
'total_gross_huf' => $this->faker->numberBetween(1, 1000), |
| 19 |
'total_vat_amount' => $this->faker->numberBetween(1, 1000), |
| 20 |
'total_vat_amount_huf' => $this->faker->numberBetween(1, 1000), |
| 21 |
'fulfillment_date' => $this->faker->date(), |
| 22 |
'paid_at' => $this->faker->optional()->date(), |
| 23 |
'category' => $this->faker->randomElement(getEnumValues(CategoryEnum::class)), |
| 24 |
'comment' => $this->faker->optional()->text(), |
| 25 |
'invoice_number' => $this->faker->regexify('(202[0-9]|203[0-9])-[09]{6}'), |
| 26 |
'invoice_date' => $this->faker->date(), |
| 27 |
'due_date' => $this->faker->date(), |
| 28 |
'payment_method' => $this->faker->randomElement(getEnumValues(SpendingPaymentMethodEnum::class)), |
| 29 |
'partner_id' => $this->faker->optional()->numberBetween(1, 1000), |
| 30 |
]; |
| 31 |
} |
| 32 |
} |
| 33 |
|