<?php
declare(strict_types=1);
namespace App\Entity\System;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Table(name="customer_payment_method")
*
* @ORM\Entity(repositoryClass="App\Repository\System\CustomerPaymentMethodRepository")
*/
class CustomerPaymentMethod
{
/**
* @ORM\Id
*
* @ORM\GeneratedValue(strategy="AUTO")
*
* @ORM\Column(type="integer", name="id")
*/
private int $id;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\System\Customer", inversedBy="customerPaymentMethods")
*
* @ORM\JoinColumn(name="customer_id", referencedColumnName="id_customer", nullable=false)
*/
private Customer $customer;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\System\PaymentMethod", inversedBy="customerPaymentMethods")
*
* @ORM\JoinColumn(name="payment_method_id", referencedColumnName="id_payment_method", nullable=false)
*/
private PaymentMethod $paymentMethod;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private ?string $externalReference = null;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private ?string $externalMandateReference = null;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private ?string $externalEmailReference = null;
/**
* @ORM\Column(name="date_add", type="datetime")
*/
private \DateTime $dateAdd;
/**
* @ORM\Column(name="date_upd", type="datetime", nullable=true)
*/
private ?\DateTime $dateUpd = null;
/**
* @ORM\Column(name="active", type="boolean", options={"default" : 1})
*/
private bool $active;
public function __construct()
{
$this->dateAdd = new \DateTime();
}
public function getId(): int
{
return $this->id;
}
public function getCustomer(): ?Customer
{
return $this->customer;
}
public function setCustomer(?Customer $customer): self
{
$this->customer = $customer;
return $this;
}
public function getPaymentMethod(): PaymentMethod
{
return $this->paymentMethod;
}
public function setPaymentMethod(PaymentMethod $paymentMethod): self
{
$this->paymentMethod = $paymentMethod;
return $this;
}
public function getExternalReference(): ?string
{
return $this->externalReference;
}
public function setExternalReference(?string $externalReference = null): self
{
$this->externalReference = $externalReference;
return $this;
}
public function getExternalMandateReference(): ?string
{
return $this->externalMandateReference;
}
public function setExternalMandateReference(?string $externalMandateReference = null): self
{
$this->externalMandateReference = $externalMandateReference;
return $this;
}
public function getExternalEmailReference(): ?string
{
return $this->externalEmailReference;
}
public function setExternalEmailReference(?string $externalEmailReference = null): self
{
$this->externalEmailReference = $externalEmailReference;
return $this;
}
public function isActive(): bool
{
return $this->active;
}
public function setActive(bool $active): self
{
$this->active = $active;
return $this;
}
public function getDateAdd(): \DateTime
{
return $this->dateAdd;
}
public function setDateAdd(?\DateTime $dateAdd): self
{
$this->dateAdd = $dateAdd;
return $this;
}
public function getDateUpd(): ?\DateTime
{
return $this->dateUpd;
}
public function setDateUpd(?\DateTime $dateUpd): self
{
$this->dateUpd = $dateUpd;
return $this;
}
}