Procházet zdrojové kódy

entity creation + Interface DescriptionProjet

master
charly před 3 roky
rodič
revize
729d29ea29
15 změnil soubory, kde provedl 14297 přidání a 481 odebrání
  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
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


+ 59
- 0
migrations/Version20210601122627.php Zobrazit soubor

@@ -0,0 +1,59 @@
<?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
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


+ 8
- 0
src/Doctrine/Extension/DescriptionProjectInterface.php Zobrazit soubor

@@ -0,0 +1,8 @@
<?php

namespace Lc\SovBundle\Doctrine\Extension;

interface DescriptionProjectInterface
{

}

+ 44
- 0
src/Doctrine/Extension/DescriptionProjectTrait.php Zobrazit soubor

@@ -0,0 +1,44 @@
<?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 Zobrazit soubor

@@ -7,12 +7,16 @@ use App\Repository\CollectifDataRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Lc\SovBundle\Doctrine\Extension\StatusInterface;
use Lc\SovBundle\Doctrine\Extension\StatusTrait;

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

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

+ 5
- 1
src/Entity/Configuration.php Zobrazit soubor

@@ -4,12 +4,16 @@ namespace App\Entity;

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

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

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

+ 5
- 1
src/Entity/Dreams.php Zobrazit soubor

@@ -4,12 +4,16 @@ namespace App\Entity;

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

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

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

+ 5
- 1
src/Entity/IndividualData.php Zobrazit soubor

@@ -6,12 +6,16 @@ use App\Repository\IndividualDataRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Lc\SovBundle\Doctrine\Extension\StatusInterface;
use Lc\SovBundle\Doctrine\Extension\StatusTrait;

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

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

+ 5
- 1
src/Entity/ProjectsBoost.php Zobrazit soubor

@@ -4,12 +4,16 @@ namespace App\Entity;

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

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

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

+ 5
- 1
src/Entity/ProjectsInspiring.php Zobrazit soubor

@@ -4,12 +4,16 @@ namespace App\Entity;

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

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

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

+ 5
- 1
src/Entity/Revolts.php Zobrazit soubor

@@ -4,12 +4,16 @@ namespace App\Entity;

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

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

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

+ 77
- 77
src/Entity/Site/Page.php Zobrazit soubor

@@ -6,7 +6,7 @@ use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Lc\SovBundle\Doctrine\Pattern\AbstractFullEntity;
use App\Entity\File\File ;
use App\Entity\File\File;
use App\Repository\PageRepository;

/**
@@ -14,90 +14,90 @@ use App\Repository\PageRepository;
*/
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
{
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 Zobrazit soubor

@@ -423,6 +423,9 @@
"symfony/polyfill-php80": {
"version": "v1.22.1"
},
"symfony/polyfill-php81": {
"version": "v1.23.0"
},
"symfony/polyfill-uuid": {
"version": "v1.22.1"
},

+ 6050
- 0
yarn.lock
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


Načítá se…
Zrušit
Uložit