src/OfficeBrain/Bundle/ServiceGroupBundle/Entity/ServiceGroup.php line 21

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.  * Entity For service Group.
  7.  *
  8.  * @author (modify) OfficeBrain 4589
  9.  */
  10. /**
  11.  * ServiceGroup.
  12.  *
  13.  * @ORM\Table(name="tbl_service_group")
  14.  * @ORM\Entity(repositoryClass="App\OfficeBrain\Bundle\ServiceGroupBundle\Entity\ServiceGroupRepository")
  15.  * @Gedmo\SoftDeleteable(fieldName="deletedAt", timeAware=false)
  16.  */
  17. class ServiceGroup
  18. {
  19.     const STATUS_ACTIVE 1;
  20.     const STATUS_PENDING 0;
  21.     /**
  22.      * @var int @ORM\Column(name="id", type="bigint", options={"unsigned":true})
  23.      * @ORM\Id
  24.      * @ORM\GeneratedValue(strategy="AUTO")
  25.      */
  26.     private $id;
  27.     /**
  28.      * @var int
  29.      *
  30.      * @ORM\Column(name="country_id", type="bigint")
  31.      */
  32.     private $countryId;
  33.     /**
  34.      * @var \integer
  35.      *
  36.      * @ORM\Column(name="instance_id", type="integer",length=11,nullable=true)
  37.      */
  38.     private $instanceId;
  39.     /**
  40.      * @var \string
  41.      *
  42.      * @ORM\Column(name="instance_type", type="string",length=255,nullable=true)
  43.      */
  44.     private $instanceType;
  45.     /**
  46.      * @var int @ORM\Column(name="status", type="integer", length=4, nullable=true)
  47.      */
  48.     private $status self::STATUS_ACTIVE;
  49.     
  50.     /**
  51.      * @var int @ORM\Column(name="is_default", type="integer", length=1, nullable=false)
  52.      */
  53.     private $isDefault 0;
  54.     /**
  55.      * @var datetime
  56.      *
  57.      * @Gedmo\Timestampable(on="create")
  58.      * @ORM\Column(name="created_at",type="datetime")
  59.      */
  60.     protected $createdAt;
  61.     /**
  62.      * @var datetime
  63.      *
  64.      * @Gedmo\Timestampable(on="update")
  65.      * @ORM\Column( name="updated_at", type="datetime",nullable=true)
  66.      */
  67.     protected $updatedAt;
  68.     /**
  69.      * @var datetime
  70.      *
  71.      * @ORM\Column(name="deleted_at",type="datetime",  nullable=true)
  72.      */
  73.     protected $deletedAt;
  74.     /**
  75.      * @var int
  76.      * @ORM\Column(name="created_uid", type="bigint" ,length=20 ,options={"unsigned"=true})
  77.      */
  78.     private $createdUid;
  79.     /**
  80.      * @var int
  81.      * @ORM\Column(name="updated_uid", type="bigint" ,length=20 ,options={"unsigned"=true}, nullable=true)
  82.      */
  83.     private $updatedUid;
  84.     /**
  85.      * @var int
  86.      * @ORM\Column(name="deleted_uid", type="bigint" ,length=20 ,options={"unsigned"=true}, nullable=true)
  87.      */
  88.     private $deletedUid;
  89.     /**
  90.      * @ORM\OneToMany(targetEntity="\App\OfficeBrain\Bundle\UserBundle\Entity\User", mappedBy="serviceGroup")
  91.      * @ORM\JoinColumn(nullable=true)
  92.      */
  93.     private $user;
  94.     /**
  95.      * @ORM\OneToMany(targetEntity="ServiceGroupLanguage", mappedBy="serviceGroup", cascade={"all"})
  96.      */
  97.     private $languageMapping;
  98.     /**
  99.      * @ORM\OneToMany(targetEntity="ServiceRuleMappingGroup", mappedBy="serviceGroupId")
  100.      */
  101.     private $serviceRuleMapGroupId;
  102.     /**
  103.      * Set id.
  104.      *
  105.      * @param int $id
  106.      *
  107.      * @return ServiceGroup
  108.      */
  109.     public function setId($id)
  110.     {
  111.         $this->id $id;
  112.         return $this;
  113.     }
  114.     /**
  115.      * Get id.
  116.      *
  117.      * @return int
  118.      */
  119.     public function getId()
  120.     {
  121.         return $this->id;
  122.     }
  123.     /**
  124.      * Set status.
  125.      *
  126.      * @param int $status
  127.      *
  128.      * @return ServiceGroup
  129.      */
  130.     public function setStatus($status)
  131.     {
  132.         $this->status $status;
  133.         return $this;
  134.     }
  135.     /**
  136.      * Get status.
  137.      *
  138.      * @return int
  139.      */
  140.     public function getStatus()
  141.     {
  142.         return $this->status;
  143.     }
  144.     /**
  145.      * Set createdAt.
  146.      *
  147.      * @param \DateTime $createdAt
  148.      *
  149.      * @return ServiceGroup
  150.      */
  151.     public function setCreatedAt($createdAt)
  152.     {
  153.         $this->createdAt $createdAt;
  154.         return $this;
  155.     }
  156.     /**
  157.      * Get createdAt.
  158.      *
  159.      * @return \DateTime
  160.      */
  161.     public function getCreatedAt()
  162.     {
  163.         return $this->createdAt;
  164.     }
  165.     /**
  166.      * Set updatedAt.
  167.      *
  168.      * @param \DateTime $updatedAt
  169.      *
  170.      * @return ServiceGroup
  171.      */
  172.     public function setUpdatedAt($updatedAt)
  173.     {
  174.         $this->updatedAt $updatedAt;
  175.         return $this;
  176.     }
  177.     /**
  178.      * Get updatedAt.
  179.      *
  180.      * @return \DateTime
  181.      */
  182.     public function getUpdatedAt()
  183.     {
  184.         return $this->updatedAt;
  185.     }
  186.     /**
  187.      * Set deletedAt.
  188.      *
  189.      * @param \DateTime $deletedAt
  190.      *
  191.      * @return ServiceGroup
  192.      */
  193.     public function setDeletedAt($deletedAt)
  194.     {
  195.         $this->deletedAt $deletedAt;
  196.         return $this;
  197.     }
  198.     /**
  199.      * Get deletedAt.
  200.      *
  201.      * @return \DateTime
  202.      */
  203.     public function getDeletedAt()
  204.     {
  205.         return $this->deletedAt;
  206.     }
  207.     /**
  208.      * Set createdUid.
  209.      *
  210.      * @param int $createdUid
  211.      *
  212.      * @return ServiceGroup
  213.      */
  214.     public function setCreatedUid($createdUid)
  215.     {
  216.         $this->createdUid $createdUid;
  217.         return $this;
  218.     }
  219.     /**
  220.      * Get createdUid.
  221.      *
  222.      * @return int
  223.      */
  224.     public function getCreatedUid()
  225.     {
  226.         return $this->createdUid;
  227.     }
  228.     /**
  229.      * Set updatedUid.
  230.      *
  231.      * @param int $updatedUid
  232.      *
  233.      * @return ServiceGroup
  234.      */
  235.     public function setUpdatedUid($updatedUid)
  236.     {
  237.         $this->updatedUid $updatedUid;
  238.         return $this;
  239.     }
  240.     /**
  241.      * Get updatedUid.
  242.      *
  243.      * @return int
  244.      */
  245.     public function getUpdatedUid()
  246.     {
  247.         return $this->updatedUid;
  248.     }
  249.     /**
  250.      * Set deletedUid.
  251.      *
  252.      * @param int $deletedUid
  253.      *
  254.      * @return ServiceGroup
  255.      */
  256.     public function setDeletedUid($deletedUid)
  257.     {
  258.         $this->deletedUid $deletedUid;
  259.         return $this;
  260.     }
  261.     /**
  262.      * Get deletedUid.
  263.      *
  264.      * @return int
  265.      */
  266.     public function getDeletedUid()
  267.     {
  268.         return $this->deletedUid;
  269.     }
  270.     /**
  271.      * Constructor.
  272.      */
  273.     public function __construct()
  274.     {
  275.         $this->user = new \Doctrine\Common\Collections\ArrayCollection();
  276.         $this->languageMapping = new \Doctrine\Common\Collections\ArrayCollection();
  277.     }
  278.     /**
  279.      * Add user.
  280.      *
  281.      * @param \App\OfficeBrain\Bundle\UserBundle\Entity\User $user
  282.      *
  283.      * @return ServiceGroup
  284.      */
  285.     public function addUser(\App\OfficeBrain\Bundle\UserBundle\Entity\User $user)
  286.     {
  287.         $this->user[] = $user;
  288.         return $this;
  289.     }
  290.     /**
  291.      * Remove user.
  292.      *
  293.      * @param \App\OfficeBrain\Bundle\UserBundle\Entity\User $user
  294.      */
  295.     public function removeUser(\App\OfficeBrain\Bundle\UserBundle\Entity\User $user)
  296.     {
  297.         $this->user->removeElement($user);
  298.     }
  299.     /**
  300.      * Get user.
  301.      *
  302.      * @return \Doctrine\Common\Collections\Collection
  303.      */
  304.     public function getUser()
  305.     {
  306.         return $this->user;
  307.     }
  308.     /**
  309.      * Add languageMapping.
  310.      *
  311.      * @param ServiceGroupLanguage $languageMapping
  312.      *
  313.      * @return Coupon
  314.      */
  315.     public function addLanguageMapping(ServiceGroupLanguage $languageMapping)
  316.     {
  317.         $this->languageMapping[] = $languageMapping;
  318.         return $this;
  319.     }
  320.     /**
  321.      * Remove languageMapping.
  322.      *
  323.      * @param ServiceGroupLanguage $languageMapping
  324.      */
  325.     public function removeLanguageMapping(ServiceGroupLanguage $languageMapping)
  326.     {
  327.         $this->languageMapping->removeElement($languageMapping);
  328.     }
  329.     /**
  330.      * Get languageMapping.
  331.      *
  332.      * @return \Doctrine\Common\Collections\Collection
  333.      */
  334.     public function getLanguageMapping()
  335.     {
  336.         return $this->languageMapping;
  337.     }
  338.     /**
  339.      * Set instanceId.
  340.      *
  341.      * @param int $instanceId
  342.      *
  343.      * @return Coupon
  344.      */
  345.     public function setInstanceId($instanceId)
  346.     {
  347.         $this->instanceId $instanceId;
  348.         return $this;
  349.     }
  350.     /**
  351.      * Get instanceId.
  352.      *
  353.      * @return int
  354.      */
  355.     public function getInstanceId()
  356.     {
  357.         return $this->instanceId;
  358.     }
  359.     /**
  360.      * Set instanceType.
  361.      *
  362.      * @param string $instanceType
  363.      *
  364.      * @return Coupon
  365.      */
  366.     public function setInstanceType($instanceType)
  367.     {
  368.         $this->instanceType $instanceType;
  369.         return $this;
  370.     }
  371.     /**
  372.      * Get instanceType.
  373.      *
  374.      * @return string
  375.      */
  376.     public function getInstanceType()
  377.     {
  378.         return $this->instanceType;
  379.     }
  380.     /**
  381.      * Set countryId.
  382.      *
  383.      * @param int $countryId
  384.      *
  385.      * @return ServiceGroup
  386.      */
  387.     public function setCountryId($countryId)
  388.     {
  389.         $this->countryId $countryId;
  390.         return $this;
  391.     }
  392.     /**
  393.      * Get countryId.
  394.      *
  395.      * @return int
  396.      */
  397.     public function getCountryId()
  398.     {
  399.         return $this->countryId;
  400.     }
  401.     /**
  402.      * Add serviceRuleMapGroupId.
  403.      *
  404.      * @param \App\OfficeBrain\Bundle\ServiceGroupBundle\Entity\ServiceRuleMappingGroup $serviceRuleMapGroupId
  405.      *
  406.      * @return ServiceGroup
  407.      */
  408.     public function addServiceRuleMapGroupId(\App\OfficeBrain\Bundle\ServiceGroupBundle\Entity\ServiceRuleMappingGroup $serviceRuleMapGroupId)
  409.     {
  410.         $this->serviceRuleMapGroupId[] = $serviceRuleMapGroupId;
  411.         return $this;
  412.     }
  413.     /**
  414.      * Remove serviceRuleMapGroupId.
  415.      *
  416.      * @param \App\OfficeBrain\Bundle\ServiceGroupBundle\Entity\ServiceRuleMappingGroup $serviceRuleMapGroupId
  417.      */
  418.     public function removeServiceRuleMapGroupId(\App\OfficeBrain\Bundle\ServiceGroupBundle\Entity\ServiceRuleMappingGroup $serviceRuleMapGroupId)
  419.     {
  420.         $this->serviceRuleMapGroupId->removeElement($serviceRuleMapGroupId);
  421.     }
  422.     /**
  423.      * Get serviceRuleMapGroupId.
  424.      *
  425.      * @return \Doctrine\Common\Collections\Collection
  426.      */
  427.     public function getServiceRuleMapGroupId()
  428.     {
  429.         return $this->serviceRuleMapGroupId;
  430.     }
  431.     
  432.     /**
  433.      * Set isDefault.
  434.      *
  435.      * @param int $isDefault
  436.      *
  437.      * @return ServiceGroup
  438.      */
  439.     public function setIsDefault($isDefault)
  440.     {
  441.         $this->isDefault $isDefault;
  442.     
  443.         return $this;
  444.     }
  445.     
  446.     /**
  447.      * Get isDefault.
  448.      *
  449.      * @return int
  450.      */
  451.     public function getIsDefault()
  452.     {
  453.         return $this->isDefault;
  454.     }
  455. }