-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from Elastic-Suite/espp173_repository_structure
Espp173 repository structure
- Loading branch information
Showing
12 changed files
with
197 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace DoctrineMigrations; | ||
|
||
use Doctrine\DBAL\Schema\Schema; | ||
use Doctrine\Migrations\AbstractMigration; | ||
|
||
/** | ||
* Auto-generated Migration: Please modify to your needs! | ||
*/ | ||
final class Version20220125195152 extends AbstractMigration | ||
{ | ||
public function getDescription(): string | ||
{ | ||
return ''; | ||
} | ||
|
||
public function up(Schema $schema): void | ||
{ | ||
// this up() migration is auto-generated, please modify it to your needs | ||
$this->addSql('CREATE SEQUENCE declarative_greeting_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); | ||
$this->addSql('CREATE TABLE declarative_greeting (id INT NOT NULL, name VARCHAR(255) NOT NULL, PRIMARY KEY(id))'); | ||
} | ||
|
||
public function down(Schema $schema): void | ||
{ | ||
// this down() migration is auto-generated, please modify it to your needs | ||
$this->addSql('CREATE SCHEMA public'); | ||
$this->addSql('DROP SEQUENCE declarative_greeting_id_seq CASCADE'); | ||
$this->addSql('DROP TABLE declarative_greeting'); | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
api/src/Acme/DeclarativeGreetingsBundle/AcmeDeclarativeGreetingsBundle.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
/** | ||
* DISCLAIMER | ||
* | ||
* Do not edit or add to this file if you wish to upgrade Smile ElasticSuite to newer | ||
* versions in the future. | ||
* | ||
* @category Acme | ||
* @package Acme\DeclarativeGreetingsBundle | ||
* @author Richard Bayet <richard.bayet@smile.fr> | ||
* @copyright 2022 Smile | ||
* @license Licensed to Smile-SA. All rights reserved. No warranty, explicit or implicit, provided. | ||
* Unauthorized copying of this file, via any medium, is strictly prohibited. | ||
*/ | ||
|
||
namespace Acme\DeclarativeGreetingsBundle; | ||
|
||
use Symfony\Component\HttpKernel\Bundle\Bundle; | ||
|
||
class AcmeDeclarativeGreetingsBundle extends Bundle | ||
{ | ||
|
||
} |
35 changes: 35 additions & 0 deletions
35
api/src/Acme/DeclarativeGreetingsBundle/Models/DeclarativeGreeting.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
namespace Acme\DeclarativeGreetingsBundle\Models; | ||
|
||
use ApiPlatform\Core\Annotation\ApiResource; | ||
use Doctrine\ORM\Mapping as ORM; | ||
use Symfony\Component\Validator\Constraints as Assert; | ||
|
||
/** | ||
* This is a dummy entity. Remove it! | ||
*/ | ||
#[ApiResource(mercure: true)] | ||
#[ORM\Entity] | ||
class DeclarativeGreeting | ||
{ | ||
/** | ||
* The entity ID | ||
*/ | ||
#[ORM\Id] | ||
#[ORM\Column(type: 'integer')] | ||
#[ORM\GeneratedValue] | ||
private ?int $id = null; | ||
|
||
/** | ||
* A nice person | ||
*/ | ||
#[ORM\Column] | ||
#[Assert\NotBlank] | ||
public string $name = ''; | ||
|
||
public function getId(): ?int | ||
{ | ||
return $this->id; | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
api/src/Acme/DeclarativeGreetingsBundle/Resources/config/api_resources.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
resources: | ||
Acme\DeclarativeGreetingsBundle\Models\DeclarativeGreeting: | ||
# Shortname used for the route: becomes '/declarative_greeting' and the plural form is applied somehow. | ||
shortName: 'DeclarativeGreeting' | ||
description: 'Description of declarative greetings (description)' | ||
# IRI NOT used for internal object IDs which use the shortName (eg: '"@id"! "/declarative_greetings/1") | ||
# BUT used for the @type property. | ||
iri: 'Declarative Greeting' | ||
# itemOperations: ['GET', 'POST', 'PUT', 'DELETE', 'PATCH'] ??? | ||
# collectionOperations: ['GET'] ?? | ||
# subresourceOperations: [] | ||
# graphql: true | ||
# attributes: [] | ||
# properties: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
/** | ||
* DISCLAIMER | ||
* | ||
* Do not edit or add to this file if you wish to upgrade Smile ElasticSuite to newer | ||
* versions in the future. | ||
* | ||
* @category Acme | ||
* @package Acme\GreetingsBundle | ||
* @author Richard Bayet <richard.bayet@smile.fr> | ||
* @copyright 2022 Smile | ||
* @license Licensed to Smile-SA. All rights reserved. No warranty, explicit or implicit, provided. | ||
* Unauthorized copying of this file, via any medium, is strictly prohibited. | ||
*/ | ||
|
||
namespace Acme\GreetingsBundle; | ||
|
||
use Symfony\Component\HttpKernel\Bundle\Bundle; | ||
|
||
class AcmeGreetingsBundle extends Bundle | ||
{ | ||
|
||
} |
2 changes: 1 addition & 1 deletion
2
api/src/Acme/Greetings/Entity/Greeting.php → .../Acme/GreetingsBundle/Entity/Greeting.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
23 changes: 23 additions & 0 deletions
23
api/src/Elasticsuite/Catalog/ElasticsuiteCatalogBundle.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
/** | ||
* DISCLAIMER | ||
* | ||
* Do not edit or add to this file if you wish to upgrade Smile ElasticSuite to newer | ||
* versions in the future. | ||
* | ||
* @category Elasticsuite | ||
* @package Elasticsuite\Catalog | ||
* @author Richard Bayet <richard.bayet@smile.fr> | ||
* @copyright 2022 Smile | ||
* @license Licensed to Smile-SA. All rights reserved. No warranty, explicit or implicit, provided. | ||
* Unauthorized copying of this file, via any medium, is strictly prohibited. | ||
*/ | ||
|
||
namespace Elasticsuite\Catalog; | ||
|
||
use Symfony\Component\HttpKernel\Bundle\Bundle; | ||
|
||
class ElasticsuiteCatalogBundle extends Bundle | ||
{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
/** | ||
* DISCLAIMER | ||
* | ||
* Do not edit or add to this file if you wish to upgrade Smile ElasticSuite to newer | ||
* versions in the future. | ||
* | ||
* @category Elasticsuite | ||
* @package Elasticsuite\Index | ||
* @author Richard Bayet <richard.bayet@smile.fr> | ||
* @copyright 2022 Smile | ||
* @license Licensed to Smile-SA. All rights reserved. No warranty, explicit or implicit, provided. | ||
* Unauthorized copying of this file, via any medium, is strictly prohibited. | ||
*/ | ||
|
||
namespace Elasticsuite\Index; | ||
|
||
use Symfony\Component\HttpKernel\Bundle\Bundle; | ||
|
||
class ElasticsuiteIndexBundle extends Bundle | ||
{ | ||
|
||
} |