Completed
Push — master ( 1d5aab...1362ac )
by Yannick
02:39 queued 01:44
created

Ticket::getLpId()   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\CoreBundle\Entity;
8
9
use DateTime;
10
use Doctrine\ORM\Mapping as ORM;
11
use Symfony\Component\Validator\Constraints as Assert;
12
13
#[ORM\Table(name: 'ticket_ticket')]
14
#[ORM\Entity]
15
class Ticket
16
{
17
    #[ORM\Column(name: 'id', type: 'integer')]
18
    #[ORM\Id]
19
    #[ORM\GeneratedValue]
20
    protected ?int $id = null;
21
22
    #[ORM\Column(name: 'code', type: 'string', length: 255, nullable: false)]
23
    protected string $code;
24
25
    #[ORM\Column(name: 'subject', type: 'string', length: 255, nullable: false)]
26
    protected string $subject;
27
28
    #[ORM\Column(name: 'message', type: 'text', nullable: true)]
29
    protected ?string $message = null;
30
31
    #[ORM\ManyToOne(targetEntity: TicketProject::class)]
32
    #[ORM\JoinColumn(name: 'project_id', referencedColumnName: 'id')]
33
    protected TicketProject $project;
34
35
    #[ORM\ManyToOne(targetEntity: TicketCategory::class)]
36
    #[ORM\JoinColumn(name: 'category_id', referencedColumnName: 'id')]
37
    protected TicketCategory $category;
38
39
    #[ORM\ManyToOne(targetEntity: TicketPriority::class)]
40
    #[ORM\JoinColumn(name: 'priority_id', referencedColumnName: 'id')]
41
    protected TicketPriority $priority;
42
43
    #[ORM\ManyToOne(targetEntity: Course::class)]
44
    #[ORM\JoinColumn(name: 'course_id', referencedColumnName: 'id', onDelete: 'CASCADE')]
45
    protected Course $course;
46
47
    #[ORM\ManyToOne(targetEntity: Session::class)]
48
    #[ORM\JoinColumn(name: 'session_id', referencedColumnName: 'id', onDelete: 'SET NULL')]
49
    protected Session $session;
50
51
    #[Assert\NotBlank]
52
    #[ORM\Column(name: 'personal_email', type: 'string', length: 255, nullable: false)]
53
    protected string $personalEmail;
54
55
    #[ORM\ManyToOne(targetEntity: User::class)]
56
    #[ORM\JoinColumn(name: 'assigned_last_user', referencedColumnName: 'id', onDelete: 'CASCADE')]
57
    protected ?User $assignedLastUser = null;
58
59
    #[ORM\ManyToOne(targetEntity: TicketStatus::class)]
60
    #[ORM\JoinColumn(name: 'status_id', referencedColumnName: 'id')]
61
    protected TicketStatus $status;
62
63
    #[ORM\Column(name: 'total_messages', type: 'integer', nullable: false)]
64
    protected int $totalMessages;
65
66
    #[ORM\Column(name: 'keyword', type: 'string', length: 255, nullable: true)]
67
    protected ?string $keyword = null;
68
69
    #[ORM\Column(name: 'source', type: 'string', length: 255, nullable: true)]
70
    protected ?string $source = null;
71
72
    #[ORM\Column(name: 'start_date', type: 'datetime', nullable: true, unique: false)]
73
    protected ?DateTime $startDate = null;
74
75
    #[ORM\Column(name: 'end_date', type: 'datetime', nullable: true, unique: false)]
76
    protected ?DateTime $endDate = null;
77
78
    #[ORM\Column(name: 'sys_insert_user_id', type: 'integer')]
79
    protected int $insertUserId;
80
81
    #[ORM\Column(name: 'sys_insert_datetime', type: 'datetime')]
82
    protected DateTime $insertDateTime;
83
84
    #[ORM\Column(name: 'sys_lastedit_user_id', type: 'integer', nullable: true, unique: false)]
85
    protected int $lastEditUserId;
86
87
    #[ORM\Column(name: 'sys_lastedit_datetime', type: 'datetime', nullable: true, unique: false)]
88
    protected DateTime $lastEditDateTime;
89
90
    #[ORM\Column(name: 'exercise_id', type: 'integer', nullable: true, unique: false)]
91
    protected int $exerciseId;
92
93
    #[ORM\Column(name: 'lp_id', type: 'integer', nullable: true, unique: false)]
94
    protected int $lpId;
95
96
    #[ORM\ManyToOne(targetEntity: AccessUrl::class)]
97
    #[ORM\JoinColumn(name: 'access_url_id', referencedColumnName: 'id', nullable: true)]
98
    protected ?AccessUrl $accessUrl = null;
99
100
    public function __construct()
101
    {
102
        $this->totalMessages = 0;
103
        $this->insertDateTime = new DateTime();
104
    }
105
106
    /**
107
     * @return int
108
     */
109
    public function getId()
110
    {
111
        return $this->id;
112
    }
113
114
    /**
115
     * @return string
116
     */
117
    public function getCode()
118
    {
119
        return $this->code;
120
    }
121
122
    public function setCode(string $code): self
123
    {
124
        $this->code = $code;
125
126
        return $this;
127
    }
128
129
    /**
130
     * @return string
131
     */
132
    public function getSubject()
133
    {
134
        return $this->subject;
135
    }
136
137
    public function setSubject(string $subject): self
138
    {
139
        $this->subject = $subject;
140
141
        return $this;
142
    }
143
144
    /**
145
     * @return string
146
     */
147
    public function getMessage()
148
    {
149
        return $this->message;
150
    }
151
152
    public function setMessage(string $message): self
153
    {
154
        $this->message = $message;
155
156
        return $this;
157
    }
158
159
    public function getAssignedLastUser(): ?User
160
    {
161
        return $this->assignedLastUser;
162
    }
163
164
    public function setAssignedLastUser(?User $assignedLastUser): self
165
    {
166
        $this->assignedLastUser = $assignedLastUser;
167
168
        return $this;
169
    }
170
171
    public function getPersonalEmail(): string
172
    {
173
        return $this->personalEmail;
174
    }
175
176
    public function setPersonalEmail(string $personalEmail): self
177
    {
178
        $this->personalEmail = $personalEmail;
179
180
        return $this;
181
    }
182
183
    public function getTotalMessages(): int
184
    {
185
        return $this->totalMessages;
186
    }
187
188
    public function setTotalMessages(int $totalMessages): self
189
    {
190
        $this->totalMessages = $totalMessages;
191
192
        return $this;
193
    }
194
195
    public function getInsertUserId(): int
196
    {
197
        return $this->insertUserId;
198
    }
199
200
    public function setInsertUserId(int $insertUserId): self
201
    {
202
        $this->insertUserId = $insertUserId;
203
204
        return $this;
205
    }
206
207
    public function getExerciseId(): int
208
    {
209
        return $this->exerciseId;
210
    }
211
212
    public function setExerciseId(int $exerciseId): self
213
    {
214
        $this->exerciseId = $exerciseId;
215
216
        return $this;
217
    }
218
219
    public function getLpId(): int
220
    {
221
        return $this->lpId;
222
    }
223
224
    public function setLpId(int $lpId): self
225
    {
226
        $this->lpId = $lpId;
227
228
        return $this;
229
    }
230
231
    public function getAccessUrl(): ?AccessUrl
232
    {
233
        return $this->accessUrl;
234
    }
235
236
    public function setAccessUrl(?AccessUrl $accessUrl): self
237
    {
238
        $this->accessUrl = $accessUrl;
239
240
        return $this;
241
    }
242
}
243