58 lines
1.5 KiB
PHP
58 lines
1.5 KiB
PHP
<?php
|
|
|
|
namespace App\Factory;
|
|
|
|
use App\Entity\OgLive;
|
|
use App\Model\OgLiveStatus;
|
|
use App\Repository\OgLiveRepository;
|
|
use Zenstruck\Foundry\ModelFactory;
|
|
use Zenstruck\Foundry\Persistence\PersistentProxyObjectFactory;
|
|
use Zenstruck\Foundry\Persistence\Proxy;
|
|
use Zenstruck\Foundry\Persistence\ProxyRepositoryDecorator;
|
|
|
|
/**
|
|
* @extends PersistentProxyObjectFactory<OgLive>
|
|
*/
|
|
final class OgLiveFactory 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 [
|
|
'createdAt' => self::faker()->dateTime(),
|
|
'filename' => self::faker()->text(255),
|
|
'status' => OgLiveStatus::ACTIVE,
|
|
'updatedAt' => self::faker()->dateTime(),
|
|
];
|
|
}
|
|
|
|
/**
|
|
* @see https://symfony.com/bundles/ZenstruckFoundryBundle/current/index.html#initialization
|
|
*/
|
|
protected function initialize(): self
|
|
{
|
|
return $this
|
|
// ->afterInstantiate(function(OgLive $ogLive): void {})
|
|
;
|
|
}
|
|
|
|
protected static function getClass(): string
|
|
{
|
|
return OgLive::class;
|
|
}
|
|
}
|