|
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
|
|
|
use Symfony\Component\Validator\Constraints as Assert; |
|
11
|
|
|
|
|
12
|
|
|
/** |
|
13
|
|
|
* CCalendarEventRepeat. |
|
14
|
|
|
* |
|
15
|
|
|
* @ORM\Table( |
|
16
|
|
|
* name="c_calendar_event_repeat", |
|
17
|
|
|
* indexes={ |
|
18
|
|
|
* } |
|
19
|
|
|
* ) |
|
20
|
|
|
* @ORM\Entity |
|
21
|
|
|
*/ |
|
22
|
|
|
class CCalendarEventRepeat |
|
23
|
|
|
{ |
|
24
|
|
|
/** |
|
25
|
|
|
* @ORM\Column(name="iid", type="integer") |
|
26
|
|
|
* @ORM\Id |
|
27
|
|
|
* @ORM\GeneratedValue |
|
28
|
|
|
*/ |
|
29
|
|
|
protected int $iid; |
|
30
|
|
|
|
|
31
|
|
|
/** |
|
32
|
|
|
* @ORM\ManyToOne(targetEntity="Chamilo\CourseBundle\Entity\CCalendarEvent", inversedBy="repeatEvents") |
|
33
|
|
|
* @ORM\JoinColumn(name="cal_id", referencedColumnName="iid") |
|
34
|
|
|
*/ |
|
35
|
|
|
protected CCalendarEvent $event; |
|
36
|
|
|
|
|
37
|
|
|
/** |
|
38
|
|
|
* @Assert\NotBlank() |
|
39
|
|
|
* @ORM\Column(name="cal_type", type="string", length=20, nullable=true) |
|
40
|
|
|
*/ |
|
41
|
|
|
protected ?string $calType = null; |
|
42
|
|
|
|
|
43
|
|
|
/** |
|
44
|
|
|
* @ORM\Column(name="cal_end", type="integer", nullable=true) |
|
45
|
|
|
*/ |
|
46
|
|
|
protected ?int $calEnd = null; |
|
47
|
|
|
|
|
48
|
|
|
/** |
|
49
|
|
|
* @ORM\Column(name="cal_frequency", type="integer", nullable=true) |
|
50
|
|
|
*/ |
|
51
|
|
|
protected ?int $calFrequency = null; |
|
52
|
|
|
|
|
53
|
|
|
/** |
|
54
|
|
|
* @ORM\Column(name="cal_days", type="string", length=7, nullable=true) |
|
55
|
|
|
*/ |
|
56
|
|
|
protected ?string $calDays = null; |
|
57
|
|
|
|
|
58
|
|
|
public function setCalType(string $calType): self |
|
59
|
|
|
{ |
|
60
|
|
|
$this->calType = $calType; |
|
61
|
|
|
|
|
62
|
|
|
return $this; |
|
63
|
|
|
} |
|
64
|
|
|
|
|
65
|
|
|
/** |
|
66
|
|
|
* Get calType. |
|
67
|
|
|
* |
|
68
|
|
|
* @return string |
|
69
|
|
|
*/ |
|
70
|
|
|
public function getCalType() |
|
71
|
|
|
{ |
|
72
|
|
|
return $this->calType; |
|
73
|
|
|
} |
|
74
|
|
|
|
|
75
|
|
|
public function setCalEnd(int $calEnd): self |
|
76
|
|
|
{ |
|
77
|
|
|
$this->calEnd = $calEnd; |
|
78
|
|
|
|
|
79
|
|
|
return $this; |
|
80
|
|
|
} |
|
81
|
|
|
|
|
82
|
|
|
/** |
|
83
|
|
|
* Get calEnd. |
|
84
|
|
|
* |
|
85
|
|
|
* @return int |
|
86
|
|
|
*/ |
|
87
|
|
|
public function getCalEnd() |
|
88
|
|
|
{ |
|
89
|
|
|
return $this->calEnd; |
|
90
|
|
|
} |
|
91
|
|
|
|
|
92
|
|
|
public function setCalFrequency(int $calFrequency): self |
|
93
|
|
|
{ |
|
94
|
|
|
$this->calFrequency = $calFrequency; |
|
95
|
|
|
|
|
96
|
|
|
return $this; |
|
97
|
|
|
} |
|
98
|
|
|
|
|
99
|
|
|
/** |
|
100
|
|
|
* Get calFrequency. |
|
101
|
|
|
* |
|
102
|
|
|
* @return int |
|
103
|
|
|
*/ |
|
104
|
|
|
public function getCalFrequency() |
|
105
|
|
|
{ |
|
106
|
|
|
return $this->calFrequency; |
|
107
|
|
|
} |
|
108
|
|
|
|
|
109
|
|
|
public function setCalDays(string $calDays): self |
|
110
|
|
|
{ |
|
111
|
|
|
$this->calDays = $calDays; |
|
112
|
|
|
|
|
113
|
|
|
return $this; |
|
114
|
|
|
} |
|
115
|
|
|
|
|
116
|
|
|
/** |
|
117
|
|
|
* Get calDays. |
|
118
|
|
|
* |
|
119
|
|
|
* @return string |
|
120
|
|
|
*/ |
|
121
|
|
|
public function getCalDays() |
|
122
|
|
|
{ |
|
123
|
|
|
return $this->calDays; |
|
124
|
|
|
} |
|
125
|
|
|
|
|
126
|
|
|
public function getEvent(): CCalendarEvent |
|
127
|
|
|
{ |
|
128
|
|
|
return $this->event; |
|
129
|
|
|
} |
|
130
|
|
|
} |
|
131
|
|
|
|