src/Entity/ManagerIt.php line 44

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use ApiPlatform\Core\Annotation\ApiResource;
  4. use App\Repository\ManagerItRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  7. /**
  8.  * @ApiResource(
  9.  *     security= "is_granted('ROLE_MANAGER')",
  10.  *     normalizationContext={"groups"={"manager-it:read"}, "swagger_definition_name"="Read"},
  11.  *     denormalizationContext={"groups"={"manager-it:write"}, "swagger_definition_name"="Write"},
  12.  *     itemOperations={
  13.  *          "get"
  14.  *     },
  15.  *     collectionOperations={
  16.  *           "get",
  17.  *
  18.  *     },
  19.  *     attributes={
  20.  *          "pagination_items_per_page"=10,
  21.  *          "formats"={"jsonld", "json", "html", "jsonhal", "csv"={"text/csv"} }
  22.  *     }
  23.  * )
  24.  * @ORM\Entity(repositoryClass=ManagerItRepository::class)
  25.  * @UniqueEntity(
  26.  *          fields={"cin" },
  27.  *          entityClass=ManagerIt::class,
  28.  *          message="AbstractPeople with cin {{ value }} is already used."
  29.  * )
  30.  * @UniqueEntity(
  31.  *           fields={"email"},
  32.  *           entityClass=ManagerIt::class,
  33.  *           message="AbstractPeople with email {{ value }} is already used."
  34.  *     )
  35.  * @UniqueEntity(
  36.  *           fields={"mainPhone"},
  37.  *           entityClass=ManagerIt::class,
  38.  *           message="AbstractPeople with main phone {{ value }} is already used."
  39.  *     )
  40.  */
  41. class ManagerIt extends AbstractCollaborator
  42. {
  43. }