src/Entity/DealerBank.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\DealerBankRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6. * @ORM\Entity(repositoryClass=DealerBankRepository::class)
  7. * @ORM\EntityListeners({"App\Listener\EntityListener"})
  8. */
  9. class DealerBank
  10. {
  11. /**
  12. * @ORM\Id
  13. * @ORM\GeneratedValue
  14. * @ORM\Column(type="integer")
  15. */
  16. private $id;
  17. /**
  18. * @ORM\ManyToOne(targetEntity=Dealer::class, inversedBy="banks", cascade={"persist"})
  19. * @ORM\JoinColumn(nullable=false)
  20. */
  21. private $dealer;
  22. /**
  23. * @ORM\Column(type="string", length=255, nullable=true)
  24. */
  25. private $name;
  26. /**
  27. * @ORM\Column(type="string", length=255, nullable=true)
  28. */
  29. private $number;
  30. /**
  31. * @ORM\Column(type="string", length=10, nullable=true)
  32. */
  33. private $code;
  34. /**
  35. * @ORM\Column(type="string", length=255, nullable=true)
  36. */
  37. private $swift;
  38. /**
  39. * @ORM\Column(type="string", length=255, nullable=true)
  40. */
  41. private $iban;
  42. /**
  43. * @ORM\Column(type="string", length=3)
  44. */
  45. private $currency;
  46. /**
  47. * @ORM\Column(type="datetime")
  48. */
  49. private $createts;
  50. /**
  51. * @ORM\ManyToOne(targetEntity="App\Entity\User")
  52. * @ORM\JoinColumn(nullable=false)
  53. */
  54. private $createUser;
  55. /**
  56. * @ORM\Column(type="datetime", nullable=true)
  57. */
  58. private $editts;
  59. /**
  60. * @ORM\ManyToOne(targetEntity="App\Entity\User")
  61. */
  62. private $editUser;
  63. public function __construct($currency = null)
  64. {
  65. if(!empty($currency)){
  66. $this->setCurrency($currency);
  67. }
  68. }
  69. public function getId(): ?int
  70. {
  71. return $this->id;
  72. }
  73. public function getDealer(): ?Dealer
  74. {
  75. return $this->dealer;
  76. }
  77. public function setDealer(?Dealer $dealer): self
  78. {
  79. $this->dealer = $dealer;
  80. return $this;
  81. }
  82. public function getName(): ?string
  83. {
  84. return $this->name;
  85. }
  86. public function setName(string $name): self
  87. {
  88. $this->name = $name;
  89. return $this;
  90. }
  91. public function getNumber(): ?string
  92. {
  93. return $this->number;
  94. }
  95. public function setNumber(string $number): self
  96. {
  97. $this->number = $number;
  98. return $this;
  99. }
  100. public function getCode(): ?string
  101. {
  102. return $this->code;
  103. }
  104. public function setCode(string $code): self
  105. {
  106. $this->code = $code;
  107. return $this;
  108. }
  109. public function getSwift(): ?string
  110. {
  111. return $this->swift;
  112. }
  113. public function setSwift(string $swift): self
  114. {
  115. $this->swift = $swift;
  116. return $this;
  117. }
  118. public function getIban(): ?string
  119. {
  120. return $this->iban;
  121. }
  122. public function setIban(string $iban): self
  123. {
  124. $this->iban = $iban;
  125. return $this;
  126. }
  127. public function getCurrency(): ?string
  128. {
  129. return $this->currency;
  130. }
  131. public function setCurrency(string $currency): self
  132. {
  133. $this->currency = $currency;
  134. return $this;
  135. }
  136. /**
  137. * Get Createts
  138. *
  139. * @return mixed
  140. */
  141. public function getCreatets()
  142. {
  143. return $this->createts;
  144. }
  145. /**
  146. * Set Createts
  147. *
  148. * @param mixed $createts
  149. */
  150. public function setCreatets( $createts )
  151. {
  152. $this->createts = $createts;
  153. }
  154. /**
  155. * Get CreateUser
  156. *
  157. * @return mixed
  158. */
  159. public function getCreateUser()
  160. {
  161. return $this->createUser;
  162. }
  163. /**
  164. * Set CreateUser
  165. *
  166. * @param mixed $createUser
  167. */
  168. public function setCreateUser( $createUser )
  169. {
  170. $this->createUser = $createUser;
  171. }
  172. /**
  173. * Get Editts
  174. *
  175. * @return mixed
  176. */
  177. public function getEditts()
  178. {
  179. return $this->editts;
  180. }
  181. /**
  182. * Set Editts
  183. *
  184. * @param mixed $editts
  185. */
  186. public function setEditts( $editts )
  187. {
  188. $this->editts = $editts;
  189. }
  190. /**
  191. * Get EditUser
  192. *
  193. * @return mixed
  194. */
  195. public function getEditUser()
  196. {
  197. return $this->editUser;
  198. }
  199. /**
  200. * Set EditUser
  201. *
  202. * @param mixed $editUser
  203. */
  204. public function setEditUser( $editUser )
  205. {
  206. $this->editUser = $editUser;
  207. }
  208. }