1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <?php
-
- /**
- * AUTO GENERATED BY LUTICATE GENERATOR
- * ANY CHANGES WILL BE OVERWRITTEN
- * DO NOT DIRECTLY USE THIS FILE
- * USE DnsDomains.php
- * TO MAKE YOUR CHANGES AND DATABASE ACCESS
- */
-
- namespace App\Http\DataAccess\Models;
-
- use Luticate\Utils\LuModel;
- use App\Http\DBO\DnsDomainsDbo;
-
- class DnsDomainsModel extends LuModel
- {
- function __construct()
- {
- parent::__construct();
- $this->timestamps = false;
- }
-
- public function toDbo()
- {
- $dbo = new DnsDomainsDbo();
-
- $dbo->setId($this->id);
- $dbo->setName($this->name);
- $dbo->setMaster($this->master);
- $dbo->setLastCheck($this->last_check);
- $dbo->setType($this->type);
- $dbo->setNotifiedSerial($this->notified_serial);
- $dbo->setAccount($this->account);
-
- return $dbo;
- }
-
- /**
- * @param $dbo DnsDomainsDbo
- * @param $model LuModel|null
- * @return DnsDomains
- */
- public function fromDbo($dbo, $model = null)
- {
- if (is_null($model))
- $model = new DnsDomains();
-
- $model->id = $dbo->getId();
- $model->name = $dbo->getName();
- $model->master = $dbo->getMaster();
- $model->last_check = $dbo->getLastCheck();
- $model->type = $dbo->getType();
- $model->notified_serial = $dbo->getNotifiedSerial();
- $model->account = $dbo->getAccount();
-
- return $model;
- }
- }
|