Browse Source

entity creation + Interface DescriptionProjet

master
charly 3 years ago
parent
commit
729d29ea29
15 changed files with 14297 additions and 481 deletions
  1. +481
    -397
      composer.lock
  2. +59
    -0
      migrations/Version20210601122627.php
  3. +7540
    -0
      package-lock.json
  4. +8
    -0
      src/Doctrine/Extension/DescriptionProjectInterface.php
  5. +44
    -0
      src/Doctrine/Extension/DescriptionProjectTrait.php
  6. +5
    -1
      src/Entity/CollectifData.php
  7. +5
    -1
      src/Entity/Configuration.php
  8. +5
    -1
      src/Entity/Dreams.php
  9. +5
    -1
      src/Entity/IndividualData.php
  10. +5
    -1
      src/Entity/ProjectsBoost.php
  11. +5
    -1
      src/Entity/ProjectsInspiring.php
  12. +5
    -1
      src/Entity/Revolts.php
  13. +77
    -77
      src/Entity/Site/Page.php
  14. +3
    -0
      symfony.lock
  15. +6050
    -0
      yarn.lock

+ 481
- 397
composer.lock
File diff suppressed because it is too large
View File


+ 59
- 0
migrations/Version20210601122627.php View File

<?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 Version20210601122627 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('ALTER TABLE collectif_data ADD status DOUBLE PRECISION NOT NULL');
$this->addSql('ALTER TABLE configuration ADD dev_alias VARCHAR(255) DEFAULT NULL');
$this->addSql('ALTER TABLE dreams ADD thematic_id INT DEFAULT NULL, ADD description LONGTEXT NOT NULL');
$this->addSql('ALTER TABLE dreams ADD CONSTRAINT FK_FD07CC0A2395FCED FOREIGN KEY (thematic_id) REFERENCES thematic (id)');
$this->addSql('CREATE INDEX IDX_FD07CC0A2395FCED ON dreams (thematic_id)');
$this->addSql('ALTER TABLE individual_data ADD status DOUBLE PRECISION NOT NULL');
$this->addSql('ALTER TABLE projects_boost ADD thematic_id INT DEFAULT NULL, ADD description LONGTEXT NOT NULL');
$this->addSql('ALTER TABLE projects_boost ADD CONSTRAINT FK_C3E573562395FCED FOREIGN KEY (thematic_id) REFERENCES thematic (id)');
$this->addSql('CREATE INDEX IDX_C3E573562395FCED ON projects_boost (thematic_id)');
$this->addSql('ALTER TABLE projects_inspiring ADD thematic_id INT DEFAULT NULL, ADD description LONGTEXT NOT NULL');
$this->addSql('ALTER TABLE projects_inspiring ADD CONSTRAINT FK_E60CAEC62395FCED FOREIGN KEY (thematic_id) REFERENCES thematic (id)');
$this->addSql('CREATE INDEX IDX_E60CAEC62395FCED ON projects_inspiring (thematic_id)');
$this->addSql('ALTER TABLE revolts ADD thematic_id INT DEFAULT NULL, ADD description LONGTEXT NOT NULL');
$this->addSql('ALTER TABLE revolts ADD CONSTRAINT FK_68E7DC9F2395FCED FOREIGN KEY (thematic_id) REFERENCES thematic (id)');
$this->addSql('CREATE INDEX IDX_68E7DC9F2395FCED ON revolts (thematic_id)');
}

public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE collectif_data DROP status');
$this->addSql('ALTER TABLE configuration DROP dev_alias');
$this->addSql('ALTER TABLE dreams DROP FOREIGN KEY FK_FD07CC0A2395FCED');
$this->addSql('DROP INDEX IDX_FD07CC0A2395FCED ON dreams');
$this->addSql('ALTER TABLE dreams DROP thematic_id, DROP description');
$this->addSql('ALTER TABLE individual_data DROP status');
$this->addSql('ALTER TABLE projects_boost DROP FOREIGN KEY FK_C3E573562395FCED');
$this->addSql('DROP INDEX IDX_C3E573562395FCED ON projects_boost');
$this->addSql('ALTER TABLE projects_boost DROP thematic_id, DROP description');
$this->addSql('ALTER TABLE projects_inspiring DROP FOREIGN KEY FK_E60CAEC62395FCED');
$this->addSql('DROP INDEX IDX_E60CAEC62395FCED ON projects_inspiring');
$this->addSql('ALTER TABLE projects_inspiring DROP thematic_id, DROP description');
$this->addSql('ALTER TABLE revolts DROP FOREIGN KEY FK_68E7DC9F2395FCED');
$this->addSql('DROP INDEX IDX_68E7DC9F2395FCED ON revolts');
$this->addSql('ALTER TABLE revolts DROP thematic_id, DROP description');
}
}

