12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- <?php
-
- /**
- * AUTO GENERATED BY LUTICATE GENERATOR
- * ANY CHANGES WILL BE OVERWRITTEN
- * DO NOT DIRECTLY USE THIS FILE
- * USE DnsRecords.php
- * TO MAKE YOUR CHANGES AND DATABASE ACCESS
- */
-
- namespace App\Http\DataAccess\Models;
-
- use Luticate\Utils\LuModel;
- use App\Http\DBO\DnsRecordsDbo;
-
- class DnsRecordsModel extends LuModel
- {
- function __construct()
- {
- parent::__construct();
- $this->timestamps = false;
- }
-
- public function toDbo()
- {
- $dbo = new DnsRecordsDbo();
-
- $dbo->setId($this->id);
- $dbo->setDomainId($this->domain_id);
- $dbo->setName($this->name);
- $dbo->setType($this->type);
- $dbo->setContent($this->content);
- $dbo->setTtl($this->ttl);
- $dbo->setPrio($this->prio);
- $dbo->setChangeDate($this->change_date);
- $dbo->setDisabled($this->disabled);
- $dbo->setOrdername($this->ordername);
- $dbo->setAuth($this->auth);
-
- return $dbo;
- }
-
- /**
- * @param $dbo DnsRecordsDbo
- * @param $model LuModel|null
- * @return DnsRecords
- */
- public function fromDbo($dbo, $model = null)
- {
- if (is_null($model))
- $model = new DnsRecords();
-
- $model->id = $dbo->getId();
- $model->domain_id = $dbo->getDomainId();
- $model->name = $dbo->getName();
- $model->type = $dbo->getType();
- $model->content = $dbo->getContent();
- $model->ttl = $dbo->getTtl();
- $model->prio = $dbo->getPrio();
- $model->change_date = $dbo->getChangeDate();
- $model->disabled = $dbo->getDisabled();
- $model->ordername = $dbo->getOrdername();
- $model->auth = $dbo->getAuth();
-
- return $model;
- }
- }
|