1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <?php
-
- /**
- * AUTO GENERATED BY LUTICATE GENERATOR
- * ANY CHANGES WILL BE OVERWRITTEN
- * DO NOT DIRECTLY USE THIS FILE
- * USE DnsComments.php
- * TO MAKE YOUR CHANGES AND DATABASE ACCESS
- */
-
- namespace App\Http\DataAccess\Models;
-
- use Luticate\Utils\LuModel;
- use App\Http\DBO\DnsCommentsDbo;
-
- class DnsCommentsModel extends LuModel
- {
- function __construct()
- {
- parent::__construct();
- $this->timestamps = false;
- }
-
- public function toDbo()
- {
- $dbo = new DnsCommentsDbo();
-
- $dbo->setId($this->id);
- $dbo->setDomainId($this->domain_id);
- $dbo->setName($this->name);
- $dbo->setType($this->type);
- $dbo->setModifiedAt($this->modified_at);
- $dbo->setAccount($this->account);
- $dbo->setComment($this->comment);
-
- return $dbo;
- }
-
- /**
- * @param $dbo DnsCommentsDbo
- * @param $model LuModel|null
- * @return DnsComments
- */
- public function fromDbo($dbo, $model = null)
- {
- if (is_null($model))
- $model = new DnsComments();
-
- $model->id = $dbo->getId();
- $model->domain_id = $dbo->getDomainId();
- $model->name = $dbo->getName();
- $model->type = $dbo->getType();
- $model->modified_at = $dbo->getModifiedAt();
- $model->account = $dbo->getAccount();
- $model->comment = $dbo->getComment();
-
- return $model;
- }
- }
|