src/Entity/Organisation/Type.php line 14
<?php
namespace App\Entity\Organisation;
use App\Entity\Traits\DeletedTrait;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Table(name: 'organisation_type')]
#[ORM\Index(name: 'idx_active', columns: ['is_active', 'deleted'])]
#[ORM\Entity(repositoryClass: 'App\Repository\Organisation\TypeRepository')]
class Type
{
use DeletedTrait;
/**
* @var int
*/
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'AUTO')]
#[ORM\Column(type: 'integer')]
private $id;
/**
* @var string
*/
#[ORM\Column(type: 'string')]
private $slug;
/**
* @var string
*/
#[ORM\Column(type: 'string')]
private $caption;
/**
* @var boolean
*/
#[ORM\Column(type: 'boolean', name: 'is_active')]
private $active = true;
/**
* @var Collection
*/
#[ORM\OneToMany(targetEntity: 'App\Entity\Organisation\Organisation', mappedBy: 'type')]
private $organisations;
/**
* @var Collection
*/
#[ORM\OneToMany(targetEntity: 'App\Entity\Organisation\PageType', mappedBy: 'type')]
private $page_types;
public function __construct()
{
$this->organisations=new ArrayCollection();
}
/**
* @return int
*/
public function getId(): ?int
{
return $this->id;
}
/**
* @param int $id
*/
public function setId(int $id): void
{
$this->id = $id;
}
/**
* @return string
*/
public function getSlug(): ?string
{
return $this->slug;
}
/**
* @param string $slug
*/
public function setSlug(string $slug): void
{
$this->slug = $slug;
}
/**
* @return string
*/
public function getCaption(): ?string
{
return $this->caption;
}
/**
* @param string $caption
*/
public function setCaption(string $caption): void
{
$this->caption = $caption;
}
/**
* @return bool
*/
public function isActive(): bool
{
return $this->active;
}
/**
* @param bool $active
*/
public function setActive(bool $active): void
{
$this->active = $active;
}
/**
* @return Collection
*/
public function getOrganisations(): Collection
{
return $this->organisations;
}
/**
* @param Collection $organisations
*/
public function setOrganisations(Collection $organisations): void
{
$this->organisations = $organisations;
}
/**
* @return Collection
*/
public function getPageTypes(): Collection
{
return $this->page_types;
}
/**
* @param Collection $page_types
*/
public function setPageTypes(Collection $page_types): void
{
$this->page_types = $page_types;
}
}