'CURRENT_TIMESTAMP'])] private ?\DateTimeImmutable $createdAt = null; #[ORM\Column(options: ['default' => false])] private ?bool $isDeleted = false; #[ORM\Column(options: ['default' => true])] private ?bool $isActive = true; /** * @var Collection */ #[ORM\ManyToMany(targetEntity: Apps::class, mappedBy: 'organization')] private Collection $apps; #[ORM\Column(length: 255)] #[Assert\NotBlank(message: "Le nom ne peut pas être vide.")] private ?string $name = null; /** * @var Collection */ #[ORM\OneToMany(targetEntity: Actions::class, mappedBy: 'Organization')] private Collection $actions; /** * @var Collection */ #[ORM\OneToMany(targetEntity: UserOrganizationApp::class, mappedBy: 'organization')] private Collection $userOrganizatonApps; #[ORM\Column(length: 4, nullable: true)] private ?string $projectPrefix = null; /** * @var Collection */ #[ORM\OneToMany(targetEntity: Project::class, mappedBy: 'organization')] private Collection $projects; public function __construct() { $this->apps = new ArrayCollection(); $this->actions = new ArrayCollection(); $this->createdAt = new \DateTimeImmutable(); $this->userOrganizatonApps = new ArrayCollection(); $this->projects = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getEmail(): ?string { return $this->email; } public function setEmail(string $email): static { $this->email = $email; return $this; } public function getNumber(): ?int { return $this->number; } public function setNumber(int $number): static { $this->number = $number; return $this; } public function getAddress(): ?string { return $this->address; } public function setAddress(string $address): static { $this->address = $address; return $this; } public function getLogoUrl(): ?string { return $this->logo_url; } public function setLogoUrl(string $logo_url): static { $this->logo_url = $logo_url; return $this; } public function getCreatedAt(): ?\DateTimeImmutable { return $this->createdAt; } public function setCreatedAt(\DateTimeImmutable $createdAt): static { $this->createdAt = $createdAt; return $this; } public function isDeleted(): ?bool { return $this->isDeleted; } public function setIsDeleted(bool $isDeleted): static { $this->isDeleted = $isDeleted; return $this; } public function isActive(): ?bool { return $this->isActive; } public function setIsActive(bool $isActive): static { $this->isActive = $isActive; return $this; } /** * @return Collection */ public function getApps(): Collection { return $this->apps; } public function addApp(Apps $app): static { if (!$this->apps->contains($app)) { $this->apps->add($app); $app->addOrganization($this); } return $this; } public function removeApp(Apps $app): static { if ($this->apps->removeElement($app)) { $app->removeOrganization($this); } return $this; } public function getName(): ?string { return $this->name; } public function setName(string $name): static { $this->name = $name; return $this; } /** * @return Collection */ public function getActions(): Collection { return $this->actions; } public function addAction(Actions $action): static { if (!$this->actions->contains($action)) { $this->actions->add($action); $action->setOrganization($this); } return $this; } public function removeAction(Actions $action): static { if ($this->actions->removeElement($action)) { // set the owning side to null (unless already changed) if ($action->getOrganization() === $this) { $action->setOrganization(null); } } return $this; } /** * @return Collection */ public function getUserOrganizatonApps(): Collection { return $this->userOrganizatonApps; } public function addUserOrganizatonApp(UserOrganizationApp $userOrganizatonApp): static { if (!$this->userOrganizatonApps->contains($userOrganizatonApp)) { $this->userOrganizatonApps->add($userOrganizatonApp); $userOrganizatonApp->setOrganization($this); } return $this; } public function removeUserOrganizatonApp(UserOrganizationApp $userOrganizatonApp): static { if ($this->userOrganizatonApps->removeElement($userOrganizatonApp)) { // set the owning side to null (unless already changed) if ($userOrganizatonApp->getOrganization() === $this) { $userOrganizatonApp->setOrganization(null); } } return $this; } public function getProjectPrefix(): ?string { return $this->projectPrefix; } public function setProjectPrefix(?string $projectPrefix): static { $this->projectPrefix = $projectPrefix; return $this; } /** * @return Collection */ public function getProjects(): Collection { return $this->projects; } public function addProject(Project $project): static { if (!$this->projects->contains($project)) { $this->projects->add($project); $project->setOrganization($this); } return $this; } public function removeProject(Project $project): static { if ($this->projects->removeElement($project)) { // set the owning side to null (unless already changed) if ($project->getOrganization() === $this) { $project->setOrganization(null); } } return $this; } }