src/Entity/Card.php line 14
<?php
namespace App\Entity;
use ApiPlatform\Metadata\ApiResource;
use App\Repository\CardRepository;
use Doctrine\ORM\Mapping as ORM;
use ApiPlatform\Metadata\ApiFilter;
use ApiPlatform\Doctrine\Orm\Filter\SearchFilter;
#[ORM\Entity(repositoryClass: CardRepository::class)]
#[ApiResource]
#[ApiFilter(SearchFilter::class, properties: ["user" => "exact"])]
class Card
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $token = null;
#[ORM\Column(length: 2000, nullable: true)]
private ?string $customerToken = null;
#[ORM\Column(length: 10)]
private ?string $lastDigit = null;
#[ORM\ManyToOne(inversedBy: 'cards')]
private ?User $user = null;
public function getId(): ?int
{
return $this->id;
}
public function getToken(): ?string
{
return $this->token;
}
public function setToken(?string $token): static
{
$this->token = $token;
return $this;
}
public function getCustomerToken(): ?string
{
return $this->customerToken;
}
public function setCustomerToken(?string $customerToken): static
{
$this->customerToken = $customerToken;
return $this;
}
public function getLastDigit(): ?string
{
return $this->lastDigit;
}
public function setLastDigit(string $lastDigit): static
{
$this->lastDigit = $lastDigit;
return $this;
}
public function getUser(): ?User
{
return $this->user;
}
public function setUser(?User $user): static
{
$this->user = $user;
return $this;
}
}