src/Entity/AppelDeMarge.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * @ORM\Entity(repositoryClass="App\Repository\AppelDeMargeRepository")
  6.  */
  7. class AppelDeMarge
  8. {
  9.     /**
  10.      * @ORM\Id()
  11.      * @ORM\GeneratedValue()
  12.      * @ORM\Column(type="integer")
  13.      */
  14.     private $id;
  15.     /**
  16.      * @ORM\Column(type="datetime",nullable=true)
  17.      */
  18.     private $mois;
  19.     /**
  20.      * @ORM\Column(type="string", length=255, nullable=true)
  21.      */
  22.     private $ref_op;
  23.     /**
  24.      * @ORM\Column(type="string", length=255, nullable=true)
  25.      */
  26.     private $mandant;
  27.     /**
  28.      * @ORM\Column(type="string", length=255, nullable=true)
  29.      */
  30.     private $volume;
  31.     /**
  32.      * @ORM\Column(type="string", length=255, nullable=true)
  33.      */
  34.     private $montant_transaction;
  35.     /**
  36.      * @ORM\Column(type="string", length=255, nullable=true)
  37.      */
  38.     private $taux;
  39.     /**
  40.      * @ORM\Column(type="string", length=255, nullable=true)
  41.      */
  42.     private $frais_de_courtage;
  43.     /**
  44.      * @ORM\Column(type="datetime")
  45.      */
  46.     private $created_at;
  47.     /**
  48.      * @ORM\ManyToOne(targetEntity="App\Entity\Status", inversedBy="appelDeMarges")
  49.      */
  50.     private $status;
  51.     /**
  52.      * @ORM\ManyToOne(targetEntity="App\Entity\Incoterm", inversedBy="appelDeMarges")
  53.      */
  54.     private $base;
  55.     /**
  56.      * @ORM\ManyToOne(targetEntity="App\Entity\SousJacent", inversedBy="appelDeMarges")
  57.      */
  58.     private $sous_jacent;
  59.     /**
  60.      * @ORM\ManyToOne(targetEntity="App\Entity\Unite", inversedBy="appelDeMarges")
  61.      */
  62.     private $unite;
  63.     /**
  64.      * @ORM\ManyToOne(targetEntity="App\Entity\Products", inversedBy="appelDeMarges")
  65.      */
  66.     private $filiere;
  67.     /**
  68.      * @ORM\ManyToOne(targetEntity="App\Entity\Devise", inversedBy="appelDeMarges")
  69.      */
  70.     private $devise;
  71.     /**
  72.      * @ORM\ManyToOne(targetEntity="App\Entity\Devise", inversedBy="appelDeMargeDeviseMontant")
  73.      */
  74.     private $dvise_montant;
  75.     /**
  76.      * @ORM\ManyToOne(targetEntity="App\Entity\Devise", inversedBy="applDeMargeStrike")
  77.      */
  78.     private $strike_devise;
  79.     /**
  80.      * @ORM\ManyToOne(targetEntity="App\Entity\Client", inversedBy="appelDeMarges")
  81.      */
  82.     private $client;
  83.     /**
  84.      * @ORM\Column(type="string", length=255, nullable=true)
  85.      */
  86.     private $objet;
  87.     /**
  88.      * @ORM\Column(type="string", length=255, nullable=true)
  89.      */
  90.     private $qte;
  91.     /**
  92.      * @ORM\Column(type="string", length=255, nullable=true)
  93.      */
  94.     private $designation;
  95.     /**
  96.      * @ORM\Column(type="string", length=255, nullable=true)
  97.      */
  98.     private $montant_commisionne;
  99.     /**
  100.      * @ORM\ManyToOne(targetEntity="App\Entity\Devise")
  101.      */
  102.     private $devise_montant;
  103.     /**
  104.      * @ORM\Column(type="string", length=255, nullable=true)
  105.      */
  106.     private $ca_net;
  107.     /**
  108.      * @ORM\ManyToOne(targetEntity="App\Entity\Devise")
  109.      */
  110.     private $devise_ca_net;
  111.     public function __construct(){
  112.         $this->created_at = new \DateTime('now');
  113.         if (!isset($this->ref_op)){
  114.             $this->ref_op 'APDM'.random_int(10,900).date('s');
  115.         }else{
  116.             $this->ref_op 'APDM'.random_int(10,900).date('s');
  117.         }
  118.     }
  119.     public function getId(): ?int
  120.     {
  121.         return $this->id;
  122.     }
  123.     public function getMois(): ?\DateTimeInterface
  124.     {
  125.         return $this->mois;
  126.     }
  127.     public function setMois(\DateTimeInterface $mois): self
  128.     {
  129.         $this->mois $mois;
  130.         return $this;
  131.     }
  132.     public function getRefOp(): ?string
  133.     {
  134.         return $this->ref_op;
  135.     }
  136.     public function setRefOp(?string $ref_op): self
  137.     {
  138.         $this->ref_op $ref_op;
  139.         return $this;
  140.     }
  141.     public function getMandant(): ?string
  142.     {
  143.         return $this->mandant;
  144.     }
  145.     public function setMandant(string $mandant): self
  146.     {
  147.         $this->mandant $mandant;
  148.         return $this;
  149.     }
  150.     public function getVolume(): ?string
  151.     {
  152.         return $this->volume;
  153.     }
  154.     public function setVolume(string $volume): self
  155.     {
  156.         $this->volume $volume;
  157.         return $this;
  158.     }
  159.     public function getMontantTransaction(): ?string
  160.     {
  161.         return $this->montant_transaction;
  162.     }
  163.     public function setMontantTransaction(string $montant_transaction): self
  164.     {
  165.         $this->montant_transaction $montant_transaction;
  166.         return $this;
  167.     }
  168.     public function getTaux(): ?string
  169.     {
  170.         return $this->taux;
  171.     }
  172.     public function setTaux(string $taux): self
  173.     {
  174.         $this->taux $taux;
  175.         return $this;
  176.     }
  177.     public function getFraisDeCourtage(): ?string
  178.     {
  179.         return $this->frais_de_courtage;
  180.     }
  181.     public function setFraisDeCourtage(string $frais_de_courtage): self
  182.     {
  183.         $this->frais_de_courtage $frais_de_courtage;
  184.         return $this;
  185.     }
  186.     public function getCreatedAt(): ?\DateTimeInterface
  187.     {
  188.         return $this->created_at;
  189.     }
  190.     public function setCreatedAt(\DateTimeInterface $created_at): self
  191.     {
  192.         $this->created_at $created_at;
  193.         return $this;
  194.     }
  195.     /**
  196.      * @return mixed
  197.      */
  198.     public function getStrike()
  199.     {
  200.         return $this->strike;
  201.     }
  202.     /**
  203.      * @param mixed $strike
  204.      * @return AppelDeMarge
  205.      */
  206.     public function setStrike($strike)
  207.     {
  208.         $this->strike $strike;
  209.         return $this;
  210.     }
  211.     public function __toString(): string{
  212.         return $this->mandant;
  213.     }
  214.     public function getStatus(): ?Status
  215.     {
  216.         return $this->status;
  217.     }
  218.     public function setStatus(?Status $status): self
  219.     {
  220.         $this->status $status;
  221.         return $this;
  222.     }
  223.     public function getBase(): ?Incoterm
  224.     {
  225.         return $this->base;
  226.     }
  227.     public function setBase(?Incoterm $base): self
  228.     {
  229.         $this->base $base;
  230.         return $this;
  231.     }
  232.     public function getSousJacent(): ?SousJacent
  233.     {
  234.         return $this->sous_jacent;
  235.     }
  236.     public function setSousJacent(?SousJacent $sous_jacent): self
  237.     {
  238.         $this->sous_jacent $sous_jacent;
  239.         return $this;
  240.     }
  241.     public function getUnite(): ?Unite
  242.     {
  243.         return $this->unite;
  244.     }
  245.     public function setUnite(?Unite $unite): self
  246.     {
  247.         $this->unite $unite;
  248.         return $this;
  249.     }
  250.     public function getFiliere(): ?Products
  251.     {
  252.         return $this->filiere;
  253.     }
  254.     public function setFiliere(?Products $filiere): self
  255.     {
  256.         $this->filiere $filiere;
  257.         return $this;
  258.     }
  259.     public function getDevise(): ?Devise
  260.     {
  261.         return $this->devise;
  262.     }
  263.     public function setDevise(?Devise $devise): self
  264.     {
  265.         $this->devise $devise;
  266.         return $this;
  267.     }
  268.     public function getDviseMontant(): ?Devise
  269.     {
  270.         return $this->dvise_montant;
  271.     }
  272.     public function setDviseMontant(?Devise $dvise_montant): self
  273.     {
  274.         $this->dvise_montant $dvise_montant;
  275.         return $this;
  276.     }
  277.     public function getStrikeDevise(): ?Devise
  278.     {
  279.         return $this->strike_devise;
  280.     }
  281.     public function setStrikeDevise(?Devise $strike_devise): self
  282.     {
  283.         $this->strike_devise $strike_devise;
  284.         return $this;
  285.     }
  286.     public function getClient(): ?Client
  287.     {
  288.         return $this->client;
  289.     }
  290.     public function setClient(?Client $client): self
  291.     {
  292.         $this->client $client;
  293.         return $this;
  294.     }
  295.     public function getObjet(): ?string
  296.     {
  297.         return $this->objet;
  298.     }
  299.     public function setObjet(?string $objet): self
  300.     {
  301.         $this->objet $objet;
  302.         return $this;
  303.     }
  304.     public function getQte(): ?string
  305.     {
  306.         return $this->qte;
  307.     }
  308.     public function setQte(?string $qte): self
  309.     {
  310.         $this->qte $qte;
  311.         return $this;
  312.     }
  313.     public function getDesignation(): ?string
  314.     {
  315.         return $this->designation;
  316.     }
  317.     public function setDesignation(?string $designation): self
  318.     {
  319.         $this->designation $designation;
  320.         return $this;
  321.     }
  322.     public function getMontantCommisionne(): ?string
  323.     {
  324.         return $this->montant_commisionne;
  325.     }
  326.     public function setMontantCommisionne(?string $montant_commisionne): self
  327.     {
  328.         $this->montant_commisionne $montant_commisionne;
  329.         return $this;
  330.     }
  331.     public function getDeviseMontant(): ?Devise
  332.     {
  333.         return $this->devise_montant;
  334.     }
  335.     public function setDeviseMontant(?Devise $devise_montant): self
  336.     {
  337.         $this->devise_montant $devise_montant;
  338.         return $this;
  339.     }
  340.     public function getCaNet(): ?string
  341.     {
  342.         return $this->ca_net;
  343.     }
  344.     public function setCaNet(?string $ca_net): self
  345.     {
  346.         $this->ca_net $ca_net;
  347.         return $this;
  348.     }
  349.     public function getDeviseCaNet(): ?Devise
  350.     {
  351.         return $this->devise_ca_net;
  352.     }
  353.     public function setDeviseCaNet(?Devise $devise_ca_net): self
  354.     {
  355.         $this->devise_ca_net $devise_ca_net;
  356.         return $this;
  357.     }
  358. }