| 1 |
<?php |
| 2 |
|
| 3 |
namespace App\Billingo\Factories; |
| 4 |
|
| 5 |
use App\Billingo\Enums\EntitlementEnum; |
| 6 |
use App\Billingo\Enums\UnitPriceTypeEnum; |
| 7 |
use App\Billingo\Enums\VatEnum; |
| 8 |
|
| 9 |
class DocumentProductDataFactory extends BaseFactory |
| 10 |
{ |
| 11 |
|
| 12 |
public function definition(): array |
| 13 |
{ |
| 14 |
return [ |
| 15 |
'name' => $this->faker->word(), |
| 16 |
'unit_price' => $this->faker->randomFloat(2, 1, 1000), |
| 17 |
'unit_price_type' => $this->faker->randomElement(getEnumValues(UnitPriceTypeEnum::class)), |
| 18 |
'quantity' => $this->faker->randomFloat(2, 1, 100), |
| 19 |
'unit' => $this->faker->word(), |
| 20 |
'vat' => $this->faker->randomElement(getEnumValues(VatEnum::class)), |
| 21 |
'comment' => $this->faker->optional()->sentence(), |
| 22 |
'entitlement' => $this->faker->optional()->randomElement(getEnumValues(EntitlementEnum::class)), |
| 23 |
'sku' => $this->faker->optional()->bothify('SKU-####'), |
| 24 |
'is_generate_erase_code' => $this->faker->boolean(), |
| 25 |
]; |
| 26 |
} |
| 27 |
} |
| 28 |
|