選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

CommandsDbo.php 2.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. <?php
  2. /**
  3. * AUTO GENERATED BY LUTICATE GENERATOR
  4. * ANY CHANGES WILL BE OVERWRITTEN
  5. */
  6. namespace App\Http\DBO;
  7. use Luticate\Utils\LuDbo;
  8. class CommandsDbo extends LuDbo {
  9. public function jsonSerialize()
  10. {
  11. return array(
  12. "Id" => $this->_id,
  13. "Name" => $this->_name,
  14. "Description" => $this->_description,
  15. "HostId" => $this->_hostId,
  16. "CommandTypeId" => $this->_commandTypeId,
  17. "Data" => $this->_data
  18. );
  19. }
  20. public static function jsonDeserialize($json)
  21. {
  22. $dbo = new CommandsDbo();
  23. if (isset($json["Id"])) {
  24. $dbo->setId($json["Id"]);
  25. }
  26. if (isset($json["Name"])) {
  27. $dbo->setName($json["Name"]);
  28. }
  29. if (isset($json["Description"])) {
  30. $dbo->setDescription($json["Description"]);
  31. }
  32. if (isset($json["HostId"])) {
  33. $dbo->setHostId($json["HostId"]);
  34. }
  35. if (isset($json["CommandTypeId"])) {
  36. $dbo->setCommandTypeId($json["CommandTypeId"]);
  37. }
  38. if (isset($json["Data"])) {
  39. $dbo->setData(json_decode($json["Data"], true));
  40. }
  41. return $dbo;
  42. }
  43. public static function generateSample()
  44. {
  45. $dbo = new CommandsDbo();
  46. $dbo->setId(42);
  47. $dbo->setName("sample string");
  48. $dbo->setDescription("sample string");
  49. $dbo->setHostId(42);
  50. $dbo->setCommandTypeId(42);
  51. $dbo->setData("sample string");
  52. return $dbo;
  53. }
  54. /**
  55. * @var integer
  56. */
  57. protected $_id;
  58. public function getId()
  59. {
  60. return $this->_id;
  61. }
  62. public function setId($value)
  63. {
  64. $this->_id = $value;
  65. }
  66. /**
  67. * @var string
  68. */
  69. protected $_name;
  70. public function getName()
  71. {
  72. return $this->_name;
  73. }
  74. public function setName($value)
  75. {
  76. $this->_name = $value;
  77. }
  78. /**
  79. * @var string
  80. */
  81. protected $_description;
  82. public function getDescription()
  83. {
  84. return $this->_description;
  85. }
  86. public function setDescription($value)
  87. {
  88. $this->_description = $value;
  89. }
  90. /**
  91. * @var integer
  92. */
  93. protected $_hostId;
  94. public function getHostId()
  95. {
  96. return $this->_hostId;
  97. }
  98. public function setHostId($value)
  99. {
  100. $this->_hostId = $value;
  101. }
  102. /**
  103. * @var integer
  104. */
  105. protected $_commandTypeId;
  106. public function getCommandTypeId()
  107. {
  108. return $this->_commandTypeId;
  109. }
  110. public function setCommandTypeId($value)
  111. {
  112. $this->_commandTypeId = $value;
  113. }
  114. /**
  115. * @var text
  116. */
  117. protected $_data;
  118. public function getData()
  119. {
  120. return $this->_data;
  121. }
  122. public function setData($value)
  123. {
  124. $this->_data = $value;
  125. }
  126. }