163 lines
3.3 KiB
PHP
163 lines
3.3 KiB
PHP
<?php
|
|
|
|
namespace App\Entity;
|
|
|
|
use App\Repository\AppsRepository;
|
|
use Doctrine\Common\Collections\ArrayCollection;
|
|
use Doctrine\Common\Collections\Collection;
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
|
#[ORM\Entity(repositoryClass: AppsRepository::class)]
|
|
class Apps
|
|
{
|
|
#[ORM\Id]
|
|
#[ORM\GeneratedValue]
|
|
#[ORM\Column]
|
|
private ?int $id = null;
|
|
|
|
#[ORM\Column(length: 255)]
|
|
private ?string $name = null;
|
|
|
|
#[ORM\Column(length: 255)]
|
|
private ?string $subDomain = null;
|
|
|
|
#[ORM\Column(length: 255)]
|
|
private ?string $logo_url = null;
|
|
|
|
#[ORM\Column(length: 255)]
|
|
private ?string $description = null;
|
|
|
|
#[ORM\Column(length: 255)]
|
|
private ?string $title = null;
|
|
|
|
#[ORM\Column(options: ['default' => true])]
|
|
private ?bool $isActive = null;
|
|
|
|
/**
|
|
* @var Collection<int, organizations>
|
|
*/
|
|
#[ORM\ManyToMany(targetEntity: organizations::class, inversedBy: 'apps')]
|
|
private Collection $organization;
|
|
|
|
#[ORM\Column(length: 255, nullable: true)]
|
|
private ?string $descriptionSmall = null;
|
|
|
|
public function __construct()
|
|
{
|
|
$this->organization = new ArrayCollection();
|
|
}
|
|
|
|
public function getId(): ?int
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
public function getName(): ?string
|
|
{
|
|
return $this->name;
|
|
}
|
|
|
|
public function setName(string $name): static
|
|
{
|
|
$this->name = $name;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getSubDomain(): ?string
|
|
{
|
|
return $this->subDomain;
|
|
}
|
|
|
|
public function setSubDomain(string $subDomain): static
|
|
{
|
|
$this->subDomain = $subDomain;
|
|
|
|
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 getDescription(): ?string
|
|
{
|
|
return $this->description;
|
|
}
|
|
|
|
public function setDescription(string $description): static
|
|
{
|
|
$this->description = $description;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getTitle(): ?string
|
|
{
|
|
return $this->title;
|
|
}
|
|
|
|
public function setTitle(string $title): static
|
|
{
|
|
$this->title = $title;
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function isActive(): ?bool
|
|
{
|
|
return $this->isActive;
|
|
}
|
|
|
|
public function setIsActive(bool $isActive): static
|
|
{
|
|
$this->isActive = $isActive;
|
|
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* @return Collection<int, organizations>
|
|
*/
|
|
public function getOrganization(): Collection
|
|
{
|
|
return $this->organization;
|
|
}
|
|
|
|
public function addOrganization(organizations $organization): static
|
|
{
|
|
if (!$this->organization->contains($organization)) {
|
|
$this->organization->add($organization);
|
|
}
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function removeOrganization(organizations $organization): static
|
|
{
|
|
$this->organization->removeElement($organization);
|
|
|
|
return $this;
|
|
}
|
|
|
|
public function getDescriptionSmall(): ?string
|
|
{
|
|
return $this->descriptionSmall;
|
|
}
|
|
|
|
public function setDescriptionSmall(?string $descriptionSmall): static
|
|
{
|
|
$this->descriptionSmall = $descriptionSmall;
|
|
|
|
return $this;
|
|
}
|
|
}
|