src/Entity/Decode.php line 17

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Symfony\Component\Security\Core\Security;
  5. use App\Validator as AppAssert;
  6. use App\Entity\User;
  7. use App\Entity\Azienda;
  8. // idx_decode_decname
  9. /**
  10. * @ORM\Entity(repositoryClass="App\Repository\DecodeRepository")
  11. * @ORM\Table(indexes={@ORM\Index(name="idx_decode_decname", columns={"decname"})}, uniqueConstraints={@ORM\UniqueConstraint(name="uqe_decode_per_macchina", columns={"decclass", "deckey", "decmacchina_id"})})
  12. * @AppAssert\UniqueDecodeKey
  13. */
  14. class Decode
  15. {
  16. /**
  17. * @ORM\Id()
  18. * @ORM\Column(type="string", length=100)
  19. */
  20. private $DECClass;
  21. /**
  22. * @ORM\Id()
  23. * @ORM\Column(type="string", length=100)
  24. */
  25. private $DECKey;
  26. /**
  27. * @ORM\Column(type="text")
  28. */
  29. private $DECValue;
  30. /**
  31. * @ORM\Column(type="string", length=1)
  32. */
  33. private $DECType;
  34. /**
  35. * @ORM\Column(type="string", length=400, nullable=true)
  36. */
  37. private $DECDescription;
  38. /**
  39. * @ORM\Column(type="smallint")
  40. */
  41. private $DECActive;
  42. /**
  43. * @ORM\Column(type="smallint")
  44. */
  45. private $DECOrder;
  46. /**
  47. * @ORM\Column(type="integer", options={"default" : 0})
  48. */
  49. private $DECAziendaId;
  50. protected $m_CurAzienda;
  51. protected $m_CurUser;
  52. /**
  53. * @ORM\Column(type="string", length=4096, nullable=true)
  54. */
  55. private $DECValidValues;
  56. /**
  57. * @ORM\Column(type="string", length=100, nullable=true)
  58. */
  59. private $Gruppo;
  60. /**
  61. * @ORM\Column(type="string", length=2048, nullable=true)
  62. */
  63. private $Cmd;
  64. /**
  65. * @ORM\Column(type="integer", options={"default" : 0})
  66. */
  67. private $DECUtenteId;
  68. /**
  69. * @ORM\Id()
  70. * @ORM\Column(type="integer")
  71. */
  72. private $DECMacchinaId;
  73. /**
  74. * @ORM\Column(type="integer")
  75. */
  76. private $CreatorId;
  77. /**
  78. * @ORM\Column(type="datetime", options={"default" : "2000-01-01 00:00:00"})
  79. */
  80. private $CreationDate;
  81. /**
  82. * @ORM\Column(type="integer")
  83. */
  84. private $ModifyId;
  85. /**
  86. * @ORM\Column(type="datetime", options={"default" : "2000-01-01 00:00:00"})
  87. */
  88. private $ModifyDate;
  89. /**
  90. * @ORM\Column(name="decname", type="string", length=200)
  91. */
  92. private $DecName;
  93. /**
  94. * @ORM\Column(name="deceditor", type="integer")
  95. */
  96. private $DECEditor;
  97. /**
  98. * @ORM\Column(name="decimmagine", type="string", length=255, nullable=true)
  99. */
  100. private $DECImmagine;
  101. /**
  102. * @ORM\Column(name="decsezione", type="string", length=255, nullable=true)
  103. */
  104. private $DECSezione;
  105. /**
  106. * @ORM\Column(name="decsezione_ordinamento", type="integer", nullable=true)
  107. */
  108. private $DECSezioneOrdinamento;
  109. /**
  110. * @ORM\Column(name="decdesc_extended", type="string", length=2048, nullable=true)
  111. */
  112. private $DECDescExtended;
  113. public function __construct(Security $security = null, User $a_User = null)
  114. {
  115. if (!empty($security)) {
  116. $this->m_CurUser = $security->getUser();
  117. }
  118. else {
  119. $this->m_CurUser = $a_User;
  120. }
  121. $this->m_CurAzienda = null;
  122. $this->DECAziendaId = 0;
  123. $this->DECUtenteId = 0;
  124. $this->DECEditor = 0; // Valore di default
  125. if (!empty($this->m_CurUser)) {
  126. $this->DECUtenteId = $this->m_CurUser->getId();
  127. $this->m_CurAzienda = $this->m_CurUser->getAzienda();
  128. if (!empty($this->m_CurAzienda)) {
  129. $this->DECAziendaId = $this->m_CurAzienda->getId();
  130. }
  131. }
  132. }
  133. public function getDECClass(): ?string
  134. {
  135. return $this->DECClass;
  136. }
  137. public function setDECClass(string $DECClass): self
  138. {
  139. $this->DECClass = $DECClass;
  140. return $this;
  141. }
  142. public function getDECKey(): ?string
  143. {
  144. return $this->DECKey;
  145. }
  146. public function setDECKey(string $DECKey): self
  147. {
  148. $this->DECKey = $DECKey;
  149. return $this;
  150. }
  151. public function getDECValue(): ?string
  152. {
  153. return $this->DECValue;
  154. }
  155. public function setDECValue(string $DECValue): self
  156. {
  157. $this->DECValue = $DECValue;
  158. return $this;
  159. }
  160. public function getDECType(): ?string
  161. {
  162. return $this->DECType;
  163. }
  164. public function setDECType(string $DECType): self
  165. {
  166. $this->DECType = $DECType;
  167. return $this;
  168. }
  169. public function getDECDescription(): ?string
  170. {
  171. return $this->DECDescription;
  172. }
  173. public function setDECDescription(?string $DECDescription): self
  174. {
  175. $this->DECDescription = $DECDescription;
  176. return $this;
  177. }
  178. public function getDECActive(): ?int
  179. {
  180. return $this->DECActive;
  181. }
  182. public function setDECActive(int $DECActive): self
  183. {
  184. $this->DECActive = $DECActive;
  185. return $this;
  186. }
  187. public function getDECOrder(): ?int
  188. {
  189. return $this->DECOrder;
  190. }
  191. public function setDECOrder(int $DECOrder): self
  192. {
  193. $this->DECOrder = $DECOrder;
  194. return $this;
  195. }
  196. public function getDECAziendaId(): ?int
  197. {
  198. return $this->DECAziendaId;
  199. }
  200. public function setDECAziendaId(int $DECAziendaId): self
  201. {
  202. $this->DECAziendaId = $DECAziendaId;
  203. return $this;
  204. }
  205. public function getDECUtenteId(): ?int
  206. {
  207. return $this->DECUtenteId;
  208. }
  209. public function setDECUtenteId(int $DECUtenteId): self
  210. {
  211. $this->DECUtenteId = $DECUtenteId;
  212. return $this;
  213. }
  214. public function getDECValidValues(): ?string
  215. {
  216. return $this->DECValidValues;
  217. }
  218. public function setDECValidValues(?string $DECValidValues): self
  219. {
  220. $this->DECValidValues = $DECValidValues;
  221. return $this;
  222. }
  223. public function getGruppo(): ?string
  224. {
  225. return $this->Gruppo;
  226. }
  227. public function setGruppo(?string $Gruppo): self
  228. {
  229. $this->Gruppo = $Gruppo;
  230. return $this;
  231. }
  232. public function getCmd(): ?string
  233. {
  234. return $this->Cmd;
  235. }
  236. public function setCmd(?string $Cmd): self
  237. {
  238. $this->Cmd = $Cmd;
  239. return $this;
  240. }
  241. public function getDECMacchinaId(): ?int
  242. {
  243. return $this->DECMacchinaId;
  244. }
  245. public function setDECMacchinaId(int $DECMacchinaId): self
  246. {
  247. $this->DECMacchinaId = $DECMacchinaId;
  248. return $this;
  249. }
  250. public function getCreatorId(): ?int
  251. {
  252. return $this->CreatorId;
  253. }
  254. public function setCreatorId(int $CreatorId): self
  255. {
  256. $this->CreatorId = $CreatorId;
  257. return $this;
  258. }
  259. public function getCreationDate(): ?\DateTimeInterface
  260. {
  261. return $this->CreationDate;
  262. }
  263. public function setCreationDate(\DateTimeInterface $CreationDate): self
  264. {
  265. $this->CreationDate = $CreationDate;
  266. return $this;
  267. }
  268. public function getModifyId(): ?int
  269. {
  270. return $this->ModifyId;
  271. }
  272. public function setModifyId(int $ModifyId): self
  273. {
  274. $this->ModifyId = $ModifyId;
  275. return $this;
  276. }
  277. public function getModifyDate(): ?\DateTimeInterface
  278. {
  279. return $this->ModifyDate;
  280. }
  281. public function setModifyDate(\DateTimeInterface $ModifyDate): self
  282. {
  283. $this->ModifyDate = $ModifyDate;
  284. return $this;
  285. }
  286. public function getDecName(): ?string
  287. {
  288. return $this->DecName;
  289. }
  290. public function setDecName(string $DecName): self
  291. {
  292. $this->DecName = $DecName;
  293. return $this;
  294. }
  295. public function getDECEditor(): ?int
  296. {
  297. return $this->DECEditor;
  298. }
  299. public function setDECEditor(int $DECEditor): self
  300. {
  301. $this->DECEditor = $DECEditor;
  302. return $this;
  303. }
  304. public function getDECImmagine(): ?string
  305. {
  306. return $this->DECImmagine;
  307. }
  308. public function setDECImmagine(?string $DECImmagine): self
  309. {
  310. $this->DECImmagine = $DECImmagine;
  311. return $this;
  312. }
  313. public function getDECSezione(): ?string
  314. {
  315. return $this->DECSezione;
  316. }
  317. public function setDECSezione(?string $DECSezione): self
  318. {
  319. $this->DECSezione = $DECSezione;
  320. return $this;
  321. }
  322. public function getDECSezioneOrdinamento(): ?int
  323. {
  324. return $this->DECSezioneOrdinamento;
  325. }
  326. public function setDECSezioneOrdinamento(?int $DECSezioneOrdinamento): self
  327. {
  328. $this->DECSezioneOrdinamento = $DECSezioneOrdinamento;
  329. return $this;
  330. }
  331. public function getDECDescExtended(): ?string
  332. {
  333. return $this->DECDescExtended;
  334. }
  335. public function setDECDescExtended(?string $DECDescExtended): self
  336. {
  337. $this->DECDescExtended = $DECDescExtended;
  338. return $this;
  339. }
  340. }