<?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;
/**
* Represents an Account level Sorting Memo Phrase customisation
*
* @ORM\Table(name="AccountSortingMemoPhrase")
*
* @ORM\Entity
*
* @Audit\Auditable
*
* @Audit\Security(view={"ROLE_ALLOWED_TO_AUDIT"})
*/
class AccountSortingMemoPhrase
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
*
* @ORM\Id
*
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $id;
/**
* @var bool
*
* @ORM\Column(name="active", type="boolean", nullable=true)
*/
private $active;
/**
* @var string
*
* @ORM\Column(name="content", type="text", nullable=true)
*/
private $content = '';
/**
* @var Account
*
* @ORM\ManyToOne(targetEntity="MedBrief\MSR\Entity\Account", inversedBy="accountSortingMemoPhrases")
*
* @ORM\JoinColumns({
*
* @ORM\JoinColumn(name="account_id", referencedColumnName="id")
* })
*/
private $account;
/**
* @var SortingMemoPhrase
*
* @ORM\ManyToOne(targetEntity="MedBrief\MSR\Entity\SortingMemoPhrase", inversedBy="accountSortingMemoPhrases")
*
* @ORM\JoinColumns({
*
* @ORM\JoinColumn(name="sortingMemoPhrase_id", referencedColumnName="id")
* })
*/
private $sortingMemoPhrase;
/**
* @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;
/**
* Get id.
*
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* Set created.
*
* @param \DateTime $created
*
* @return AccountSortingMemoPhrase
*/
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 AccountSortingMemoPhrase
*/
public function setUpdated($updated)
{
$this->updated = $updated;
return $this;
}
/**
* Get updated.
*
* @return \DateTime
*/
public function getUpdated()
{
return $this->updated;
}
/**
* Set active.
*
* @param bool $active
*
* @return AccountSortingMemoPhrase
*/
public function setActive($active)
{
$this->active = $active;
return $this;
}
/**
* Get active.
*
* @return bool
*/
public function getActive(): ?bool
{
return $this->active;
}
/**
* Set content.
*
* @param string|null $content
*
* @return AccountSortingMemoPhrase
*/
public function setContent($content = null)
{
$this->content = $content;
return $this;
}
/**
* Get content.
*
* @return string|null
*/
public function getContent()
{
return $this->content;
}
/**
* Set sortingMemoPhrase.
*
* @param SortingMemoPhrase|null $sortingMemoPhrase
*
* @return AccountSortingMemoPhrase
*/
public function setSortingMemoPhrase(?SortingMemoPhrase $sortingMemoPhrase = null)
{
$this->sortingMemoPhrase = $sortingMemoPhrase;
return $this;
}
/**
* Get sortingMemoPhrase.
*
* @return SortingMemoPhrase|null
*/
public function getSortingMemoPhrase()
{
return $this->sortingMemoPhrase;
}
/**
* Set account.
*
* @param Account|null $account
*
* @return AccountSortingMemoPhrase
*/
public function setAccount(?Account $account = null)
{
$this->account = $account;
return $this;
}
/**
* Get account.
*
* @return Account|null
*/
public function getAccount()
{
return $this->account;
}
}