<?php

namespace AppBundle\Entity\AccessAndFunction;
use AppBundle\Annotation\DefaultField;
use Doctrine\ORM\Mapping as ORM;
use Dunglas\ApiBundle\Annotation\Iri;
use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Validator\Constraints as Assert;
use AppBundle\Entity\Traits\TimestampableEntity;
use AppBundle\Entity\Traits\CreatorUpdaterEntity;
/**
 * Personnalisation d'une liste par un Access
 *
 * @Iri("http://schema.org/PersonalizedList")
 */
#[ORM\Entity]
class PersonalizedList
{
    use TimestampableEntity;
    use CreatorUpdaterEntity;
    /**
     * @var int
     */
    #[ORM\Column(type: 'integer')]
    #[ORM\Id]
    #[ORM\GeneratedValue(strategy: 'AUTO')]
    #[Groups(['personalizedlist'])]
    private $id;
    /**
     * @var Access
     */
    #[ORM\ManyToOne(targetEntity: 'Access', inversedBy: 'personalizedLists')]
    #[ORM\JoinColumn(nullable: false)]
    #[Assert\NotNull]
    #[Groups(['personalizedlist'])]
    private $access;
    /**
     * @var $label
     */
    #[ORM\Column(type: 'string', length: 200, nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['personalizedlist'])]
    private $label;
    /**
     * @var array
     */
    #[ORM\Column(type: 'json_array', nullable: true)]
    #[Groups(['personalizedlist'])]
    private $filters;
    #[ORM\Column(type: 'string', length: 150)]
    #[Assert\Type(type: 'string')]
    #[Groups(['personalizedlist'])]
    private $entity;
    /**
     * @var array
     */
    #[ORM\Column(type: 'json_array', nullable: true)]
    #[Groups(['personalizedlist'])]
    private $columns;
    /**
     * @var $menuKey
     */
    #[ORM\Column(type: 'string', length: 150, nullable: true)]
    #[Assert\Type(type: 'string')]
    #[Groups(['personalizedlist'])]
    private $menuKey;
    /**
     * Sets id.
     *
     * @param int $id
     *
     * @return $this
     */
    public function setId($id)
    {
        $this->id = $id;

        return $this;
    }
    /**
     * Gets id.
     *
     * @return int
     */
    public function getId()
    {
        return $this->id;
    }
    /**
     * Set filters
     *
     * @param array $filters
     *
     * @return PersonalizedList
     */
    public function setFilters($filters)
    {
        $this->filters = $filters;

        return $this;
    }
    /**
     * Get filters
     *
     * @return array
     */
    public function getFilters()
    {
        return $this->filters;
    }
    /**
     * Set columns
     *
     * @param array $columns
     *
     * @return PersonalizedList
     */
    public function setColumns($columns)
    {
        $this->columns = $columns;

        return $this;
    }
    /**
     * Get columns
     *
     * @return array
     */
    public function getColumns()
    {
        return $this->columns;
    }
    /**
     * Set access
     *
     * @param \AppBundle\Entity\AccessAndFunction\Access $access
     *
     * @return PersonalizedList
     */
    public function setAccess(\AppBundle\Entity\AccessAndFunction\Access $access)
    {
        $this->access = $access;

        return $this;
    }
    /**
     * Get access
     *
     * @return \AppBundle\Entity\AccessAndFunction\Access
     */
    public function getAccess()
    {
        return $this->access;
    }
    /**
     * Set menuKey
     *
     * @param string $menuKey
     *
     * @return PersonalizedList
     */
    public function setMenuKey($menuKey)
    {
        $this->menuKey = $menuKey;

        return $this;
    }
    /**
     * Get menuKey
     *
     * @return string
     */
    public function getMenuKey()
    {
        return $this->menuKey;
    }
    /**
     * Set label
     *
     * @param string $label
     *
     * @return PersonalizedList
     */
    public function setLabel($label)
    {
        $this->label = $label;

        return $this;
    }
    /**
     * Get label
     *
     * @return string
     */
    public function getLabel()
    {
        return $this->label;
    }
    /**
     * Set entity
     *
     * @param string $entity
     *
     * @return PersonalizedList
     */
    public function setEntity($entity)
    {
        $this->entity = $entity;

        return $this;
    }
    /**
     * Get entity
     *
     * @return string
     */
    public function getEntity()
    {
        return $this->entity;
    }
}
