src/OfficeBrain/Bundle/EmailBundle/Entity/EmailTemplateHeaderMaster.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 Doctrine\Common\Collections\ArrayCollection;
  7. /**
  8.  *
  9.  * @author OfficeBrain 4795 <info@officebrain.com>
  10.  *
  11.  * Description: All template header will be saved here.
  12.  *
  13.  */
  14. /**
  15.  * EmailTemplateHeaderMaster
  16.  *
  17.  * @ORM\Table(name = "tbl_email_template_header_master")
  18.  * @ORM\Entity(repositoryClass="App\OfficeBrain\Bundle\EmailBundle\Entity\EmailTemplateHeaderMasterRepository")
  19.  */
  20. class EmailTemplateHeaderMaster
  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.      * @ORM\Column(name="name", type="string", length=255)
  54.      */
  55.     private $name;
  56.     
  57.     /**
  58.      * @ORM\OneToMany(targetEntity="\App\OfficeBrain\Bundle\EmailBundle\Entity\EmailTemplateHeaderLanguage", mappedBy="headerId", cascade={"all"})
  59.      */
  60.     protected $content;
  61.            
  62.     /**
  63.      * @var integer
  64.      *
  65.      * @ORM\Column(name="created_uid", type="integer")
  66.      */
  67.     private $createdUid;
  68.     
  69.     /**
  70.      * @ORM\Column(type="datetime", name="created_at")
  71.      */
  72.     protected $createdAt;
  73.     
  74.     /**
  75.      * @var integer
  76.      *
  77.      * @ORM\Column(name="updated_uid", type="integer", nullable=true)
  78.      */
  79.     private $updatedUid;
  80.     
  81.     /**
  82.      * @ORM\Column(type="datetime", name="updated_at", nullable=true)
  83.      */
  84.     protected $updatedAt;
  85.     
  86.     /**
  87.      * @var integer
  88.      *
  89.      * @ORM\Column(name="deleted_uid", type="integer", nullable=true)
  90.      */
  91.     private $deletedUid;
  92.     
  93.     /**
  94.      * @ORM\Column(type="datetime", name="deleted_at", nullable=true)
  95.      */
  96.     protected $deletedAt;
  97.     
  98.     /**
  99.      * @ORM\Column(type="string", name="status", length=100, options={"default" = "0"})
  100.      * @Assert\NotBlank(message="email.form.not_blank")
  101.      */
  102.     private $status;
  103.     public function __construct()
  104.     {
  105.         $this->content = new ArrayCollection();
  106.     }
  107.     
  108.     /**
  109.      * Get id
  110.      *
  111.      * @return integer
  112.      */
  113.     public function getId()
  114.     {
  115.         return $this->id;
  116.     }
  117.     /**
  118.      * Set instanceType
  119.      *
  120.      * @param string $instanceType
  121.      * @return EmailTemplateHeaderMaster
  122.      */
  123.     public function setInstanceType($instanceType)
  124.     {
  125.         $this->instanceType $instanceType;
  126.         return $this;
  127.     }
  128.     /**
  129.      * Get instanceType
  130.      *
  131.      * @return string
  132.      */
  133.     public function getInstanceType()
  134.     {
  135.         return $this->instanceType;
  136.     }
  137.     /**
  138.      * Set instanceId
  139.      *
  140.      * @param integer $instanceId
  141.      * @return EmailTemplateHeaderMaster
  142.      */
  143.     public function setInstanceId($instanceId)
  144.     {
  145.         $this->instanceId $instanceId;
  146.         return $this;
  147.     }
  148.     /**
  149.      * Get instanceId
  150.      *
  151.      * @return integer
  152.      */
  153.     public function getInstanceId()
  154.     {
  155.         return $this->instanceId;
  156.     }
  157.     /**
  158.      * Set name
  159.      *
  160.      * @param string $name
  161.      * @return EmailTemplateHeaderMaster
  162.      */
  163.     public function setName($name)
  164.     {
  165.         $this->name $name;
  166.         return $this;
  167.     }
  168.     /**
  169.      * Get name
  170.      *
  171.      * @return string
  172.      */
  173.     public function getName()
  174.     {
  175.         return $this->name;
  176.     }
  177.     public function __toString()
  178.     {
  179.         return (string) $this->name;
  180.     }
  181.     /**
  182.      * Set createdUid
  183.      *
  184.      * @param integer $createdUid
  185.      * @return EmailTemplateHeaderMaster
  186.      */
  187.     public function setCreatedUid($createdUid)
  188.     {
  189.         $this->createdUid $createdUid;
  190.         return $this;
  191.     }
  192.     /**
  193.      * Get createdUid
  194.      *
  195.      * @return integer
  196.      */
  197.     public function getCreatedUid()
  198.     {
  199.         return $this->createdUid;
  200.     }
  201.     /**
  202.      * Set createdAt
  203.      *
  204.      * @param \DateTime $createdAt
  205.      * @return EmailTemplateHeaderMaster
  206.      */
  207.     public function setCreatedAt($createdAt)
  208.     {
  209.         $this->createdAt $createdAt;
  210.         return $this;
  211.     }
  212.     /**
  213.      * Get createdAt
  214.      *
  215.      * @return \DateTime
  216.      */
  217.     public function getCreatedAt()
  218.     {
  219.         return $this->createdAt;
  220.     }
  221.     /**
  222.      * Set updatedUid
  223.      *
  224.      * @param integer $updatedUid
  225.      * @return EmailTemplateHeaderMaster
  226.      */
  227.     public function setUpdatedUid($updatedUid)
  228.     {
  229.         $this->updatedUid $updatedUid;
  230.         return $this;
  231.     }
  232.     /**
  233.      * Get updatedUid
  234.      *
  235.      * @return integer
  236.      */
  237.     public function getUpdatedUid()
  238.     {
  239.         return $this->updatedUid;
  240.     }
  241.     /**
  242.      * Set updatedAt
  243.      *
  244.      * @param \DateTime $updatedAt
  245.      * @return EmailTemplateHeaderMaster
  246.      */
  247.     public function setUpdatedAt($updatedAt)
  248.     {
  249.         $this->updatedAt $updatedAt;
  250.         return $this;
  251.     }
  252.     /**
  253.      * Get updatedAt
  254.      *
  255.      * @return \DateTime
  256.      */
  257.     public function getUpdatedAt()
  258.     {
  259.         return $this->updatedAt;
  260.     }
  261.     /**
  262.      * Set deletedUid
  263.      *
  264.      * @param integer $deletedUid
  265.      * @return EmailTemplateHeaderMaster
  266.      */
  267.     public function setDeletedUid($deletedUid)
  268.     {
  269.         $this->deletedUid $deletedUid;
  270.         return $this;
  271.     }
  272.     /**
  273.      * Get deletedUid
  274.      *
  275.      * @return integer
  276.      */
  277.     public function getDeletedUid()
  278.     {
  279.         return $this->deletedUid;
  280.     }
  281.     /**
  282.      * Set deletedAt
  283.      *
  284.      * @param \DateTime $deletedAt
  285.      * @return EmailTemplateHeaderMaster
  286.      */
  287.     public function setDeletedAt($deletedAt)
  288.     {
  289.         $this->deletedAt $deletedAt;
  290.         return $this;
  291.     }
  292.     /**
  293.      * Get deletedAt
  294.      *
  295.      * @return \DateTime
  296.      */
  297.     public function getDeletedAt()
  298.     {
  299.         return $this->deletedAt;
  300.     }
  301.     /**
  302.      * Add content
  303.      *
  304.      * @param \App\OfficeBrain\Bundle\EmailBundle\Entity\EmailTemplateLanguage $content
  305.      * @return EmailTemplateHeaderMaster
  306.      */
  307.     public function addContent(\App\OfficeBrain\Bundle\EmailBundle\Entity\EmailTemplateLanguage $content)
  308.     {
  309.         $this->content[] = $content;
  310.         return $this;
  311.     }
  312.     /**
  313.      * Remove content
  314.      *
  315.      * @param \App\OfficeBrain\Bundle\EmailBundle\Entity\EmailTemplateLanguage $content
  316.      */
  317.     public function removeContent(\App\OfficeBrain\Bundle\EmailBundle\Entity\EmailTemplateLanguage $content)
  318.     {
  319.         $this->content->removeElement($content);
  320.     }
  321.     
  322.     public function setContent($content)
  323.     {
  324.         foreach ($content as $contentval) {
  325.             $contentval->setHeaderId($this);
  326.         }
  327.     
  328.         $this->content $content;
  329.     }
  330.     /**
  331.      * Get content
  332.      *
  333.      * @return \Doctrine\Common\Collections\Collection
  334.      */
  335.     public function getContent()
  336.     {
  337.         return $this->content;
  338.     }
  339.     /**
  340.      * Set countryId
  341.      *
  342.      * @param integer $countryId
  343.      * @return EmailTemplateHeaderMaster
  344.      */
  345.     public function setCountryId($countryId)
  346.     {
  347.         $this->countryId $countryId;
  348.         return $this;
  349.     }
  350.     /**
  351.      * Get countryId
  352.      *
  353.      * @return integer
  354.      */
  355.     public function getCountryId()
  356.     {
  357.         return $this->countryId;
  358.     }
  359.     /**
  360.      * Set status
  361.      *
  362.      * @param string $status
  363.      *
  364.      * @return EmailTemplateHeaderMaster
  365.      */
  366.     public function setStatus($status)
  367.     {
  368.         $this->status $status;
  369.         return $this;
  370.     }
  371.     /**
  372.      * Get status
  373.      *
  374.      * @return string
  375.      */
  376.     public function getStatus()
  377.     {
  378.         return $this->status;
  379.     }
  380. }