src/Entity/FielpetPol/TicketRespuesta.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity\FielpetPol;
  3. use App\Entity\Traits\LoggableTrait;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use Doctrine\Common\Collections\Collection;
  7. /**
  8. * TicketRespuesta
  9. *
  10. * @ORM\Table(name="ticket_respuesta")
  11. * @ORM\Entity(repositoryClass="App\Repository\FielpetPol\TicketRespuestaRepository")
  12. */
  13. class TicketRespuesta
  14. {
  15. use LoggableTrait;
  16. /**
  17. * @var integer
  18. *
  19. * @ORM\Column(name="id", type="integer", nullable=false)
  20. * @ORM\Id
  21. * @ORM\GeneratedValue(strategy="IDENTITY")
  22. */
  23. private $id;
  24. /**
  25. * @var string
  26. *
  27. * @ORM\Column(name="contenido", type="text", nullable=false)
  28. */
  29. private $contenido;
  30. /**
  31. * @var \DateTime
  32. *
  33. * @ORM\Column(name="fecha_creacion", type="datetime", nullable=false)
  34. */
  35. private $fechaCreacion;
  36. /**
  37. * @var bool
  38. *
  39. * @ORM\Column(name="es_nota_interna", type="boolean", nullable=false, options={"default"=false})
  40. */
  41. private $esNotaInterna = false;
  42. /**
  43. * @var string|null
  44. *
  45. * @ORM\Column(name="cambio_estado", type="string", length=50, nullable=true)
  46. */
  47. private $cambioEstado;
  48. /**
  49. * @var Ticket
  50. *
  51. * @ORM\ManyToOne(targetEntity="App\Entity\FielpetPol\Ticket", inversedBy="respuestas")
  52. * @ORM\JoinColumn(name="ticket_id", referencedColumnName="id", nullable=false)
  53. */
  54. private $ticket;
  55. /**
  56. * @var Usuario
  57. *
  58. * @ORM\ManyToOne(targetEntity="App\Entity\FielpetPol\Usuario")
  59. * @ORM\JoinColumn(name="usuario_id", referencedColumnName="id", nullable=false)
  60. */
  61. private $usuario;
  62. /**
  63. * @var Collection|TicketAdjunto[]
  64. *
  65. * @ORM\OneToMany(targetEntity="App\Entity\FielpetPol\TicketAdjunto", mappedBy="ticketRespuesta", cascade={"remove"})
  66. */
  67. private $adjuntos;
  68. public function __construct()
  69. {
  70. $this->fechaCreacion = new \DateTime();
  71. $this->adjuntos = new ArrayCollection();
  72. }
  73. // --- Getters & Setters ---
  74. public function getId(): ?int
  75. {
  76. return $this->id;
  77. }
  78. public function getContenido(): ?string
  79. {
  80. return $this->contenido;
  81. }
  82. public function setContenido(string $contenido): static
  83. {
  84. $this->contenido = $contenido;
  85. return $this;
  86. }
  87. public function getFechaCreacion(): ?\DateTimeInterface
  88. {
  89. return $this->fechaCreacion;
  90. }
  91. public function setFechaCreacion(\DateTimeInterface $fechaCreacion): static
  92. {
  93. $this->fechaCreacion = $fechaCreacion;
  94. return $this;
  95. }
  96. public function isEsNotaInterna(): bool
  97. {
  98. return $this->esNotaInterna;
  99. }
  100. public function setEsNotaInterna(bool $esNotaInterna): static
  101. {
  102. $this->esNotaInterna = $esNotaInterna;
  103. return $this;
  104. }
  105. public function getCambioEstado(): ?string
  106. {
  107. return $this->cambioEstado;
  108. }
  109. public function setCambioEstado(?string $cambioEstado): static
  110. {
  111. $this->cambioEstado = $cambioEstado;
  112. return $this;
  113. }
  114. public function getTicket(): ?Ticket
  115. {
  116. return $this->ticket;
  117. }
  118. public function setTicket(?Ticket $ticket): static
  119. {
  120. $this->ticket = $ticket;
  121. return $this;
  122. }
  123. public function getUsuario(): ?Usuario
  124. {
  125. return $this->usuario;
  126. }
  127. public function setUsuario(?Usuario $usuario): static
  128. {
  129. $this->usuario = $usuario;
  130. return $this;
  131. }
  132. public function getAdjuntos(): Collection
  133. {
  134. return $this->adjuntos;
  135. }
  136. }