123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <?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);
-
- 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();
-
- return $model;
- }
- }
|