| 1 |
<?php |
| 2 |
|
| 3 |
namespace Give\EventTickets\Factories; |
| 4 |
|
| 5 |
use DateTime; |
| 6 |
use Give\Framework\Models\Factories\ModelFactory; |
| 7 |
|
| 8 |
class EventFactory extends ModelFactory |
| 9 |
{ |
| 10 |
/** |
| 11 |
* @since 3.6.0 |
| 12 |
*/ |
| 13 |
public function definition(): array |
| 14 |
{ |
| 15 |
$startDateTime = $this->faker->dateTimeThisYear('+6 months'); |
| 16 |
|
| 17 |
return [ |
| 18 |
'title' => $this->faker->words(3, true), |
| 19 |
'description' => $this->faker->paragraph(), |
| 20 |
'startDateTime' => $startDateTime, |
| 21 |
'endDateTime' => $startDateTime->modify('+1 hour'), |
| 22 |
'ticketCloseDateTime' => null, |
| 23 |
'createdAt' => new DateTime(), |
| 24 |
'updatedAt' => new DateTime(), |
| 25 |
]; |
| 26 |
} |
| 27 |
} |
| 28 |
|