src/Entity/Ean/Participation/EanPuntos.php line 59

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Ean\Participation;
  3. use ApiPlatform\Core\Annotation\ApiProperty;
  4. use ApiPlatform\Core\Annotation\ApiResource;
  5. use App\Entity\Participation\Step;
  6. use App\Repository\Ean\EanStepRepository;
  7. use Doctrine\ORM\Mapping as ORM;
  8. use Gedmo\Timestampable\Traits\TimestampableEntity;
  9. use Ramsey\Uuid\Doctrine\UuidGenerator;
  10. use Symfony\Component\Serializer\Annotation\Groups;
  11. use Symfony\Component\Serializer\Annotation\SerializedName;
  12. use Symfony\Component\Validator\Constraints as Assert;
  13. use Gedmo\Mapping\Annotation as Gedmo;
  14. use App\Entity\Ean\Ean;
  15. /**
  16.  * @ORM\Entity(repositoryClass=EanStepRepository::class)
  17.  * @ApiResource(
  18.  *     attributes={
  19.  *          "normalization_context"={
  20.  *              "groups"={
  21.  *                  "EanPuntos:output",
  22.  *                  "EanPuntos:io",
  23.  *               }
  24.  *          },
  25.  *          "denormalization_context"={
  26.  *              "groups"={
  27.  *                  "EanPuntos:input",
  28.  *                  "EanPuntos:io",
  29.  *              }
  30.  *          }
  31.  *      },
  32.  *     collectionOperations={
  33.  *          "post"={
  34.  *              "method"="POST",
  35.  *              "access_control"="is_granted('ROLE_USER')",
  36.  *          },
  37.  *          "admin-post"={
  38.  *              "method"="POST",
  39.  *              "path"="/admin/ean_puntos",
  40.  *              "access_control"="is_granted('ROLE_ADMIN_API')",
  41.  *              "validation_groups"={"Default", "Create"}
  42.  *          },
  43.  *          "get"={
  44.  *              "method"="GET",
  45.  *              "access_control"="is_granted('ROLE_USER')",
  46.  *          },
  47.  *     },
  48.  *     itemOperations={
  49.  *          "get"={
  50.  *              "method"="GET",
  51.  *              "access_control"="is_granted('ROLE_USER')",
  52.  *          },
  53.  *     },
  54.  * )
  55.  */
  56. class EanPuntos extends EanParticipation
  57. {
  58. }