Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

DnsDomainsModel.php 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. /**
  3. * AUTO GENERATED BY LUTICATE GENERATOR
  4. * ANY CHANGES WILL BE OVERWRITTEN
  5. * DO NOT DIRECTLY USE THIS FILE
  6. * USE DnsDomains.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\DnsDomainsDbo;
  12. class DnsDomainsModel extends LuModel
  13. {
  14. function __construct()
  15. {
  16. parent::__construct();
  17. $this->timestamps = false;
  18. }
  19. public function toDbo()
  20. {
  21. $dbo = new DnsDomainsDbo();
  22. $dbo->setId($this->id);
  23. $dbo->setName($this->name);
  24. $dbo->setMaster($this->master);
  25. $dbo->setLastCheck($this->last_check);
  26. $dbo->setType($this->type);
  27. $dbo->setNotifiedSerial($this->notified_serial);
  28. $dbo->setAccount($this->account);
  29. return $dbo;
  30. }
  31. /**
  32. * @param $dbo DnsDomainsDbo
  33. * @param $model LuModel|null
  34. * @return DnsDomains
  35. */
  36. public function fromDbo($dbo, $model = null)
  37. {
  38. if (is_null($model))
  39. $model = new DnsDomains();
  40. $model->id = $dbo->getId();
  41. $model->name = $dbo->getName();
  42. $model->master = $dbo->getMaster();
  43. $model->last_check = $dbo->getLastCheck();
  44. $model->type = $dbo->getType();
  45. $model->notified_serial = $dbo->getNotifiedSerial();
  46. $model->account = $dbo->getAccount();
  47. return $model;
  48. }
  49. }