src/Infrastructure/Doctrine/Entity/DoctrineIzOrderClient.php line 18

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Infrastructure\Doctrine\Entity;
  4. use App\Domain\Common\Entity\Cart;
  5. use App\Domain\Common\Entity\IzOrderClient;
  6. use App\Domain\Common\Entity\IzOrderClientContact;
  7. use App\Domain\Common\Entity\IzOrderPriceParameter;
  8. use App\Domain\Common\Entity\IzOrderRepresentative;
  9. use App\Domain\Common\Entity\UserAgent;
  10. use Doctrine\ORM\Mapping as ORM;
  11. /**
  12.  * @ORM\Entity(repositoryClass="App\Infrastructure\Doctrine\Repository\DoctrineIzOrderClientRepository")
  13.  */
  14. class DoctrineIzOrderClient extends DoctrineBaseUser implements IzOrderClient
  15. {
  16.     /**
  17.      * @ORM\Column(type="string", length=191, nullable=true)
  18.      */
  19.     private ?string $raisonSociale null;
  20.     /**
  21.      * @ORM\Column(type="string", length=191, nullable=true)
  22.      */
  23.     private ?string $raisonSociale2 null;
  24.     /**
  25.      * @ORM\Column(type="string", length=191, nullable=true)
  26.      */
  27.     private ?string $adresse1 null;
  28.     /**
  29.      * @ORM\Column(type="string", length=191, nullable=true)
  30.      */
  31.     private ?string $adresse2 null;
  32.     /**
  33.      * @ORM\Column(type="string", length=16, nullable=true)
  34.      */
  35.     private ?string $codePostal null;
  36.     /**
  37.      * @ORM\Column(type="string", length=191, nullable=true)
  38.      */
  39.     private ?string $ville null;
  40.     /**
  41.      * @ORM\Column(type="string", length=191, nullable=true)
  42.      */
  43.     private ?string $pays null;
  44.     /**
  45.      * @ORM\Column(type="string", length=191, nullable=true)
  46.      */
  47.     private ?string $telephone1 null;
  48.     /**
  49.      * @ORM\ManyToOne(targetEntity="App\Infrastructure\Doctrine\Entity\DoctrineIzOrderPriceParameter")
  50.      * @ORM\JoinColumn(name="code_tarif", referencedColumnName="code_tpm")
  51.      */
  52.     private ?IzOrderPriceParameter $codeTarif null;
  53.     /**
  54.      * @ORM\ManyToOne(targetEntity="App\Infrastructure\Doctrine\Entity\DoctrineIzOrderRepresentative")
  55.      * @ORM\JoinColumn(name="code_representant", referencedColumnName="code_representant")
  56.      */
  57.     private ?IzOrderRepresentative $codeRepresentant null;
  58.     /**
  59.      * @ORM\Column(type="string", length=191, nullable=true)
  60.      */
  61.     private ?string $representantAdv null;
  62.     /**
  63.      * @ORM\Column(type="integer", nullable=true)
  64.      */
  65.     private ?int $franco null;
  66.     /**
  67.      * @ORM\Column(type="float", nullable=true)
  68.      */
  69.     private ?float $tauxDeRemise;
  70.     /**
  71.      * @ORM\Column(type="float", nullable=true)
  72.      */
  73.     private ?float $tauxDeRemiseLigne;
  74.     /**
  75.      * @ORM\ManyToOne(targetEntity="App\Infrastructure\Doctrine\Entity\DoctrineIzOrderClientContact", inversedBy="clients")
  76.      * @ORM\JoinColumn(name="code_contact", referencedColumnName="code_contact")
  77.      */
  78.     private ?IzOrderClientContact $contact null;
  79.     /**
  80.      * @ORM\Column(type="string", length=16, nullable=true)
  81.      */
  82.     private ?string $codeFiliere null;
  83.     /**
  84.      * @ORM\Column(type="string", length=191, nullable=true)
  85.      */
  86.     private ?string $champLibre1 null;
  87.     /**
  88.      * @ORM\Column(type="string", length=16, nullable=true)
  89.      */
  90.     private ?string $codeGroupement null;
  91.     /**
  92.      * @ORM\Column(type="integer", nullable=true)
  93.      */
  94.     private ?int $minimumDeCommande null;
  95.     /**
  96.      * @ORM\OneToOne(
  97.      *     targetEntity="App\Infrastructure\Doctrine\Entity\DoctrineCart",
  98.      *     mappedBy="client",
  99.      *     cascade={"persist", "remove"},
  100.      *     orphanRemoval=true,
  101.      * )
  102.      */
  103.     private ?Cart $cart null;
  104.     /**
  105.      * @ORM\ManyToOne(targetEntity="App\Infrastructure\Doctrine\Entity\DoctrineUserAgent", inversedBy="clients", fetch="EAGER")
  106.      * @ORM\JoinColumn(referencedColumnName="code_client", onDelete="SET NULL")
  107.      */
  108.     private ?UserAgent $agent null;
  109.     /**
  110.      * @ORM\Column(type="integer", nullable=true)
  111.      */
  112.     private ?int $remisePiedDePage null;
  113.     /**
  114.      * @ORM\Column(type="string", length=191, nullable=true)
  115.      */
  116.     private ?string $canal null;
  117.     public function __toString(): string
  118.     {
  119.         return $this->getCodeClient().' - '.$this->getRaisonSociale();
  120.     }
  121.     public function getRaisonSociale(): ?string
  122.     {
  123.         return $this->raisonSociale;
  124.     }
  125.     public function setRaisonSociale(?string $raisonSociale): void
  126.     {
  127.         $this->raisonSociale $raisonSociale;
  128.     }
  129.     public function getRaisonSociale2(): ?string
  130.     {
  131.         return $this->raisonSociale2;
  132.     }
  133.     public function setRaisonSociale2(?string $raisonSociale2): void
  134.     {
  135.         $this->raisonSociale2 $raisonSociale2;
  136.     }
  137.     public function getAdresse1(): ?string
  138.     {
  139.         return $this->adresse1;
  140.     }
  141.     public function setAdresse1(?string $adresse1): void
  142.     {
  143.         $this->adresse1 $adresse1;
  144.     }
  145.     public function getAdresse2(): ?string
  146.     {
  147.         return $this->adresse2;
  148.     }
  149.     public function setAdresse2(?string $adresse2): void
  150.     {
  151.         $this->adresse2 $adresse2;
  152.     }
  153.     public function getCodePostal(): ?string
  154.     {
  155.         return $this->codePostal;
  156.     }
  157.     public function setCodePostal(?string $codePostal): void
  158.     {
  159.         $this->codePostal $codePostal;
  160.     }
  161.     public function getVille(): ?string
  162.     {
  163.         return $this->ville;
  164.     }
  165.     public function setVille(?string $ville): void
  166.     {
  167.         $this->ville $ville;
  168.     }
  169.     public function getPays(): ?string
  170.     {
  171.         return $this->pays;
  172.     }
  173.     public function setPays(?string $pays): void
  174.     {
  175.         $this->pays $pays;
  176.     }
  177.     public function getTelephone1(): ?string
  178.     {
  179.         return $this->telephone1;
  180.     }
  181.     public function setTelephone1(?string $telephone1): void
  182.     {
  183.         $this->telephone1 $telephone1;
  184.     }
  185.     public function getCodeTarif(): ?IzOrderPriceParameter
  186.     {
  187.         return $this->codeTarif;
  188.     }
  189.     public function setCodeTarif(?IzOrderPriceParameter $codeTarif): void
  190.     {
  191.         $this->codeTarif $codeTarif;
  192.     }
  193.     public function getCodeRepresentant(): ?IzOrderRepresentative
  194.     {
  195.         return $this->codeRepresentant;
  196.     }
  197.     public function setCodeRepresentant(?IzOrderRepresentative $codeRepresentant): void
  198.     {
  199.         $this->codeRepresentant $codeRepresentant;
  200.     }
  201.     public function getRepresentantAdv(): ?string
  202.     {
  203.         return $this->representantAdv;
  204.     }
  205.     public function setRepresentantAdv(?string $representantAdv): void
  206.     {
  207.         $this->representantAdv $representantAdv;
  208.     }
  209.     public function getFranco(): ?int
  210.     {
  211.         return $this->franco;
  212.     }
  213.     public function setFranco(?int $franco): void
  214.     {
  215.         $this->franco $franco;
  216.     }
  217.     public function getTauxDeRemise(): ?float
  218.     {
  219.         return $this->tauxDeRemise;
  220.     }
  221.     public function setTauxDeRemise($tauxDeRemise): void
  222.     {
  223.         if (null !== $tauxDeRemise) {
  224.             $tauxDeRemise = (float) $tauxDeRemise;
  225.         }
  226.         if ($tauxDeRemise <= 0) {
  227.             $tauxDeRemise null;
  228.         }
  229.         $this->tauxDeRemise $tauxDeRemise;
  230.     }
  231.     public function getTauxDeRemiseLigne(): ?float
  232.     {
  233.         return $this->tauxDeRemiseLigne;
  234.     }
  235.     public function setTauxDeRemiseLigne($tauxDeRemiseLigne): void
  236.     {
  237.         if (null !== $tauxDeRemiseLigne) {
  238.             $tauxDeRemiseLigne = (float) $tauxDeRemiseLigne;
  239.         }
  240.         if ($tauxDeRemiseLigne <= 0) {
  241.             $tauxDeRemiseLigne null;
  242.         }
  243.         $this->tauxDeRemiseLigne $tauxDeRemiseLigne;
  244.     }
  245.     public function getContact(): ?IzOrderClientContact
  246.     {
  247.         return $this->contact;
  248.     }
  249.     public function setContact(?IzOrderClientContact $contact): void
  250.     {
  251.         $this->contact $contact;
  252.     }
  253.     public function getCodeFiliere(): ?string
  254.     {
  255.         return $this->codeFiliere;
  256.     }
  257.     public function setCodeFiliere(?string $codeFiliere): void
  258.     {
  259.         $this->codeFiliere $codeFiliere;
  260.     }
  261.     public function getChampLibre1(): ?string
  262.     {
  263.         return $this->champLibre1;
  264.     }
  265.     public function setChampLibre1(?string $champLibre1): void
  266.     {
  267.         $this->champLibre1 $champLibre1;
  268.     }
  269.     public function getCodeGroupement(): ?string
  270.     {
  271.         return $this->codeGroupement;
  272.     }
  273.     public function setCodeGroupement(?string $codeGroupement): void
  274.     {
  275.         $this->codeGroupement $codeGroupement;
  276.     }
  277.     public function getMinimumDeCommande(): ?int
  278.     {
  279.         return $this->minimumDeCommande;
  280.     }
  281.     public function setMinimumDeCommande(?int $minimumDeCommande): void
  282.     {
  283.         $this->minimumDeCommande $minimumDeCommande;
  284.     }
  285.     public function getCart(): Cart
  286.     {
  287.         if (null === $this->cart) {
  288.             $this->cart = new DoctrineCart();
  289.             $this->cart->setClient($this);
  290.         }
  291.         return $this->cart;
  292.     }
  293.     public function setCart(Cart $cart): void
  294.     {
  295.         // set the owning side of the relation if necessary
  296.         if ($cart->getClient() !== $this) {
  297.             $cart->setClient($this);
  298.         }
  299.         $this->cart $cart;
  300.     }
  301.     public function getAgent(): ?UserAgent
  302.     {
  303.         return $this->agent;
  304.     }
  305.     public function setAgent(?UserAgent $agent): void
  306.     {
  307.         $this->agent $agent;
  308.     }
  309.     public function getRemisePiedDePage(): ?int
  310.     {
  311.         return $this->remisePiedDePage;
  312.     }
  313.     public function setRemisePiedDePage(?int $remisePiedDePage): void
  314.     {
  315.         $this->remisePiedDePage $remisePiedDePage;
  316.     }
  317.     public function getCanal(): ?string
  318.     {
  319.         return $this->canal;
  320.     }
  321.     public function setCanal(?string $canal): void
  322.     {
  323.         $this->canal $canal;
  324.     }
  325.     public function getRoles(): array
  326.     {
  327.         return ['ROLE_USER'];
  328.     }
  329. }