src/Entity/System/CustomerCatalog.php line 22

Open in your IDE?
  1. <?php
  2. namespace App\Entity\System;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5. * CatalogCustomer
  6. *
  7. * @ORM\Table(name="customer_catalog",
  8. * indexes={
  9. *
  10. * @ORM\Index(name="catalog_id", columns={"catalog_id"}),
  11. * @ORM\Index(name="customer_id", columns={"customer_id"}),
  12. * @ORM\Index(name="date_add", columns={"date_add"})
  13. * }
  14. * ,uniqueConstraints={@ORM\UniqueConstraint(name="customer_catalog_idx", columns={"catalog_id", "customer_id"})}
  15. * )
  16. *
  17. * @ORM\Entity(repositoryClass="App\Repository\System\CustomerCatalogRepository")
  18. */
  19. class CustomerCatalog
  20. {
  21. /**
  22. * @var int
  23. *
  24. * @ORM\Id
  25. *
  26. * @ORM\GeneratedValue(strategy="AUTO")
  27. *
  28. * @ORM\Column(type="integer")
  29. */
  30. private $id;
  31. /**
  32. * @var Catalog
  33. *
  34. * @ORM\ManyToOne(targetEntity="App\Entity\System\Catalog", inversedBy="customerCatalogs")
  35. *
  36. * @ORM\JoinColumn(nullable=false, name="catalog_id", referencedColumnName="id")
  37. */
  38. private $catalog;
  39. /**
  40. * @var Customer
  41. *
  42. * @ORM\ManyToOne(targetEntity="App\Entity\System\Customer" , inversedBy="customerCatalogs")
  43. *
  44. * @ORM\JoinColumn(nullable=false, name="customer_id", referencedColumnName="id_customer")
  45. */
  46. private $customer;
  47. /**
  48. * @var \DateTime
  49. *
  50. * @ORM\Column(type="datetime")
  51. */
  52. private $dateAdd;
  53. /**
  54. * @return int
  55. */
  56. public function getId(): int
  57. {
  58. return $this->id;
  59. }
  60. /**
  61. * @param int $id
  62. *
  63. * @return CustomerCatalog
  64. */
  65. public function setId(int $id): self
  66. {
  67. $this->id = $id;
  68. return $this;
  69. }
  70. /**
  71. * @return Catalog
  72. */
  73. public function getCatalog(): Catalog
  74. {
  75. return $this->catalog;
  76. }
  77. /**
  78. * @param Catalog $catalog
  79. *
  80. * @return CustomerCatalog
  81. */
  82. public function setCatalog(Catalog $catalog): self
  83. {
  84. $this->catalog = $catalog;
  85. return $this;
  86. }
  87. /**
  88. * @return Customer
  89. */
  90. public function getCustomer(): Customer
  91. {
  92. return $this->customer;
  93. }
  94. /**
  95. * @param Customer $customer
  96. *
  97. * @return CustomerCatalog
  98. */
  99. public function setCustomer(Customer $customer): self
  100. {
  101. $this->customer = $customer;
  102. return $this;
  103. }
  104. /**
  105. * @return \DateTime
  106. */
  107. public function getDateAdd(): \DateTime
  108. {
  109. return $this->dateAdd;
  110. }
  111. /**
  112. * @param \DateTime $dateAdd
  113. *
  114. * @return CustomerCatalog
  115. */
  116. public function setDateAdd(\DateTime $dateAdd): self
  117. {
  118. $this->dateAdd = $dateAdd;
  119. return $this;
  120. }
  121. }