<?phpnamespace App\Entity;use App\Entity\Enum\ClaimStateEnum;use App\Repository\ClaimRepository;use Doctrine\ORM\Mapping as ORM;use Gedmo\Mapping\Annotation as Gedmo;/** * @ORM\Entity(repositoryClass=ClaimRepository::class) */class Claim{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private int $id; /** * @ORM\Column(type="datetime_immutable") * @Gedmo\Timestampable(on="create") */ private $createdAt; /** * @ORM\ManyToOne(targetEntity=User::class) * @ORM\JoinColumn(nullable=false) * @Gedmo\Blameable(on="create") */ private $author; /** * @ORM\OneToOne(targetEntity=ProspectOnStore::class, mappedBy="claim") * @ORM\JoinColumn(nullable=false) */ private $prospectOnStore; /** * @ORM\Column(type="string", length=5) */ private $state=ClaimStateEnum::NEW; /** * @ORM\Column(type="text", nullable=true) */ private $message; public function getId(): ?int { return $this->id; } public function getCreatedAt(): ?\DateTimeImmutable { return $this->createdAt; } public function setCreatedAt(\DateTimeImmutable $createdAt): self { $this->createdAt = $createdAt; return $this; } public function getAuthor(): ?User { return $this->author; } public function setAuthor(?User $author): self { $this->author = $author; return $this; } public function getProspectOnStore(): ?ProspectOnStore { return $this->prospectOnStore; } public function setProspectOnStore(ProspectOnStore $prospectOnStore): self { $this->prospectOnStore = $prospectOnStore; $prospectOnStore->setClaim($this); return $this; } public function getState(): ?string { return $this->state; } public function getStateLabel(): ?string { return ClaimStateEnum::getStateName($this->state); } public function setState(string $state): self { $this->state = $state; return $this; } public function getMessage(): ?string { return $this->message; } public function setMessage(string $message): self { $this->message = $message; return $this; }}