src/Entity/System/Carrier.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity\System;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * @ORM\Table(name="ps_carrier")
  6.  *
  7.  * @ORM\Entity(repositoryClass="App\Repository\System\CarrierRepository")
  8.  */
  9. class Carrier
  10. {
  11.     public const PARCEL_POD 1;
  12.     public const PALLET_POD 2;
  13.     public const PARCEL_NO_POD 3;
  14.     public const PACKAGING_METHODS = [
  15.         self::PARCEL_POD,
  16.         self::PALLET_POD,
  17.         self::PARCEL_NO_POD,
  18.     ];
  19.     public const STANDARD_SHIPMENT_NAME 'Standard Shipment';
  20.     public const WAREHOUSE_PICKUP_API_NAME 'exw';
  21.     public const PACK_AND_COLLECT_API_NAME 'pc';
  22.     public const PACK_AND_COLLECT_ID 162;
  23.     public const SERVICES_ID 53;
  24.     public const WAREHOUSE_PICKUP_ID 55;
  25.     public const ID_COLIS_PRIVE_HOME_DELIVERY_EASY 359;
  26.     public const ID_COLIS_PRIVE_HOME_DELIVERY_EASY_SIGNATURE 382;
  27.     public const SMART_SHIPMENT_CARRIER_MASTER_ID 37;
  28.     public const AERIAL_TRANSPORT_METHOD_ID 3;
  29.     /**
  30.      * @var int
  31.      *
  32.      * @ORM\Id()
  33.      *
  34.      * @ORM\GeneratedValue()
  35.      *
  36.      * @ORM\Column(name="id_carrier", type="integer")
  37.      */
  38.     private $id;
  39.     /**
  40.      * @var int
  41.      *
  42.      * @ORM\Column(name="id_reference", type="integer", length=10)
  43.      */
  44.     private $referenceId;
  45.     /**
  46.      * @var int|null
  47.      *
  48.      * @ORM\Column(name="id_tax_rules_group", type="integer", length=10, options={"unsigned": 0}, nullable=true)
  49.      */
  50.     private $taxRulesGroupId;
  51.     /**
  52.      * @var string
  53.      *
  54.      * @ORM\Column(type="string", length=64)
  55.      */
  56.     private $name;
  57.     /**
  58.      * @var string|null
  59.      *
  60.      * @ORM\Column(type="string", length=255, nullable=true)
  61.      */
  62.     private $url;
  63.     /**
  64.      * @var int
  65.      *
  66.      * @ORM\Column(type="boolean", columnDefinition="tinyint(1)", options={"unsigned": 0})
  67.      */
  68.     private $active;
  69.     /**
  70.      * @var int
  71.      *
  72.      * @ORM\Column(type="boolean", columnDefinition="tinyint(1)", options={"unsigned": 0})
  73.      */
  74.     private $deleted;
  75.     /**
  76.      * @var int
  77.      *
  78.      * @ORM\Column(type="boolean", columnDefinition="tinyint(1)", options={"unsigned": 1})
  79.      */
  80.     private $shippingHandling;
  81.     /**
  82.      * @var int
  83.      *
  84.      * @ORM\Column(type="boolean", columnDefinition="tinyint(1)", options={"unsigned": 0})
  85.      */
  86.     private $rangeBehavior;
  87.     /**
  88.      * @var int
  89.      *
  90.      * @ORM\Column(type="boolean", columnDefinition="tinyint(1)", options={"unsigned": 0})
  91.      */
  92.     private $isModule;
  93.     /**
  94.      * @var int
  95.      *
  96.      * @ORM\Column(type="boolean", columnDefinition="tinyint(1)", options={"unsigned": 0})
  97.      */
  98.     private $isFree;
  99.     /**
  100.      * @var int
  101.      *
  102.      * @ORM\Column(type="boolean", columnDefinition="tinyint(1)", options={"unsigned": 0})
  103.      */
  104.     private $shippingExternal;
  105.     /**
  106.      * @var int
  107.      *
  108.      * @ORM\Column(type="boolean", columnDefinition="tinyint(1)", options={"unsigned": 0})
  109.      */
  110.     private $needRange;
  111.     /**
  112.      * @var string|null
  113.      *
  114.      * @ORM\Column(type="string", length=64, nullable=true)
  115.      */
  116.     private $externalModuleName;
  117.     /**
  118.      * @var int
  119.      *
  120.      * @ORM\Column(type="integer", length=2, options={"default": 0})
  121.      */
  122.     private $shippingMethod;
  123.     /**
  124.      * @var int
  125.      *
  126.      * @ORM\Column(type="integer", length=10, options={"unsigned": 0})
  127.      */
  128.     private $position;
  129.     /**
  130.      * @var int|null
  131.      *
  132.      * @ORM\Column(type="integer", length=10, options={"default": 0}, nullable=true)
  133.      */
  134.     private $maxWidth;
  135.     /**
  136.      * @var int|null
  137.      *
  138.      * @ORM\Column(type="integer", length=10, options={"default": 0}, nullable=true)
  139.      */
  140.     private $maxHeight;
  141.     /**
  142.      * @var int|null
  143.      *
  144.      * @ORM\Column(type="integer", length=10, options={"default": 0}, nullable=true)
  145.      */
  146.     private $maxDepth;
  147.     /**
  148.      * @var float|null
  149.      *
  150.      * @ORM\Column(type="decimal", precision=20, scale=6, options={"default" : 0.000000}, nullable=true)
  151.      */
  152.     private $maxWeight;
  153.     /**
  154.      * @var int|null
  155.      *
  156.      * @ORM\Column(type="integer", length=10, options={"default": 0}, nullable=true)
  157.      */
  158.     private $grade;
  159.     /**
  160.      * @var int
  161.      *
  162.      * @ORM\Column(name="id_carrier_master", type="integer", length=10, options={"default": 0})
  163.      */
  164.     private $carrierMasterId;
  165.     /**
  166.      * @var float
  167.      *
  168.      * @ORM\Column(name="vol_density", type="float", options={"default": 0})
  169.      */
  170.     private $volumenDensity;
  171.     /**
  172.      * @var string
  173.      *
  174.      * @ORM\Column(type="string", length=50, options={"default": "mag_shipping_matrixrate"})
  175.      */
  176.     private $tableShippingCost;
  177.     /**
  178.      * @var int
  179.      *
  180.      * @ORM\Column(type="integer", length=2, options={"default": 1})
  181.      */
  182.     private $transportMethod;
  183.     /**
  184.      * @var int
  185.      *
  186.      * @ORM\Column(type="integer", length=2, options={"default": 1})
  187.      */
  188.     private $packagingMethod;
  189.     /**
  190.      * @var Warehouse
  191.      *
  192.      * @ORM\ManyToOne(targetEntity="App\Entity\System\Warehouse")
  193.      *
  194.      * @ORM\JoinColumn(nullable=false, name="id_warehouse", referencedColumnName="id")
  195.      */
  196.     private $warehouse;
  197.     /**
  198.      * @var bool
  199.      *
  200.      * @ORM\Column(name="free_shipping_allowed", type="boolean")
  201.      */
  202.     private $freeShippingAllowed;
  203.     /**
  204.      * @return int
  205.      */
  206.     public function getId(): int
  207.     {
  208.         return $this->id;
  209.     }
  210.     /**
  211.      * @param int $id
  212.      *
  213.      * @return Carrier
  214.      */
  215.     public function setId(int $id): Carrier
  216.     {
  217.         $this->id $id;
  218.         return $this;
  219.     }
  220.     /**
  221.      * @return int
  222.      */
  223.     public function getReferenceId(): int
  224.     {
  225.         return $this->referenceId;
  226.     }
  227.     /**
  228.      * @param int $referenceId
  229.      *
  230.      * @return Carrier
  231.      */
  232.     public function setReferenceId(int $referenceId): Carrier
  233.     {
  234.         $this->referenceId $referenceId;
  235.         return $this;
  236.     }
  237.     /**
  238.      * @return int|null
  239.      */
  240.     public function getTaxRulesGroupId(): ?int
  241.     {
  242.         return $this->taxRulesGroupId;
  243.     }
  244.     /**
  245.      * @param int|null $taxRulesGroupId
  246.      *
  247.      * @return Carrier
  248.      */
  249.     public function setTaxRulesGroupId(?int $taxRulesGroupId): Carrier
  250.     {
  251.         $this->taxRulesGroupId $taxRulesGroupId;
  252.         return $this;
  253.     }
  254.     /**
  255.      * @return string
  256.      */
  257.     public function getName(): string
  258.     {
  259.         return $this->name;
  260.     }
  261.     /**
  262.      * @param string $name
  263.      *
  264.      * @return Carrier
  265.      */
  266.     public function setName(string $name): Carrier
  267.     {
  268.         $this->name $name;
  269.         return $this;
  270.     }
  271.     /**
  272.      * @return string|null
  273.      */
  274.     public function getUrl(): ?string
  275.     {
  276.         return $this->url;
  277.     }
  278.     /**
  279.      * @param string|null $url
  280.      *
  281.      * @return Carrier
  282.      */
  283.     public function setUrl(?string $url): Carrier
  284.     {
  285.         $this->url $url;
  286.         return $this;
  287.     }
  288.     /**
  289.      * @return int
  290.      */
  291.     public function getActive(): int
  292.     {
  293.         return $this->active;
  294.     }
  295.     /**
  296.      * @param int $active
  297.      *
  298.      * @return Carrier
  299.      */
  300.     public function setActive(int $active): Carrier
  301.     {
  302.         $this->active $active;
  303.         return $this;
  304.     }
  305.     /**
  306.      * @return int
  307.      */
  308.     public function getDeleted(): int
  309.     {
  310.         return $this->deleted;
  311.     }
  312.     /**
  313.      * @param int $deleted
  314.      *
  315.      * @return Carrier
  316.      */
  317.     public function setDeleted(int $deleted): Carrier
  318.     {
  319.         $this->deleted $deleted;
  320.         return $this;
  321.     }
  322.     /**
  323.      * @return int
  324.      */
  325.     public function getShippingHandling(): int
  326.     {
  327.         return $this->shippingHandling;
  328.     }
  329.     /**
  330.      * @param int $shippingHandling
  331.      *
  332.      * @return Carrier
  333.      */
  334.     public function setShippingHandling(int $shippingHandling): Carrier
  335.     {
  336.         $this->shippingHandling $shippingHandling;
  337.         return $this;
  338.     }
  339.     /**
  340.      * @return int
  341.      */
  342.     public function getRangeBehavior(): int
  343.     {
  344.         return $this->rangeBehavior;
  345.     }
  346.     /**
  347.      * @param int $rangeBehavior
  348.      *
  349.      * @return Carrier
  350.      */
  351.     public function setRangeBehavior(int $rangeBehavior): Carrier
  352.     {
  353.         $this->rangeBehavior $rangeBehavior;
  354.         return $this;
  355.     }
  356.     /**
  357.      * @return int
  358.      */
  359.     public function getIsModule(): int
  360.     {
  361.         return $this->isModule;
  362.     }
  363.     /**
  364.      * @param int $isModule
  365.      *
  366.      * @return Carrier
  367.      */
  368.     public function setIsModule(int $isModule): Carrier
  369.     {
  370.         $this->isModule $isModule;
  371.         return $this;
  372.     }
  373.     /**
  374.      * @return int
  375.      */
  376.     public function getIsFree(): int
  377.     {
  378.         return $this->isFree;
  379.     }
  380.     /**
  381.      * @param int $isFree
  382.      *
  383.      * @return Carrier
  384.      */
  385.     public function setIsFree(int $isFree): Carrier
  386.     {
  387.         $this->isFree $isFree;
  388.         return $this;
  389.     }
  390.     /**
  391.      * @return int
  392.      */
  393.     public function getShippingExternal(): int
  394.     {
  395.         return $this->shippingExternal;
  396.     }
  397.     /**
  398.      * @param int $shippingExternal
  399.      *
  400.      * @return Carrier
  401.      */
  402.     public function setShippingExternal(int $shippingExternal): Carrier
  403.     {
  404.         $this->shippingExternal $shippingExternal;
  405.         return $this;
  406.     }
  407.     /**
  408.      * @return int
  409.      */
  410.     public function getNeedRange(): int
  411.     {
  412.         return $this->needRange;
  413.     }
  414.     /**
  415.      * @param int $needRange
  416.      *
  417.      * @return Carrier
  418.      */
  419.     public function setNeedRange(int $needRange): Carrier
  420.     {
  421.         $this->needRange $needRange;
  422.         return $this;
  423.     }
  424.     /**
  425.      * @return string|null
  426.      */
  427.     public function getExternalModuleName(): ?string
  428.     {
  429.         return $this->externalModuleName;
  430.     }
  431.     /**
  432.      * @param string|null $externalModuleName
  433.      *
  434.      * @return Carrier
  435.      */
  436.     public function setExternalModuleName(?string $externalModuleName): Carrier
  437.     {
  438.         $this->externalModuleName $externalModuleName;
  439.         return $this;
  440.     }
  441.     /**
  442.      * @return int
  443.      */
  444.     public function getShippingMethod(): int
  445.     {
  446.         return $this->shippingMethod;
  447.     }
  448.     /**
  449.      * @param int $shippingMethod
  450.      *
  451.      * @return Carrier
  452.      */
  453.     public function setShippingMethod(int $shippingMethod): Carrier
  454.     {
  455.         $this->shippingMethod $shippingMethod;
  456.         return $this;
  457.     }
  458.     /**
  459.      * @return int
  460.      */
  461.     public function getPosition(): int
  462.     {
  463.         return $this->position;
  464.     }
  465.     /**
  466.      * @param int $position
  467.      *
  468.      * @return Carrier
  469.      */
  470.     public function setPosition(int $position): Carrier
  471.     {
  472.         $this->position $position;
  473.         return $this;
  474.     }
  475.     /**
  476.      * @return int|null
  477.      */
  478.     public function getMaxWidth(): ?int
  479.     {
  480.         return $this->maxWidth;
  481.     }
  482.     /**
  483.      * @param int|null $maxWidth
  484.      *
  485.      * @return Carrier
  486.      */
  487.     public function setMaxWidth(?int $maxWidth): Carrier
  488.     {
  489.         $this->maxWidth $maxWidth;
  490.         return $this;
  491.     }
  492.     /**
  493.      * @return int|null
  494.      */
  495.     public function getMaxHeight(): ?int
  496.     {
  497.         return $this->maxHeight;
  498.     }
  499.     /**
  500.      * @param int|null $maxHeight
  501.      *
  502.      * @return Carrier
  503.      */
  504.     public function setMaxHeight(?int $maxHeight): Carrier
  505.     {
  506.         $this->maxHeight $maxHeight;
  507.         return $this;
  508.     }
  509.     /**
  510.      * @return int|null
  511.      */
  512.     public function getMaxDepth(): ?int
  513.     {
  514.         return $this->maxDepth;
  515.     }
  516.     /**
  517.      * @param int|null $maxDepth
  518.      *
  519.      * @return Carrier
  520.      */
  521.     public function setMaxDepth(?int $maxDepth): Carrier
  522.     {
  523.         $this->maxDepth $maxDepth;
  524.         return $this;
  525.     }
  526.     /**
  527.      * @return float|null
  528.      */
  529.     public function getMaxWeight(): ?float
  530.     {
  531.         return $this->maxWeight;
  532.     }
  533.     /**
  534.      * @param float|null $maxWeight
  535.      *
  536.      * @return Carrier
  537.      */
  538.     public function setMaxWeight(?float $maxWeight): Carrier
  539.     {
  540.         $this->maxWeight $maxWeight;
  541.         return $this;
  542.     }
  543.     /**
  544.      * @return int|null
  545.      */
  546.     public function getGrade(): ?int
  547.     {
  548.         return $this->grade;
  549.     }
  550.     /**
  551.      * @param int|null $grade
  552.      *
  553.      * @return Carrier
  554.      */
  555.     public function setGrade(?int $grade): Carrier
  556.     {
  557.         $this->grade $grade;
  558.         return $this;
  559.     }
  560.     /**
  561.      * @return int
  562.      */
  563.     public function getCarrierMasterId(): int
  564.     {
  565.         return $this->carrierMasterId;
  566.     }
  567.     /**
  568.      * @param int $carrierMasterId
  569.      *
  570.      * @return Carrier
  571.      */
  572.     public function setCarrierMasterId(int $carrierMasterId): Carrier
  573.     {
  574.         $this->carrierMasterId $carrierMasterId;
  575.         return $this;
  576.     }
  577.     /**
  578.      * @return float
  579.      */
  580.     public function getVolumenDensity(): float
  581.     {
  582.         return $this->volumenDensity;
  583.     }
  584.     /**
  585.      * @param float $volumenDensity
  586.      *
  587.      * @return Carrier
  588.      */
  589.     public function setVolumenDensity(float $volumenDensity): Carrier
  590.     {
  591.         $this->volumenDensity $volumenDensity;
  592.         return $this;
  593.     }
  594.     /**
  595.      * @return string
  596.      */
  597.     public function getTableShippingCost(): string
  598.     {
  599.         return $this->tableShippingCost;
  600.     }
  601.     /**
  602.      * @param string $tableShippingCost
  603.      *
  604.      * @return Carrier
  605.      */
  606.     public function setTableShippingCost(string $tableShippingCost): Carrier
  607.     {
  608.         $this->tableShippingCost $tableShippingCost;
  609.         return $this;
  610.     }
  611.     /**
  612.      * @return int
  613.      */
  614.     public function getTransportMethod(): int
  615.     {
  616.         return $this->transportMethod;
  617.     }
  618.     /**
  619.      * @param int $transportMethod
  620.      *
  621.      * @return Carrier
  622.      */
  623.     public function setTransportMethod(int $transportMethod): Carrier
  624.     {
  625.         $this->transportMethod $transportMethod;
  626.         return $this;
  627.     }
  628.     /**
  629.      * @return int
  630.      */
  631.     public function getPackagingMethod(): int
  632.     {
  633.         return $this->packagingMethod;
  634.     }
  635.     /**
  636.      * @param int $packagingMethod
  637.      *
  638.      * @return Carrier
  639.      */
  640.     public function setPackagingMethod(int $packagingMethod): Carrier
  641.     {
  642.         $this->packagingMethod $packagingMethod;
  643.         return $this;
  644.     }
  645.     /**
  646.      * @return Warehouse
  647.      */
  648.     public function getWarehouse(): Warehouse
  649.     {
  650.         return $this->warehouse;
  651.     }
  652.     /**
  653.      * @param Warehouse $warehouse
  654.      *
  655.      * @return Carrier
  656.      */
  657.     public function setWarehouse(Warehouse $warehouse): Carrier
  658.     {
  659.         $this->warehouse $warehouse;
  660.         return $this;
  661.     }
  662.     /**
  663.      * @return bool
  664.      */
  665.     public function isFreeShippingAllowed(): bool
  666.     {
  667.         return $this->freeShippingAllowed;
  668.     }
  669. }