Test Setup Failed
Push — master ( e2bcdd...a7e223 )
by Julito
36:07
created

ScheduledAnnouncement::__construct()   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
/* For licensing terms, see /license.txt */
3
4
namespace Chamilo\CoreBundle\Entity;
5
6
use Doctrine\ORM\Mapping as ORM;
7
8
/**
9
 * ScheduledAnnouncement
10
 *
11
 * @ORM\Table(name="scheduled_announcements")
12
 * @ORM\Entity
13
 */
14
class ScheduledAnnouncement
15
{
16
    /**
17
     * @var integer
18
     *
19
     * @ORM\Column(name="id", type="integer", nullable=false, unique=false)
20
     * @ORM\Id
21
     * @ORM\GeneratedValue()
22
     */
23
    private $id;
24
25
    /**
26
     * @var string
27
     *
28
     * @ORM\Column(name="subject", type="string", length=255, nullable=false, unique=false)
29
     */
30
    private $subject;
31
32
    /**
33
     * @var string
34
     *
35
     * @ORM\Column(name="message", type="text", unique=false)
36
     */
37
    private $message;
38
39
    /**
40
     * @var integer
41
     *
42
     * @ORM\Column(name="date", type="datetime", nullable=true)
43
     */
44
    private $date;
45
46
    /**
47
     * @var integer
48
     *
49
     * @ORM\Column(name="sent", type="boolean")
50
     */
51
    private $sent;
52
53
    /**
54
     * @var \DateTime
55
     *
56
     * @ORM\Column(name="session_id", type="int", nullable=false)
57
     */
58
    private $sessionId;
59
60
    /**
61
     * Constructor
62
     */
63
    public function __construct()
64
    {
65
    }
66
67
    /**
68
     * @return string
69
     */
70
    public function __toString()
71
    {
72
        return (string) $this->getSubject();
73
    }
74
75
    /**
76
     * @return int
77
     */
78
    public function getId(): int
79
    {
80
        return $this->id;
81
    }
82
83
    /**
84
     * @param int $id
85
     * @return ScheduledAnnouncement
86
     */
87
    public function setId(int $id): ScheduledAnnouncement
88
    {
89
        $this->id = $id;
90
91
        return $this;
92
    }
93
94
    /**
95
     * @return string
96
     */
97
    public function getSubject(): string
98
    {
99
        return $this->subject;
100
    }
101
102
    /**
103
     * @param string $subject
104
     * @return ScheduledAnnouncement
105
     */
106
    public function setSubject(string $subject): ScheduledAnnouncement
107
    {
108
        $this->subject = $subject;
109
110
        return $this;
111
    }
112
113
    /**
114
     * @return string
115
     */
116
    public function getMessage(): string
117
    {
118
        return $this->message;
119
    }
120
121
    /**
122
     * @param string $message
123
     * @return ScheduledAnnouncement
124
     */
125
    public function setMessage(string $message): ScheduledAnnouncement
126
    {
127
        $this->message = $message;
128
129
        return $this;
130
    }
131
132
    /**
133
     * @return int
134
     */
135
    public function getDate(): int
136
    {
137
        return $this->date;
138
    }
139
140
    /**
141
     * @param int $date
142
     * @return ScheduledAnnouncement
143
     */
144
    public function setDate(int $date): ScheduledAnnouncement
145
    {
146
        $this->date = $date;
147
148
        return $this;
149
    }
150
151
    /**
152
     * @return int
153
     */
154
    public function getSent(): int
155
    {
156
        return $this->sent;
157
    }
158
159
    /**
160
     * @param int $sent
161
     * @return ScheduledAnnouncement
162
     */
163
    public function setSent(int $sent): ScheduledAnnouncement
164
    {
165
        $this->sent = $sent;
166
167
        return $this;
168
    }
169
170
    /**
171
     * @return \DateTime
172
     */
173
    public function getSessionId(): \DateTime
174
    {
175
        return $this->sessionId;
176
    }
177
178
    /**
179
     * @param \DateTime $sessionId
180
     * @return ScheduledAnnouncement
181
     */
182
    public function setSessionId(\DateTime $sessionId): ScheduledAnnouncement
183
    {
184
        $this->sessionId = $sessionId;
185
186
        return $this;
187
    }
188
}
189