vendor/crosiersource/crosierlib-radx/src/Entity/Vendas/PlanoPagto.php line 49

Open in your IDE?
  1. <?php
  2. namespace CrosierSource\CrosierLibRadxBundle\Entity\Vendas;
  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"={"planoPagto","entityId"},"enable_max_depth"=true},
  17.  *     denormalizationContext={"groups"={"planoPagto"},"enable_max_depth"=true},
  18.  *
  19.  *     itemOperations={
  20.  *          "get"={"path"="/ven/planoPagto/{id}", "security"="is_granted('ROLE_VENDAS')"},
  21.  *          "put"={"path"="/ven/planoPagto/{id}", "security"="is_granted('ROLE_VENDAS')"},
  22.  *          "delete"={"path"="/ven/planoPagto/{id}", "security"="is_granted('ROLE_ADMIN')"}
  23.  *     },
  24.  *     collectionOperations={
  25.  *          "get"={"path"="/ven/planoPagto", "security"="is_granted('ROLE_VENDAS')"},
  26.  *          "post"={"path"="/ven/planoPagto", "security"="is_granted('ROLE_VENDAS')"}
  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={"nome": "partial", "documento": "exact", "id": "exact"})
  37.  * @ApiFilter(OrderFilter::class, properties={"id", "documento", "nome", "updated"}, arguments={"orderParameterName"="order"})
  38.  *
  39.  * @EntityHandler(entityHandlerClass="CrosierSource\CrosierLibRadxBundle\EntityHandler\Vendas\PlanoPagtoEntityHandler")
  40.  *
  41.  * @ORM\Entity(repositoryClass="CrosierSource\CrosierLibRadxBundle\Repository\Vendas\PlanoPagtoRepository")
  42.  * @ORM\Table(name="ven_plano_pagto")
  43.  *
  44.  * @author Carlos Eduardo Pauluk
  45.  */
  46. class PlanoPagto implements EntityId
  47. {
  48.     use EntityIdTrait;
  49.     /**
  50.      *
  51.      * @ORM\Column(name="codigo", type="string")
  52.      * @Groups("planoPagto")
  53.      *
  54.      * @var null|string
  55.      */
  56.     public ?string $codigo null;
  57.     /**
  58.      *
  59.      * @ORM\Column(name="descricao", type="string")
  60.      * @Groups("planoPagto")
  61.      *
  62.      * @var null|string
  63.      */
  64.     public ?string $descricao null;
  65.     /**
  66.      *
  67.      * @ORM\Column(name="ativo", type="boolean")
  68.      * @Groups("planoPagto")
  69.      *
  70.      * @var bool|null
  71.      */
  72.     public ?bool $ativo true;
  73.     /**
  74.      *
  75.      * @ORM\Column(name="json_data", type="json")
  76.      * @var null|array
  77.      * @NotUppercase()
  78.      * @Groups("planoPagto")
  79.      */
  80.     public ?array $jsonData null;
  81. }