vendor/crosiersource/crosierlib-base/src/Entity/Config/EntMenuLocator.php line 48

Open in your IDE?
  1. <?php
  2. namespace CrosierSource\CrosierLibBaseBundle\Entity\Config;
  3. use ApiPlatform\Core\Annotation\ApiFilter;
  4. use ApiPlatform\Core\Annotation\ApiResource;
  5. use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\OrderFilter;
  6. use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\SearchFilter;
  7. use ApiPlatform\Core\Serializer\Filter\PropertyFilter;
  8. use CrosierSource\CrosierLibBaseBundle\Doctrine\Annotations\EntityHandler;
  9. use CrosierSource\CrosierLibBaseBundle\Doctrine\Annotations\NotUppercase;
  10. use CrosierSource\CrosierLibBaseBundle\Entity\EntityId;
  11. use CrosierSource\CrosierLibBaseBundle\Entity\EntityIdTrait;
  12. use Doctrine\ORM\Mapping as ORM;
  13. use Symfony\Component\Serializer\Annotation\Groups;
  14. /**
  15.  * @ApiResource(
  16.  *     normalizationContext={"groups"={"entMenuLocator","entityId"},"enable_max_depth"=true},
  17.  *     denormalizationContext={"groups"={"entMenuLocator"},"enable_max_depth"=true},
  18.  *
  19.  *     itemOperations={
  20.  *          "get"={"path"="/cfg/entMenuLocator/{id}"},
  21.  *          "put"={"path"="/cfg/entMenuLocator/{id}", "security"="is_granted('ROLE_ADMIN')"},
  22.  *          "delete"={"path"="/cfg/entMenuLocator/{id}", "security"="is_granted('ROLE_ADMIN')"}
  23.  *     },
  24.  *     collectionOperations={
  25.  *          "get"={"path"="/cfg/entMenuLocator"},
  26.  *          "post"={"path"="/cfg/entMenuLocator", "security"="is_granted('ROLE_ADMIN')"}
  27.  *     },
  28.  *
  29.  *     attributes={
  30.  *          "pagination_items_per_page"=10,
  31.  *          "formats"={"jsonld", "csv"={"text/csv"}}
  32.  *     }
  33.  * )
  34.  * @ApiFilter(PropertyFilter::class)
  35.  *
  36.  * @ApiFilter(SearchFilter::class, properties={"codigo": "exact", "descricao": "partial", "id": "exact"})
  37.  * @ApiFilter(OrderFilter::class, properties={"id", "codigo", "descricao", "updated"}, arguments={"orderParameterName"="order"})
  38.  *
  39.  * @EntityHandler(entityHandlerClass="CrosierSource\CrosierLibRadxBundle\EntityHandler\Config\EntMenuLocatorEntityHandler")
  40.  *
  41.  * @ORM\Entity(repositoryClass="CrosierSource\CrosierLibBaseBundle\Repository\Config\EntMenuLocatorRepository")
  42.  * @ORM\Table(name="cfg_entmenu_locator")
  43.  * @author Carlos Eduardo Pauluk
  44.  */
  45. class EntMenuLocator implements EntityId
  46. {
  47.     use EntityIdTrait;
  48.     /**
  49.      * @ORM\Column(name="menu_uuid", type="string", nullable=false, length=36)
  50.      * @NotUppercase()
  51.      * @Groups("entity")
  52.      *
  53.      * @var null|string
  54.      */
  55.     public ?string $menuUUID null;
  56.     /**
  57.      *
  58.      * @ORM\Column(name="url_regexp", type="string", nullable=false, length=2000)
  59.      * @NotUppercase()
  60.      * @Groups("entity")
  61.      *
  62.      * @var null|string
  63.      */
  64.     public ?string $urlRegexp null;
  65.     /**
  66.      *
  67.      * @ORM\Column(name="nao_contendo", type="string")
  68.      * @NotUppercase()
  69.      * @Groups("entity")
  70.      *
  71.      * @var null|string
  72.      */
  73.     public ?string $naoContendo null;
  74.     /**
  75.      *
  76.      * @ORM\Column(name="quem", type="string", nullable=false, length=2000)
  77.      * @NotUppercase()
  78.      * @Groups("entity")
  79.      *
  80.      * @var null|string
  81.      */
  82.     public ?string $quem null;
  83.     
  84. }