<?php
declare(strict_types=1);
namespace App\Domain\Entity;
use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\GetCollection;
use App\Domain\Entity\Behavior\Identifiable;
use Gedmo\SoftDeleteable\Traits\SoftDeleteable;
use Gedmo\Timestampable\Traits\Timestampable;
#[ApiResource(
operations : [
new GetCollection(),
],
normalizationContext : ['groups' => ['offer_token_read']],
denormalizationContext: ['groups' => ['offer_token_write']]
)]
class OfferToken
{
use Identifiable;
use SoftDeleteable;
use Timestampable;
public function __construct(
public string $token,
public string $name,
)
{ }
public function getToken(): string
{
return $this->token;
}
public function getName(): string
{
return $this->name;
}
}