<?php

namespace App\Factory;

use App\Entity\Subnet;
use App\Repository\SubnetRepository;
use Zenstruck\Foundry\ModelFactory;
use Zenstruck\Foundry\Persistence\PersistentProxyObjectFactory;
use Zenstruck\Foundry\Persistence\Proxy;
use Zenstruck\Foundry\Persistence\ProxyRepositoryDecorator;

/**
 * @extends PersistentProxyObjectFactory<Subnet>
 */
final class SubnetFactory extends ModelFactory
{
    /**
     * @see https://symfony.com/bundles/ZenstruckFoundryBundle/current/index.html#factories-as-services
     *
     * @todo inject services if required
     */
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * @see https://symfony.com/bundles/ZenstruckFoundryBundle/current/index.html#model-factories
     *
     * @todo add your default values here
     */
    protected function getDefaults(): array
    {
        return [
            'bootFileName' => self::faker()->text(255),
            'createdAt' => self::faker()->dateTime(),
            'ipAddress' => self::faker()->text(255),
            'netmask' => self::faker()->text(255),
            'nextServer' => self::faker()->text(255),
            'updatedAt' => self::faker()->dateTime()
        ];
    }

    /**
     * @see https://symfony.com/bundles/ZenstruckFoundryBundle/current/index.html#initialization
     */
    protected function initialize(): self
    {
        return $this
            // ->afterInstantiate(function(Subnet $subnet): void {})
        ;
    }

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