src/Entity/Idempiere/CBpartnerLocation.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Idempiere;
  3. use App\Repository\Idempiere\CBpartnerLocationRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8. * @ORM\Entity(repositoryClass=CBpartnerLocationRepository::class)
  9. * @ORM\Table(name="c_bpartner_location")
  10. */
  11. class CBpartnerLocation
  12. {
  13. /**
  14. * @ORM\Id
  15. * @ORM\Column(type="integer")
  16. */
  17. private $c_bpartner_location_id;
  18. /**
  19. * @ORM\Column(type="string", length=255)
  20. */
  21. private $email;
  22. /**
  23. * @ORM\Column(type="string", length=255)
  24. */
  25. private $phone;
  26. /**
  27. * @ORM\ManyToOne(targetEntity=CBpartner::class, inversedBy="c_bpartner_location")
  28. * @ORM\JoinColumn(referencedColumnName="c_bpartner_id", nullable=false)
  29. */
  30. private $c_bpartner;
  31. /**
  32. * @ORM\Column(type="integer")
  33. */
  34. private $c_bpartner_id;
  35. /**
  36. * @ORM\OneToOne(targetEntity=CLocation::class, cascade={"persist", "remove"})
  37. * @ORM\JoinColumn(referencedColumnName="c_location_id", nullable=false)
  38. */
  39. private $c_location;
  40. /**
  41. * @ORM\Column(type="integer")
  42. */
  43. private $c_location_id;
  44. /**
  45. * @ORM\OneToMany(targetEntity=COrder::class, mappedBy="c_bpartner_location")
  46. */
  47. private $c_order;
  48. /**
  49. * @ORM\Column(type="string", length=60)
  50. */
  51. private $name;
  52. /**
  53. * @ORM\Column(type="string", length=1)
  54. */
  55. private $isbillto;
  56. /**
  57. * @ORM\Column(type="string", length=1)
  58. */
  59. private $isshipto;
  60. public function __construct()
  61. {
  62. $this->c_order = new ArrayCollection();
  63. }
  64. public function getId(): ?int
  65. {
  66. return $this->getCBpartnerLocationId();
  67. }
  68. public function getCBpartnerLocationId(): ?int
  69. {
  70. return $this->c_bpartner_location_id;
  71. }
  72. public function setCBpartnerLocationId(int $c_bpartner_location_id): self
  73. {
  74. $this->c_bpartner_location_id = $c_bpartner_location_id;
  75. return $this;
  76. }
  77. public function getEmail(): ?string
  78. {
  79. return $this->email;
  80. }
  81. public function setEmail(string $email): self
  82. {
  83. $this->email = $email;
  84. return $this;
  85. }
  86. public function getPhone(): ?string
  87. {
  88. return $this->phone;
  89. }
  90. public function setPhone(string $phone): self
  91. {
  92. $this->phone = $phone;
  93. return $this;
  94. }
  95. public function getCBpartner(): ?CBpartner
  96. {
  97. return $this->c_bpartner;
  98. }
  99. public function setCBpartner(?CBpartner $c_bpartner): self
  100. {
  101. $this->c_bpartner = $c_bpartner;
  102. return $this;
  103. }
  104. public function getCBpartnerId(): ?int
  105. {
  106. return $this->c_bpartner_id;
  107. }
  108. public function setCBpartnerId(int $c_bpartner_id): self
  109. {
  110. $this->c_bpartner_id = $c_bpartner_id;
  111. return $this;
  112. }
  113. public function getCLocation(): ?CLocation
  114. {
  115. return $this->c_location;
  116. }
  117. public function setCLocation(CLocation $c_location): self
  118. {
  119. $this->c_location = $c_location;
  120. return $this;
  121. }
  122. public function getCLocationId(): ?int
  123. {
  124. return $this->c_location_id;
  125. }
  126. public function setCLocationId(int $c_location_id): self
  127. {
  128. $this->c_location_id = $c_location_id;
  129. return $this;
  130. }
  131. /**
  132. * @return Collection|COrder[]
  133. */
  134. public function getCOrder(): Collection
  135. {
  136. return $this->c_order;
  137. }
  138. public function getName(): ?string
  139. {
  140. return $this->name;
  141. }
  142. public function setName(string $name): self
  143. {
  144. $this->name = $name;
  145. return $this;
  146. }
  147. public function isBillTo(): ?bool
  148. {
  149. return $this->getIsbillto();
  150. }
  151. public function getIsbillto(): ?bool
  152. {
  153. return $this->isbillto === "Y";
  154. }
  155. public function setIsbillto(bool $isbillto): self
  156. {
  157. $this->isbillto = $isbillto ? "Y" : "N";
  158. return $this;
  159. }
  160. public function isShipTo(): ?bool
  161. {
  162. return $this-> getIsshipto();
  163. }
  164. public function getIsshipto(): ?bool
  165. {
  166. return $this->isshipto === "Y";
  167. }
  168. public function setIsshipto(bool $isshipto): self
  169. {
  170. $this->isshipto = $isshipto ? "Y" : "N";
  171. return $this;
  172. }
  173. }