+ 7540
- 0
package-lock.json
File diff suppressed because it is too large
View File


+ 8
- 0
src/Doctrine/Extension/DescriptionProjectInterface.php View File

<?php

namespace Lc\SovBundle\Doctrine\Extension;

interface DescriptionProjectInterface
{

}

+ 44
- 0
src/Doctrine/Extension/DescriptionProjectTrait.php View File

<?php

namespace Lc\SovBundle\Doctrine\Extension;

use Doctrine\ORM\Mapping as ORM;

trait DescriptionProjectTrait
{

/**
* @ORM\Column(type="text")
*/
private $description;

/**
* @ORM\ManyToOne(targetEntity=Thematic::class)
*/
private $thematic;

public function getDescription(): ?string
{
return $this->description;
}

public function setDescription(string $description): self
{
$this->description = $description;

return $this;
}

public function getThematic(): ?Thematic
{
return $this->thematic;
}

public function setThematic(?Thematic $thematic): self
{
$this->thematic = $thematic;

return $this;
}

}

+ 5
- 1
src/Entity/CollectifData.php View File

use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection; use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Lc\SovBundle\Doctrine\Extension\StatusInterface;
use Lc\SovBundle\Doctrine\Extension\StatusTrait;


/** /**
* @ORM\Entity(repositoryClass=CollectifDataRepository::class) * @ORM\Entity(repositoryClass=CollectifDataRepository::class)
*/ */
class CollectifData
class CollectifData implements StatusInterface
{ {
use StatusTrait;

/** /**
* @ORM\Id * @ORM\Id
* @ORM\GeneratedValue * @ORM\GeneratedValue

+ 5
- 1
src/Entity/Configuration.php View File



use App\Repository\ConfigurationRepository; use App\Repository\ConfigurationRepository;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Lc\SovBundle\Doctrine\Extension\DevAliasInterface;
use Lc\SovBundle\Doctrine\Extension\DevAliasTrait;


/** /**
* @ORM\Entity(repositoryClass=ConfigurationRepository::class) * @ORM\Entity(repositoryClass=ConfigurationRepository::class)
*/ */
class Configuration
class Configuration implements DevAliasInterface
{ {
use DevAliasTrait;

/** /**
* @ORM\Id * @ORM\Id
* @ORM\GeneratedValue * @ORM\GeneratedValue

+ 5
- 1
src/Entity/Dreams.php View File



use App\Repository\DreamsRepository; use App\Repository\DreamsRepository;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Lc\SovBundle\Doctrine\Extension\DescriptionProjectInterface;
use Lc\SovBundle\Doctrine\Extension\DescriptionProjectTrait;


/** /**
* @ORM\Entity(repositoryClass=DreamsRepository::class) * @ORM\Entity(repositoryClass=DreamsRepository::class)
*/ */
class Dreams
class Dreams implements DescriptionProjectInterface
{ {
use DescriptionProjectTrait;

/** /**
* @ORM\Id * @ORM\Id
* @ORM\GeneratedValue * @ORM\GeneratedValue

+ 5
- 1
src/Entity/IndividualData.php View File

use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection; use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Lc\SovBundle\Doctrine\Extension\StatusInterface;
use Lc\SovBundle\Doctrine\Extension\StatusTrait;


/** /**
* @ORM\Entity(repositoryClass=IndividualDataRepository::class) * @ORM\Entity(repositoryClass=IndividualDataRepository::class)
*/ */
class IndividualData
class IndividualData implements StatusInterface
{ {
use StatusTrait;

/** /**
* @ORM\Id * @ORM\Id
* @ORM\GeneratedValue * @ORM\GeneratedValue

+ 5
- 1
src/Entity/ProjectsBoost.php View File



use App\Repository\ProjectsBoostRepository; use App\Repository\ProjectsBoostRepository;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Lc\SovBundle\Doctrine\Extension\DescriptionProjectInterface;
use Lc\SovBundle\Doctrine\Extension\DescriptionProjectTrait;


/** /**
* @ORM\Entity(repositoryClass=ProjectsBoostRepository::class) * @ORM\Entity(repositoryClass=ProjectsBoostRepository::class)
*/ */
class ProjectsBoost
class ProjectsBoost implements DescriptionProjectInterface
{ {
use DescriptionProjectTrait;

/** /**
* @ORM\Id * @ORM\Id
* @ORM\GeneratedValue * @ORM\GeneratedValue

+ 5
- 1
src/Entity/ProjectsInspiring.php View File



use App\Repository\ProjectsInspiringRepository; use App\Repository\ProjectsInspiringRepository;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Lc\SovBundle\Doctrine\Extension\DescriptionProjectInterface;
use Lc\SovBundle\Doctrine\Extension\DescriptionProjectTrait;


/** /**
* @ORM\Entity(repositoryClass=ProjectsInspiringRepository::class) * @ORM\Entity(repositoryClass=ProjectsInspiringRepository::class)
*/ */
class ProjectsInspiring
class ProjectsInspiring implements DescriptionProjectInterface
{ {
use DescriptionProjectTrait;

/** /**
* @ORM\Id * @ORM\Id
* @ORM\GeneratedValue * @ORM\GeneratedValue

+ 5
- 1
src/Entity/Revolts.php View File



use App\Repository\RevoltsRepository; use App\Repository\RevoltsRepository;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Lc\SovBundle\Doctrine\Extension\DescriptionProjectInterface;
use Lc\SovBundle\Doctrine\Extension\DescriptionProjectTrait;


/** /**
* @ORM\Entity(repositoryClass=RevoltsRepository::class) * @ORM\Entity(repositoryClass=RevoltsRepository::class)
*/ */
class Revolts
class Revolts implements DescriptionProjectInterface
{ {
use DescriptionProjectTrait;

/** /**
* @ORM\Id * @ORM\Id
* @ORM\GeneratedValue * @ORM\GeneratedValue

+ 77
- 77
src/Entity/Site/Page.php View File

use Doctrine\Common\Collections\Collection; use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Lc\SovBundle\Doctrine\Pattern\AbstractFullEntity; use Lc\SovBundle\Doctrine\Pattern\AbstractFullEntity;
use App\Entity\File\File ;
use App\Entity\File\File;
use App\Repository\PageRepository; use App\Repository\PageRepository;


/** /**
*/ */
class Page extends AbstractFullEntity class Page extends AbstractFullEntity
{ {
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=File::class, cascade={"persist", "remove"})
*/
private $image;
/**
* @ORM\ManyToMany(targetEntity=File::class, cascade={"persist", "remove"}, orphanRemoval=true)
* @ORM\OrderBy({"position" = "ASC"})
*/
private $gallery;
/**
* @ORM\ManyToOne(targetEntity=File::class, cascade={"persist"})
*/
private $file;
public function __construct()
{
$this->gallery = new ArrayCollection();
}
public function __toString()
{
return $this->title;
}
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\ManyToOne(targetEntity=File::class, cascade={"persist", "remove"})
*/
private $image;
/**
* @ORM\ManyToMany(targetEntity=File::class, cascade={"persist", "remove"}, orphanRemoval=true)
* @ORM\OrderBy({"position" = "ASC"})
*/
private $gallery;
/**
* @ORM\ManyToOne(targetEntity=File::class, cascade={"persist"})
*/
private $file;
public function __construct()
{
$this->gallery = new ArrayCollection();
}
public function __toString()
{
return $this->title;
}


public function getId(): ?int public function getId(): ?int
{
return $this->id;
}

public function getImage(): ?File
{
return $this->image;
{
return $this->id;
}

public function getImage(): ?File
{
return $this->image;
}

public function setImage(?File $image): self
{
$this->image = $image;

return $this;
}

/**
* @return Collection|File[]
*/
public function getGallery(): Collection
{
return $this->gallery;
}

public function addGallery(File $gallery): self
{
if (!$this->gallery->contains($gallery)) {
$this->gallery[] = $gallery;
} }


public function setImage(?File $image): self
{
$this->image = $image;
return $this;
}


return $this;
}
public function removeGallery(File $gallery): self
{
$this->gallery->removeElement($gallery);


/**
* @return Collection|File[]
*/
public function getGallery(): Collection
{
return $this->gallery;
}
return $this;
}


public function addGallery(File $gallery): self
{
if (!$this->gallery->contains($gallery)) {
$this->gallery[] = $gallery;
}
public function getFile(): ?File
{
return $this->file;
}


return $this;
}
public function setFile(?File $file): self
{
$this->file = $file;


public function removeGallery(File $gallery): self
{
$this->gallery->removeElement($gallery);

return $this;
}

public function getFile(): ?File
{
return $this->file;
}

public function setFile(?File $file): self
{
$this->file = $file;

return $this;
}
return $this;
}


} }

+ 3
- 0
symfony.lock View File

"symfony/polyfill-php80": { "symfony/polyfill-php80": {
"version": "v1.22.1" "version": "v1.22.1"
}, },
"symfony/polyfill-php81": {
"version": "v1.23.0"
},
"symfony/polyfill-uuid": { "symfony/polyfill-uuid": {
"version": "v1.22.1" "version": "v1.22.1"
}, },

+ 6050
- 0
yarn.lock
File diff suppressed because it is too large
View File


Loading…
Cancel
Save