<?php
namespace App\OfficeBrain\Bundle\ServiceGroupBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Symfony\Component\Validator\Constraints as Assert;
/**
* ServiceRuleMappingMaster.
*
* @ORM\Table("tbl_service_rule_mapping_master")
* @ORM\Entity(repositoryClass="App\OfficeBrain\Bundle\ServiceGroupBundle\Entity\ServiceRuleMappingMasterRepository")
*/
class ServiceRuleMappingMaster
{
/**
* @var int
*
* @ORM\Column(name="id", type="bigint",length=20, options={"unsigned"=true})
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @var string
*
* @ORM\Column(name="master_rule_type", type="string", length=50)
*/
private $masterRuleType;
/**
* @ORM\OneToMany(targetEntity="ServiceRuleMappingRules", mappedBy="ruleMappingId")
*/
private $ruleMapMasterId;
/**
* @var int
*
* @ORM\Column(name="country_id", type="integer")
* @Assert\NotBlank(message = "service_group.culture.not_blank")
*/
private $countryId;
/**
* @var \DateTime
*
* @ORM\Column(name="start_date", type="date", nullable=true)
*/
private $startDate;
/**
* @var \DateTime
*
* @ORM\Column(name="end_date", type="date", nullable=true)
*/
private $endDate;
/**
* @var int
*
* @ORM\Column(name="rule_type", type="integer", nullable=true)
*/
private $ruleType;
/**
* @var string
*
* @ORM\Column(name="charges_type", type="string", length=255, nullable=true)
*/
private $chargesType;
/**
* @var int
*
* @ORM\Column(name="amount_type", type="integer", nullable=true)
*/
private $amountType;
/**
* @var float
*
* @ORM\Column(name="amount", type="float", precision=10, scale=0, nullable=true)
*/
private $amount;
/**
* @var bool
*
* @ORM\Column(name="is_column_qty", type="boolean", nullable=true)
*/
private $isColumnQty = false;
/**
* @var bool
*
* @ORM\Column(name="is_discount_on_code", type="boolean")
*/
private $isDiscountOnCode = true;
/**
* @var int
*
* @ORM\Column(name="status", type="integer")
*/
private $status = true;
/**
* @var int
*
* @ORM\Column(name="priority", type="integer")
*/
private $priority;
/**
* @ORM\OneToMany(targetEntity="ServiceRuleMappingColumnQty", mappedBy="serviceRuleMappingId")
*/
private $serviceRuleMappingQtyId;
/**
* @ORM\OneToMany(targetEntity="ServiceRuleChargesEquation", mappedBy="serviceRuleMappingId", cascade={"persist"})
*/
private $serviceRuleChargesEquationId;
/**
* @ORM\OneToMany(targetEntity="ServiceRuleMappingGroup", mappedBy="serviceRuleMappingId")
*/
private $serviceRuleMappingGroupId;
/**
* @var \DateTime
*
* @ORM\Column(name="deleted_at", type="date", nullable=true)
*/
private $deletedAt;
/**
* @var \DateTime
* @Gedmo\Timestampable(on="create")
* @ORM\Column(name="created_at", type="date")
*/
private $createdAt;
/**
* @var \DateTime
* @Gedmo\Timestampable(on="update")
* @ORM\Column(name="updated_at", type="date")
*/
private $updatedAt;
/**
* @var int
* @ORM\Column(name="created_uid", type="bigint" ,length=20 ,options={"unsigned"=true})
*/
private $createdUid;
/**
* @var int
* @ORM\Column(name="updated_uid", type="bigint" ,length=20 ,options={"unsigned"=true}, nullable=true)
*/
private $updatedUid;
/**
* @var int
* @ORM\Column(name="deleted_uid", type="bigint" ,length=20 ,options={"unsigned"=true}, nullable=true)
*/
private $deletedUid;
/**
* @var \integer
*
* @ORM\Column(name="instance_id", type="integer",length=11,nullable=true)
*/
private $instanceId;
/**
* @var \string
*
* @ORM\Column(name="instance_type", type="string",length=255,nullable=true)
*/
private $instanceType;
/**
* Set id.
*
* @param int $id
*
* @return Service
*/
public function setId($id)
{
$this->id = $id;
return $this;
}
/**
* Get id.
*
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* Set deletedAt.
*
* @param \DateTime $deletedAt
*
* @return ServiceRuleMappingMaster
*/
public function setDeletedAt($deletedAt)
{
$this->deletedAt = ($deletedAt === null) ? new \DateTime() : $deletedAt;
return $this;
}
/**
* Get deletedAt.
*
* @return \DateTime
*/
public function getDeletedAt()
{
return $this->deletedAt;
}
/**
* Set updatedAt.
*
* @param \DateTime $updatedAt
*
* @return ServiceRuleMappingMaster
*/
public function setUpdatedAt($updatedAt)
{
$this->updatedAt = ($updatedAt === null) ? new \DateTime() : $updatedAt;
return $this;
}
/**
* Get updatedAt.
*
* @return \DateTime
*/
public function getUpdatedAt()
{
return $this->updatedAt;
}
/**
* Set createdUid.
*
* @param int $createdUid
*
* @return ServiceGroup
*/
public function setCreatedUid($createdUid)
{
$this->createdUid = $createdUid;
return $this;
}
/**
* Get createdUid.
*
* @return int
*/
public function getCreatedUid()
{
return $this->createdUid;
}
/**
* Set updatedUid.
*
* @param int $updatedUid
*
* @return ServiceGroup
*/
public function setUpdatedUid($updatedUid)
{
$this->updatedUid = $updatedUid;
return $this;
}
/**
* Get updatedUid.
*
* @return int
*/
public function getUpdatedUid()
{
return $this->updatedUid;
}
/**
* Set deletedUid.
*
* @param int $deletedUid
*
* @return ServiceGroup
*/
public function setDeletedUid($deletedUid)
{
$this->deletedUid = $deletedUid;
return $this;
}
/**
* Get deletedUid.
*
* @return int
*/
public function getDeletedUid()
{
return $this->deletedUid;
}
/**
* Set instanceId.
*
* @param int $instanceId
*
* @return Coupon
*/
public function setInstanceId($instanceId)
{
$this->instanceId = $instanceId;
return $this;
}
/**
* Get instanceId.
*
* @return int
*/
public function getInstanceId()
{
return $this->instanceId;
}
/**
* Set instanceType.
*
* @param string $instanceType
*
* @return Coupon
*/
public function setInstanceType($instanceType)
{
$this->instanceType = $instanceType;
return $this;
}
/**
* Get instanceType.
*
* @return string
*/
public function getInstanceType()
{
return $this->instanceType;
}
/**
* Set ruleMapMasterId.
*
* @param string $ruleMapMasterId
*
* @return Coupon
*/
public function setRuleMapMasterId($ruleMapMasterId)
{
$this->ruleMapMasterId = $ruleMapMasterId;
return $this;
}
/**
* Get ruleMapMasterId.
*
* @return string
*/
public function getRuleMapMasterId()
{
return $this->ruleMapMasterId;
}
/**
* Constructor.
*/
public function __construct()
{
$this->ruleMapMasterId = new \Doctrine\Common\Collections\ArrayCollection();
}
/**
* Set createdAt.
*
* @param \DateTime $createdAt
*
* @return ServiceRuleMappingMaster
*/
public function setCreatedAt($createdAt)
{
$this->createdAt = $createdAt;
return $this;
}
/**
* Get createdAt.
*
* @return \DateTime
*/
public function getCreatedAt()
{
return $this->createdAt;
}
/**
* Add ruleMapMasterId.
*
* @param \App\OfficeBrain\Bundle\ServiceGroupBundle\Entity\ServiceRuleMappingRules $ruleMapMasterId
*
* @return ServiceRuleMappingMaster
*/
public function addRuleMapMasterId(\App\OfficeBrain\Bundle\ServiceGroupBundle\Entity\ServiceRuleMappingRules $ruleMapMasterId)
{
$this->ruleMapMasterId[] = $ruleMapMasterId;
return $this;
}
/**
* Remove ruleMapMasterId.
*
* @param \App\OfficeBrain\Bundle\ServiceGroupBundle\Entity\ServiceRuleMappingRules $ruleMapMasterId
*/
public function removeRuleMapMasterId(\App\OfficeBrain\Bundle\ServiceGroupBundle\Entity\ServiceRuleMappingRules $ruleMapMasterId)
{
$this->ruleMapMasterId->removeElement($ruleMapMasterId);
}
/**
* Set countryId.
*
* @param int $countryId
*
* @return ServiceRuleMappingMaster
*/
public function setCountryId($countryId)
{
$this->countryId = $countryId;
return $this;
}
/**
* Get countryId.
*
* @return int
*/
public function getCountryId()
{
return $this->countryId;
}
/**
* Set status.
*
* @param int $status
*
* @return ServiceRuleMappingMaster
*/
public function setStatus($status)
{
$this->status = $status;
return $this;
}
/**
* Get status.
*
* @return int
*/
public function getStatus()
{
return $this->status;
}
/**
* Add serviceRuleMappingQtyId.
*
* @param \App\OfficeBrain\Bundle\ServiceGroupBundle\Entity\ServiceRuleMappingColumnQty $serviceRuleMappingQtyId
*
* @return ServiceRuleMappingMaster
*/
public function addServiceRuleMappingQtyId(\App\OfficeBrain\Bundle\ServiceGroupBundle\Entity\ServiceRuleMappingColumnQty $serviceRuleMappingQtyId)
{
$this->serviceRuleMappingQtyId[] = $serviceRuleMappingQtyId;
return $this;
}
/**
* Remove serviceRuleMappingQtyId.
*
* @param \App\OfficeBrain\Bundle\ServiceGroupBundle\Entity\ServiceRuleMappingColumnQty $serviceRuleMappingQtyId
*/
public function removeServiceRuleMappingQtyId(\App\OfficeBrain\Bundle\ServiceGroupBundle\Entity\ServiceRuleMappingColumnQty $serviceRuleMappingQtyId)
{
$this->serviceRuleMappingQtyId->removeElement($serviceRuleMappingQtyId);
}
/**
* Get serviceRuleMappingQtyId.
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getServiceRuleMappingQtyId()
{
return $this->serviceRuleMappingQtyId;
}
/**
* Add serviceRuleMappingGroupId.
*
* @param \App\OfficeBrain\Bundle\ServiceGroupBundle\Entity\ServiceRuleMappingGroup $serviceRuleMappingGroupId
*
* @return ServiceRuleMappingMaster
*/
public function addServiceRuleMappingGroupId(\App\OfficeBrain\Bundle\ServiceGroupBundle\Entity\ServiceRuleMappingGroup $serviceRuleMappingGroupId)
{
$this->serviceRuleMappingGroupId[] = $serviceRuleMappingGroupId;
return $this;
}
/**
* Remove serviceRuleMappingGroupId.
*
* @param \App\OfficeBrain\Bundle\ServiceGroupBundle\Entity\ServiceRuleMappingGroup $serviceRuleMappingGroupId
*/
public function removeServiceRuleMappingGroupId(\App\OfficeBrain\Bundle\ServiceGroupBundle\Entity\ServiceRuleMappingGroup $serviceRuleMappingGroupId)
{
$this->serviceRuleMappingGroupId->removeElement($serviceRuleMappingGroupId);
}
/**
* Get serviceRuleMappingGroupId.
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getServiceRuleMappingGroupId()
{
return $this->serviceRuleMappingGroupId;
}
/**
* Set masterRuleType.
*
* @param string $masterRuleType
*
* @return ServiceRuleMappingMaster
*/
public function setMasterRuleType($masterRuleType)
{
$this->masterRuleType = $masterRuleType;
return $this;
}
/**
* Get masterRuleType.
*
* @return string
*/
public function getMasterRuleType()
{
return $this->masterRuleType;
}
/**
* Set startDate.
*
* @param \DateTime $startDate
*
* @return ServiceRuleMaster
*/
public function setStartDate($startDate)
{
$this->startDate = $startDate;
return $this;
}
/**
* Get startDate.
*
* @return \DateTime
*/
public function getStartDate()
{
return $this->startDate;
}
/**
* Set endDate.
*
* @param \DateTime $endDate
*
* @return ServiceRuleMaster
*/
public function setEndDate($endDate)
{
$this->endDate = $endDate;
return $this;
}
/**
* Get endDate.
*
* @return \DateTime
*/
public function getEndDate()
{
return $this->endDate;
}
/**
* Set amountType.
*
* @param int $amountType
*
* @return ServiceRuleMappingActions
*/
public function setAmountType($amountType)
{
$this->amountType = $amountType;
return $this;
}
/**
* Get amountType.
*
* @return int
*/
public function getAmountType()
{
return $this->amountType;
}
/**
* Set amount.
*
* @param float $amount
*
* @return ServiceRuleMappingActions
*/
public function setAmount($amount)
{
$this->amount = $amount;
return $this;
}
/**
* Get amount.
*
* @return float
*/
public function getAmount()
{
return $this->amount;
}
/**
* Set isColumnQty.
*
* @param bool $isColumnQty
*
* @return ServiceRuleMappingActions
*/
public function setIsColumnQty($isColumnQty)
{
$this->isColumnQty = $isColumnQty;
return $this;
}
/**
* Get isColumnQty.
*
* @return bool
*/
public function getIsColumnQty()
{
return $this->isColumnQty;
}
/**
* Set isDiscountOnCode.
*
* @param bool $isDiscountOnCode
*
* @return ServiceRuleMappingActions
*/
public function setIsDiscountOnCode($isDiscountOnCode)
{
$this->isDiscountOnCode = $isDiscountOnCode;
return $this;
}
/**
* Get isDiscountOnCode.
*
* @return bool
*/
public function getIsDiscountOnCode()
{
return $this->isDiscountOnCode;
}
/**
* Set ruleType.
*
* @param int $ruleType
*
* @return ServiceRuleMappingActions
*/
public function setRuleType($ruleType)
{
$this->ruleType = $ruleType;
return $this;
}
/**
* Get ruleType.
*
* @return int
*/
public function getRuleType()
{
return $this->ruleType;
}
/**
* Set priority.
*
* @param int $priority
*
* @return ServiceRuleMappingActions
*/
public function setPriority($priority)
{
$this->priority = $priority;
return $this;
}
/**
* Get priority.
*
* @return int
*/
public function getPriority()
{
return $this->priority;
}
/**
* Add serviceRuleChargesEquationId
*
* @param \App\OfficeBrain\Bundle\ServiceGroupBundle\Entity\ServiceRuleChargesEquation $serviceRuleChargesEquationId
* @return ServiceRuleMappingMaster
*/
public function addServiceRuleChargesEquationId($serviceRuleChargesEquationId)
{
$this->serviceRuleChargesEquationId[] = $serviceRuleChargesEquationId;
return $this;
}
/**
* Remove serviceRuleChargesEquationId
*
* @param \App\OfficeBrain\Bundle\ServiceGroupBundle\Entity\ServiceRuleChargesEquation $serviceRuleChargesEquationId
*/
public function removeServiceRuleChargesEquationId($serviceRuleChargesEquationId)
{
$this->serviceRuleChargesEquationId->removeElement($serviceRuleChargesEquationId);
}
/**
* Get serviceRuleChargesEquationId
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getServiceRuleChargesEquationId()
{
return $this->serviceRuleChargesEquationId;
}
/**
* Set chargesType
*
* @param string $chargesType
* @return ServiceRuleMappingMaster
*/
public function setChargesType($chargesType)
{
$this->chargesType = $chargesType;
return $this;
}
/**
* Get chargesType
*
* @return string
*/
public function getChargesType()
{
return $this->chargesType;
}
}