You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

DnsRecordsModel.php 1.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?php
  2. /**
  3. * AUTO GENERATED BY LUTICATE GENERATOR
  4. * ANY CHANGES WILL BE OVERWRITTEN
  5. * DO NOT DIRECTLY USE THIS FILE
  6. * USE DnsRecords.php
  7. * TO MAKE YOUR CHANGES AND DATABASE ACCESS
  8. */
  9. namespace App\Http\DataAccess\Models;
  10. use Luticate\Utils\LuModel;
  11. use App\Http\DBO\DnsRecordsDbo;
  12. class DnsRecordsModel extends LuModel
  13. {
  14. function __construct()
  15. {
  16. parent::__construct();
  17. $this->timestamps = false;
  18. }
  19. public function toDbo()
  20. {
  21. $dbo = new DnsRecordsDbo();
  22. $dbo->setId($this->id);
  23. $dbo->setDomainId($this->domain_id);
  24. $dbo->setName($this->name);
  25. $dbo->setType($this->type);
  26. $dbo->setContent($this->content);
  27. $dbo->setTtl($this->ttl);
  28. $dbo->setPrio($this->prio);
  29. $dbo->setChangeDate($this->change_date);
  30. $dbo->setDisabled($this->disabled);
  31. $dbo->setOrdername($this->ordername);
  32. $dbo->setAuth($this->auth);
  33. return $dbo;
  34. }
  35. /**
  36. * @param $dbo DnsRecordsDbo
  37. * @param $model LuModel|null
  38. * @return DnsRecords
  39. */
  40. public function fromDbo($dbo, $model = null)
  41. {
  42. if (is_null($model))
  43. $model = new DnsRecords();
  44. $model->id = $dbo->getId();
  45. $model->domain_id = $dbo->getDomainId();
  46. $model->name = $dbo->getName();
  47. $model->type = $dbo->getType();
  48. $model->content = $dbo->getContent();
  49. $model->ttl = $dbo->getTtl();
  50. $model->prio = $dbo->getPrio();
  51. $model->change_date = $dbo->getChangeDate();
  52. $model->disabled = $dbo->getDisabled();
  53. $model->ordername = $dbo->getOrdername();
  54. $model->auth = $dbo->getAuth();
  55. return $model;
  56. }
  57. }