src/Entity/Gauge/GaugeRemoteProperties.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Gauge;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use phpDocumentor\Reflection\Types\Nullable;
  5. use Symfony\Component\Serializer\Annotation\Groups;
  6. use Symfony\Component\Validator\Constraints as Assert;
  7. /**
  8. * @ORM\Entity()
  9. * @ORM\Table(name="gauge_remote_properties")
  10. */
  11. class GaugeRemoteProperties
  12. {
  13. /**
  14. * typ zapojení dálkových odečtů: PŘÍMÉ/OPTOČLEN/VYSÍLAČ/JINÝ
  15. */
  16. public const CONNECTION_DIRECT = 1; // PŘÍMÉ
  17. public const CONNECTION_OPTOCOUPLER = 2; // OPTOČLEN
  18. public const CONNECTION_TRANSMITTER = 3; // VYSÍLAČ
  19. public const CONNECTION_OTHER = 4; // JINÝ
  20. /**
  21. * způsob zasílání dat: KABEL / WIFI / GSM / IOT / JINÝ
  22. */
  23. public const SENDING_DATA_WAY_CABLE = 1;
  24. public const SENDING_DATA_WAY_WIFI = 2;
  25. public const SENDING_DATA_WAY_GSM = 3;
  26. public const SENDING_DATA_WAY_IOT = 4;
  27. public const SENDING_DATA_WAY_OTHER = 5;
  28. /**
  29. * výstup: PULZNÍ / M-BUS / MAGNETICKYÝ / JINÝ
  30. */
  31. public const OUTPUT_PULSE = 1;
  32. public const OUTPUT_M_BUS = 2;
  33. public const OUTPUT_MAGNETIC = 3;
  34. public const OUTPUT_OTHER = 4;
  35. public const POWER_INPUT_MAINS = 1; // napájení ze sítě
  36. public const POWER_INPUT_BATTERY = 2; // napájení z baterie
  37. /**
  38. * @ORM\Id()
  39. * @ORM\GeneratedValue()
  40. * @ORM\Column(type="integer")
  41. */
  42. private int $id;
  43. /**
  44. * @var Gauge
  45. * @ORM\OneToOne(targetEntity="App\Entity\Gauge\Gauge", inversedBy="remoteProperties")
  46. * @ORM\JoinColumn(name="gauge_id", referencedColumnName="id", nullable=false)
  47. */
  48. private Gauge $gauge;
  49. /**
  50. * @var \DateTime|null
  51. *
  52. * @ORM\Column(type="datetime", nullable=true)
  53. */
  54. private ?\DateTime $initDate = null;
  55. /**
  56. * values are defined above self::CONNECTION_...
  57. * @var int|null
  58. * @ORM\Column(type="smallint", nullable=true)
  59. */
  60. private ?int $connectionType = null;
  61. /**
  62. * @var string|null
  63. * @ORM\Column(type="string", nullable=true)
  64. */
  65. private ?string $deviceType = null;
  66. /**
  67. * values are defined above self::SENDING_DATA_WAY_...
  68. * @var int|null
  69. * @ORM\Column(type="smallint", nullable=true)
  70. */
  71. private ?int $dataSendingWay = null;
  72. /**
  73. * @var string|null
  74. * @ORM\Column(type="string", nullable=true)
  75. */
  76. private ?string $simNumber = null;
  77. /**
  78. * values are defined above self::OUTPUT_...
  79. * @var int|null
  80. * @ORM\Column(type="smallint", nullable=true)
  81. */
  82. private ?int $output = null;
  83. /**
  84. * @var int|null
  85. * @ORM\Column(type="integer", nullable=true)
  86. */
  87. private ?int $pulseQuantity = null;
  88. /**
  89. * @var string|null
  90. * @ORM\Column(type="string", nullable=true)
  91. */
  92. private ?string $digitalInput = null;
  93. /**
  94. * values are defined above self::POWER_INPUT...
  95. * @var int|null
  96. * @ORM\Column(type="integer", nullable=true)
  97. */
  98. private ?int $powerInput = null;
  99. /**
  100. * @var \DateTime|null
  101. *
  102. * @ORM\Column(type="datetime", nullable=true)
  103. */
  104. private ?\DateTime $lastBatteryExchange = null;
  105. /**
  106. * @var string|null
  107. * @ORM\Column(type="text", nullable=true)
  108. */
  109. private ?string $otherInfo;
  110. /**
  111. * GaugeRemoteProperties constructor.
  112. * @param Gauge $gauge
  113. */
  114. public function __construct(Gauge $gauge)
  115. {
  116. $this->gauge = $gauge;
  117. }
  118. /**
  119. * @return int
  120. */
  121. public function getId(): int
  122. {
  123. return $this->id;
  124. }
  125. /**
  126. * @param int $id
  127. * @return GaugeRemoteProperties
  128. */
  129. public function setId(int $id): GaugeRemoteProperties
  130. {
  131. $this->id = $id;
  132. return $this;
  133. }
  134. /**
  135. * @return Gauge
  136. */
  137. public function getGauge(): Gauge
  138. {
  139. return $this->gauge;
  140. }
  141. /**
  142. * @param Gauge $gauge
  143. * @return GaugeRemoteProperties
  144. */
  145. public function setGauge(Gauge $gauge): GaugeRemoteProperties
  146. {
  147. $this->gauge = $gauge;
  148. return $this;
  149. }
  150. /**
  151. * @return \DateTime|null
  152. */
  153. public function getInitDate(): ?\DateTime
  154. {
  155. return $this->initDate;
  156. }
  157. /**
  158. * @param \DateTime|null $initDate
  159. * @return GaugeRemoteProperties
  160. */
  161. public function setInitDate(?\DateTime $initDate): GaugeRemoteProperties
  162. {
  163. $this->initDate = $initDate;
  164. return $this;
  165. }
  166. /**
  167. * @return int|null
  168. */
  169. public function getConnectionType(): ?int
  170. {
  171. return $this->connectionType;
  172. }
  173. /**
  174. * @param int|null $connectionType
  175. * @return GaugeRemoteProperties
  176. */
  177. public function setConnectionType(?int $connectionType): GaugeRemoteProperties
  178. {
  179. $this->connectionType = $connectionType;
  180. return $this;
  181. }
  182. /**
  183. * @return string|null
  184. */
  185. public function getDeviceType(): ?string
  186. {
  187. return $this->deviceType;
  188. }
  189. /**
  190. * @param string|null $deviceType
  191. * @return GaugeRemoteProperties
  192. */
  193. public function setDeviceType(?string $deviceType): GaugeRemoteProperties
  194. {
  195. $this->deviceType = $deviceType;
  196. return $this;
  197. }
  198. /**
  199. * @return int|null
  200. */
  201. public function getDataSendingWay(): ?int
  202. {
  203. return $this->dataSendingWay;
  204. }
  205. /**
  206. * @param int|null $dataSendingWay
  207. * @return GaugeRemoteProperties
  208. */
  209. public function setDataSendingWay(?int $dataSendingWay): GaugeRemoteProperties
  210. {
  211. $this->dataSendingWay = $dataSendingWay;
  212. return $this;
  213. }
  214. /**
  215. * @return string|null
  216. */
  217. public function getSimNumber(): ?string
  218. {
  219. return $this->simNumber;
  220. }
  221. /**
  222. * @param string|null $simNumber
  223. * @return GaugeRemoteProperties
  224. */
  225. public function setSimNumber(?string $simNumber): GaugeRemoteProperties
  226. {
  227. $this->simNumber = $simNumber;
  228. return $this;
  229. }
  230. /**
  231. * @return int|null
  232. */
  233. public function getOutput(): ?int
  234. {
  235. return $this->output;
  236. }
  237. /**
  238. * @param int|null $output
  239. * @return GaugeRemoteProperties
  240. */
  241. public function setOutput(?int $output): GaugeRemoteProperties
  242. {
  243. $this->output = $output;
  244. return $this;
  245. }
  246. /**
  247. * @return int|null
  248. */
  249. public function getPulseQuantity(): ?int
  250. {
  251. return $this->pulseQuantity;
  252. }
  253. /**
  254. * @param int|null $pulseQuantity
  255. * @return GaugeRemoteProperties
  256. */
  257. public function setPulseQuantity(?int $pulseQuantity): GaugeRemoteProperties
  258. {
  259. $this->pulseQuantity = $pulseQuantity;
  260. return $this;
  261. }
  262. /**
  263. * @return string|null
  264. */
  265. public function getDigitalInput(): ?string
  266. {
  267. return $this->digitalInput;
  268. }
  269. /**
  270. * @param string|null $digitalInput
  271. * @return GaugeRemoteProperties
  272. */
  273. public function setDigitalInput(?string $digitalInput): GaugeRemoteProperties
  274. {
  275. $this->digitalInput = $digitalInput;
  276. return $this;
  277. }
  278. /**
  279. * @return int|null
  280. */
  281. public function getPowerInput(): ?int
  282. {
  283. return $this->powerInput;
  284. }
  285. /**
  286. * @param int|null $powerInput
  287. * @return GaugeRemoteProperties
  288. */
  289. public function setPowerInput(?int $powerInput): GaugeRemoteProperties
  290. {
  291. $this->powerInput = $powerInput;
  292. return $this;
  293. }
  294. /**
  295. * @return \DateTime|null
  296. */
  297. public function getLastBatteryExchange(): ?\DateTime
  298. {
  299. return $this->lastBatteryExchange;
  300. }
  301. /**
  302. * @param \DateTime|null $lastBatteryExchange
  303. * @return GaugeRemoteProperties
  304. */
  305. public function setLastBatteryExchange(?\DateTime $lastBatteryExchange): GaugeRemoteProperties
  306. {
  307. $this->lastBatteryExchange = $lastBatteryExchange;
  308. return $this;
  309. }
  310. /**
  311. * @return string|null
  312. */
  313. public function getOtherInfo(): ?string
  314. {
  315. return $this->otherInfo;
  316. }
  317. /**
  318. * @param string|null $otherInfo
  319. * @return GaugeRemoteProperties
  320. */
  321. public function setOtherInfo(?string $otherInfo): GaugeRemoteProperties
  322. {
  323. $this->otherInfo = $otherInfo;
  324. return $this;
  325. }
  326. }