src/Entity/ProjectType.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ProjectTypeRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. #[ORM\Entity(repositoryClassProjectTypeRepository::class)]
  9. class ProjectType
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\Column(length255)]
  16.     private ?string $label null;
  17.     #[ORM\ManyToOne(inversedBy'projectTypes')]
  18.     private ?ContactType $contact_group null;
  19.     #[ORM\ManyToMany(targetEntityVariablesGroup::class, mappedBy'project_group')]
  20.     private Collection $variablesGroups;
  21.     #[ORM\OneToMany(mappedBy'project_type'targetEntityProject::class)]
  22.     private Collection $projects;
  23.     #[ORM\Column(nullabletrue)]
  24.     private ?int $colonne null;
  25.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  26.     private ?\DateTimeInterface $date_creation null;
  27.     public function __construct()
  28.     {
  29.         $this->variablesGroups = new ArrayCollection();
  30.         $this->projects = new ArrayCollection();
  31.     }
  32.     public function getId(): ?int
  33.     {
  34.         return $this->id;
  35.     }
  36.     public function getLabel(): ?string
  37.     {
  38.         return $this->label;
  39.     }
  40.     public function setLabel(string $label): static
  41.     {
  42.         $this->label $label;
  43.         return $this;
  44.     }
  45.     public function getContactGroup(): ?ContactType
  46.     {
  47.         return $this->contact_group;
  48.     }
  49.     public function setContactGroup(?ContactType $contact_group): static
  50.     {
  51.         $this->contact_group $contact_group;
  52.         return $this;
  53.     }
  54.     /**
  55.      * @return Collection<int, VariablesGroup>
  56.      */
  57.     public function getVariablesGroups(): Collection
  58.     {
  59.         return $this->variablesGroups;
  60.     }
  61.     public function addVariablesGroup(VariablesGroup $variablesGroup): static
  62.     {
  63.         if (!$this->variablesGroups->contains($variablesGroup)) {
  64.             $this->variablesGroups->add($variablesGroup);
  65.             $variablesGroup->addProjectGroup($this);
  66.         }
  67.         return $this;
  68.     }
  69.     public function removeVariablesGroup(VariablesGroup $variablesGroup): static
  70.     {
  71.         if ($this->variablesGroups->removeElement($variablesGroup)) {
  72.             $variablesGroup->removeProjectGroup($this);
  73.         }
  74.         return $this;
  75.     }
  76.     /**
  77.      * @return Collection<int, Project>
  78.      */
  79.     public function getProjects(): Collection
  80.     {
  81.         return $this->projects;
  82.     }
  83.     public function addProject(Project $project): static
  84.     {
  85.         if (!$this->projects->contains($project)) {
  86.             $this->projects->add($project);
  87.             $project->setProjectType($this);
  88.         }
  89.         return $this;
  90.     }
  91.     public function removeProject(Project $project): static
  92.     {
  93.         if ($this->projects->removeElement($project)) {
  94.             // set the owning side to null (unless already changed)
  95.             if ($project->getProjectType() === $this) {
  96.                 $project->setProjectType(null);
  97.             }
  98.         }
  99.         return $this;
  100.     }
  101.     public function getColonne(): ?int
  102.     {
  103.         return $this->colonne;
  104.     }
  105.     public function setColonne(?int $colonne): static
  106.     {
  107.         $this->colonne $colonne;
  108.         return $this;
  109.     }
  110.     public function getDateCreation(): ?\DateTimeInterface
  111.     {
  112.         return $this->date_creation;
  113.     }
  114.     public function setDateCreation(?\DateTimeInterface $date_creation): static
  115.     {
  116.         $this->date_creation $date_creation;
  117.         return $this;
  118.     }
  119. }