Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318
  1. <?php
  2. namespace Lc\ShopBundle\Model;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5. * @ORM\MappedSuperclass()
  6. */
  7. abstract class Address extends AbstractEntity
  8. {
  9. /**
  10. * @ORM\ManyToOne(targetEntity="Lc\ShopBundle\Context\UserInterface", inversedBy="addresses")
  11. * @ORM\JoinColumn(nullable=true)
  12. */
  13. protected $user;
  14. /**
  15. * @ORM\Column(type="string", length=255)
  16. */
  17. protected $title;
  18. /**
  19. * @ORM\Column(type="string", length=31)
  20. */
  21. protected $type;
  22. /**
  23. * @ORM\Column(type="boolean", nullable=true)
  24. */
  25. protected $civility;
  26. /**
  27. * @ORM\Column(type="string", length=127, nullable=true)
  28. */
  29. protected $lastname;
  30. /**
  31. * @ORM\Column(type="string", length=127, nullable=true)
  32. */
  33. protected $firstname;
  34. /**
  35. * @ORM\Column(type="text")
  36. */
  37. protected $address;
  38. /**
  39. * @ORM\Column(type="string", length=31)
  40. */
  41. protected $zip;
  42. /**
  43. * @ORM\Column(type="string", length=255)
  44. */
  45. protected $city;
  46. /**
  47. * @ORM\Column(type="string", length=255)
  48. */
  49. protected $country;
  50. /**
  51. * @ORM\Column(type="string", length=255, nullable=true)
  52. */
  53. protected $company;
  54. /**
  55. * @ORM\Column(type="string", length=127, nullable=true)
  56. */
  57. protected $siret;
  58. /**
  59. * @ORM\Column(type="string", length=127, nullable=true)
  60. */
  61. protected $tva;
  62. /**
  63. * @ORM\Column(type="string", length=127, nullable=true)
  64. */
  65. protected $phone;
  66. /**
  67. * @ORM\Column(type="text", nullable=true)
  68. */
  69. protected $comment;
  70. /**
  71. * @ORM\OneToOne(targetEntity="Lc\ShopBundle\Context\PointSaleInterface", mappedBy="address", cascade={"persist", "remove"})
  72. */
  73. protected $pointSale;
  74. /**
  75. * @ORM\OneToOne(targetEntity="Lc\ShopBundle\Context\MerchantInterface", mappedBy="address", cascade={"persist", "remove"})
  76. */
  77. protected $merchant;
  78. public function __toString()
  79. {
  80. return $this->getTitle() ;
  81. }
  82. public function getUser(): ?User
  83. {
  84. return $this->user;
  85. }
  86. public function setUser(?User $user): self
  87. {
  88. $this->user = $user;
  89. return $this;
  90. }
  91. public function getTitle(): ?string
  92. {
  93. return $this->title;
  94. }
  95. public function setTitle(string $title): self
  96. {
  97. $this->title = $title;
  98. return $this;
  99. }
  100. public function getType(): ?string
  101. {
  102. return $this->type;
  103. }
  104. public function setType(string $type): self
  105. {
  106. $this->type = $type;
  107. return $this;
  108. }
  109. public function getCivility(): ?bool
  110. {
  111. return $this->civility;
  112. }
  113. public function setCivility(?bool $civility): self
  114. {
  115. $this->civility = $civility;
  116. return $this;
  117. }
  118. public function getLastname(): ?string
  119. {
  120. return $this->lastname;
  121. }
  122. public function setLastname(?string $lastname): self
  123. {
  124. $this->lastname = $lastname;
  125. return $this;
  126. }
  127. public function getFirstname(): ?string
  128. {
  129. return $this->firstname;
  130. }
  131. public function setFirstname(?string $firstname): self
  132. {
  133. $this->firstname = $firstname;
  134. return $this;
  135. }
  136. public function getAddress(): ?string
  137. {
  138. return $this->address;
  139. }
  140. public function setAddress(string $address): self
  141. {
  142. $this->address = $address;
  143. return $this;
  144. }
  145. public function getZip(): ?string
  146. {
  147. return $this->zip;
  148. }
  149. public function setZip(string $zip): self
  150. {
  151. $this->zip = $zip;
  152. return $this;
  153. }
  154. public function getCity(): ?string
  155. {
  156. return $this->city;
  157. }
  158. public function setCity(string $city): self
  159. {
  160. $this->city = $city;
  161. return $this;
  162. }
  163. public function getCountry(): ?string
  164. {
  165. return $this->country;
  166. }
  167. public function setCountry(string $country): self
  168. {
  169. $this->country = $country;
  170. return $this;
  171. }
  172. public function getCompany(): ?string
  173. {
  174. return $this->company;
  175. }
  176. public function setCompany(?string $company): self
  177. {
  178. $this->company = $company;
  179. return $this;
  180. }
  181. public function getSiret(): ?string
  182. {
  183. return $this->siret;
  184. }
  185. public function setSiret(?string $siret): self
  186. {
  187. $this->siret = $siret;
  188. return $this;
  189. }
  190. public function getTva(): ?string
  191. {
  192. return $this->tva;
  193. }
  194. public function setTva(?string $tva): self
  195. {
  196. $this->tva = $tva;
  197. return $this;
  198. }
  199. public function getPhone(): ?string
  200. {
  201. return $this->phone;
  202. }
  203. public function setPhone(?string $phone): self
  204. {
  205. $this->phone = $phone;
  206. return $this;
  207. }
  208. public function getComment(): ?string
  209. {
  210. return $this->comment;
  211. }
  212. public function setComment(?string $comment): self
  213. {
  214. $this->comment = $comment;
  215. return $this;
  216. }
  217. public function getPointSale(): ?PointSale
  218. {
  219. return $this->pointSale;
  220. }
  221. public function setPointSale(PointSale $pointSale): self
  222. {
  223. $this->pointSale = $pointSale;
  224. // set the owning side of the relation if necessary
  225. if ($pointSale->getAddress() !== $this) {
  226. $pointSale->setAddress($this);
  227. }
  228. return $this;
  229. }
  230. public function getMerchant(): ?Merchant
  231. {
  232. return $this->merchant;
  233. }
  234. public function setMerchant(Merchant $merchant): self
  235. {
  236. $this->merchant = $merchant;
  237. // set the owning side of the relation if necessary
  238. if ($merchant->getAddress() !== $this) {
  239. $merchant->setAddress($this);
  240. }
  241. return $this;
  242. }
  243. }