您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

DnsSupermastersModel.php 1.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. /**
  3. * AUTO GENERATED BY LUTICATE GENERATOR
  4. * ANY CHANGES WILL BE OVERWRITTEN
  5. * DO NOT DIRECTLY USE THIS FILE
  6. * USE DnsSupermasters.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\DnsSupermastersDbo;
  12. class DnsSupermastersModel extends LuModel
  13. {
  14. function __construct()
  15. {
  16. parent::__construct();
  17. $this->timestamps = false;
  18. }
  19. public function toDbo()
  20. {
  21. $dbo = new DnsSupermastersDbo();
  22. $dbo->setIp($this->ip);
  23. $dbo->setNameserver($this->nameserver);
  24. $dbo->setAccount($this->account);
  25. return $dbo;
  26. }
  27. /**
  28. * @param $dbo DnsSupermastersDbo
  29. * @param $model LuModel|null
  30. * @return DnsSupermasters
  31. */
  32. public function fromDbo($dbo, $model = null)
  33. {
  34. if (is_null($model))
  35. $model = new DnsSupermasters();
  36. $model->ip = $dbo->getIp();
  37. $model->nameserver = $dbo->getNameserver();
  38. $model->account = $dbo->getAccount();
  39. return $model;
  40. }
  41. }