src/Entity/Transaction.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * @ORM\Table(name="`transaction`")
  6.  * @ORM\Entity(repositoryClass="App\Repository\TransactionRepository")
  7.  */
  8. class Transaction
  9. {
  10.     /**
  11.      * @ORM\Id()
  12.      * @ORM\GeneratedValue()
  13.      * @ORM\Column(type="integer")
  14.      */
  15.     private $id;
  16.     /**
  17.      * @ORM\Column(type="datetime", nullable=true)
  18.      */
  19.     private $date_transaction;
  20.     /**
  21.      * @ORM\Column(type="string", length=255, nullable=true)
  22.      */
  23.     private $notification;
  24.     /**
  25.      * @ORM\ManyToOne(targetEntity="App\Entity\SousJacent", inversedBy="transactions")
  26.      */
  27.     private $sous_jacent;
  28.     /**
  29.      * @ORM\ManyToOne(targetEntity="App\Entity\Products", inversedBy="transactions")
  30.      */
  31.     private $filiere;
  32.     /**
  33.      * @ORM\Column(type="string", length=255, nullable=true)
  34.      */
  35.     private $total_paa;
  36.     /**
  37.      * @ORM\ManyToOne(targetEntity="App\Entity\Devise", inversedBy="transactions")
  38.      */
  39.     private $total_unite;
  40.     /**
  41.      * @ORM\Column(type="string", length=255, nullable=true)
  42.      */
  43.     private $ca_prev;
  44.     /**
  45.      * @ORM\ManyToOne(targetEntity="App\Entity\Devise")
  46.      */
  47.     private $ca_unite;
  48.     /**
  49.      * @ORM\Column(type="string", length=255, nullable=true)
  50.      */
  51.     private $courtage;
  52.     /**
  53.      * @ORM\ManyToOne(targetEntity="App\Entity\Devise")
  54.      */
  55.     private $courtage_unite;
  56.     /**
  57.      * @ORM\Column(type="string", length=255, nullable=true)
  58.      */
  59.     private $apm_prev;
  60.     /**
  61.      * @ORM\ManyToOne(targetEntity="App\Entity\Devise")
  62.      */
  63.     private $apm_unite;
  64.     
  65.     /**
  66.      * @ORM\Column(type="datetime")
  67.      */
  68.     private $created_at;
  69.     /**
  70.      * @ORM\ManyToOne(targetEntity="App\Entity\AdminDonneurOrdre", inversedBy="transactions")
  71.      */
  72.     private $vendeur;
  73.     /**
  74.      * @ORM\ManyToOne(targetEntity="App\Entity\Status", inversedBy="transactions")
  75.      */
  76.     private $status;
  77.     /**
  78.      * @ORM\ManyToOne(targetEntity="App\Entity\Duree", inversedBy="transactions")
  79.      */
  80.     private $duree;
  81.     /**
  82.      * @ORM\ManyToOne(targetEntity="App\Entity\Niveau", inversedBy="transactions")
  83.      */
  84.     private $niveau;
  85.     /**
  86.      * @ORM\ManyToOne(targetEntity="App\Entity\TypeContrat", inversedBy="transactions")
  87.      */
  88.     private $type_contrat;
  89.     /**
  90.      * @ORM\ManyToOne(targetEntity="App\Entity\Unite", inversedBy="transactions_unite")
  91.      */
  92.     private $unite_paa;
  93.     public function __construct(){
  94.         $this->created_at = new \DateTime('now');
  95.         if (!isset($this->notification)){
  96.             $this->notification 'CD'.random_int(1,900).date('s');
  97.         }else{
  98.             $this->notification 'CD'.random_int(1,900).date('s');
  99.         }
  100.     }
  101.     public function getId(): ?int
  102.     {
  103.         return $this->id;
  104.     }
  105.     public function getDateTransaction(): ?\DateTimeInterface
  106.     {
  107.         return $this->date_transaction;
  108.     }
  109.     public function setDateTransaction(?\DateTimeInterface $date_transaction): self
  110.     {
  111.         $this->date_transaction $date_transaction;
  112.         return $this;
  113.     }
  114.     public function getNotification(): ?string
  115.     {
  116.         return $this->notification;
  117.     }
  118.     public function setNotification(?string $notification): self
  119.     {
  120.         $this->notification $notification;
  121.         return $this;
  122.     }
  123.     
  124.     public function getDuree(): ?Duree
  125.     {
  126.         return $this->duree;
  127.     }
  128.     public function setDuree(?Duree $duree): self
  129.     {
  130.         $this->duree $duree;
  131.         return $this;
  132.     }
  133.     public function getSousJacent(): ?SousJacent
  134.     {
  135.         return $this->sous_jacent;
  136.     }
  137.     public function setSousJacent(?SousJacent $sous_jacent): self
  138.     {
  139.         $this->sous_jacent $sous_jacent;
  140.         return $this;
  141.     }
  142.     public function getFiliere(): ?Products
  143.     {
  144.         return $this->filiere;
  145.     }
  146.     public function setFiliere(?Products $filiere): self
  147.     {
  148.         $this->filiere $filiere;
  149.         return $this;
  150.     }
  151.     
  152.     public function getTotalPaa(): ?string
  153.     {
  154.         return $this->total_paa;
  155.     }
  156.     public function setTotalPaa(?string $total_paa): self
  157.     {
  158.         $this->total_paa $total_paa;
  159.         return $this;
  160.     }
  161.     public function getTotalUnite(): ?Devise
  162.     {
  163.         return $this->total_unite;
  164.     }
  165.     public function setTotalUnite(?Devise $total_unite): self
  166.     {
  167.         $this->total_unite $total_unite;
  168.         return $this;
  169.     }
  170.     public function getCaPrev(): ?string
  171.     {
  172.         return $this->ca_prev;
  173.     }
  174.     public function setCaPrev(?string $ca_prev): self
  175.     {
  176.         $this->ca_prev $ca_prev;
  177.         return $this;
  178.     }
  179.     public function getCaUnite(): ?Devise
  180.     {
  181.         return $this->ca_unite;
  182.     }
  183.     public function setCaUnite(?Devise $ca_unite): self
  184.     {
  185.         $this->ca_unite $ca_unite;
  186.         return $this;
  187.     }
  188.     public function getCourtage(): ?string
  189.     {
  190.         return $this->courtage;
  191.     }
  192.     public function setCourtage(?string $courtage): self
  193.     {
  194.         $this->courtage $courtage;
  195.         return $this;
  196.     }
  197.     public function getCourtageUnite(): ?Devise
  198.     {
  199.         return $this->courtage_unite;
  200.     }
  201.     public function setCourtageUnite(?Devise $courtage_unite): self
  202.     {
  203.         $this->courtage_unite $courtage_unite;
  204.         return $this;
  205.     }
  206.     public function getApmPrev(): ?string
  207.     {
  208.         return $this->apm_prev;
  209.     }
  210.     public function setApmPrev(?string $apm_prev): self
  211.     {
  212.         $this->apm_prev $apm_prev;
  213.         return $this;
  214.     }
  215.     public function getApmUnite(): ?Devise
  216.     {
  217.         return $this->apm_unite;
  218.     }
  219.     public function setApmUnite(?Devise $apm_unite): self
  220.     {
  221.         $this->apm_unite $apm_unite;
  222.         return $this;
  223.     }
  224.     public function getStatus(): ?Status
  225.     {
  226.         return $this->status;
  227.     }
  228.     public function setStatus(?Status $status): self
  229.     {
  230.         $this->status $status;
  231.         return $this;
  232.     }
  233.     public function getCreatedAt(): ?\DateTimeInterface
  234.     {
  235.         return $this->created_at;
  236.     }
  237.     public function setCreatedAt(\DateTimeInterface $created_at): self
  238.     {
  239.         $this->created_at $created_at;
  240.         return $this;
  241.     }
  242.     public function getVendeur(): ?AdminDonneurOrdre
  243.     {
  244.         return $this->vendeur;
  245.     }
  246.     public function setVendeur(?AdminDonneurOrdre $vendeur): self
  247.     {
  248.         $this->vendeur $vendeur;
  249.         return $this;
  250.     }
  251.     public function getNiveau(): ?Niveau
  252.     {
  253.         return $this->niveau;
  254.     }
  255.     public function setNiveau(?Niveau $niveau): self
  256.     {
  257.         $this->niveau $niveau;
  258.         return $this;
  259.     }
  260.     public function getTypeContrat(): ?TypeContrat
  261.     {
  262.         return $this->type_contrat;
  263.     }
  264.     public function setTypeContrat(?TypeContrat $type_contrat): self
  265.     {
  266.         $this->type_contrat $type_contrat;
  267.         return $this;
  268.     }
  269.     public function getUnitePaa(): ?Unite
  270.     {
  271.         return $this->unite_paa;
  272.     }
  273.     public function setUnitePaa(?Unite $unite_paa): self
  274.     {
  275.         $this->unite_paa $unite_paa;
  276.         return $this;
  277.     }
  278. }