diff --git a/config/api_platform/OgLive.yaml b/config/api_platform/OgLive.yaml new file mode 100644 index 0000000..e69de29 diff --git a/migrations/Version20240808140716.php b/migrations/Version20240808140716.php new file mode 100644 index 0000000..b61c4df --- /dev/null +++ b/migrations/Version20240808140716.php @@ -0,0 +1,31 @@ +addSql('CREATE TABLE og_live (id INT AUTO_INCREMENT NOT NULL, uuid CHAR(36) NOT NULL COMMENT \'(DC2Type:uuid)\', migration_id VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, created_by VARCHAR(255) DEFAULT NULL, updated_by VARCHAR(255) DEFAULT NULL, download_url VARCHAR(255) DEFAULT NULL, name VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_3D6B7739D17F50A6 (uuid), UNIQUE INDEX UNIQ_IDENTIFIER_NAME (name), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('DROP TABLE og_live'); + } +} diff --git a/src/Dto/Input/OgLiveInput.php b/src/Dto/Input/OgLiveInput.php new file mode 100644 index 0000000..4f8d788 --- /dev/null +++ b/src/Dto/Input/OgLiveInput.php @@ -0,0 +1,8 @@ +downloadUrl; + } + + public function setDownloadUrl(?string $downloadUrl): static + { + $this->downloadUrl = $downloadUrl; + + return $this; + } +} diff --git a/src/Factory/OgLiveFactory.php b/src/Factory/OgLiveFactory.php new file mode 100644 index 0000000..cb90dcd --- /dev/null +++ b/src/Factory/OgLiveFactory.php @@ -0,0 +1,56 @@ + + */ +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(), + 'name' => self::faker()->text(255), + 'downloadUrl' => 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(OgLive $ogLive): void {}) + ; + } + + protected static function getClass(): string + { + return OgLive::class; + } +} diff --git a/src/Repository/OgLiveRepository.php b/src/Repository/OgLiveRepository.php new file mode 100644 index 0000000..63e83cc --- /dev/null +++ b/src/Repository/OgLiveRepository.php @@ -0,0 +1,18 @@ + + */ +class OgLiveRepository extends AbstractRepository +{ + public function __construct(ManagerRegistry $registry) + { + parent::__construct($registry, OgLive::class); + } +} diff --git a/src/State/Processor/OgLiveProcessor.php b/src/State/Processor/OgLiveProcessor.php new file mode 100644 index 0000000..dff06bf --- /dev/null +++ b/src/State/Processor/OgLiveProcessor.php @@ -0,0 +1,8 @@ +