src/Entity/AccountSortingMemoPhrase.php line 20

Open in your IDE?
  1. <?php
  2. namespace MedBrief\MSR\Entity;
  3. use DH\Auditor\Provider\Doctrine\Auditing\Annotation as Audit;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Gedmo\Mapping\Annotation as Gedmo;
  6. /**
  7. * Represents an Account level Sorting Memo Phrase customisation
  8. *
  9. * @ORM\Table(name="AccountSortingMemoPhrase")
  10. *
  11. * @ORM\Entity
  12. *
  13. * @Audit\Auditable
  14. *
  15. * @Audit\Security(view={"ROLE_ALLOWED_TO_AUDIT"})
  16. */
  17. class AccountSortingMemoPhrase
  18. {
  19. /**
  20. * @var int
  21. *
  22. * @ORM\Column(name="id", type="integer")
  23. *
  24. * @ORM\Id
  25. *
  26. * @ORM\GeneratedValue(strategy="IDENTITY")
  27. */
  28. private $id;
  29. /**
  30. * @var bool
  31. *
  32. * @ORM\Column(name="active", type="boolean", nullable=true)
  33. */
  34. private $active;
  35. /**
  36. * @var string
  37. *
  38. * @ORM\Column(name="content", type="text", nullable=true)
  39. */
  40. private $content = '';
  41. /**
  42. * @var Account
  43. *
  44. * @ORM\ManyToOne(targetEntity="MedBrief\MSR\Entity\Account", inversedBy="accountSortingMemoPhrases")
  45. *
  46. * @ORM\JoinColumns({
  47. *
  48. * @ORM\JoinColumn(name="account_id", referencedColumnName="id")
  49. * })
  50. */
  51. private $account;
  52. /**
  53. * @var SortingMemoPhrase
  54. *
  55. * @ORM\ManyToOne(targetEntity="MedBrief\MSR\Entity\SortingMemoPhrase", inversedBy="accountSortingMemoPhrases")
  56. *
  57. * @ORM\JoinColumns({
  58. *
  59. * @ORM\JoinColumn(name="sortingMemoPhrase_id", referencedColumnName="id")
  60. * })
  61. */
  62. private $sortingMemoPhrase;
  63. /**
  64. * @var \DateTime
  65. *
  66. * @ORM\Column(name="created", type="datetime")
  67. *
  68. * @Gedmo\Timestampable(on="create")
  69. */
  70. private $created;
  71. /**
  72. * @var \DateTime
  73. *
  74. * @ORM\Column(name="updated", type="datetime")
  75. *
  76. * @Gedmo\Timestampable(on="update")
  77. */
  78. private $updated;
  79. /**
  80. * Get id.
  81. *
  82. * @return int
  83. */
  84. public function getId()
  85. {
  86. return $this->id;
  87. }
  88. /**
  89. * Set created.
  90. *
  91. * @param \DateTime $created
  92. *
  93. * @return AccountSortingMemoPhrase
  94. */
  95. public function setCreated($created)
  96. {
  97. $this->created = $created;
  98. return $this;
  99. }
  100. /**
  101. * Get created.
  102. *
  103. * @return \DateTime
  104. */
  105. public function getCreated()
  106. {
  107. return $this->created;
  108. }
  109. /**
  110. * Set updated.
  111. *
  112. * @param \DateTime $updated
  113. *
  114. * @return AccountSortingMemoPhrase
  115. */
  116. public function setUpdated($updated)
  117. {
  118. $this->updated = $updated;
  119. return $this;
  120. }
  121. /**
  122. * Get updated.
  123. *
  124. * @return \DateTime
  125. */
  126. public function getUpdated()
  127. {
  128. return $this->updated;
  129. }
  130. /**
  131. * Set active.
  132. *
  133. * @param bool $active
  134. *
  135. * @return AccountSortingMemoPhrase
  136. */
  137. public function setActive($active)
  138. {
  139. $this->active = $active;
  140. return $this;
  141. }
  142. /**
  143. * Get active.
  144. *
  145. * @return bool
  146. */
  147. public function getActive(): ?bool
  148. {
  149. return $this->active;
  150. }
  151. /**
  152. * Set content.
  153. *
  154. * @param string|null $content
  155. *
  156. * @return AccountSortingMemoPhrase
  157. */
  158. public function setContent($content = null)
  159. {
  160. $this->content = $content;
  161. return $this;
  162. }
  163. /**
  164. * Get content.
  165. *
  166. * @return string|null
  167. */
  168. public function getContent()
  169. {
  170. return $this->content;
  171. }
  172. /**
  173. * Set sortingMemoPhrase.
  174. *
  175. * @param SortingMemoPhrase|null $sortingMemoPhrase
  176. *
  177. * @return AccountSortingMemoPhrase
  178. */
  179. public function setSortingMemoPhrase(?SortingMemoPhrase $sortingMemoPhrase = null)
  180. {
  181. $this->sortingMemoPhrase = $sortingMemoPhrase;
  182. return $this;
  183. }
  184. /**
  185. * Get sortingMemoPhrase.
  186. *
  187. * @return SortingMemoPhrase|null
  188. */
  189. public function getSortingMemoPhrase()
  190. {
  191. return $this->sortingMemoPhrase;
  192. }
  193. /**
  194. * Set account.
  195. *
  196. * @param Account|null $account
  197. *
  198. * @return AccountSortingMemoPhrase
  199. */
  200. public function setAccount(?Account $account = null)
  201. {
  202. $this->account = $account;
  203. return $this;
  204. }
  205. /**
  206. * Get account.
  207. *
  208. * @return Account|null
  209. */
  210. public function getAccount()
  211. {
  212. return $this->account;
  213. }
  214. }