src/Entity/Transporteurs/Transporteur.php line 25

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Transporteurs;
  3. use App\Entity\Adresses\Adresse;
  4. use App\Entity\GestionComerciale\Commande;
  5. use App\Entity\Taxes\RegleTaxe;
  6. use App\Entity\Utilisateur\contact;
  7. use App\Entity\Utilisateur\Utilisateur;
  8. use DateTime;
  9. use Doctrine\Common\Collections\ArrayCollection;
  10. use Doctrine\Common\Collections\Collection;
  11. use Doctrine\ORM\Mapping as ORM;
  12. use Gedmo\Mapping\Annotation as Gedmo;
  13. use Symfony\Component\Validator\Constraints as Assert;
  14. use App\Annotations\SecuredEntity;
  15. /**
  16.  * Transporteur
  17.  *
  18.  * @ORM\Table("transporteur__transporteur")
  19.  * @ORM\Entity(repositoryClass="App\Repository\Transporteurs\TransporteurRepository")
  20.  * @Gedmo\SoftDeleteable(fieldName="dateSuppression",timeAware=false)
  21.  * @SecuredEntity (name="Transporteur", group="TRANSPORTEURS")
  22.  */
  23. class Transporteur
  24. {
  25.     /**
  26.      * @ORM\Column(name="id", type="integer")
  27.      * @ORM\Id
  28.      * @ORM\GeneratedValue(strategy="AUTO")
  29.      */
  30.     private $id;
  31.     /**
  32.      * @ORM\Column(name="position", type="integer", nullable=true)
  33.      */
  34.     private $position;
  35.     /**
  36.      * @ORM\Column(name="reference", type="string", length=255, nullable=true)
  37.      */
  38.     private $reference;
  39.     /**
  40.      * @ORM\Column(name="suivi_colis", type="string", length=255, nullable=true)
  41.      */
  42.     private $suiviColis;
  43.     /**
  44.      * @ORM\Column(name="tracking", type="string", length=255, nullable=true)
  45.      */
  46.     private $tracking;
  47.     /**
  48.      * @ORM\Column(name="id_import", type="string",length=255, nullable=true)
  49.      */
  50.     private $idImport;
  51.     /**
  52.      * @ORM\Column(name="coeff_vente", type="float", nullable=true)
  53.      */
  54.     private $coeffVente;
  55.     /**
  56.      * @ORM\Column(name="statut", type="boolean", nullable=true)
  57.      */
  58.     private $statut;
  59.     /**
  60.      * @ORM\OneToMany(targetEntity="App\Entity\GestionComerciale\Commande", mappedBy="transporteur")
  61.      */
  62.     private $commandes;
  63.     /**
  64.      * @ORM\ManyToOne(targetEntity="App\Entity\Taxes\RegleTaxe")
  65.      */
  66.     private $regleTaxe;
  67.     /**
  68.      * @ORM\OneToMany(targetEntity="App\Entity\Transporteurs\TransporteurZoneLivraison", mappedBy="transporteur")
  69.      */
  70.     private $transporteurZoneLivraison;
  71.     /**
  72.      * @ORM\OneToMany(targetEntity="App\Entity\Adresses\Adresse", mappedBy="transporteur")
  73.      */
  74.     private $adresses;
  75.     /**
  76.      * @ORM\OneToMany(targetEntity="App\Entity\Transporteurs\TranchePoids", mappedBy="transporteur")
  77.      */
  78.     private $tranchePoids;
  79.     /**
  80.      * @ORM\OneToMany(targetEntity="App\Entity\Utilisateur\Contact", mappedBy="transporteur")
  81.      */
  82.     private $contacts;
  83.     /**
  84.      * @ORM\ManyToOne(targetEntity="App\Entity\Utilisateur\Utilisateur", inversedBy="transporteurs")
  85.      * @ORM\JoinColumn(nullable=true)
  86.      */
  87.     private $utilisateur;
  88.     /**
  89.      * @ORM\Column(name="libelle", type="string", length=255, nullable=true)
  90.      * @Assert\NotBlank(message="LibellĂ© obligatoire")
  91.      */
  92.     private $libelle;
  93.     /**
  94.      * @ORM\Column(name="transporteur_cdiscount", type="string", length=255, nullable=true)
  95.      */
  96.     private $transporteurCdiscount;
  97.     /**
  98.      * @ORM\Column(name="date", type="datetime", nullable=true)
  99.      */
  100.     private $date;
  101.     /**
  102.      * @ORM\Column(name="dateMaj", type="datetime", nullable=true)
  103.      * @Gedmo\Timestampable(on="update")
  104.      */
  105.     private $dateMaj;
  106.     /**
  107.      * @ORM\Column(name="dateSuppression", type="datetime", nullable=true)
  108.      */
  109.     private $dateSuppression;
  110.     /**
  111.      * @ORM\Column(name="telephone", type="string", length=255, nullable=true)
  112.      */
  113.     private $telephone;
  114.     /**
  115.      * @ORM\Column(name="telephone2", type="string", length=255, nullable=true)
  116.      */
  117.     private $telephone2;
  118.     /**
  119.      * @ORM\Column(name="commentaire", type="text", nullable=true)
  120.      */
  121.     private $commentaire;
  122.     /**
  123.      * @ORM\Column(name="fax", type="string", length=255, nullable=true)
  124.      */
  125.     private $fax;
  126.     /**
  127.      * @ORM\Column(name="email", type="string", length=255, nullable=true)
  128.      */
  129.     private $email;
  130.     /**
  131.      * @ORM\Column(name="responsable", type="string", length=255, nullable=true)
  132.      */
  133.     private $responsable;
  134.     /**
  135.      * @ORM\Column(name="delaiHabituel", type="integer", nullable=true)
  136.      */
  137.     private $delaiHabituel;
  138.     /**
  139.      * @ORM\Column(name="montantFraisFixe", type="float", nullable=true)
  140.      */
  141.     private $montantFraisFixe;
  142.     /**
  143.      * @ORM\Column(name="logo", type="string", length=255, nullable=true)
  144.      */
  145.     private $logo;
  146.     /**
  147.      * @ORM\Column(name="service_code", type="string", length=255, nullable=true)
  148.      */
  149.     private $serviceCode;
  150.     /**
  151.      * @ORM\Column(name="mode_livraison_amazon", type="string", length=255, nullable=true)
  152.      */
  153.     private $modeLivraisonAmazon;
  154.     /**
  155.      * @ORM\Column(name="transporteur_amazon", type="string", length=255, nullable=true)
  156.      */
  157.     private $transporteurAmazon;
  158.     /**
  159.      * @ORM\Column(name="transporteur_ebay", type="string", length=255, nullable=true)
  160.      */
  161.     private $transporteurEbay;
  162.     /**
  163.      * @ORM\Column(name="rapport_cloture", type="boolean", nullable=true)
  164.      */
  165.     private $rapportCloture;
  166.     /**
  167.      * @ORM\Column(name="priorite", type="float", nullable=true)
  168.      */
  169.     private $priorite;
  170.     public function __construct()
  171.     {
  172.         $this->date                         = new Datetime();
  173.         $this->commandes                    = new ArrayCollection();
  174.         $this->transporteurZoneLivraison    = new ArrayCollection();
  175.         $this->tranchePoids                 = new ArrayCollection();
  176.         $this->adresses                     = new ArrayCollection();
  177.         $this->contacts                     = new ArrayCollection();
  178.     }
  179.     public function getId(): int
  180.     {
  181.         return $this->id;
  182.     }
  183.     public function setLibelle(?string $libelle): Transporteur
  184.     {
  185.         $this->libelle $libelle;
  186.         return $this;
  187.     }
  188.     public function getLibelle(): ?string
  189.     {
  190.         return $this->libelle;
  191.     }
  192.     public function setDate(?DateTime $date): Transporteur
  193.     {
  194.         $this->date $date;
  195.         return $this;
  196.     }
  197.     public function getDate(): ?DateTime
  198.     {
  199.         return $this->date;
  200.     }
  201.     public function setDateMaj(?DateTime $dateMaj): Transporteur
  202.     {
  203.         $this->dateMaj $dateMaj;
  204.         return $this;
  205.     }
  206.     public function getDateMaj(): ?DateTime
  207.     {
  208.         return $this->dateMaj;
  209.     }
  210.     public function setDateSuppression(?DateTime $dateSuppression): Transporteur
  211.     {
  212.         $this->dateSuppression $dateSuppression;
  213.         return $this;
  214.     }
  215.     public function getDateSuppression(): ?DateTime
  216.     {
  217.         return $this->dateSuppression;
  218.     }
  219.     public function setTelephone(?string $telephone): Transporteur
  220.     {
  221.         $this->telephone $telephone;
  222.         return $this;
  223.     }
  224.     public function getTelephone(): ?string
  225.     {
  226.         return $this->telephone;
  227.     }
  228.     public function setTelephone2(?string $telephone2): Transporteur
  229.     {
  230.         $this->telephone2 $telephone2;
  231.         return $this;
  232.     }
  233.     public function getTelephone2(): ?string
  234.     {
  235.         return $this->telephone2;
  236.     }
  237.     public function setCommentaire(?string $commentaire): Transporteur
  238.     {
  239.         $this->commentaire $commentaire;
  240.         return $this;
  241.     }
  242.     public function getCommentaire(): ?string
  243.     {
  244.         return $this->commentaire;
  245.     }
  246.     public function setFax(?string $fax): Transporteur
  247.     {
  248.         $this->fax $fax;
  249.         return $this;
  250.     }
  251.     public function getFax(): ?string
  252.     {
  253.         return $this->fax;
  254.     }
  255.     public function setEmail(?string $email): Transporteur
  256.     {
  257.         $this->email $email;
  258.         return $this;
  259.     }
  260.     public function getEmail(): ?string
  261.     {
  262.         return $this->email;
  263.     }
  264.     public function setResponsable(?string $responsable): Transporteur
  265.     {
  266.         $this->responsable $responsable;
  267.         return $this;
  268.     }
  269.     public function getResponsable(): ?string
  270.     {
  271.         return $this->responsable;
  272.     }
  273.     public function setDelaiHabituel(?int $delaiHabituel): Transporteur
  274.     {
  275.         $this->delaiHabituel $delaiHabituel;
  276.         return $this;
  277.     }
  278.     public function getDelaiHabituel(): ?int
  279.     {
  280.         return $this->delaiHabituel;
  281.     }
  282.     public function setMontantFraisFixe(?float $montantFraisFixe): Transporteur
  283.     {
  284.         $this->montantFraisFixe $montantFraisFixe;
  285.         return $this;
  286.     }
  287.     public function getMontantFraisFixe(): ?float
  288.     {
  289.         return $this->montantFraisFixe;
  290.     }
  291.     public function setLogo(?string $logo): Transporteur
  292.     {
  293.         $this->logo $logo;
  294.         return $this;
  295.     }
  296.     public function getLogo(): ?string
  297.     {
  298.         return $this->logo;
  299.     }
  300.     public function getLogoDir(): string
  301.     {
  302.         return 'uploads/logos/transporteur';
  303.     }
  304.     public function setUtilisateur(?Utilisateur $utilisateur): Transporteur
  305.     {
  306.         $this->utilisateur $utilisateur;
  307.         return $this;
  308.     }
  309.     public function getUtilisateur(): ?Utilisateur
  310.     {
  311.         return $this->utilisateur;
  312.     }
  313.     public function addContact(contact $contacts): Transporteur
  314.     {
  315.         $this->contacts[] = $contacts;
  316.         return $this;
  317.     }
  318.     public function removeContact(contact $contacts)
  319.     {
  320.         $this->contacts->removeElement($contacts);
  321.     }
  322.     public function getContacts(): Collection
  323.     {
  324.         return $this->contacts;
  325.     }
  326.     public function addAdress(Adresse $adresses): Transporteur
  327.     {
  328.         $this->adresses[] = $adresses;
  329.         return $this;
  330.     }
  331.     public function removeAdress(Adresse $adresses)
  332.     {
  333.         $this->adresses->removeElement($adresses);
  334.     }
  335.     public function getAdresses(): Collection
  336.     {
  337.         return $this->adresses;
  338.     }
  339.     public function addTranchePoid(TranchePoids $tranchePoids): Transporteur
  340.     {
  341.         $this->tranchePoids[] = $tranchePoids;
  342.         return $this;
  343.     }
  344.     public function removeTranchePoid(TranchePoids $tranchePoids)
  345.     {
  346.         $this->tranchePoids->removeElement($tranchePoids);
  347.     }
  348.     public function getTranchePoids(): Collection
  349.     {
  350.         return $this->tranchePoids;
  351.     }
  352.     public function __toString()
  353.     {
  354.         return $this->libelle;
  355.     }
  356.     public function addTransporteurZoneLivraison(TransporteurZoneLivraison $transporteurZoneLivraison): Transporteur
  357.     {
  358.         $this->transporteurZoneLivraison[] = $transporteurZoneLivraison;
  359.         return $this;
  360.     }
  361.     public function removeTransporteurZoneLivraison(TransporteurZoneLivraison $transporteurZoneLivraison)
  362.     {
  363.         $this->transporteurZoneLivraison->removeElement($transporteurZoneLivraison);
  364.     }
  365.     public function getTransporteurZoneLivraison(): Collection
  366.     {
  367.         return $this->transporteurZoneLivraison;
  368.     }
  369.     public function addCommande(Commande $commandes): Transporteur
  370.     {
  371.         $this->commandes[] = $commandes;
  372.         return $this;
  373.     }
  374.     public function removeCommande(Commande $commandes)
  375.     {
  376.         $this->commandes->removeElement($commandes);
  377.     }
  378.     public function getCommandes(): Collection
  379.     {
  380.         return $this->commandes;
  381.     }
  382.     public function setRegleTaxe(?RegleTaxe $regleTaxe): Transporteur
  383.     {
  384.         $this->regleTaxe $regleTaxe;
  385.         return $this;
  386.     }
  387.     public function getRegleTaxe(): ?RegleTaxe
  388.     {
  389.         return $this->regleTaxe;
  390.     }
  391.     public function setStatut(?bool $statut): Transporteur
  392.     {
  393.         $this->statut $statut;
  394.         return $this;
  395.     }
  396.     public function getStatut(): ?bool
  397.     {
  398.         return $this->statut;
  399.     }
  400.     public function setIdImport(?string $idImport): Transporteur
  401.     {
  402.         $this->idImport $idImport;
  403.         return $this;
  404.     }
  405.     public function getIdImport(): ?string
  406.     {
  407.         return $this->idImport;
  408.     }
  409.     public function setCoeffVente(?float $coeffVente): Transporteur
  410.     {
  411.         $this->coeffVente $coeffVente;
  412.         return $this;
  413.     }
  414.     public function getCoeffVente(): ?float
  415.     {
  416.         return $this->coeffVente;
  417.     }
  418.     public function setReference(?string $reference): Transporteur
  419.     {
  420.         $this->reference $reference;
  421.         return $this;
  422.     }
  423.     public function getReference(): ?string
  424.     {
  425.         return $this->reference;
  426.     }
  427.     public function setSuiviColis(?string $suiviColis): Transporteur
  428.     {
  429.         $this->suiviColis $suiviColis;
  430.         return $this;
  431.     }
  432.     public function getSuiviColis(): ?string
  433.     {
  434.         return $this->suiviColis;
  435.     }
  436.     public function setServiceCode(?string $serviceCode): Transporteur
  437.     {
  438.         $this->serviceCode $serviceCode;
  439.         return $this;
  440.     }
  441.     public function getServiceCode(): ?string
  442.     {
  443.         return $this->serviceCode;
  444.     }
  445.     public function setTracking(?string $tracking): Transporteur
  446.     {
  447.         $this->tracking $tracking;
  448.         return $this;
  449.     }
  450.     public function getTracking(): ?string
  451.     {
  452.         return $this->tracking;
  453.     }
  454.     public function setPosition(?int $position): Transporteur
  455.     {
  456.         $this->position $position;
  457.         return $this;
  458.     }
  459.     public function getPosition(): ?int
  460.     {
  461.         return $this->position;
  462.     }
  463.     public function setTransporteurCdiscount(?string $transporteurCdiscount): Transporteur
  464.     {
  465.         $this->transporteurCdiscount $transporteurCdiscount;
  466.         return $this;
  467.     }
  468.     public function getTransporteurCdiscount(): ?string
  469.     {
  470.         return $this->transporteurCdiscount;
  471.     }
  472.     public function setTransporteurEbay(?string $transporteurEbay): Transporteur
  473.     {
  474.         $this->transporteurEbay $transporteurEbay;
  475.         return $this;
  476.     }
  477.     public function getTransporteurEbay(): ?string
  478.     {
  479.         return $this->transporteurEbay;
  480.     }
  481.     public function setRapportCloture(?bool $rapportCloture): Transporteur
  482.     {
  483.         $this->rapportCloture $rapportCloture;
  484.         return $this;
  485.     }
  486.     public function getRapportCloture(): ?bool
  487.     {
  488.         return $this->rapportCloture;
  489.     }
  490.     public function setPriorite(?float $priorite): Transporteur
  491.     {
  492.         $this->priorite $priorite;
  493.         return $this;
  494.     }
  495.     public function getPriorite(): ?float
  496.     {
  497.         return $this->priorite;
  498.     }
  499.     public function setModeLivraisonAmazon(?string $modeLivraisonAmazon): Transporteur
  500.     {
  501.         $this->modeLivraisonAmazon $modeLivraisonAmazon;
  502.         return $this;
  503.     }
  504.     public function getModeLivraisonAmazon(): ?string
  505.     {
  506.         return $this->modeLivraisonAmazon;
  507.     }
  508.     public function setTransporteurAmazon(?string $transporteurAmazon): Transporteur
  509.     {
  510.         $this->transporteurAmazon $transporteurAmazon;
  511.         return $this;
  512.     }
  513.     public function getTransporteurAmazon(): ?string
  514.     {
  515.         return $this->transporteurAmazon;
  516.     }
  517. }