12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <?php
-
- /**
- * AUTO GENERATED BY LUTICATE GENERATOR
- * ANY CHANGES WILL BE OVERWRITTEN
- * DO NOT DIRECTLY USE THIS FILE
- * USE Images.php
- * TO MAKE YOUR CHANGES AND DATABASE ACCESS
- */
-
- namespace App\Http\DataAccess\Models;
-
- use Luticate\Utils\LuModel;
- use App\Http\DBO\ImagesDbo;
-
- class ImagesModel extends LuModel
- {
- function __construct()
- {
- parent::__construct();
- $this->timestamps = false;
- }
-
- public function toDbo()
- {
- $dbo = new ImagesDbo();
-
- $dbo->setId($this->id);
- $dbo->setUserId($this->user_id);
- $dbo->setPath($this->path);
- $dbo->setDate($this->date);
- $dbo->setName($this->name);
-
- return $dbo;
- }
-
- /**
- * @param $dbo ImagesDbo
- * @param $model LuModel|null
- * @return Images
- */
- public function fromDbo($dbo, $model = null)
- {
- if (is_null($model))
- $model = new Images();
-
- $model->id = $dbo->getId();
- $model->user_id = $dbo->getUserId();
- $model->path = $dbo->getPath();
- $model->date = $dbo->getDate();
- $model->name = $dbo->getName();
-
- return $model;
- }
- }
|