src/Entity/System/Carrier.php line 18

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