<?php
namespace App\Domain\Entity\Enumeration;
use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Delete;
use ApiPlatform\Metadata\Get;
use ApiPlatform\Metadata\GetCollection;
use ApiPlatform\Metadata\Post;
use ApiPlatform\Metadata\Put;
use App\Domain\Entity\Enumeration;
/**
* Class PersonDeleteReason
*
* @package App\Domain\Entity\Enumeration
*/
#[ApiResource(
operations : [
new Delete(security: "is_granted('ROLE_ADMIN')"),
new Get(),
new GetCollection(filters: ['soft_delete_filter']),
new Post(normalizationContext: ['groups' => ['translations']], security: "is_granted('ROLE_ADMIN')"),
new Put(normalizationContext: ['groups' => ['translations']], security: "is_granted('ROLE_ADMIN')"),
],
normalizationContext : ['groups' => ['enumeration_read']],
denormalizationContext: ['groups' => ['enumeration_write']]
)]
class PersonDeleteReason extends Enumeration
{
public const PERSON_DELETE_REASON_OTHER = 'person_delete_reason_other';
public const PERSON_DELETE_REASON_PRIVACY = 'person_delete_reason_privacy';
public const PERSON_DELETE_REASON_SECURITY = 'person_delete_reason_security';
public const PERSON_DELETE_REASON_TEMPORARY = 'person_delete_reason_temporary';
public const PERSON_DELETE_REASON_UNPRACTICAL = 'person_delete_reason_unpractical';
public const PERSON_DELETE_REASON_USELESS = 'person_delete_reason_useless';
}