src/Entity/FielpetPol/Policy.php line 20

Open in your IDE?
  1. <?php
  2. namespace App\Entity\FielpetPol;
  3. use App\Entity\Traits\LoggableTrait;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. use Gedmo\Mapping\Annotation as Gedmo;
  9. /**
  10. * Policy
  11. *
  12. * @ORM\Table(name="policy")
  13. * @ORM\Entity
  14. * @ORM\Entity(repositoryClass="App\Repository\FielpetPol\PolicyRepository")
  15. * @Gedmo\Loggable
  16. */
  17. class Policy
  18. {
  19. /**
  20. * LoggableTrait add add_user_ add_date, edit_user, edit_date
  21. */
  22. use LoggableTrait;
  23. /**
  24. * @var integer
  25. *
  26. * @ORM\Column(name="id", type="integer", nullable=false)
  27. * @ORM\Id
  28. * @ORM\GeneratedValue(strategy="IDENTITY")
  29. */
  30. private $id;
  31. /**
  32. * @var string
  33. *
  34. * @ORM\Column(name="version", type="string", length=255, nullable=true)
  35. * @Gedmo\Versioned
  36. */
  37. private $version;
  38. /**
  39. * @var string
  40. *
  41. * @ORM\Column(name="estado", type="string", length=255, nullable=true)
  42. * @Gedmo\Versioned
  43. */
  44. private $estado;
  45. /**
  46. * @var string
  47. *
  48. * @ORM\Column(name="enfermedad_id", type="string", length=255, nullable=true)
  49. * @Gedmo\Versioned
  50. */
  51. private $enfermedadId;
  52. /**
  53. * @var string
  54. *
  55. * @ORM\Column(name="enfermedad_nombre", type="string", length=255, nullable=true)
  56. * @Gedmo\Versioned
  57. */
  58. private $enfermedadNombre;
  59. /**
  60. * @var string
  61. *
  62. * @ORM\Column(name="sistema", type="string", length=255, nullable=true)
  63. * @Gedmo\Versioned
  64. */
  65. private $sistema;
  66. /**
  67. * @var string
  68. *
  69. * @ORM\Column(name="agente", type="string", length=255, nullable=true)
  70. * @Gedmo\Versioned
  71. */
  72. private $agente;
  73. /**
  74. * @var string
  75. *
  76. * @ORM\Column(name="agente_etiologico", type="string", length=255, nullable=true)
  77. * @Gedmo\Versioned
  78. */
  79. private $agenteEtiologico;
  80. /**
  81. * @var string
  82. *
  83. * @ORM\Column(name="razas", type="string", length=255, nullable=true)
  84. * @Gedmo\Versioned
  85. */
  86. private $razas;
  87. /**
  88. * @ORM\OneToMany(targetEntity="Enfermedad", mappedBy="fkPolicy")
  89. **/
  90. private $enfermedades;
  91. /**
  92. * @ORM\OneToMany(targetEntity="CaracteristicaDetalle", mappedBy="fkPolicy", cascade={"persist"})
  93. **/
  94. private $caracteristicas;
  95. /**
  96. * @ORM\OneToMany(targetEntity="ManifestacionClinicaSintoma", mappedBy="fkPolicy", cascade={"persist"})
  97. **/
  98. private $manifestaciones;
  99. /**
  100. * @ORM\OneToMany(targetEntity="DiagnosticoDetalle", mappedBy="fkPolicy", cascade={"persist"})
  101. **/
  102. private $diagnosticos;
  103. /**
  104. * @ORM\OneToMany(targetEntity="TratamientoDetalle", mappedBy="fkPolicy", cascade={"persist"})
  105. **/
  106. private $tratamientos;
  107. /**
  108. * @ORM\OneToMany(targetEntity="ResultadoDetalle", mappedBy="fkPolicy", cascade={"persist"})
  109. **/
  110. private $resultados;
  111. public function __construct()
  112. {
  113. $this->enfermedades = new \Doctrine\Common\Collections\ArrayCollection();
  114. $this->caracteristicas = new \Doctrine\Common\Collections\ArrayCollection();
  115. $this->manifestaciones = new \Doctrine\Common\Collections\ArrayCollection();
  116. $this->diagnosticos = new \Doctrine\Common\Collections\ArrayCollection();
  117. $this->tratamientos = new \Doctrine\Common\Collections\ArrayCollection();
  118. $this->resultados = new \Doctrine\Common\Collections\ArrayCollection();
  119. }
  120. public function getId(): ?int
  121. {
  122. return $this->id;
  123. }
  124. public function getVersion(): ?string
  125. {
  126. return $this->version;
  127. }
  128. public function setVersion(?string $version): static
  129. {
  130. $this->version = $version;
  131. return $this;
  132. }
  133. public function getEstado(): ?string
  134. {
  135. return $this->estado;
  136. }
  137. public function setEstado(?string $estado): static
  138. {
  139. $this->estado = $estado;
  140. return $this;
  141. }
  142. public function getSistema(): ?string
  143. {
  144. return $this->sistema;
  145. }
  146. public function setSistema(?string $sistema): static
  147. {
  148. $this->sistema = $sistema;
  149. return $this;
  150. }
  151. public function getAgente(): ?string
  152. {
  153. return $this->agente;
  154. }
  155. public function setAgente(?string $agente): static
  156. {
  157. $this->agente = $agente;
  158. return $this;
  159. }
  160. public function getAgenteEtiologico(): ?string
  161. {
  162. return $this->agenteEtiologico;
  163. }
  164. public function setAgenteEtiologico(?string $agenteEtiologico): static
  165. {
  166. $this->agenteEtiologico = $agenteEtiologico;
  167. return $this;
  168. }
  169. /**
  170. * @return Collection<int, ManifestacionClinicaSintoma>
  171. */
  172. public function getManifestaciones(): Collection
  173. {
  174. return $this->manifestaciones;
  175. }
  176. public function addManifestacione(ManifestacionClinicaSintoma $manifestacione): static
  177. {
  178. if (!$this->manifestaciones->contains($manifestacione)) {
  179. $this->manifestaciones->add($manifestacione);
  180. $manifestacione->setFkVenta($this);
  181. }
  182. return $this;
  183. }
  184. public function removeManifestacione(ManifestacionClinicaSintoma $manifestacione): static
  185. {
  186. if ($this->manifestaciones->removeElement($manifestacione)) {
  187. // set the owning side to null (unless already changed)
  188. if ($manifestacione->getFkPolicy() === $this) {
  189. $manifestacione->setFkPolicy(null);
  190. }
  191. }
  192. return $this;
  193. }
  194. public function getEnfermedadId(): ?string
  195. {
  196. return $this->enfermedadId;
  197. }
  198. public function setEnfermedadId(?string $enfermedadId): static
  199. {
  200. $this->enfermedadId = $enfermedadId;
  201. return $this;
  202. }
  203. public function getEnfermedadNombre(): ?string
  204. {
  205. return $this->enfermedadNombre;
  206. }
  207. public function setEnfermedadNombre(?string $enfermedadNombre): static
  208. {
  209. $this->enfermedadNombre = $enfermedadNombre;
  210. return $this;
  211. }
  212. public function getEnfermedades(): Collection
  213. {
  214. return $this->enfermedades;
  215. }
  216. public function setEnfermedades(Collection $enfermedades): void
  217. {
  218. $this->enfermedades = $enfermedades;
  219. }
  220. public function getDiagnosticos(): Collection
  221. {
  222. return $this->diagnosticos;
  223. }
  224. public function setDiagnosticos(Collection $diagnosticos): void
  225. {
  226. $this->diagnosticos = $diagnosticos;
  227. }
  228. public function addDiagnostico(DiagnosticoDetalle $diagnostico): void
  229. {
  230. $diagnostico->setFkPolicy($this);
  231. $this->diagnosticos->add($diagnostico);
  232. }
  233. public function getTratamientos(): Collection
  234. {
  235. return $this->tratamientos;
  236. }
  237. public function setTratamientos(Collection $tratamientos): void
  238. {
  239. $this->tratamientos = $tratamientos;
  240. }
  241. public function addTratamiento(TratamientoDetalle $tratamiento): void
  242. {
  243. $tratamiento->setFkPolicy($this);
  244. $this->tratamientos->add($tratamiento);
  245. }
  246. public function getResultados(): Collection
  247. {
  248. return $this->resultados;
  249. }
  250. public function setResultados(Collection $resultados): void
  251. {
  252. $this->resultados = $resultados;
  253. }
  254. public function addResultado(ResultadoDetalle $resultado): void
  255. {
  256. $resultado->setFkPolicy($this);
  257. $this->resultados->add($resultado);
  258. }
  259. public function __toString() {
  260. return $this->getId().' '.$this->getEnfermedadNombre().' '.$this->getVersion();
  261. }
  262. public function getCaracteristicas(): Collection
  263. {
  264. return $this->caracteristicas;
  265. }
  266. public function setCaracteristicas(Collection $caracteristicas): void
  267. {
  268. $this->caracteristicas = $caracteristicas;
  269. }
  270. public function addCaracteristica(CaracteristicaDetalle $caracteristica): void
  271. {
  272. $caracteristica->setFkPolicy($this);
  273. $this->caracteristicas->add($caracteristica);
  274. }
  275. /**
  276. * @return string
  277. */
  278. public function getRazas(): ?string
  279. {
  280. return $this->razas;
  281. }
  282. /**
  283. * @param string $razas
  284. */
  285. public function setRazas(string $razas): void
  286. {
  287. $this->razas = $razas;
  288. }
  289. }