src/Entity/BankAccount.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\BankAccountRepository;
  4. use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  7. use Symfony\Component\Serializer\Annotation\Ignore;
  8. /**
  9.  * @ORM\Entity(repositoryClass=BankAccountRepository::class)
  10.  * UniqueEntity(fields={"label"}, message="Ce compte bancaire existe déjà.")
  11.  * @Auditable()
  12.  */
  13. class BankAccount
  14. {
  15.     /**
  16.      * @ORM\Id
  17.      * @ORM\GeneratedValue
  18.      * @ORM\Column(type="integer")
  19.      */
  20.     private $id;
  21.     /**
  22.      * @ORM\Column(type="string", length=255)
  23.      */
  24.     private $label;
  25.     /**
  26.      * @ORM\Column(type="string", length=255)
  27.      */
  28.     private $number;
  29.     /**
  30.      * @ORM\ManyToOne(targetEntity=Currency::class)
  31.      */
  32.     private $currency;
  33.     /**
  34.      * @ORM\ManyToOne(targetEntity=Bank::class, inversedBy="bankAccounts")
  35.      */
  36.     private $bank;
  37.     /**
  38.      * @ORM\Column(type="integer")
  39.      */
  40.     private $status;
  41.     /**
  42.      * @ORM\Column(type="boolean", nullable=true)
  43.      */
  44.     private $isDeleted;
  45.     /**
  46.      * @Ignore()
  47.      * @ORM\ManyToOne(targetEntity=Users::class)
  48.      */
  49.     private $userCreate;
  50.     /**
  51.      * @ORM\Column(type="datetime", nullable=true)
  52.      */
  53.     private $dateCreate;
  54.     /**
  55.      * @Ignore()
  56.      * @ORM\ManyToOne(targetEntity=Users::class)
  57.      */
  58.     private $userUpdate;
  59.     /**
  60.      * @ORM\Column(type="datetime", nullable=true)
  61.      */
  62.     private $dateUpdate;
  63.     public function getId(): ?int
  64.     {
  65.         return $this->id;
  66.     }
  67.     public function getLabel(): ?string
  68.     {
  69.         return $this->label;
  70.     }
  71.     public function setLabel(string $label): self
  72.     {
  73.         $this->label $label;
  74.         return $this;
  75.     }
  76.     public function getNumber(): ?string
  77.     {
  78.         return $this->number;
  79.     }
  80.     public function setNumber(string $number): self
  81.     {
  82.         $this->number $number;
  83.         return $this;
  84.     }
  85.     public function getCurrency(): ?Currency
  86.     {
  87.         return $this->currency;
  88.     }
  89.     public function setCurrency(?Currency $currency): self
  90.     {
  91.         $this->currency $currency;
  92.         return $this;
  93.     }
  94.     public function getBank(): ?Bank
  95.     {
  96.         return $this->bank;
  97.     }
  98.     public function setBank(?Bank $bank): self
  99.     {
  100.         $this->bank $bank;
  101.         return $this;
  102.     }
  103.     public function getStatus(): ?int
  104.     {
  105.         return $this->status;
  106.     }
  107.     public function setStatus(int $status): self
  108.     {
  109.         $this->status $status;
  110.         return $this;
  111.     }
  112.     public function getIsDeleted(): ?bool
  113.     {
  114.         return $this->isDeleted;
  115.     }
  116.     public function setIsDeleted(?bool $isDeleted): self
  117.     {
  118.         $this->isDeleted $isDeleted;
  119.         return $this;
  120.     }
  121.      /**
  122.      * @Ignore()
  123.      */
  124.     public function getUserCreate(): ?Users
  125.     {
  126.         return $this->userCreate;
  127.     }
  128.     public function setUserCreate(?Users $userCreate): self
  129.     {
  130.         $this->userCreate $userCreate;
  131.         return $this;
  132.     }
  133.     public function getDateCreate(): ?\DateTimeInterface
  134.     {
  135.         return $this->dateCreate;
  136.     }
  137.     public function setDateCreate(?\DateTimeInterface $dateCreate): self
  138.     {
  139.         $this->dateCreate $dateCreate;
  140.         return $this;
  141.     }
  142.      /**
  143.      * @Ignore()
  144.      */
  145.     public function getUserUpdate(): ?Users
  146.     {
  147.         return $this->userUpdate;
  148.     }
  149.     public function setUserUpdate(?Users $userUpdate): self
  150.     {
  151.         $this->userUpdate $userUpdate;
  152.         return $this;
  153.     }
  154.     public function getDateUpdate(): ?\DateTimeInterface
  155.     {
  156.         return $this->dateUpdate;
  157.     }
  158.     public function setDateUpdate(?\DateTimeInterface $dateUpdate): self
  159.     {
  160.         $this->dateUpdate $dateUpdate;
  161.         return $this;
  162.     }
  163. }