PluginProbe
Billingo Official for WooCommerce / 4.2.9
Billingo Official for WooCommerce v4.2.9
4.3.3 4.3.2 trunk 0.0.2 1.0.0 2.0 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 All 82 releases
billingo / src / Factories / CreateDocumentExportFactory.php

CreateDocumentExportFactory.php in Billingo Official for WooCommerce 4.2.9, at src/Factories/CreateDocumentExportFactory.php

36 lines 1.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace App\Billingo\Factories;
4
5 use App\Billingo\Enums\DocumentExport\DocumentExportOtherOptionsEnum;
6 use App\Billingo\Enums\DocumentExport\DocumentExportQueryTypeEnum;
7 use App\Billingo\Enums\DocumentExport\DocumentExportSortByEnum;
8 use App\Billingo\Enums\DocumentExport\DocumentExportTypeEnum;
9 use App\Billingo\Enums\PaymentMethodEnum;
10 use App\Billingo\Models\DocumentExport\DocumentExportFilterExtra;
11
12 class CreateDocumentExportFactory extends BaseFactory
13 {
14
15 public function definition(): array
16 {
17 return [
18 'query_type' => $this->faker->randomElement(getEnumValues(DocumentExportQueryTypeEnum::class)),
19 'start_date' => $this->faker->date(),
20 'end_date' => $this->faker->date(),
21 'document_block_id' => $this->faker->optional()->numberBetween(1, 1000),
22 'export_type' => $this->faker->randomElement(getEnumValues(DocumentExportTypeEnum::class)),
23 'number_start_year' => $this->faker->optional()->numberBetween(1, 1000),
24 'number_start_sequence' => $this->faker->optional()->numberBetween(1, 1000),
25 'number_end_year' => $this->faker->optional()->numberBetween(1, 1000),
26 'number_end_sequence' => $this->faker->optional()->numberBetween(1, 1000),
27 'payment_method' => $this->faker->optional()->randomElement(getEnumValues(PaymentMethodEnum::class)),
28 'sort_by' => $this->faker->optional()->randomElement(getEnumValues(DocumentExportSortByEnum::class)),
29 'other_options' => $this->faker->optional()->randomElement(
30 getEnumValues(DocumentExportOtherOptionsEnum::class)
31 ),
32 'filter_extra' => $this->faker->boolean() ? DocumentExportFilterExtra::factory() : null,
33 ];
34 }
35 }
36