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.

DnsCryptokeysModel.php 1.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. /**
  3. * AUTO GENERATED BY LUTICATE GENERATOR
  4. * ANY CHANGES WILL BE OVERWRITTEN
  5. * DO NOT DIRECTLY USE THIS FILE
  6. * USE DnsCryptokeys.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\DnsCryptokeysDbo;
  12. class DnsCryptokeysModel extends LuModel
  13. {
  14. function __construct()
  15. {
  16. parent::__construct();
  17. $this->timestamps = false;
  18. }
  19. public function toDbo()
  20. {
  21. $dbo = new DnsCryptokeysDbo();
  22. $dbo->setId($this->id);
  23. $dbo->setDomainId($this->domain_id);
  24. $dbo->setFlags($this->flags);
  25. $dbo->setActive($this->active);
  26. $dbo->setContent($this->content);
  27. return $dbo;
  28. }
  29. /**
  30. * @param $dbo DnsCryptokeysDbo
  31. * @param $model LuModel|null
  32. * @return DnsCryptokeys
  33. */
  34. public function fromDbo($dbo, $model = null)
  35. {
  36. if (is_null($model))
  37. $model = new DnsCryptokeys();
  38. $model->id = $dbo->getId();
  39. $model->domain_id = $dbo->getDomainId();
  40. $model->flags = $dbo->getFlags();
  41. $model->active = $dbo->getActive();
  42. $model->content = $dbo->getContent();
  43. return $model;
  44. }
  45. }