src/OfficeBrain/Bundle/ServiceGroupBundle/Entity/ServiceRuleMappingRules.php line 14

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. /**
  6.  * ServiceRuleMappingRules.
  7.  *
  8.  * @ORM\Table(name="tbl_service_rule_mapping_rules")
  9.  * @ORM\Entity(repositoryClass="App\OfficeBrain\Bundle\ServiceGroupBundle\Entity\ServiceRuleMappingRulesRepository")
  10.  */
  11. class ServiceRuleMappingRules
  12. {
  13.     /**
  14.      * @var int
  15.      *
  16.      * @ORM\Column(name="id", type="bigint",length=20, options={"unsigned"=true})
  17.      * @ORM\Id
  18.      * @ORM\GeneratedValue(strategy="AUTO")
  19.      */
  20.     private $id;
  21.     /**
  22.      * @ORM\OneToMany(targetEntity="ServiceRuleMappingMainConditions", mappedBy="ruleMappingRulesId")
  23.      */
  24.     private $ruleMapRulesId;
  25.     /**
  26.      * @ORM\OneToMany(targetEntity="ServiceRuleMappingActions", mappedBy="ruleMappingRuleId")
  27.      */
  28.     private $ruleMapActions;
  29.     /**
  30.      * @var int
  31.      *
  32.      * @ORM\ManyToOne(targetEntity="ServiceRuleMappingMaster", inversedBy="ruleMapMasterId")
  33.      * @ORM\JoinColumn(name="rule_mapping_id", referencedColumnName="id")
  34.      */
  35.     private $ruleMappingId;
  36.     /**
  37.      * @var int
  38.      *
  39.      * @ORM\Column(name="rule_master_id", type="bigint",length=20, options={"unsigned"=true})
  40.      */
  41.     private $ruleMasterId;
  42.     /**
  43.      * @var \DateTime
  44.      * @Gedmo\Timestampable(on="create")
  45.      * @ORM\Column(name="created_at", type="datetime")
  46.      */
  47.     private $createdAt;
  48.     /**
  49.      * @var \DateTime
  50.      * @Gedmo\Timestampable(on="update")
  51.      * @ORM\Column(name="updated_at", type="datetime", nullable=true)
  52.      */
  53.     private $updatedAt;
  54.     /**
  55.      * @var \DateTime
  56.      *
  57.      * @ORM\Column(name="deleted_at", type="datetime", nullable=true)
  58.      */
  59.     private $deletedAt;
  60.     /**
  61.      * @var int
  62.      * @ORM\Column(name="created_uid", type="bigint" ,length=20 ,options={"unsigned"=true})
  63.      */
  64.     private $createdUid;
  65.     /**
  66.      * @var int
  67.      * @ORM\Column(name="updated_uid", type="bigint" ,length=20 ,options={"unsigned"=true}, nullable=true)
  68.      */
  69.     private $updatedUid;
  70.     /**
  71.      * @var int
  72.      * @ORM\Column(name="deleted_uid", type="bigint" ,length=20 ,options={"unsigned"=true}, nullable=true)
  73.      */
  74.     private $deletedUid;
  75.     /**
  76.      * Set id.
  77.      *
  78.      * @param int $id
  79.      *
  80.      * @return ServiceRuleMappingRules
  81.      */
  82.     public function setId($id)
  83.     {
  84.         $this->id $id;
  85.         return $this;
  86.     }
  87.     /**
  88.      * Get id.
  89.      *
  90.      * @return int
  91.      */
  92.     public function getId()
  93.     {
  94.         return $this->id;
  95.     }
  96.     /**
  97.      * Set ruleMappingId.
  98.      *
  99.      * @param int $ruleMappingId
  100.      *
  101.      * @return ServiceRuleMappingRules
  102.      */
  103.     public function setRuleMappingId($ruleMappingId)
  104.     {
  105.         $this->ruleMappingId $ruleMappingId;
  106.         return $this;
  107.     }
  108.     /**
  109.      * Get ruleMappingId.
  110.      *
  111.      * @return int
  112.      */
  113.     public function getRuleMappingId()
  114.     {
  115.         return $this->ruleMappingId;
  116.     }
  117.     /**
  118.      * Set ruleMasterId.
  119.      *
  120.      * @param int $ruleMasterId
  121.      *
  122.      * @return ServiceRuleMappingRules
  123.      */
  124.     public function setRuleMasterId($ruleMasterId)
  125.     {
  126.         $this->ruleMasterId $ruleMasterId;
  127.         return $this;
  128.     }
  129.     /**
  130.      * Get ruleMasterId.
  131.      *
  132.      * @return int
  133.      */
  134.     public function getRuleMasterId()
  135.     {
  136.         return $this->ruleMasterId;
  137.     }
  138.     /**
  139.      * Set deletedAt.
  140.      *
  141.      * @param \DateTime $deletedAt
  142.      *
  143.      * @return ServiceRuleMappingRules
  144.      */
  145.     public function setDeletedAt($deletedAt)
  146.     {
  147.         $this->deletedAt = ($deletedAt === null) ? new \DateTime() : $deletedAt;
  148.         return $this;
  149.     }
  150.     /**
  151.      * Get deletedAt.
  152.      *
  153.      * @return \DateTime
  154.      */
  155.     public function getDeletedAt()
  156.     {
  157.         return $this->deletedAt;
  158.     }
  159.     /**
  160.      * Constructor.
  161.      */
  162.     public function __construct()
  163.     {
  164.         $this->ruleMapRulesId = new \Doctrine\Common\Collections\ArrayCollection();
  165.         $this->ruleMapActions = new \Doctrine\Common\Collections\ArrayCollection();
  166.     }
  167.     /**
  168.      * Set createdAt.
  169.      *
  170.      * @param \DateTime $createdAt
  171.      *
  172.      * @return ServiceRuleMappingRules
  173.      */
  174.     public function setCreatedAt($createdAt)
  175.     {
  176.         $this->createdAt $createdAt;
  177.         return $this;
  178.     }
  179.     /**
  180.      * Get createdAt.
  181.      *
  182.      * @return \DateTime
  183.      */
  184.     public function getCreatedAt()
  185.     {
  186.         return $this->createdAt;
  187.     }
  188.     /**
  189.      * Set updatedAt.
  190.      *
  191.      * @param \DateTime $updatedAt
  192.      *
  193.      * @return ServiceRuleMappingRules
  194.      */
  195.     public function setUpdatedAt($updatedAt)
  196.     {
  197.         $this->updatedAt $updatedAt;
  198.         return $this;
  199.     }
  200.     /**
  201.      * Get updatedAt.
  202.      *
  203.      * @return \DateTime
  204.      */
  205.     public function getUpdatedAt()
  206.     {
  207.         return $this->updatedAt;
  208.     }
  209.     /**
  210.      * Set createdUid.
  211.      *
  212.      * @param int $createdUid
  213.      *
  214.      * @return ServiceRuleMappingRules
  215.      */
  216.     public function setCreatedUid($createdUid)
  217.     {
  218.         $this->createdUid $createdUid;
  219.         return $this;
  220.     }
  221.     /**
  222.      * Get createdUid.
  223.      *
  224.      * @return int
  225.      */
  226.     public function getCreatedUid()
  227.     {
  228.         return $this->createdUid;
  229.     }
  230.     /**
  231.      * Set updatedUid.
  232.      *
  233.      * @param int $updatedUid
  234.      *
  235.      * @return ServiceRuleMappingRules
  236.      */
  237.     public function setUpdatedUid($updatedUid)
  238.     {
  239.         $this->updatedUid $updatedUid;
  240.         return $this;
  241.     }
  242.     /**
  243.      * Get updatedUid.
  244.      *
  245.      * @return int
  246.      */
  247.     public function getUpdatedUid()
  248.     {
  249.         return $this->updatedUid;
  250.     }
  251.     /**
  252.      * Set deletedUid.
  253.      *
  254.      * @param int $deletedUid
  255.      *
  256.      * @return ServiceRuleMappingRules
  257.      */
  258.     public function setDeletedUid($deletedUid)
  259.     {
  260.         $this->deletedUid $deletedUid;
  261.         return $this;
  262.     }
  263.     /**
  264.      * Get deletedUid.
  265.      *
  266.      * @return int
  267.      */
  268.     public function getDeletedUid()
  269.     {
  270.         return $this->deletedUid;
  271.     }
  272.     /**
  273.      * Add ruleMapRulesId.
  274.      *
  275.      * @param \App\OfficeBrain\Bundle\ServiceGroupBundle\Entity\ServiceRuleMappingMainConditions $ruleMapRulesId
  276.      *
  277.      * @return ServiceRuleMappingRules
  278.      */
  279.     public function addRuleMapRulesId(\App\OfficeBrain\Bundle\ServiceGroupBundle\Entity\ServiceRuleMappingMainConditions $ruleMapRulesId)
  280.     {
  281.         $this->ruleMapRulesId[] = $ruleMapRulesId;
  282.         return $this;
  283.     }
  284.     /**
  285.      * Remove ruleMapRulesId.
  286.      *
  287.      * @param \App\OfficeBrain\Bundle\ServiceGroupBundle\Entity\ServiceRuleMappingMainConditions $ruleMapRulesId
  288.      */
  289.     public function removeRuleMapRulesId(\App\OfficeBrain\Bundle\ServiceGroupBundle\Entity\ServiceRuleMappingMainConditions $ruleMapRulesId)
  290.     {
  291.         $this->ruleMapRulesId->removeElement($ruleMapRulesId);
  292.     }
  293.     /**
  294.      * Get ruleMapRulesId.
  295.      *
  296.      * @return \Doctrine\Common\Collections\Collection
  297.      */
  298.     public function getRuleMapRulesId()
  299.     {
  300.         return $this->ruleMapRulesId;
  301.     }
  302.     /**
  303.      * Add ruleMapActions.
  304.      *
  305.      * @param \App\OfficeBrain\Bundle\ServiceGroupBundle\Entity\ServiceRuleMappingActions $ruleMapActions
  306.      *
  307.      * @return ServiceRuleMappingRules
  308.      */
  309.     public function addRuleMapAction(\App\OfficeBrain\Bundle\ServiceGroupBundle\Entity\ServiceRuleMappingActions $ruleMapActions)
  310.     {
  311.         $this->ruleMapActions[] = $ruleMapActions;
  312.         return $this;
  313.     }
  314.     /**
  315.      * Remove ruleMapActions.
  316.      *
  317.      * @param \App\OfficeBrain\Bundle\ServiceGroupBundle\Entity\ServiceRuleMappingActions $ruleMapActions
  318.      */
  319.     public function removeRuleMapAction(\App\OfficeBrain\Bundle\ServiceGroupBundle\Entity\ServiceRuleMappingActions $ruleMapActions)
  320.     {
  321.         $this->ruleMapActions->removeElement($ruleMapActions);
  322.     }
  323.     /**
  324.      * Get ruleMapActions.
  325.      *
  326.      * @return \Doctrine\Common\Collections\Collection
  327.      */
  328.     public function getRuleMapActions()
  329.     {
  330.         return $this->ruleMapActions;
  331.     }
  332. }