<?php

namespace App\Tests\Fixture\Factory\Access;

use App\Entity\Access\Access;
use App\Tests\Fixture\Factory\Person\PersonRepository;
use Zenstruck\Foundry\RepositoryProxy;
use Zenstruck\Foundry\ModelFactory;
use Zenstruck\Foundry\Proxy;

/**
 * @extends ModelFactory<Access>
 *
 * @phpstan-method        Access|Proxy create(array|callable $attributes = [])
 * @phpstan-method static Access|Proxy createOne(array $attributes = [])
 * @phpstan-method static Access|Proxy find(object|array|mixed $criteria)
 * @phpstan-method static Access|Proxy findOrCreate(array $attributes)
 * @phpstan-method static Access|Proxy first(string $sortedField = 'id')
 * @phpstan-method static Access|Proxy last(string $sortedField = 'id')
 * @phpstan-method static Access|Proxy random(array $attributes = [])
 * @phpstan-method static Access|Proxy randomOrCreate(array $attributes = []))
 * @phpstan-method static AccessRepository|RepositoryProxy repository()
 * @phpstan-method static Access[]|Proxy[] all()
 * @phpstan-method static Access[]|Proxy[] createMany(int $number, array|callable $attributes = [])
 * @phpstan-method static Access[]&Proxy[] createSequence(iterable|callable $sequence)
 * @phpstan-method static Access[]|Proxy[] findBy(array $attributes)
 * @phpstan-method static Access[]|Proxy[] randomRange(int $min, int $max, array $attributes = []))
 * @phpstan-method static Access[]|Proxy[] randomSet(int $number, array $attributes = []))
 */
class AccessFactory 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 Access::class;
    }
}
