<?php
namespace MedBrief\MSR\Entity;
use DH\Auditor\Provider\Doctrine\Auditing\Annotation as Audit;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
/**
* @ORM\Table(name="domain")
*
* @ORM\Entity
*
* @Gedmo\SoftDeleteable(fieldName="deletedAt", timeAware=false)
*
* @Audit\Auditable
*
* @Audit\Security(view={"ROLE_ALLOWED_TO_AUDIT"})
*
* @deprecated Potentially unused. Deprecating for checks.
*/
class Domain
{
/**
* @var int
*
* @ORM\Column(name="id", type="bigint", nullable=false)
*
* @ORM\Id
*
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $id;
/**
* @var \DateTime|null
*
* @ORM\Column(name="deletedAt", type="datetime", nullable=true)
*/
private $deletedAt;
/**
* @var string
*
* @ORM\Column(name="name", type="string", length=255, nullable=false)
*/
private $name;
/**
* @var bool
*
* @ORM\Column(name="verified", type="boolean")
*/
private $verified;
/**
* @var string
*
* @ORM\Column(name="slug", type="string")
*
* @Gedmo\Slug(fields={"name"}, updatable=false, separator="_")
*/
private $slug;
/**
* @var \DateTime
*
* @ORM\Column(name="created", type="datetime")
*
* @Gedmo\Timestampable(on="create")
*/
private $created;
/**
* @var \DateTime
*
* @ORM\Column(name="updated", type="datetime")
*
* @Gedmo\Timestampable(on="update")
*/
private $updated;
/**
* @var Account
*
* @ORM\ManyToOne(targetEntity="MedBrief\MSR\Entity\Account", inversedBy="domains")
*
* @ORM\JoinColumns({
*
* @ORM\JoinColumn(name="account_id", referencedColumnName="id")
* })
*/
private $account;
/**
* @var int
*/
private $accountId;
public function __construct()
{
@trigger_error(sprintf('The class %s is deprecated and will be removed with the next major upgrade. Please consider an alternative if this class is still used.', self::class), E_USER_DEPRECATED);
}
public function __toString()
{
@trigger_error(sprintf('The class %s is deprecated and will be removed with the next major upgrade. Please consider an alternative if this class is still used.', self::class), E_USER_DEPRECATED);
return $this->getName();
}
/**
* Get id
*
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* Set name
*
* @param string $name
*
* @return Domain
*/
public function setName($name)
{
$this->name = $name;
return $this;
}
/**
* Get name
*
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Set account
*
* @param Account|null $account
*
* @return Domain
*/
public function setAccount(?Account $account = null)
{
$this->account = $account;
return $this;
}
/**
* Get account
*
* @return Account
*/
public function getAccount()
{
return $this->account;
}
/**
* Set accountId
*
* @param int $accountId
*
* @return Domain
*/
public function setAccountId($accountId)
{
$this->accountId = $accountId;
return $this;
}
/**
* Get accountId
*
* @return int
*/
public function getAccountId()
{
return $this->accountId;
}
/**
* Set verified
*
* @param bool $verified
*
* @return Domain
*/
public function setVerified($verified)
{
$this->verified = $verified;
return $this;
}
/**
* Get verified
*
* @return bool
*/
public function getVerified()
{
return $this->verified;
}
/**
* Set slug
*
* @param string $slug
*
* @return Domain
*/
public function setSlug($slug)
{
$this->slug = $slug;
return $this;
}
/**
* Get slug
*
* @return string
*/
public function getSlug()
{
return $this->slug;
}
/**
* Set created
*
* @param \DateTime $created
*
* @return Domain
*/
public function setCreated($created)
{
$this->created = $created;
return $this;
}
/**
* Get created
*
* @return \DateTime
*/
public function getCreated()
{
return $this->created;
}
/**
* Set updated
*
* @param \DateTime $updated
*
* @return Domain
*/
public function setUpdated($updated)
{
$this->updated = $updated;
return $this;
}
/**
* Get updated
*
* @return \DateTime
*/
public function getUpdated()
{
return $this->updated;
}
/**
* Set deletedAt
*
* @param \DateTime $deletedAt
*
* @return Domain
*/
public function setDeletedAt($deletedAt)
{
$this->deletedAt = $deletedAt;
return $this;
}
/**
* Get deletedAt
*
* @return \DateTime
*/
public function getDeletedAt()
{
return $this->deletedAt;
}
}