Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

DnsCommentsModel.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 DnsComments.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\DnsCommentsDbo;
  12. class DnsCommentsModel extends LuModel
  13. {
  14. function __construct()
  15. {
  16. parent::__construct();
  17. $this->timestamps = false;
  18. }
  19. public function toDbo()
  20. {
  21. $dbo = new DnsCommentsDbo();
  22. $dbo->setId($this->id);
  23. $dbo->setDomainId($this->domain_id);
  24. $dbo->setName($this->name);
  25. $dbo->setType($this->type);
  26. $dbo->setModifiedAt($this->modified_at);
  27. $dbo->setAccount($this->account);
  28. $dbo->setComment($this->comment);
  29. return $dbo;
  30. }
  31. /**
  32. * @param $dbo DnsCommentsDbo
  33. * @param $model LuModel|null
  34. * @return DnsComments
  35. */
  36. public function fromDbo($dbo, $model = null)
  37. {
  38. if (is_null($model))
  39. $model = new DnsComments();
  40. $model->id = $dbo->getId();
  41. $model->domain_id = $dbo->getDomainId();
  42. $model->name = $dbo->getName();
  43. $model->type = $dbo->getType();
  44. $model->modified_at = $dbo->getModifiedAt();
  45. $model->account = $dbo->getAccount();
  46. $model->comment = $dbo->getComment();
  47. return $model;
  48. }
  49. }