Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

ImagesModel.php 1001B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. /**
  3. * AUTO GENERATED BY LUTICATE GENERATOR
  4. * ANY CHANGES WILL BE OVERWRITTEN
  5. * DO NOT DIRECTLY USE THIS FILE
  6. * USE Images.php
  7. * TO MAKE YOUR CHANGES AND DATABASE ACCESS
  8. */
  9. namespace App\Http\DataAccess\Models;
  10. use Luticate\Utils\LuModel;
  11. use App\Http\DBO\ImagesDbo;
  12. class ImagesModel extends LuModel
  13. {
  14. function __construct()
  15. {
  16. parent::__construct();
  17. $this->timestamps = false;
  18. }
  19. public function toDbo()
  20. {
  21. $dbo = new ImagesDbo();
  22. $dbo->setId($this->id);
  23. $dbo->setUserId($this->user_id);
  24. $dbo->setPath($this->path);
  25. return $dbo;
  26. }
  27. /**
  28. * @param $dbo ImagesDbo
  29. * @param $model LuModel|null
  30. * @return Images
  31. */
  32. public function fromDbo($dbo, $model = null)
  33. {
  34. if (is_null($model))
  35. $model = new Images();
  36. $model->id = $dbo->getId();
  37. $model->user_id = $dbo->getUserId();
  38. $model->path = $dbo->getPath();
  39. return $model;
  40. }
  41. }