<?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\BrandRepository")
* @ORM\Table(name="brands", indexes={@ORM\Index(name="id_index", columns={"id"})})
*/
class Brand
{
/**
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\Column(type="string", length=255, nullable=false)
*/
private $name;
/**
* @ORM\Column(type="string", length=150, nullable=true)
*/
private $twitter;
/**
* @ORM\Column(type="string", length=320, nullable=true)
*/
private $email;
/**
* @ORM\Column(type="string", length=30, nullable=true)
*/
private $pushover_group_api_key;
/**
* @ORM\Column(type="boolean", nullable=false)
*/
private $status;
/**
* @ORM\OneToMany(targetEntity="App\Entity\Keyword", mappedBy="brand")
*/
private $keywords;
/**
* @ORM\OneToMany(targetEntity="App\Entity\Setting", mappedBy="brand")
*/
private $settings;
/**
* @ORM\OneToMany(targetEntity="App\Entity\BrandDomain", mappedBy="brand")
*/
private $brandDomains;
/**
* @ORM\OneToMany(targetEntity="App\Entity\Page", mappedBy="brand")
*/
private $pages;
/**
* @ORM\OneToMany(targetEntity="App\Entity\CheckNuked", mappedBy="brand")
*/
private $checkNukeds;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Customer", inversedBy="brands")
* @ORM\JoinColumn(name="customer_id", referencedColumnName="id", nullable=false)
*/
private $customer;
/**
* @ORM\ManyToMany(targetEntity="App\Entity\CheckType", inversedBy="brands")
* @ORM\JoinTable(
* name="check_types_brands",
* joinColumns={@ORM\JoinColumn(name="brand_id", referencedColumnName="id", nullable=false)},
* inverseJoinColumns={@ORM\JoinColumn(name="check_type_id", referencedColumnName="id", nullable=false)}
* )
*/
private $checkTypes;
public function __construct()
{
$this->keywords = new ArrayCollection();
$this->settings = new ArrayCollection();
$this->brandDomains = new ArrayCollection();
$this->pages = new ArrayCollection();
$this->checkNukeds = new ArrayCollection();
$this->checkTypes = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
public function getTwitter(): ?string
{
return $this->twitter;
}
public function setTwitter(?string $twitter): self
{
$this->twitter = $twitter;
return $this;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setEmail(?string $email): self
{
$this->email = $email;
return $this;
}
public function getPushoverGroupApiKey(): ?string
{
return $this->pushover_group_api_key;
}
public function setPushoverGroupApiKey(?string $pushover_group_api_key): self
{
$this->pushover_group_api_key = $pushover_group_api_key;
return $this;
}
public function getStatus(): ?bool
{
return $this->status;
}
public function setStatus(bool $status): self
{
$this->status = $status;
return $this;
}
/**
* @return Collection<int, Keyword>
*/
public function getKeywords(): Collection
{
return $this->keywords;
}
public function addKeyword(Keyword $keyword): self
{
if (!$this->keywords->contains($keyword)) {
$this->keywords[] = $keyword;
$keyword->setBrand($this);
}
return $this;
}
public function removeKeyword(Keyword $keyword): self
{
if ($this->keywords->removeElement($keyword)) {
// set the owning side to null (unless already changed)
if ($keyword->getBrand() === $this) {
$keyword->setBrand(null);
}
}
return $this;
}
/**
* @return Collection<int, Setting>
*/
public function getSettings(): Collection
{
return $this->settings;
}
public function addSetting(Setting $setting): self
{
if (!$this->settings->contains($setting)) {
$this->settings[] = $setting;
$setting->setBrand($this);
}
return $this;
}
public function removeSetting(Setting $setting): self
{
if ($this->settings->removeElement($setting)) {
// set the owning side to null (unless already changed)
if ($setting->getBrand() === $this) {
$setting->setBrand(null);
}
}
return $this;
}
/**
* @return Collection<int, BrandDomain>
*/
public function getBrandDomains(): Collection
{
return $this->brandDomains;
}
public function addBrandDomain(BrandDomain $brandDomain): self
{
if (!$this->brandDomains->contains($brandDomain)) {
$this->brandDomains[] = $brandDomain;
$brandDomain->setBrand($this);
}
return $this;
}
public function removeBrandDomain(BrandDomain $brandDomain): self
{
if ($this->brandDomains->removeElement($brandDomain)) {
// set the owning side to null (unless already changed)
if ($brandDomain->getBrand() === $this) {
$brandDomain->setBrand(null);
}
}
return $this;
}
/**
* @return Collection<int, Page>
*/
public function getPages(): Collection
{
return $this->pages;
}
public function addPage(Page $page): self
{
if (!$this->pages->contains($page)) {
$this->pages[] = $page;
$page->setBrand($this);
}
return $this;
}
public function removePage(Page $page): self
{
if ($this->pages->removeElement($page)) {
// set the owning side to null (unless already changed)
if ($page->getBrand() === $this) {
$page->setBrand(null);
}
}
return $this;
}
/**
* @return Collection<int, CheckNuked>
*/
public function getCheckNukeds(): Collection
{
return $this->checkNukeds;
}
public function addCheckNuked(CheckNuked $checkNuked): self
{
if (!$this->checkNukeds->contains($checkNuked)) {
$this->checkNukeds[] = $checkNuked;
$checkNuked->setBrand($this);
}
return $this;
}
public function removeCheckNuked(CheckNuked $checkNuked): self
{
if ($this->checkNukeds->removeElement($checkNuked)) {
// set the owning side to null (unless already changed)
if ($checkNuked->getBrand() === $this) {
$checkNuked->setBrand(null);
}
}
return $this;
}
public function getCustomer(): ?Customer
{
return $this->customer;
}
public function setCustomer(?Customer $customer): self
{
$this->customer = $customer;
return $this;
}
/**
* @return Collection<int, CheckType>
*/
public function getCheckTypes(): Collection
{
return $this->checkTypes;
}
public function addCheckType(CheckType $checkType): self
{
if (!$this->checkTypes->contains($checkType)) {
$this->checkTypes[] = $checkType;
}
return $this;
}
public function removeCheckType(CheckType $checkType): self
{
$this->checkTypes->removeElement($checkType);
return $this;
}
}