vendor/uvdesk/automation-bundle/Entity/PreparedResponses.php line 295

Open in your IDE?
  1. <?php
  2. namespace Webkul\UVDesk\AutomationBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5. * PreparedResponses
  6. * @ORM\HasLifecycleCallbacks()
  7. * @ORM\Entity(repositoryClass="Webkul\UVDesk\AutomationBundle\Repository\PreparedResponsesRepository")
  8. * @ORM\Table(name="uv_prepared_responses")
  9. */
  10. class PreparedResponses
  11. {
  12. /**
  13. * @var integer
  14. * @ORM\Id()
  15. * @ORM\Column(type="integer")
  16. * @ORM\GeneratedValue
  17. */
  18. private $id;
  19. /**
  20. * @var string
  21. * @ORM\Column(type="string", length=255)
  22. */
  23. private $name;
  24. /**
  25. * @var string
  26. * @ORM\Column(type="text", nullable=true)
  27. */
  28. private $description;
  29. /**
  30. * @var string
  31. * @ORM\Column(type="string", length=255, nullable=true, options={"default": "public"})
  32. */
  33. private $type;
  34. /**
  35. * @var \Webkul\UserBundle\Entity\UserData
  36. * @ORM\ManyToOne(targetEntity="Webkul\UVDesk\CoreFrameworkBundle\Entity\UserInstance")
  37. * @ORM\JoinColumn(name="user_id", referencedColumnName="id", onDelete="SET NULL")
  38. */
  39. private $user;
  40. /**
  41. * @var \Doctrine\Common\Collections\Collection
  42. * @ORM\ManyToMany(targetEntity="Webkul\UVDesk\CoreFrameworkBundle\Entity\SupportGroup")
  43. * @ORM\JoinTable(name="uv_prepared_response_support_groups",
  44. * joinColumns={@ORM\JoinColumn(name="savedReply_id", referencedColumnName="id", onDelete="CASCADE")},
  45. * inverseJoinColumns={@ORM\JoinColumn(name="group_id", referencedColumnName="id", onDelete="CASCADE")}
  46. * )
  47. */
  48. private $groups;
  49. /**
  50. * @var \Doctrine\Common\Collections\Collection
  51. * @ORM\ManyToMany(targetEntity="Webkul\UVDesk\CoreFrameworkBundle\Entity\SupportTeam")
  52. * @ORM\JoinTable(name="uv_prepared_response_support_teams",
  53. * joinColumns={@ORM\JoinColumn(name="savedReply_id", referencedColumnName="id", onDelete="CASCADE")},
  54. * inverseJoinColumns={@ORM\JoinColumn(name="subgroup_id", referencedColumnName="id", onDelete="CASCADE")}
  55. * )
  56. */
  57. private $teams;
  58. /**
  59. * @var array
  60. * @ORM\Column(type="array")
  61. */
  62. private $actions;
  63. /**
  64. * @var boolean
  65. * @ORM\Column(type="boolean", nullable=true, options={"default": true})
  66. */
  67. private $status;
  68. /**
  69. * @var \DateTime
  70. * @ORM\Column(type="datetime")
  71. */
  72. private $dateAdded;
  73. /**
  74. * @var \DateTime
  75. * @ORM\Column(type="datetime")
  76. */
  77. private $dateUpdated;
  78. /**
  79. * Constructor
  80. */
  81. public function __construct()
  82. {
  83. $this->groups = new \Doctrine\Common\Collections\ArrayCollection();
  84. $this->teams = new \Doctrine\Common\Collections\ArrayCollection();
  85. }
  86. /**
  87. * Get id
  88. *
  89. * @return integer
  90. */
  91. public function getId()
  92. {
  93. return $this->id;
  94. }
  95. /**
  96. * Set name
  97. *
  98. * @param string $name
  99. * @return PreparedResponses
  100. */
  101. public function setName($name)
  102. {
  103. $this->name = $name;
  104. return $this;
  105. }
  106. /**
  107. * Get name
  108. *
  109. * @return string
  110. */
  111. public function getName()
  112. {
  113. return $this->name;
  114. }
  115. /**
  116. * Set description
  117. *
  118. * @param string $description
  119. * @return PreparedResponses
  120. */
  121. public function setDescription($description)
  122. {
  123. $this->description = $description;
  124. return $this;
  125. }
  126. /**
  127. * Get description
  128. *
  129. * @return string
  130. */
  131. public function getDescription()
  132. {
  133. return $this->description;
  134. }
  135. /**
  136. * Set type
  137. *
  138. * @param string $type
  139. * @return PreparedResponses
  140. */
  141. public function setType($type)
  142. {
  143. $this->type = $type;
  144. return $this;
  145. }
  146. /**
  147. * Get type
  148. *
  149. * @return string
  150. */
  151. public function getType()
  152. {
  153. return $this->type;
  154. }
  155. /**
  156. * Set actions
  157. *
  158. * @param array $actions
  159. * @return PreparedResponses
  160. */
  161. public function setActions($actions)
  162. {
  163. $this->actions = $actions;
  164. return $this;
  165. }
  166. /**
  167. * Get actions
  168. *
  169. * @return array
  170. */
  171. public function getActions()
  172. {
  173. return $this->actions;
  174. }
  175. /**
  176. * Set status
  177. *
  178. * @param boolean $status
  179. * @return PreparedResponses
  180. */
  181. public function setStatus($status)
  182. {
  183. $this->status = $status;
  184. return $this;
  185. }
  186. /**
  187. * Get status
  188. *
  189. * @return boolean
  190. */
  191. public function getStatus()
  192. {
  193. return $this->status;
  194. }
  195. /**
  196. * Set dateAdded
  197. *
  198. * @param \DateTime $dateAdded
  199. * @return PreparedResponses
  200. */
  201. public function setDateAdded($dateAdded)
  202. {
  203. $this->dateAdded = $dateAdded;
  204. return $this;
  205. }
  206. /**
  207. * Get dateAdded
  208. *
  209. * @return \DateTime
  210. */
  211. public function getDateAdded()
  212. {
  213. return $this->dateAdded;
  214. }
  215. /**
  216. * Set dateUpdated
  217. *
  218. * @param \DateTime $dateUpdated
  219. * @return PreparedResponses
  220. */
  221. public function setDateUpdated($dateUpdated)
  222. {
  223. $this->dateUpdated = $dateUpdated;
  224. return $this;
  225. }
  226. /**
  227. * Get dateUpdated
  228. *
  229. * @return \DateTime
  230. */
  231. public function getDateUpdated()
  232. {
  233. return $this->dateUpdated;
  234. }
  235. /**
  236. * @ORM\PrePersist
  237. */
  238. public function setCreatedAtValue()
  239. {
  240. $this->dateAdded = new \DateTime();
  241. $this->dateUpdated = new \DateTime();
  242. }
  243. /**
  244. * @ORM\PreUpdate
  245. */
  246. public function setUpdatedAtValue()
  247. {
  248. $this->dateUpdated = new \DateTime();
  249. }
  250. /**
  251. * Set user
  252. *
  253. * @param \Webkul\UVDesk\CoreFrameworkBundle\Entity\UserInstance $user
  254. * @return PreparedResponses
  255. */
  256. public function setUser(\Webkul\UVDesk\CoreFrameworkBundle\Entity\UserInstance $user = null)
  257. {
  258. $this->user = $user;
  259. return $this;
  260. }
  261. /**
  262. * Get user
  263. *
  264. * @return \Webkul\UVDesk\CoreFrameworkBundle\Entity\UserInstance
  265. */
  266. public function getUser()
  267. {
  268. return $this->user;
  269. }
  270. /**
  271. * Add groups
  272. *
  273. * @param \Webkul\UVDesk\CoreFrameworkBundle\Entity\SupportGroup $groups
  274. * @return PreparedResponses
  275. */
  276. public function addGroup(\Webkul\UVDesk\CoreFrameworkBundle\Entity\SupportGroup $groups)
  277. {
  278. $this->groups[] = $groups;
  279. return $this;
  280. }
  281. /**
  282. * Remove groups
  283. *
  284. * @param \Webkul\UVDesk\CoreFrameworkBundle\Entity\SupportGroup $groups
  285. */
  286. public function removeGroup(\Webkul\UVDesk\CoreFrameworkBundle\Entity\SupportGroup $groups)
  287. {
  288. $this->groups->removeElement($groups);
  289. }
  290. /**
  291. * Get groups
  292. *
  293. * @return \Doctrine\Common\Collections\Collection
  294. */
  295. public function getGroups()
  296. {
  297. return $this->groups;
  298. }
  299. /**
  300. * Add teams
  301. *
  302. * @param \Webkul\UVDesk\CoreFrameworkBundle\Entity\SupportTeam $teams
  303. * @return PreparedResponses
  304. */
  305. public function addTeam(\Webkul\UVDesk\CoreFrameworkBundle\Entity\SupportTeam $teams)
  306. {
  307. $this->teams[] = $teams;
  308. return $this;
  309. }
  310. /**
  311. * Remove teams
  312. *
  313. * @param \Webkul\UVDesk\CoreFrameworkBundle\Entity\SupportTeam $teams
  314. */
  315. public function removeTeam(\Webkul\UVDesk\CoreFrameworkBundle\Entity\SupportTeam $teams)
  316. {
  317. $this->teams->removeElement($teams);
  318. }
  319. /**
  320. * Get teams
  321. *
  322. * @return \Doctrine\Common\Collections\Collection
  323. */
  324. public function getTeams()
  325. {
  326. return $this->teams;
  327. }
  328. }