<?php
namespace App\Entity\System;
use Doctrine\ORM\Mapping as ORM;
/**
* CatalogCustomer
*
* @ORM\Table(name="customer_catalog",
* indexes={
*
* @ORM\Index(name="catalog_id", columns={"catalog_id"}),
* @ORM\Index(name="customer_id", columns={"customer_id"}),
* @ORM\Index(name="date_add", columns={"date_add"})
* }
* ,uniqueConstraints={@ORM\UniqueConstraint(name="customer_catalog_idx", columns={"catalog_id", "customer_id"})}
* )
*
* @ORM\Entity(repositoryClass="App\Repository\System\CustomerCatalogRepository")
*/
class CustomerCatalog
{
/**
* @var int
*
* @ORM\Id
*
* @ORM\GeneratedValue(strategy="AUTO")
*
* @ORM\Column(type="integer")
*/
private $id;
/**
* @var Catalog
*
* @ORM\ManyToOne(targetEntity="App\Entity\System\Catalog", inversedBy="customerCatalogs")
*
* @ORM\JoinColumn(nullable=false, name="catalog_id", referencedColumnName="id")
*/
private $catalog;
/**
* @var Customer
*
* @ORM\ManyToOne(targetEntity="App\Entity\System\Customer" , inversedBy="customerCatalogs")
*
* @ORM\JoinColumn(nullable=false, name="customer_id", referencedColumnName="id_customer")
*/
private $customer;
/**
* @var \DateTime
*
* @ORM\Column(type="datetime")
*/
private $dateAdd;
/**
* @return int
*/
public function getId(): int
{
return $this->id;
}
/**
* @param int $id
*
* @return CustomerCatalog
*/
public function setId(int $id): self
{
$this->id = $id;
return $this;
}
/**
* @return Catalog
*/
public function getCatalog(): Catalog
{
return $this->catalog;
}
/**
* @param Catalog $catalog
*
* @return CustomerCatalog
*/
public function setCatalog(Catalog $catalog): self
{
$this->catalog = $catalog;
return $this;
}
/**
* @return Customer
*/
public function getCustomer(): Customer
{
return $this->customer;
}
/**
* @param Customer $customer
*
* @return CustomerCatalog
*/
public function setCustomer(Customer $customer): self
{
$this->customer = $customer;
return $this;
}
/**
* @return \DateTime
*/
public function getDateAdd(): \DateTime
{
return $this->dateAdd;
}
/**
* @param \DateTime $dateAdd
*
* @return CustomerCatalog
*/
public function setDateAdd(\DateTime $dateAdd): self
{
$this->dateAdd = $dateAdd;
return $this;
}
}