This commit is contained in:
2024-12-09 19:12:27 +04:00
parent 78094e41c1
commit a6f655d80f
10 changed files with 574 additions and 22 deletions
+62
View File
@@ -0,0 +1,62 @@
<?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;
}
}