Files
pf2e-builder/src/Entity/Item.php
T
2024-12-09 19:12:27 +04:00

63 lines
1.2 KiB
PHP

<?php
namespace App\Entity;
use App\Repository\ItemRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Types\UuidType;
use Symfony\Component\Uid\Uuid;
#[ORM\Entity(repositoryClass: ItemRepository::class)]
class Item
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(type: UuidType::NAME, unique: true)]
#[ORM\GeneratedValue(strategy: 'CUSTOM')]
#[ORM\CustomIdGenerator(class: 'doctrine.uuid_generator')]
private ?Uuid $uuid = null;
#[ORM\Column(length: 255)]
private ?string $name = null;
#[ORM\Column(enumType: ItemTypeEnum::class)]
private ?ItemTypeEnum $type = null;
public function getId(): ?int
{
return $this->id;
}
public function getUuid(): ?Uuid
{
return $this->uuid;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): static
{
$this->name = $name;
return $this;
}
public function getType(): ?ItemTypeEnum
{
return $this->type;
}
public function setType(ItemTypeEnum $type): static
{
$this->type = $type;
return $this;
}
}