src/OfficeBrain/Bundle/ServiceGroupBundle/Entity/ServiceRuleMappingMaster.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\OfficeBrain\Bundle\ServiceGroupBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Gedmo\Mapping\Annotation as Gedmo;
  5. use Symfony\Component\Validator\Constraints as Assert;
  6. /**
  7.  * ServiceRuleMappingMaster.
  8.  *
  9.  * @ORM\Table("tbl_service_rule_mapping_master")
  10.  * @ORM\Entity(repositoryClass="App\OfficeBrain\Bundle\ServiceGroupBundle\Entity\ServiceRuleMappingMasterRepository")
  11.  */
  12. class ServiceRuleMappingMaster
  13. {
  14.     /**
  15.      * @var int
  16.      *
  17.      * @ORM\Column(name="id", type="bigint",length=20, options={"unsigned"=true})
  18.      * @ORM\Id
  19.      * @ORM\GeneratedValue(strategy="AUTO")
  20.      */
  21.     private $id;
  22.     /**
  23.      * @var string
  24.      *
  25.      * @ORM\Column(name="master_rule_type", type="string", length=50)
  26.      */
  27.     private $masterRuleType;
  28.     /**
  29.      * @ORM\OneToMany(targetEntity="ServiceRuleMappingRules", mappedBy="ruleMappingId")
  30.      */
  31.     private $ruleMapMasterId;
  32.     /**
  33.      * @var int
  34.      *
  35.      * @ORM\Column(name="country_id", type="integer")
  36.      * @Assert\NotBlank(message = "service_group.culture.not_blank")
  37.      */
  38.     private $countryId;
  39.     /**
  40.      * @var \DateTime
  41.      *
  42.      * @ORM\Column(name="start_date", type="date", nullable=true)
  43.      */
  44.     private $startDate;
  45.     /**
  46.      * @var \DateTime
  47.      *
  48.      * @ORM\Column(name="end_date", type="date", nullable=true)
  49.      */
  50.     private $endDate;
  51.     /**
  52.      * @var int
  53.      *
  54.      * @ORM\Column(name="rule_type", type="integer", nullable=true)
  55.      */
  56.     private $ruleType;
  57.     /**
  58.      * @var string
  59.      *
  60.      * @ORM\Column(name="charges_type", type="string", length=255, nullable=true)
  61.      */
  62.     private $chargesType;
  63.     /**
  64.      * @var int
  65.      *
  66.      * @ORM\Column(name="amount_type", type="integer", nullable=true)
  67.      */
  68.     private $amountType;
  69.     /**
  70.      * @var float
  71.      *
  72.      * @ORM\Column(name="amount", type="float", precision=10, scale=0, nullable=true)
  73.      */
  74.     private $amount;
  75.     /**
  76.      * @var bool
  77.      *
  78.      * @ORM\Column(name="is_column_qty", type="boolean", nullable=true)
  79.      */
  80.     private $isColumnQty false;
  81.     /**
  82.      * @var bool
  83.      *
  84.      * @ORM\Column(name="is_discount_on_code", type="boolean")
  85.      */
  86.     private $isDiscountOnCode true;
  87.     /**
  88.      * @var int
  89.      *
  90.      * @ORM\Column(name="status", type="integer")
  91.      */
  92.     private $status true;
  93.     /**
  94.      * @var int
  95.      *
  96.      * @ORM\Column(name="priority", type="integer")
  97.      */
  98.     private $priority;
  99.     /**
  100.      * @ORM\OneToMany(targetEntity="ServiceRuleMappingColumnQty", mappedBy="serviceRuleMappingId")
  101.      */
  102.     private $serviceRuleMappingQtyId;
  103.     /**
  104.      * @ORM\OneToMany(targetEntity="ServiceRuleChargesEquation", mappedBy="serviceRuleMappingId", cascade={"persist"})
  105.      */
  106.     private $serviceRuleChargesEquationId;
  107.     /**
  108.      * @ORM\OneToMany(targetEntity="ServiceRuleMappingGroup", mappedBy="serviceRuleMappingId")
  109.      */
  110.     private $serviceRuleMappingGroupId;
  111.     /**
  112.      * @var \DateTime
  113.      *
  114.      * @ORM\Column(name="deleted_at", type="date", nullable=true)
  115.      */
  116.     private $deletedAt;
  117.     /**
  118.      * @var \DateTime
  119.      * @Gedmo\Timestampable(on="create")
  120.      * @ORM\Column(name="created_at", type="date")
  121.      */
  122.     private $createdAt;
  123.     /**
  124.      * @var \DateTime
  125.      * @Gedmo\Timestampable(on="update")
  126.      * @ORM\Column(name="updated_at", type="date")
  127.      */
  128.     private $updatedAt;
  129.     /**
  130.      * @var int
  131.      * @ORM\Column(name="created_uid", type="bigint" ,length=20 ,options={"unsigned"=true})
  132.      */
  133.     private $createdUid;
  134.     /**
  135.      * @var int
  136.      * @ORM\Column(name="updated_uid", type="bigint" ,length=20 ,options={"unsigned"=true}, nullable=true)
  137.      */
  138.     private $updatedUid;
  139.     /**
  140.      * @var int
  141.      * @ORM\Column(name="deleted_uid", type="bigint" ,length=20 ,options={"unsigned"=true}, nullable=true)
  142.      */
  143.     private $deletedUid;
  144.     /**
  145.      * @var \integer
  146.      *
  147.      * @ORM\Column(name="instance_id", type="integer",length=11,nullable=true)
  148.      */
  149.     private $instanceId;
  150.     /**
  151.      * @var \string
  152.      *
  153.      * @ORM\Column(name="instance_type", type="string",length=255,nullable=true)
  154.      */
  155.     private $instanceType;
  156.     /**
  157.      * Set id.
  158.      *
  159.      * @param int $id
  160.      *
  161.      * @return Service
  162.      */
  163.     public function setId($id)
  164.     {
  165.         $this->id $id;
  166.         return $this;
  167.     }
  168.     /**
  169.      * Get id.
  170.      *
  171.      * @return int
  172.      */
  173.     public function getId()
  174.     {
  175.         return $this->id;
  176.     }
  177.     /**
  178.      * Set deletedAt.
  179.      *
  180.      * @param \DateTime $deletedAt
  181.      *
  182.      * @return ServiceRuleMappingMaster
  183.      */
  184.     public function setDeletedAt($deletedAt)
  185.     {
  186.         $this->deletedAt = ($deletedAt === null) ? new \DateTime() : $deletedAt;
  187.         return $this;
  188.     }
  189.     /**
  190.      * Get deletedAt.
  191.      *
  192.      * @return \DateTime
  193.      */
  194.     public function getDeletedAt()
  195.     {
  196.         return $this->deletedAt;
  197.     }
  198.     /**
  199.      * Set updatedAt.
  200.      *
  201.      * @param \DateTime $updatedAt
  202.      *
  203.      * @return ServiceRuleMappingMaster
  204.      */
  205.     public function setUpdatedAt($updatedAt)
  206.     {
  207.         $this->updatedAt = ($updatedAt === null) ? new \DateTime() : $updatedAt;
  208.         return $this;
  209.     }
  210.     /**
  211.      * Get updatedAt.
  212.      *
  213.      * @return \DateTime
  214.      */
  215.     public function getUpdatedAt()
  216.     {
  217.         return $this->updatedAt;
  218.     }
  219.     /**
  220.      * Set createdUid.
  221.      *
  222.      * @param int $createdUid
  223.      *
  224.      * @return ServiceGroup
  225.      */
  226.     public function setCreatedUid($createdUid)
  227.     {
  228.         $this->createdUid $createdUid;
  229.         return $this;
  230.     }
  231.     /**
  232.      * Get createdUid.
  233.      *
  234.      * @return int
  235.      */
  236.     public function getCreatedUid()
  237.     {
  238.         return $this->createdUid;
  239.     }
  240.     /**
  241.      * Set updatedUid.
  242.      *
  243.      * @param int $updatedUid
  244.      *
  245.      * @return ServiceGroup
  246.      */
  247.     public function setUpdatedUid($updatedUid)
  248.     {
  249.         $this->updatedUid $updatedUid;
  250.         return $this;
  251.     }
  252.     /**
  253.      * Get updatedUid.
  254.      *
  255.      * @return int
  256.      */
  257.     public function getUpdatedUid()
  258.     {
  259.         return $this->updatedUid;
  260.     }
  261.     /**
  262.      * Set deletedUid.
  263.      *
  264.      * @param int $deletedUid
  265.      *
  266.      * @return ServiceGroup
  267.      */
  268.     public function setDeletedUid($deletedUid)
  269.     {
  270.         $this->deletedUid $deletedUid;
  271.         return $this;
  272.     }
  273.     /**
  274.      * Get deletedUid.
  275.      *
  276.      * @return int
  277.      */
  278.     public function getDeletedUid()
  279.     {
  280.         return $this->deletedUid;
  281.     }
  282.     /**
  283.      * Set instanceId.
  284.      *
  285.      * @param int $instanceId
  286.      *
  287.      * @return Coupon
  288.      */
  289.     public function setInstanceId($instanceId)
  290.     {
  291.         $this->instanceId $instanceId;
  292.         return $this;
  293.     }
  294.     /**
  295.      * Get instanceId.
  296.      *
  297.      * @return int
  298.      */
  299.     public function getInstanceId()
  300.     {
  301.         return $this->instanceId;
  302.     }
  303.     /**
  304.      * Set instanceType.
  305.      *
  306.      * @param string $instanceType
  307.      *
  308.      * @return Coupon
  309.      */
  310.     public function setInstanceType($instanceType)
  311.     {
  312.         $this->instanceType $instanceType;
  313.         return $this;
  314.     }
  315.     /**
  316.      * Get instanceType.
  317.      *
  318.      * @return string
  319.      */
  320.     public function getInstanceType()
  321.     {
  322.         return $this->instanceType;
  323.     }
  324.     /**
  325.      * Set ruleMapMasterId.
  326.      *
  327.      * @param string $ruleMapMasterId
  328.      *
  329.      * @return Coupon
  330.      */
  331.     public function setRuleMapMasterId($ruleMapMasterId)
  332.     {
  333.         $this->ruleMapMasterId $ruleMapMasterId;
  334.         return $this;
  335.     }
  336.     /**
  337.      * Get ruleMapMasterId.
  338.      *
  339.      * @return string
  340.      */
  341.     public function getRuleMapMasterId()
  342.     {
  343.         return $this->ruleMapMasterId;
  344.     }
  345.     /**
  346.      * Constructor.
  347.      */
  348.     public function __construct()
  349.     {
  350.         $this->ruleMapMasterId = new \Doctrine\Common\Collections\ArrayCollection();
  351.     }
  352.     /**
  353.      * Set createdAt.
  354.      *
  355.      * @param \DateTime $createdAt
  356.      *
  357.      * @return ServiceRuleMappingMaster
  358.      */
  359.     public function setCreatedAt($createdAt)
  360.     {
  361.         $this->createdAt $createdAt;
  362.         return $this;
  363.     }
  364.     /**
  365.      * Get createdAt.
  366.      *
  367.      * @return \DateTime
  368.      */
  369.     public function getCreatedAt()
  370.     {
  371.         return $this->createdAt;
  372.     }
  373.     /**
  374.      * Add ruleMapMasterId.
  375.      *
  376.      * @param \App\OfficeBrain\Bundle\ServiceGroupBundle\Entity\ServiceRuleMappingRules $ruleMapMasterId
  377.      *
  378.      * @return ServiceRuleMappingMaster
  379.      */
  380.     public function addRuleMapMasterId(\App\OfficeBrain\Bundle\ServiceGroupBundle\Entity\ServiceRuleMappingRules $ruleMapMasterId)
  381.     {
  382.         $this->ruleMapMasterId[] = $ruleMapMasterId;
  383.         return $this;
  384.     }
  385.     /**
  386.      * Remove ruleMapMasterId.
  387.      *
  388.      * @param \App\OfficeBrain\Bundle\ServiceGroupBundle\Entity\ServiceRuleMappingRules $ruleMapMasterId
  389.      */
  390.     public function removeRuleMapMasterId(\App\OfficeBrain\Bundle\ServiceGroupBundle\Entity\ServiceRuleMappingRules $ruleMapMasterId)
  391.     {
  392.         $this->ruleMapMasterId->removeElement($ruleMapMasterId);
  393.     }
  394.     /**
  395.      * Set countryId.
  396.      *
  397.      * @param int $countryId
  398.      *
  399.      * @return ServiceRuleMappingMaster
  400.      */
  401.     public function setCountryId($countryId)
  402.     {
  403.         $this->countryId $countryId;
  404.         return $this;
  405.     }
  406.     /**
  407.      * Get countryId.
  408.      *
  409.      * @return int
  410.      */
  411.     public function getCountryId()
  412.     {
  413.         return $this->countryId;
  414.     }
  415.     /**
  416.      * Set status.
  417.      *
  418.      * @param int $status
  419.      *
  420.      * @return ServiceRuleMappingMaster
  421.      */
  422.     public function setStatus($status)
  423.     {
  424.         $this->status $status;
  425.         return $this;
  426.     }
  427.     /**
  428.      * Get status.
  429.      *
  430.      * @return int
  431.      */
  432.     public function getStatus()
  433.     {
  434.         return $this->status;
  435.     }
  436.     /**
  437.      * Add serviceRuleMappingQtyId.
  438.      *
  439.      * @param \App\OfficeBrain\Bundle\ServiceGroupBundle\Entity\ServiceRuleMappingColumnQty $serviceRuleMappingQtyId
  440.      *
  441.      * @return ServiceRuleMappingMaster
  442.      */
  443.     public function addServiceRuleMappingQtyId(\App\OfficeBrain\Bundle\ServiceGroupBundle\Entity\ServiceRuleMappingColumnQty $serviceRuleMappingQtyId)
  444.     {
  445.         $this->serviceRuleMappingQtyId[] = $serviceRuleMappingQtyId;
  446.         return $this;
  447.     }
  448.     /**
  449.      * Remove serviceRuleMappingQtyId.
  450.      *
  451.      * @param \App\OfficeBrain\Bundle\ServiceGroupBundle\Entity\ServiceRuleMappingColumnQty $serviceRuleMappingQtyId
  452.      */
  453.     public function removeServiceRuleMappingQtyId(\App\OfficeBrain\Bundle\ServiceGroupBundle\Entity\ServiceRuleMappingColumnQty $serviceRuleMappingQtyId)
  454.     {
  455.         $this->serviceRuleMappingQtyId->removeElement($serviceRuleMappingQtyId);
  456.     }
  457.     /**
  458.      * Get serviceRuleMappingQtyId.
  459.      *
  460.      * @return \Doctrine\Common\Collections\Collection
  461.      */
  462.     public function getServiceRuleMappingQtyId()
  463.     {
  464.         return $this->serviceRuleMappingQtyId;
  465.     }
  466.     /**
  467.      * Add serviceRuleMappingGroupId.
  468.      *
  469.      * @param \App\OfficeBrain\Bundle\ServiceGroupBundle\Entity\ServiceRuleMappingGroup $serviceRuleMappingGroupId
  470.      *
  471.      * @return ServiceRuleMappingMaster
  472.      */
  473.     public function addServiceRuleMappingGroupId(\App\OfficeBrain\Bundle\ServiceGroupBundle\Entity\ServiceRuleMappingGroup $serviceRuleMappingGroupId)
  474.     {
  475.         $this->serviceRuleMappingGroupId[] = $serviceRuleMappingGroupId;
  476.         return $this;
  477.     }
  478.     /**
  479.      * Remove serviceRuleMappingGroupId.
  480.      *
  481.      * @param \App\OfficeBrain\Bundle\ServiceGroupBundle\Entity\ServiceRuleMappingGroup $serviceRuleMappingGroupId
  482.      */
  483.     public function removeServiceRuleMappingGroupId(\App\OfficeBrain\Bundle\ServiceGroupBundle\Entity\ServiceRuleMappingGroup $serviceRuleMappingGroupId)
  484.     {
  485.         $this->serviceRuleMappingGroupId->removeElement($serviceRuleMappingGroupId);
  486.     }
  487.     /**
  488.      * Get serviceRuleMappingGroupId.
  489.      *
  490.      * @return \Doctrine\Common\Collections\Collection
  491.      */
  492.     public function getServiceRuleMappingGroupId()
  493.     {
  494.         return $this->serviceRuleMappingGroupId;
  495.     }
  496.     /**
  497.      * Set masterRuleType.
  498.      *
  499.      * @param string $masterRuleType
  500.      *
  501.      * @return ServiceRuleMappingMaster
  502.      */
  503.     public function setMasterRuleType($masterRuleType)
  504.     {
  505.         $this->masterRuleType $masterRuleType;
  506.         return $this;
  507.     }
  508.     /**
  509.      * Get masterRuleType.
  510.      *
  511.      * @return string
  512.      */
  513.     public function getMasterRuleType()
  514.     {
  515.         return $this->masterRuleType;
  516.     }
  517.     /**
  518.      * Set startDate.
  519.      *
  520.      * @param \DateTime $startDate
  521.      *
  522.      * @return ServiceRuleMaster
  523.      */
  524.     public function setStartDate($startDate)
  525.     {
  526.         $this->startDate $startDate;
  527.         return $this;
  528.     }
  529.     /**
  530.      * Get startDate.
  531.      *
  532.      * @return \DateTime
  533.      */
  534.     public function getStartDate()
  535.     {
  536.         return $this->startDate;
  537.     }
  538.     /**
  539.      * Set endDate.
  540.      *
  541.      * @param \DateTime $endDate
  542.      *
  543.      * @return ServiceRuleMaster
  544.      */
  545.     public function setEndDate($endDate)
  546.     {
  547.         $this->endDate $endDate;
  548.         return $this;
  549.     }
  550.     /**
  551.      * Get endDate.
  552.      *
  553.      * @return \DateTime
  554.      */
  555.     public function getEndDate()
  556.     {
  557.         return $this->endDate;
  558.     }
  559.     /**
  560.      * Set amountType.
  561.      *
  562.      * @param int $amountType
  563.      *
  564.      * @return ServiceRuleMappingActions
  565.      */
  566.     public function setAmountType($amountType)
  567.     {
  568.         $this->amountType $amountType;
  569.         return $this;
  570.     }
  571.     /**
  572.      * Get amountType.
  573.      *
  574.      * @return int
  575.      */
  576.     public function getAmountType()
  577.     {
  578.         return $this->amountType;
  579.     }
  580.     /**
  581.      * Set amount.
  582.      *
  583.      * @param float $amount
  584.      *
  585.      * @return ServiceRuleMappingActions
  586.      */
  587.     public function setAmount($amount)
  588.     {
  589.         $this->amount $amount;
  590.         return $this;
  591.     }
  592.     /**
  593.      * Get amount.
  594.      *
  595.      * @return float
  596.      */
  597.     public function getAmount()
  598.     {
  599.         return $this->amount;
  600.     }
  601.     /**
  602.      * Set isColumnQty.
  603.      *
  604.      * @param bool $isColumnQty
  605.      *
  606.      * @return ServiceRuleMappingActions
  607.      */
  608.     public function setIsColumnQty($isColumnQty)
  609.     {
  610.         $this->isColumnQty $isColumnQty;
  611.         return $this;
  612.     }
  613.     /**
  614.      * Get isColumnQty.
  615.      *
  616.      * @return bool
  617.      */
  618.     public function getIsColumnQty()
  619.     {
  620.         return $this->isColumnQty;
  621.     }
  622.     /**
  623.      * Set isDiscountOnCode.
  624.      *
  625.      * @param bool $isDiscountOnCode
  626.      *
  627.      * @return ServiceRuleMappingActions
  628.      */
  629.     public function setIsDiscountOnCode($isDiscountOnCode)
  630.     {
  631.         $this->isDiscountOnCode $isDiscountOnCode;
  632.         return $this;
  633.     }
  634.     /**
  635.      * Get isDiscountOnCode.
  636.      *
  637.      * @return bool
  638.      */
  639.     public function getIsDiscountOnCode()
  640.     {
  641.         return $this->isDiscountOnCode;
  642.     }
  643.     /**
  644.      * Set ruleType.
  645.      *
  646.      * @param int $ruleType
  647.      *
  648.      * @return ServiceRuleMappingActions
  649.      */
  650.     public function setRuleType($ruleType)
  651.     {
  652.         $this->ruleType $ruleType;
  653.         return $this;
  654.     }
  655.     /**
  656.      * Get ruleType.
  657.      *
  658.      * @return int
  659.      */
  660.     public function getRuleType()
  661.     {
  662.         return $this->ruleType;
  663.     }
  664.     /**
  665.      * Set priority.
  666.      *
  667.      * @param int $priority
  668.      *
  669.      * @return ServiceRuleMappingActions
  670.      */
  671.     public function setPriority($priority)
  672.     {
  673.         $this->priority $priority;
  674.         return $this;
  675.     }
  676.     /**
  677.      * Get priority.
  678.      *
  679.      * @return int
  680.      */
  681.     public function getPriority()
  682.     {
  683.         return $this->priority;
  684.     }
  685.     /**
  686.      * Add serviceRuleChargesEquationId
  687.      *
  688.      * @param \App\OfficeBrain\Bundle\ServiceGroupBundle\Entity\ServiceRuleChargesEquation $serviceRuleChargesEquationId
  689.      * @return ServiceRuleMappingMaster
  690.      */
  691.     public function addServiceRuleChargesEquationId($serviceRuleChargesEquationId)
  692.     {
  693.         $this->serviceRuleChargesEquationId[] = $serviceRuleChargesEquationId;
  694.         return $this;
  695.     }
  696.     /**
  697.      * Remove serviceRuleChargesEquationId
  698.      *
  699.      * @param \App\OfficeBrain\Bundle\ServiceGroupBundle\Entity\ServiceRuleChargesEquation $serviceRuleChargesEquationId
  700.      */
  701.     public function removeServiceRuleChargesEquationId($serviceRuleChargesEquationId)
  702.     {
  703.         $this->serviceRuleChargesEquationId->removeElement($serviceRuleChargesEquationId);
  704.     }
  705.     /**
  706.      * Get serviceRuleChargesEquationId
  707.      *
  708.      * @return \Doctrine\Common\Collections\Collection
  709.      */
  710.     public function getServiceRuleChargesEquationId()
  711.     {
  712.         return $this->serviceRuleChargesEquationId;
  713.     }
  714.     /**
  715.      * Set chargesType
  716.      *
  717.      * @param string $chargesType
  718.      * @return ServiceRuleMappingMaster
  719.      */
  720.     public function setChargesType($chargesType)
  721.     {
  722.         $this->chargesType $chargesType;
  723.         return $this;
  724.     }
  725.     /**
  726.      * Get chargesType
  727.      *
  728.      * @return string
  729.      */
  730.     public function getChargesType()
  731.     {
  732.         return $this->chargesType;
  733.     }
  734. }