src/OfficeBrain/Bundle/CmsBundle/Entity/CmsSearchCriteria.php line 17

Open in your IDE?
  1. <?php
  2. namespace App\OfficeBrain\Bundle\CmsBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Gedmo\Mapping\Annotation as Gedmo;
  5. use Symfony\Component\Validator\Constraints as Assert;
  6. use Doctrine\Common\Collections\ArrayCollection;
  7. /**
  8.  * CmsSearchCriteria.
  9.  *
  10.  * @ORM\Table("tbl_cms_search_criteria")
  11.  * @ORM\Entity(repositoryClass="App\OfficeBrain\Bundle\CmsBundle\Entity\CmsSearchCriteriaRepository")
  12.  * @Gedmo\SoftDeleteable(fieldName="deletedAt", timeAware=false)
  13.  */
  14. class CmsSearchCriteria
  15. {
  16.     const STATUS_ACTIVE 1;
  17.     /**
  18.      * @var int
  19.      *
  20.      * @ORM\Column(name="id", type="integer")
  21.      * @ORM\Id
  22.      * @ORM\GeneratedValue(strategy="AUTO")
  23.      */
  24.     private $id;
  25.     /**
  26.      * @var string
  27.      * @Assert\NotBlank(message="cms.search_criteria.admin.form.attribute.not_blank")
  28.      * @ORM\Column(name="attribute", type="text")
  29.      */
  30.     private $attribute;
  31.     /**
  32.      * @var int
  33.      *
  34.      * @ORM\Column(name="instance_id", type="integer", nullable=true)
  35.      */
  36.     private $instanceId;
  37.     /**
  38.      * @var string
  39.      *
  40.      * @ORM\Column(name="instance_type", type="string", length=255, nullable=true)
  41.      */
  42.     private $instanceType;
  43.     /**
  44.      * @var int
  45.      *
  46.      * @ORM\Column(name="country_id", type="integer", nullable=true)
  47.      */
  48.     private $countryId;
  49.     /**
  50.      * @var bool
  51.      *
  52.      * @ORM\Column(name="status", type="boolean", nullable=false)
  53.      */
  54.     private $status self::STATUS_ACTIVE;
  55.     /**
  56.      * @var int
  57.      *
  58.      * @ORM\Column(name="created_uid", type="integer", nullable=true)
  59.      */
  60.     private $createdUid;
  61.     /**
  62.      * @var int
  63.      *
  64.      * @ORM\Column(name="updated_uid", type="integer", nullable=true)
  65.      */
  66.     private $updatedUid;
  67.     /**
  68.      * @var int
  69.      *
  70.      * @ORM\Column(name="deleted_uid", type="integer", nullable=true)
  71.      */
  72.     private $deletedUid;
  73.     /**
  74.      * @var \DateTime
  75.      *
  76.      * @ORM\Column(name="created_at", type="datetime", nullable=true)
  77.      */
  78.     private $createdAt;
  79.     /**
  80.      * @var \DateTime
  81.      *
  82.      * @Gedmo\Timestampable(on="create")
  83.      * @ORM\Column(name="updated_at", type="datetime", nullable=true)
  84.      */
  85.     private $updatedAt;
  86.     /**
  87.      * @var \DateTime
  88.      *
  89.      * @ORM\Column(name="deleted_at", type="datetime", nullable=true)
  90.      */
  91.     private $deletedAt;
  92.     /**
  93.      * @ORM\OneToMany(targetEntity="CmsSearchCriteriaLanguage", mappedBy="cmsSearchCriteriaId", cascade={"all"})
  94.      */
  95.     private $languageMapping;
  96.     /**
  97.      * Constructor.
  98.      */
  99.     public function __construct()
  100.     {
  101.         $this->languageMapping = new ArrayCollection();
  102.     }
  103.     /**
  104.      * Add language mapping.
  105.      *
  106.      * @param CmsSearchCriteriaLanguage $languageMapping
  107.      *
  108.      * @return
  109.      */
  110.     public function addLanguageMapping(CmsSearchCriteriaLanguage $languageMapping)
  111.     {
  112.         $this->languageMapping[] = $languageMapping;
  113.         return $this;
  114.     }
  115.     /**
  116.      * Remove language mapping.
  117.      *
  118.      * @param CmsSearchCriteriaLanguage $languageMapping
  119.      */
  120.     public function removeLanguageMapping(CmsSearchCriteriaLanguage $languageMapping)
  121.     {
  122.         $this->languageMapping->removeElement($languageMapping);
  123.     }
  124.     /**
  125.      * Get language mapping.
  126.      *
  127.      * @return \Doctrine\Common\Collections\Collection
  128.      */
  129.     public function getLanguageMapping()
  130.     {
  131.         return $this->languageMapping;
  132.     }
  133.     /**
  134.      * Set id.
  135.      *
  136.      * @param int $id
  137.      *
  138.      * @return CmsSearchCriteria
  139.      */
  140.     public function setId($id)
  141.     {
  142.         $this->id $id;
  143.         return $this;
  144.     }
  145.     /**
  146.      * Get id.
  147.      *
  148.      * @return int
  149.      */
  150.     public function getId()
  151.     {
  152.         return $this->id;
  153.     }
  154.     /**
  155.      * Set attribute.
  156.      *
  157.      * @param string $attribute
  158.      *
  159.      * @return CmsSearchCriteria
  160.      */
  161.     public function setAttribute($attribute)
  162.     {
  163.         $this->attribute $attribute;
  164.         return $this;
  165.     }
  166.     /**
  167.      * Get attribute.
  168.      *
  169.      * @return string
  170.      */
  171.     public function getAttribute()
  172.     {
  173.         return $this->attribute;
  174.     }
  175.     /**
  176.      * Set countryId.
  177.      *
  178.      * @param int $countryId
  179.      *
  180.      * @return CmsSearchCriteria
  181.      */
  182.     public function setCountryId($countryId)
  183.     {
  184.         $this->countryId $countryId;
  185.         return $this;
  186.     }
  187.     /**
  188.      * Get countryId.
  189.      *
  190.      * @return int
  191.      */
  192.     public function getCountryId()
  193.     {
  194.         return $this->countryId;
  195.     }
  196.     /**
  197.      * Set status.
  198.      *
  199.      * @param bool $status
  200.      *
  201.      * @return CmsSearchCriteria
  202.      */
  203.     public function setStatus($status)
  204.     {
  205.         $this->status $status;
  206.         return $this;
  207.     }
  208.     /**
  209.      * Get status.
  210.      *
  211.      * @return bool
  212.      */
  213.     public function getStatus()
  214.     {
  215.         return $this->status;
  216.     }
  217.     /**
  218.      * Set createdUid.
  219.      *
  220.      * @param int $createdUid
  221.      *
  222.      * @return CmsSearchCriteria
  223.      */
  224.     public function setCreatedUid($createdUid)
  225.     {
  226.         $this->createdUid $createdUid;
  227.         return $this;
  228.     }
  229.     /**
  230.      * Get createdUid.
  231.      *
  232.      * @return int
  233.      */
  234.     public function getCreatedUid()
  235.     {
  236.         return $this->createdUid;
  237.     }
  238.     /**
  239.      * Set createdAt.
  240.      *
  241.      * @param \DateTime $createdAt
  242.      *
  243.      * @return CmsSearchCriteria
  244.      */
  245.     public function setCreatedAt($createdAt)
  246.     {
  247.         $this->createdAt $createdAt;
  248.         return $this;
  249.     }
  250.     /**
  251.      * Get createdAt.
  252.      *
  253.      * @return \DateTime
  254.      */
  255.     public function getCreatedAt()
  256.     {
  257.         return $this->createdAt;
  258.     }
  259.     /**
  260.      * Set updatedUid.
  261.      *
  262.      * @param int $updatedUid
  263.      *
  264.      * @return CmsSearchCriteria
  265.      */
  266.     public function setUpdatedUid($updatedUid)
  267.     {
  268.         $this->updatedUid $updatedUid;
  269.         return $this;
  270.     }
  271.     /**
  272.      * Get updatedUid.
  273.      *
  274.      * @return int
  275.      */
  276.     public function getUpdatedUid()
  277.     {
  278.         return $this->updatedUid;
  279.     }
  280.     /**
  281.      * Set updatedAt.
  282.      *
  283.      * @param \DateTime $updatedAt
  284.      *
  285.      * @return CmsSearchCriteria
  286.      */
  287.     public function setUpdatedAt($updatedAt)
  288.     {
  289.         $this->updatedAt $updatedAt;
  290.         return $this;
  291.     }
  292.     /**
  293.      * Get updatedAt.
  294.      *
  295.      * @return \DateTime
  296.      */
  297.     public function getUpdatedAt()
  298.     {
  299.         return $this->updatedAt;
  300.     }
  301.     /**
  302.      * Set deletedUid.
  303.      *
  304.      * @param int $deletedUid
  305.      *
  306.      * @return CmsSearchCriteria
  307.      */
  308.     public function setDeletedUid($deletedUid)
  309.     {
  310.         $this->deletedUid $deletedUid;
  311.         return $this;
  312.     }
  313.     /**
  314.      * Get deletedUid.
  315.      *
  316.      * @return int
  317.      */
  318.     public function getDeletedUid()
  319.     {
  320.         return $this->deletedUid;
  321.     }
  322.     /**
  323.      * Set deletedAt.
  324.      *
  325.      * @param \DateTime $deletedAt
  326.      *
  327.      * @return CmsSearchCriteria
  328.      */
  329.     public function setDeletedAt($deletedAt)
  330.     {
  331.         $this->deletedAt $deletedAt;
  332.         return $this;
  333.     }
  334.     /**
  335.      * Get deletedAt.
  336.      *
  337.      * @return \DateTime
  338.      */
  339.     public function getDeletedAt()
  340.     {
  341.         return $this->deletedAt;
  342.     }
  343.     /**
  344.      * Set instanceType.
  345.      *
  346.      * @param string $instanceType
  347.      *
  348.      * @return CmsSearchCriteria
  349.      */
  350.     public function setInstanceType($instanceType)
  351.     {
  352.         $this->instanceType $instanceType;
  353.         return $this;
  354.     }
  355.     /**
  356.      * Get instanceType.
  357.      *
  358.      * @return string
  359.      */
  360.     public function getInstanceType()
  361.     {
  362.         return $this->instanceType;
  363.     }
  364.     /**
  365.      * Set instanceId.
  366.      *
  367.      * @param int $instanceId
  368.      *
  369.      * @return CmsSearchCriteria
  370.      */
  371.     public function setInstanceId($instanceId)
  372.     {
  373.         $this->instanceId $instanceId;
  374.         return $this;
  375.     }
  376.     /**
  377.      * Get instanceId.
  378.      *
  379.      * @return int
  380.      */
  381.     public function getInstanceId()
  382.     {
  383.         return $this->instanceId;
  384.     }
  385. }