1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Yandex\Market\Partner\Models; |
4
|
|
|
|
5
|
|
|
use Yandex\Common\Model; |
6
|
|
|
|
7
|
|
|
class MarketModel extends Model |
8
|
|
|
{ |
9
|
|
|
/** |
10
|
|
|
* @var int |
11
|
|
|
*/ |
12
|
|
|
protected $id; |
13
|
|
|
|
14
|
|
|
/** |
15
|
|
|
* @var string |
16
|
|
|
*/ |
17
|
|
|
protected $name; |
18
|
|
|
|
19
|
|
|
/** |
20
|
|
|
* @var MarketModelPrices |
21
|
|
|
*/ |
22
|
|
|
protected $prices; |
23
|
|
|
|
24
|
|
|
/** |
25
|
|
|
* @var MarketModelOffers |
26
|
|
|
*/ |
27
|
|
|
protected $offers; |
28
|
|
|
|
29
|
|
|
/** |
30
|
|
|
* @var int |
31
|
|
|
*/ |
32
|
|
|
protected $offlineOffers; |
33
|
|
|
|
34
|
|
|
/** |
35
|
|
|
* @var int |
36
|
|
|
*/ |
37
|
|
|
protected $onlineOffers; |
38
|
|
|
|
39
|
|
|
protected $mappingClasses = [ |
40
|
|
|
'prices' => MarketModelPrices::class, |
41
|
|
|
'offers' => MarketModelOffers::class, |
42
|
|
|
]; |
43
|
|
|
|
44
|
|
|
/** |
45
|
|
|
* Retrieve the id property |
46
|
|
|
* |
47
|
|
|
* @return int |
48
|
|
|
*/ |
49
|
|
|
public function getId() |
50
|
|
|
{ |
51
|
|
|
return $this->id; |
52
|
|
|
} |
53
|
|
|
|
54
|
|
|
/** |
55
|
|
|
* Set the id property |
56
|
|
|
* |
57
|
|
|
* @param int $id |
58
|
|
|
* @return MarketModel |
59
|
|
|
*/ |
60
|
|
|
public function setId($id) |
61
|
|
|
{ |
62
|
|
|
$this->id = $id; |
63
|
|
|
return $this; |
64
|
|
|
} |
65
|
|
|
|
66
|
|
|
/** |
67
|
|
|
* Get name |
68
|
|
|
* |
69
|
|
|
* @return string |
70
|
|
|
*/ |
71
|
|
|
public function getName() |
72
|
|
|
{ |
73
|
|
|
return $this->name; |
74
|
|
|
} |
75
|
|
|
|
76
|
|
|
/** |
77
|
|
|
* Set name |
78
|
|
|
* |
79
|
|
|
* @param string $name |
80
|
|
|
* @return MarketModel |
81
|
|
|
*/ |
82
|
|
|
public function setName($name) |
83
|
|
|
{ |
84
|
|
|
$this->name = $name; |
85
|
|
|
return $this; |
86
|
|
|
} |
87
|
|
|
|
88
|
|
|
/** |
89
|
|
|
* Get model prices |
90
|
|
|
* |
91
|
|
|
* @return MarketModelPrices|null |
92
|
|
|
*/ |
93
|
|
|
public function getPrices() |
94
|
|
|
{ |
95
|
|
|
return $this->prices; |
96
|
|
|
} |
97
|
|
|
|
98
|
|
|
/** |
99
|
|
|
* Set model prices |
100
|
|
|
* |
101
|
|
|
* @param MarketModelPrices $prices |
102
|
|
|
* @return MarketModel |
103
|
|
|
*/ |
104
|
|
|
public function setPrices($prices) |
105
|
|
|
{ |
106
|
|
|
$this->prices = $prices; |
107
|
|
|
return $this; |
108
|
|
|
} |
109
|
|
|
|
110
|
|
|
/** |
111
|
|
|
* Get model offers |
112
|
|
|
* |
113
|
|
|
* @return MarketModelOffers|null |
114
|
|
|
*/ |
115
|
|
|
public function getOffers() |
116
|
|
|
{ |
117
|
|
|
return $this->offers; |
118
|
|
|
} |
119
|
|
|
|
120
|
|
|
/** |
121
|
|
|
* Set model offers |
122
|
|
|
* |
123
|
|
|
* @param MarketModelOffers $offers |
124
|
|
|
* @return MarketModel |
125
|
|
|
*/ |
126
|
|
|
public function setOffers($offers) |
127
|
|
|
{ |
128
|
|
|
$this->offers = $offers; |
129
|
|
|
return $this; |
130
|
|
|
} |
131
|
|
|
|
132
|
|
|
/** |
133
|
|
|
* Get number of product offerings int the retail (offline) stores |
134
|
|
|
* |
135
|
|
|
* @return int|null |
136
|
|
|
*/ |
137
|
|
|
public function getOfflineOffers() |
138
|
|
|
{ |
139
|
|
|
return $this->offlineOffers; |
140
|
|
|
} |
141
|
|
|
|
142
|
|
|
/** |
143
|
|
|
* Set number of product offerings in retail (offline) stores |
144
|
|
|
* |
145
|
|
|
* @param int $offlineOffers |
146
|
|
|
* @return MarketModel |
147
|
|
|
*/ |
148
|
|
|
public function setOfflineOffers($offlineOffers) |
149
|
|
|
{ |
150
|
|
|
$this->offlineOffers = $offlineOffers; |
151
|
|
|
return $this; |
152
|
|
|
} |
153
|
|
|
|
154
|
|
|
/** |
155
|
|
|
* Get the number of product offerings online |
156
|
|
|
* |
157
|
|
|
* @return int|null |
158
|
|
|
*/ |
159
|
|
|
public function getOnlineOffers() |
160
|
|
|
{ |
161
|
|
|
return $this->onlineOffers; |
162
|
|
|
} |
163
|
|
|
|
164
|
|
|
/** |
165
|
|
|
* Set the number of product offerings online |
166
|
|
|
* |
167
|
|
|
* @param int $onlineOffers |
168
|
|
|
* @return MarketModel |
169
|
|
|
*/ |
170
|
|
|
public function setOnlineOffers($onlineOffers) |
171
|
|
|
{ |
172
|
|
|
$this->onlineOffers = $onlineOffers; |
173
|
|
|
return $this; |
174
|
|
|
} |
175
|
|
|
} |
176
|
|
|
|