<?php
declare(strict_types=1);
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;
use App\Repository\CspCountryRepository;
/**
* CspCountry
*
* @ORM\Table(name="csp_country", indexes={@ORM\Index(name="countryID", columns={"country_id"}), @ORM\Index(name="csp_id", columns={"csp_id"})})
* @ORM\Entity(repositoryClass=CspCountryRepository::class)
* @ORM\HasLifecycleCallbacks()
*/
class CspCountry
{
public const SERIALIZATION_GROUP_COUNTRIES_PER_CSP = 'countries_per_csp';
public const SERIALIZATION_GROUP_GET_ITEM = 'csp_country_item';
/**
* @var int
*
* @ORM\Column(name="id", type="integer", nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
* @Groups({self::SERIALIZATION_GROUP_GET_ITEM})
*/
private $id;
/**
* @var Csp
*
* @ORM\ManyToOne(targetEntity="Csp", inversedBy="country")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="csp_id", referencedColumnName="id")
* })
*/
private $csp;
/**
* @var Country
*
* @ORM\ManyToOne(targetEntity="Country")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="country_id", referencedColumnName="id")
* })
* @Groups({self::SERIALIZATION_GROUP_COUNTRIES_PER_CSP, self::SERIALIZATION_GROUP_GET_ITEM})
*/
private $country;
/**
* @var string|null
*
* @ORM\Column(name="phone", type="string", length=100, nullable=true, options={"default"="NULL"})
* @Groups({self::SERIALIZATION_GROUP_GET_ITEM})
*/
private $phone = null;
/**
* @var string|null
*
* @ORM\Column(name="email_format", type="string", length=90, nullable=true, options={"default"="NULL"})
* @Groups({self::SERIALIZATION_GROUP_GET_ITEM})
*/
private $emailFormat = null;
/**
* @var string|null
*
* @ORM\Column(name="website", type="string", length=100, nullable=true, options={"default"="NULL"})
* @Groups({self::SERIALIZATION_GROUP_GET_ITEM})
*/
private $website = null;
/**
* @var string|null
*
* @ORM\Column(name="wikipedia", type="string", length=100, nullable=true, options={"default"="NULL"})
* @Groups({self::SERIALIZATION_GROUP_GET_ITEM})
*/
private $wikipedia = null;
/**
* @var bool
*
* @ORM\Column(name="valid_switchboard", type="boolean", nullable=false)
* @Groups({self::SERIALIZATION_GROUP_GET_ITEM})
*/
private $validSwitchboard = false;
/**
* @var int|null
*
* @ORM\Column(name="method_1", type="smallint", nullable=true, options={"default"="NULL"})
* @Groups({self::SERIALIZATION_GROUP_GET_ITEM})
*/
private $method1 = null;
/**
* @var int|null
*
* @ORM\Column(name="method_2", type="smallint", nullable=true, options={"default"="NULL"})
* @Groups({self::SERIALIZATION_GROUP_GET_ITEM})
*/
private $method2 = null;
/**
* @var string|null
*
* @ORM\Column(name="domain", type="string", length=60, nullable=true, options={"default"="NULL"})
* @Groups({self::SERIALIZATION_GROUP_GET_ITEM})
*/
private $domain = null;
/**
* @var \DateTime|null
*
* @ORM\Column(name="updated_at", type="datetime", nullable=true, options={"default"="NULL"})
*/
private $updatedAt = null;
public function getId(): ?int
{
return $this->id;
}
public function getPhone(): ?string
{
return $this->phone;
}
public function setPhone(?string $phone): self
{
$this->phone = $phone;
return $this;
}
public function getEmailFormat(): ?string
{
return $this->emailFormat;
}
public function setEmailFormat(?string $emailFormat): self
{
$this->emailFormat = $emailFormat;
return $this;
}
public function getWebsite(): ?string
{
return $this->website;
}
public function setWebsite(?string $website): self
{
$this->website = $website;
return $this;
}
public function getWikipedia(): ?string
{
return $this->wikipedia;
}
public function setWikipedia(?string $wikipedia): self
{
$this->wikipedia = $wikipedia;
return $this;
}
public function isValidSwitchboard(): ?bool
{
return $this->validSwitchboard;
}
public function setValidSwitchboard(bool $validSwitchboard): self
{
$this->validSwitchboard = $validSwitchboard;
return $this;
}
public function getMethod1(): ?int
{
return $this->method1;
}
public function setMethod1(?int $method1): self
{
$this->method1 = $method1;
return $this;
}
public function getMethod2(): ?int
{
return $this->method2;
}
public function setMethod2(?int $method2): self
{
$this->method2 = $method2;
return $this;
}
public function getDomain(): ?string
{
return $this->domain;
}
public function setDomain(?string $domain): self
{
$this->domain = $domain;
return $this;
}
public function getUpdatedAt(): ?\DateTimeInterface
{
return $this->updatedAt;
}
/**
* @ORM\PreUpdate
*/
public function setUpdatedAt(): self
{
$this->updatedAt = new \DateTimeImmutable();
return $this;
}
public function getCsp(): ?Csp
{
return $this->csp;
}
public function setCsp(?Csp $csp): self
{
$this->csp = $csp;
return $this;
}
public function getCountry(): ?Country
{
return $this->country;
}
public function setCountry(?Country $country): self
{
$this->country = $country;
return $this;
}
}