wiederaufbau
This commit is contained in:
parent
fe9820ef4b
commit
72ded82226
9 changed files with 217 additions and 34 deletions
|
@ -11,23 +11,18 @@ use Symfony\Component\Uid\Ulid;
|
|||
#[ORM\Entity(repositoryClass: ItemExtraRepository::class)]
|
||||
class ItemExtra
|
||||
{
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue(strategy: 'CUSTOM')]
|
||||
#[ORM\Column(type: UlidType::NAME, unique: true)]
|
||||
#[ORM\CustomIdGenerator(class: UlidGenerator::class)]
|
||||
private Ulid $id;
|
||||
|
||||
#[ORM\Column(length: 50)]
|
||||
private string|null $name = null;
|
||||
|
||||
#[ORM\ManyToOne(inversedBy: 'itemExtras')]
|
||||
#[ORM\JoinColumn(nullable: false)]
|
||||
private MenuItem|null $menuItem = null;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->id = new Ulid;
|
||||
}
|
||||
public function __construct(
|
||||
#[ORM\Column(length: 50)]
|
||||
private string|null $name = null,
|
||||
#[ORM\ManyToOne(inversedBy: 'itemExtras')]
|
||||
#[ORM\JoinColumn(nullable: false)]
|
||||
private MenuItem|null $menuItem = null,
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue(strategy: 'CUSTOM')]
|
||||
#[ORM\Column(type: UlidType::NAME, unique: true)]
|
||||
#[ORM\CustomIdGenerator(class: UlidGenerator::class)]
|
||||
private Ulid $id = new Ulid,
|
||||
) {}
|
||||
|
||||
public function getId(): Ulid
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue