/
Item.php
37 lines (34 loc) · 1.14 KB
/
Item.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
namespace App\Attribute\Entity;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity, ORM\Table(name: 'item')]
class Item
{
#[ORM\Id, ORM\Column(type: 'integer'), ORM\GeneratedValue]
private int $id;
#[ORM\Column(type: 'string')]
private string $sku;
#[ORM\Column(type: 'string')]
private string $type;
#[ORM\Column(type: 'string')]
private string $name;
#[ORM\Column(type: 'string')]
private string $description;
#[ORM\Column(type: 'integer')]
private int $shopId;
#[ORM\Column(type: 'boolean')]
private bool $isFree;
#[ORM\Column(type: 'boolean')]
private bool $isEnabled;
#[ORM\Column(type: 'boolean')]
private bool $isDeleted;
#[ORM\OneToMany(mappedBy: 'item', targetEntity: ItemPrice::class)]
private Collection $prices;
#[ORM\OneToMany(mappedBy: 'item', targetEntity: ItemMedia::class)]
private Collection $media;
#[ORM\OneToMany(mappedBy: 'item', targetEntity: ItemAttribute::class)]
private Collection $attributes;
#[ORM\ManyToMany(mappedBy: 'items', targetEntity: ItemGroup::class)]
private Collection $groups;
}