-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathItemType.php
More file actions
154 lines (129 loc) · 2.55 KB
/
ItemType.php
File metadata and controls
154 lines (129 loc) · 2.55 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
<?php declare(strict_types = 1);
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Ramsey\Uuid\Uuid;
use Ramsey\Uuid\UuidInterface;
/**
* @ORM\Entity
*/
class ItemType
{
/**
* @var UuidInterface
*
* @ORM\Id
* @ORM\Column(type="guid", unique=true)
*/
protected $id;
/**
* @var string
* @ORM\Column(type="string", length=255)
*/
protected $commonName;
/**
* @var string|null
* @ORM\Column(type="string", length=1023, nullable=true)
*/
protected $officialName;
/**
* @var int|null
* @ORM\Column(type="integer", nullable=true)
*/
protected $basicRentalPrice;
/**
* @var string|null
* @ORM\Column(type="string", nullable=true)
*/
protected $productPageUrl;
/**
* @var string|null
* @TODO How to handle files
* @ORM\Column(type="string", nullable=true)
*/
protected $avatar;
/**
* @var string[]
* @TODO How to handle files
* @ORM\Column(type="json_array", nullable=true)
*/
protected $attachments;
/**
* Weight in grams.
*
* @var int|null
* @ORM\Column(type="integer", nullable=true)
*/
protected $weight;
/**
* ItemType constructor.
*
* @param string $commonName
*/
public function __construct(string $commonName)
{
$this->commonName = $commonName;
$this->id = Uuid::uuid4();
}
public function getCommonName(): string
{
return $this->commonName;
}
public function setCommonName(string $commonName): void
{
$this->commonName = $commonName;
}
public function getOfficialName(): ?string
{
return $this->officialName;
}
public function setOfficialName(?string $officialName): void
{
$this->officialName = $officialName;
}
public function getBasicRentalPrice(): ?int
{
return $this->basicRentalPrice;
}
public function setBasicRentalPrice(?int $basicRentalPrice): void
{
$this->basicRentalPrice = $basicRentalPrice;
}
public function getProductPageUrl(): ?string
{
return $this->productPageUrl;
}
public function setProductPageUrl(?string $productPageUrl): void
{
$this->productPageUrl = $productPageUrl;
}
public function getAvatar(): ?string
{
return $this->avatar;
}
public function setAvatar(?string $avatar): void
{
$this->avatar = $avatar;
}
/**
* @return string[]
*/
public function getAttachments(): array
{
return $this->attachments;
}
/**
* @param string[] $attachments
*/
public function setAttachments(array $attachments): void
{
$this->attachments = $attachments;
}
public function getWeight(): ?int
{
return $this->weight;
}
public function setWeight(?int $weight): void
{
$this->weight = $weight;
}
}