<?php

namespace App\Tests\Fixture\Factory\Booking;

use App\Entity\Booking\Event;
use Zenstruck\Foundry\ModelFactory;
use Zenstruck\Foundry\Proxy;

/**
 * @extends ModelFactory<Event>
 *
 * @phpstan-method        Event|Proxy create(array|callable $attributes = [])
 * @phpstan-method static Event|Proxy createOne(array $attributes = [])
 * @phpstan-method static Event|Proxy find(object|array|mixed $criteria)
 * @phpstan-method static Event|Proxy findOrCreate(array $attributes)
 * @phpstan-method static Event|Proxy first(string $sortedField = 'id')
 * @phpstan-method static Event|Proxy last(string $sortedField = 'id')
 * @phpstan-method static Event|Proxy random(array $attributes = [])
 * @phpstan-method static Event|Proxy randomOrCreate(array $attributes = []))
 * @phpstan-method static EventRepository|RepositoryProxy repository()
 * @phpstan-method static Event[]|Proxy[] all()
 * @phpstan-method static Event[]|Proxy[] createMany(int $number, array|callable $attributes = [])
 * @phpstan-method static Event[]&Proxy[] createSequence(iterable|callable $sequence)
 * @phpstan-method static Event[]|Proxy[] findBy(array $attributes)
 * @phpstan-method static Event[]|Proxy[] randomRange(int $min, int $max, array $attributes = []))
 * @phpstan-method static Event[]|Proxy[] randomSet(int $number, array $attributes = []))
 */
class EventFactory extends ModelFactory
{
    /**
     * @see https://github.com/zenstruck/foundry#factories-as-services
     */
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * @see https://github.com/zenstruck/foundry#model-factories
     *
     * @todo add your default values here
     */
    protected function getDefaults(): array
    {
        return [];
    }

    /**
     * @see https://github.com/zenstruck/foundry#initialization
     */
    protected function initialize(): self
    {
        return $this
            // ->afterInstantiate(function(Post $post) {})
        ;
    }

    protected static function getClass(): string
    {
        return Event::class;
    }
}
