Passed
Push — master ( 8d1a37...25babe )
by Julito
22:45
created

CLpItemView::getStatus()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
/* For licensing terms, see /license.txt */
6
7
namespace Chamilo\CourseBundle\Entity;
8
9
use Doctrine\ORM\Mapping as ORM;
10
11
/**
12
 * CLpItemView.
13
 *
14
 * @ORM\Table(
15
 *     name="c_lp_item_view",
16
 *     indexes={
17
 *         @ORM\Index(name="lp_item_id", columns={"lp_item_id"}),
18
 *         @ORM\Index(name="lp_view_id", columns={"lp_view_id"}),
19
 *     }
20
 * )
21
 * @ORM\Entity
22
 */
23
class CLpItemView
24
{
25
    /**
26
     * @ORM\Column(name="iid", type="integer")
27
     * @ORM\Id
28
     * @ORM\GeneratedValue
29
     */
30
    protected int $iid;
31
32
    /**
33
     * @ORM\ManyToOne(targetEntity="Chamilo\CourseBundle\Entity\CLpItem")
34
     * @ORM\JoinColumn(name="lp_item_id", referencedColumnName="iid", onDelete="CASCADE")
35
     */
36
    protected CLpItem $item;
37
38
    /**
39
     * @ORM\ManyToOne(targetEntity="Chamilo\CourseBundle\Entity\CLpView")
40
     * @ORM\JoinColumn(name="lp_view_id", referencedColumnName="iid", onDelete="CASCADE")
41
     */
42
    protected CLpView $view;
43
44
    /**
45
     * @ORM\Column(name="view_count", type="integer", nullable=false)
46
     */
47
    protected int $viewCount;
48
49
    /**
50
     * @ORM\Column(name="start_time", type="integer", nullable=false)
51
     */
52
    protected int $startTime;
53
54
    /**
55
     * @ORM\Column(name="total_time", type="integer", nullable=false)
56
     */
57
    protected int $totalTime;
58
59
    /**
60
     * @ORM\Column(name="score", type="float", precision=10, scale=0, nullable=false)
61
     */
62
    protected float $score;
63
64
    /**
65
     * @ORM\Column(name="status", type="string", length=32, nullable=false, options={"default":"not attempted"})
66
     */
67
    protected string $status;
68
69
    /**
70
     * @ORM\Column(name="suspend_data", type="text", nullable=true)
71
     */
72
    protected ?string $suspendData = null;
73
74
    /**
75
     * @ORM\Column(name="lesson_location", type="text", nullable=true)
76
     */
77
    protected ?string $lessonLocation = null;
78
79
    /**
80
     * @ORM\Column(name="core_exit", type="string", length=32, nullable=false, options={"default":"none"})
81
     */
82
    protected string $coreExit;
83
84
    /**
85
     * @ORM\Column(name="max_score", type="string", length=8, nullable=true)
86
     */
87
    protected ?string $maxScore = null;
88
89
    public function __construct()
90
    {
91
        $this->status = 'not attempted';
92
        $this->coreExit = 'none';
93
    }
94
95
    public function getIid(): int
96
    {
97
        return $this->iid;
98
    }
99
100
    public function setViewCount(int $viewCount): self
101
    {
102
        $this->viewCount = $viewCount;
103
104
        return $this;
105
    }
106
107
    /**
108
     * Get viewCount.
109
     *
110
     * @return int
111
     */
112
    public function getViewCount()
113
    {
114
        return $this->viewCount;
115
    }
116
117
    public function setStartTime(int $startTime): self
118
    {
119
        $this->startTime = $startTime;
120
121
        return $this;
122
    }
123
124
    /**
125
     * Get startTime.
126
     *
127
     * @return int
128
     */
129
    public function getStartTime()
130
    {
131
        return $this->startTime;
132
    }
133
134
    public function setTotalTime(int $totalTime): self
135
    {
136
        $this->totalTime = $totalTime;
137
138
        return $this;
139
    }
140
141
    /**
142
     * Get totalTime.
143
     *
144
     * @return int
145
     */
146
    public function getTotalTime()
147
    {
148
        return $this->totalTime;
149
    }
150
151
    public function setScore(float $score): self
152
    {
153
        $this->score = $score;
154
155
        return $this;
156
    }
157
158
    /**
159
     * Get score.
160
     *
161
     * @return float
162
     */
163
    public function getScore()
164
    {
165
        return $this->score;
166
    }
167
168
    public function setStatus(string $status): self
169
    {
170
        $this->status = $status;
171
172
        return $this;
173
    }
174
175
    /**
176
     * Get status.
177
     *
178
     * @return string
179
     */
180
    public function getStatus()
181
    {
182
        return $this->status;
183
    }
184
185
    public function setSuspendData(string $suspendData): self
186
    {
187
        $this->suspendData = $suspendData;
188
189
        return $this;
190
    }
191
192
    /**
193
     * Get suspendData.
194
     *
195
     * @return string
196
     */
197
    public function getSuspendData()
198
    {
199
        return $this->suspendData;
200
    }
201
202
    public function setLessonLocation(string $lessonLocation): self
203
    {
204
        $this->lessonLocation = $lessonLocation;
205
206
        return $this;
207
    }
208
209
    /**
210
     * Get lessonLocation.
211
     *
212
     * @return string
213
     */
214
    public function getLessonLocation()
215
    {
216
        return $this->lessonLocation;
217
    }
218
219
    public function setCoreExit(string $coreExit): self
220
    {
221
        $this->coreExit = $coreExit;
222
223
        return $this;
224
    }
225
226
    /**
227
     * Get coreExit.
228
     *
229
     * @return string
230
     */
231
    public function getCoreExit()
232
    {
233
        return $this->coreExit;
234
    }
235
236
    public function setMaxScore(string $maxScore): self
237
    {
238
        $this->maxScore = $maxScore;
239
240
        return $this;
241
    }
242
243
    /**
244
     * Get maxScore.
245
     *
246
     * @return string
247
     */
248
    public function getMaxScore()
249
    {
250
        return $this->maxScore;
251
    }
252
253
    public function getItem(): CLpItem
254
    {
255
        return $this->item;
256
    }
257
258
    public function setItem(CLpItem $item): self
259
    {
260
        $this->item = $item;
261
262
        return $this;
263
    }
264
265
    public function getView(): CLpView
266
    {
267
        return $this->view;
268
    }
269
270
    public function setView(CLpView $view): self
271
    {
272
        $this->view = $view;
273
274
        return $this;
275
    }
276
}
277