src/Entity/Idempiere/MaterialManagement/Reservation.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Idempiere\MaterialManagement;
  3. use App\Entity\Idempiere\AdClient;
  4. use App\Entity\Idempiere\AdOrg;
  5. use App\Entity\Idempiere\MProduct;
  6. use App\Entity\Idempiere\MWarehouse;
  7. use Doctrine\ORM\Mapping as ORM;
  8. /**
  9. * @ORM\Entity(readOnly=true)
  10. * @ORM\Table(name="m_storagereservation")
  11. */
  12. class Reservation { // QUITAR FINAL
  13. /**
  14. * @ORM\Id
  15. * @ORM\ManyToOne(targetEntity=AdClient::class)
  16. * @ORM\JoinColumn(name="ad_client_id", referencedColumnName="ad_client_id", nullable=false)
  17. */
  18. private AdClient $client;
  19. /**
  20. * @ORM\Id
  21. * @ORM\ManyToOne(targetEntity=AdOrg::class)
  22. * @ORM\JoinColumn(name="ad_org_id", referencedColumnName="ad_org_id", nullable=false)
  23. */
  24. private AdOrg $organization;
  25. /**
  26. * @ORM\Id
  27. * @ORM\ManyToOne(targetEntity=MProduct::class, inversedBy="reservationList")
  28. * @ORM\JoinColumn(name="m_product_id", referencedColumnName="m_product_id", nullable=false)
  29. */
  30. private MProduct $product;
  31. /**
  32. * @ORM\Id
  33. * @ORM\ManyToOne(targetEntity=MWarehouse::class, inversedBy="warehouseList")
  34. * @ORM\JoinColumn(name="m_warehouse_id", referencedColumnName="m_warehouse_id", nullable=false)
  35. */
  36. private MWarehouse $warehouse;
  37. /** @ORM\Column(type="integer") */
  38. private int $qty;
  39. /** @ORM\Column(type="datetime", nullable=true) */
  40. private $datelastinventory;
  41. /** @ORM\Column(type="string", length=1) */
  42. private string $isactive;
  43. /** @ORM\Column(type="string", length=1) */
  44. private string $issotrx;
  45. /** @ORM\Column(type="string", length=40) */
  46. private string $m_storagereservation_uu;
  47. public function getId(): string { return $this->m_storagereservation_uu; }
  48. public function getProduct(): MProduct { return $this->product; }
  49. public function getWarehouse(): MWarehouse { return $this->warehouse; }
  50. public function getOrganization(): AdOrg { return $this->organization; }
  51. public function getQty(): int { return $this->qty; }
  52. public function isActive(): bool { return $this->isactive === 'Y'; }
  53. public function isIsSotrx(): bool { return $this->issotrx === 'Y'; }
  54. public function getDateLastInventory(): ?\DateTimeInterface {
  55. return $this->datelastinventory;
  56. }
  57. }