src/Entity/Domain.php line 22

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. * @ORM\Table(name="domain")
  8. *
  9. * @ORM\Entity
  10. *
  11. * @Gedmo\SoftDeleteable(fieldName="deletedAt", timeAware=false)
  12. *
  13. * @Audit\Auditable
  14. *
  15. * @Audit\Security(view={"ROLE_ALLOWED_TO_AUDIT"})
  16. *
  17. * @deprecated Potentially unused. Deprecating for checks.
  18. */
  19. class Domain
  20. {
  21. /**
  22. * @var int
  23. *
  24. * @ORM\Column(name="id", type="bigint", nullable=false)
  25. *
  26. * @ORM\Id
  27. *
  28. * @ORM\GeneratedValue(strategy="IDENTITY")
  29. */
  30. private $id;
  31. /**
  32. * @var \DateTime|null
  33. *
  34. * @ORM\Column(name="deletedAt", type="datetime", nullable=true)
  35. */
  36. private $deletedAt;
  37. /**
  38. * @var string
  39. *
  40. * @ORM\Column(name="name", type="string", length=255, nullable=false)
  41. */
  42. private $name;
  43. /**
  44. * @var bool
  45. *
  46. * @ORM\Column(name="verified", type="boolean")
  47. */
  48. private $verified;
  49. /**
  50. * @var string
  51. *
  52. * @ORM\Column(name="slug", type="string")
  53. *
  54. * @Gedmo\Slug(fields={"name"}, updatable=false, separator="_")
  55. */
  56. private $slug;
  57. /**
  58. * @var \DateTime
  59. *
  60. * @ORM\Column(name="created", type="datetime")
  61. *
  62. * @Gedmo\Timestampable(on="create")
  63. */
  64. private $created;
  65. /**
  66. * @var \DateTime
  67. *
  68. * @ORM\Column(name="updated", type="datetime")
  69. *
  70. * @Gedmo\Timestampable(on="update")
  71. */
  72. private $updated;
  73. /**
  74. * @var Account
  75. *
  76. * @ORM\ManyToOne(targetEntity="MedBrief\MSR\Entity\Account", inversedBy="domains")
  77. *
  78. * @ORM\JoinColumns({
  79. *
  80. * @ORM\JoinColumn(name="account_id", referencedColumnName="id")
  81. * })
  82. */
  83. private $account;
  84. /**
  85. * @var int
  86. */
  87. private $accountId;
  88. public function __construct()
  89. {
  90. @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);
  91. }
  92. public function __toString()
  93. {
  94. @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);
  95. return $this->getName();
  96. }
  97. /**
  98. * Get id
  99. *
  100. * @return int
  101. */
  102. public function getId()
  103. {
  104. return $this->id;
  105. }
  106. /**
  107. * Set name
  108. *
  109. * @param string $name
  110. *
  111. * @return Domain
  112. */
  113. public function setName($name)
  114. {
  115. $this->name = $name;
  116. return $this;
  117. }
  118. /**
  119. * Get name
  120. *
  121. * @return string
  122. */
  123. public function getName()
  124. {
  125. return $this->name;
  126. }
  127. /**
  128. * Set account
  129. *
  130. * @param Account|null $account
  131. *
  132. * @return Domain
  133. */
  134. public function setAccount(?Account $account = null)
  135. {
  136. $this->account = $account;
  137. return $this;
  138. }
  139. /**
  140. * Get account
  141. *
  142. * @return Account
  143. */
  144. public function getAccount()
  145. {
  146. return $this->account;
  147. }
  148. /**
  149. * Set accountId
  150. *
  151. * @param int $accountId
  152. *
  153. * @return Domain
  154. */
  155. public function setAccountId($accountId)
  156. {
  157. $this->accountId = $accountId;
  158. return $this;
  159. }
  160. /**
  161. * Get accountId
  162. *
  163. * @return int
  164. */
  165. public function getAccountId()
  166. {
  167. return $this->accountId;
  168. }
  169. /**
  170. * Set verified
  171. *
  172. * @param bool $verified
  173. *
  174. * @return Domain
  175. */
  176. public function setVerified($verified)
  177. {
  178. $this->verified = $verified;
  179. return $this;
  180. }
  181. /**
  182. * Get verified
  183. *
  184. * @return bool
  185. */
  186. public function getVerified()
  187. {
  188. return $this->verified;
  189. }
  190. /**
  191. * Set slug
  192. *
  193. * @param string $slug
  194. *
  195. * @return Domain
  196. */
  197. public function setSlug($slug)
  198. {
  199. $this->slug = $slug;
  200. return $this;
  201. }
  202. /**
  203. * Get slug
  204. *
  205. * @return string
  206. */
  207. public function getSlug()
  208. {
  209. return $this->slug;
  210. }
  211. /**
  212. * Set created
  213. *
  214. * @param \DateTime $created
  215. *
  216. * @return Domain
  217. */
  218. public function setCreated($created)
  219. {
  220. $this->created = $created;
  221. return $this;
  222. }
  223. /**
  224. * Get created
  225. *
  226. * @return \DateTime
  227. */
  228. public function getCreated()
  229. {
  230. return $this->created;
  231. }
  232. /**
  233. * Set updated
  234. *
  235. * @param \DateTime $updated
  236. *
  237. * @return Domain
  238. */
  239. public function setUpdated($updated)
  240. {
  241. $this->updated = $updated;
  242. return $this;
  243. }
  244. /**
  245. * Get updated
  246. *
  247. * @return \DateTime
  248. */
  249. public function getUpdated()
  250. {
  251. return $this->updated;
  252. }
  253. /**
  254. * Set deletedAt
  255. *
  256. * @param \DateTime $deletedAt
  257. *
  258. * @return Domain
  259. */
  260. public function setDeletedAt($deletedAt)
  261. {
  262. $this->deletedAt = $deletedAt;
  263. return $this;
  264. }
  265. /**
  266. * Get deletedAt
  267. *
  268. * @return \DateTime
  269. */
  270. public function getDeletedAt()
  271. {
  272. return $this->deletedAt;
  273. }
  274. }