Completed
Pull Request — master (#3464)
by Julito
14:18 queued 01:15
created

CAttendanceSheet::getUser()   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
/* For licensing terms, see /license.txt */
4
5
namespace Chamilo\CourseBundle\Entity;
6
7
use Doctrine\ORM\Mapping as ORM;
8
use Chamilo\CoreBundle\Entity\User;
9
10
/**
11
 * CAttendanceSheet.
12
 *
13
 * @ORM\Table(
14
 *  name="c_attendance_sheet",
15
 *  indexes={
16
 *      @ORM\Index(name="course", columns={"c_id"}),
17
 *      @ORM\Index(name="user", columns={"user_id"}),
18
 *      @ORM\Index(name="presence", columns={"presence"})
19
 *  }
20
 * )
21
 * @ORM\Entity
22
 */
23
class CAttendanceSheet
24
{
25
    /**
26
     * @var int
27
     *
28
     * @ORM\Column(name="iid", type="integer")
29
     * @ORM\Id
30
     * @ORM\GeneratedValue
31
     */
32
    protected $iid;
33
34
    /**
35
     * @var int
36
     *
37
     * @ORM\Column(name="c_id", type="integer")
38
     */
39
    protected $cId;
40
41
    /**
42
     * @var bool
43
     *
44
     * @ORM\Column(name="presence", type="boolean", nullable=false)
45
     */
46
    protected $presence;
47
48
    /**
49
     * @var User
50
     * @ORM\ManyToOne (
51
     *    targetEntity="Chamilo\CoreBundle\Entity\User",
52
     *    inversedBy="cAttendanceSheets"
53
     * )
54
     * @ORM\JoinColumn(
55
     *    name="user_id",
56
     *    referencedColumnName="id",
57
     *    onDelete="CASCADE"
58
     * )
59
     */
60
    protected $user;
61
62
    /**
63
     * Get user.
64
     *
65
     */
66
    public function getUser(): User
67
    {
68
        return $this->user;
69
    }
70
71
    /**
72
     * Set user.
73
     *
74
     */
75
    public function setUser($user)
76
    {
77
        $this->user = $user;
78
79
        return $this;
80
    }
81
82
    /**
83
     * @var int
84
     *
85
     * @ORM\Column(name="attendance_calendar_id", type="integer")
86
     */
87
    protected $attendanceCalendarId;
88
89
    /**
90
     * Set presence.
91
     *
92
     * @param bool $presence
93
     *
94
     * @return CAttendanceSheet
95
     */
96
    public function setPresence($presence)
97
    {
98
        $this->presence = $presence;
99
100
        return $this;
101
    }
102
103
    /**
104
     * Get presence.
105
     *
106
     * @return bool
107
     */
108
    public function getPresence()
109
    {
110
        return $this->presence;
111
    }
112
113
    /**
114
     * Set cId.
115
     *
116
     * @param int $cId
117
     *
118
     * @return CAttendanceSheet
119
     */
120
    public function setCId($cId)
121
    {
122
        $this->cId = $cId;
123
124
        return $this;
125
    }
126
127
    /**
128
     * Get cId.
129
     *
130
     * @return int
131
     */
132
    public function getCId()
133
    {
134
        return $this->cId;
135
    }
136
137
    /**
138
     * Set attendanceCalendarId.
139
     *
140
     * @param int $attendanceCalendarId
141
     *
142
     * @return CAttendanceSheet
143
     */
144
    public function setAttendanceCalendarId($attendanceCalendarId)
145
    {
146
        $this->attendanceCalendarId = $attendanceCalendarId;
147
148
        return $this;
149
    }
150
151
    /**
152
     * Get attendanceCalendarId.
153
     *
154
     * @return int
155
     */
156
    public function getAttendanceCalendarId()
157
    {
158
        return $this->attendanceCalendarId;
159
    }
160
}
161