src/OfficeBrain/Bundle/EmailBundle/Entity/EmailEventMaster.php line 23

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