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

COnlineConnected::getUserId()   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
 * COnlineConnected.
12
 *
13
 * @ORM\Table(
14
 *  name="c_online_connected",
15
 *  indexes={
16
 *      @ORM\Index(name="course", columns={"c_id"})
17
 *  }
18
 * )
19
 * @ORM\Entity
20
 */
21
class COnlineConnected
22
{
23
    /**
24
     * @var int
25
     *
26
     * @ORM\Column(name="iid", type="integer")
27
     * @ORM\Id
28
     * @ORM\GeneratedValue
29
     */
30
    protected $iid;
31
32
    /**
33
     * @var int
34
     *
35
     * @ORM\Column(name="c_id", type="integer")
36
     */
37
    protected $cId;
38
39
    /**
40
     * @var \DateTime
41
     *
42
     * @ORM\Column(name="last_connection", type="datetime", nullable=false)
43
     */
44
    protected $lastConnection;
45
46
    /**
47
     * @var User
48
     * @ORM\ManyToOne (
49
     *    targetEntity="Chamilo\CoreBundle\Entity\User",
50
     *    inversedBy="cOnlineConnected"
51
     * )
52
     * @ORM\JoinColumn(
53
     *    name="user_id",
54
     *    referencedColumnName="id",
55
     *    onDelete="CASCADE"
56
     * )
57
     */
58
    protected $user;
59
60
    /**
61
     * Get user.
62
     *
63
     */
64
    public function getUser(): User
65
    {
66
        return $this->user;
67
    }
68
69
    /**
70
     * Set user.
71
     *
72
     */
73
    public function setUser($user)
74
    {
75
        $this->user = $user;
76
77
        return $this;
78
    }
79
80
    /**
81
     * Set lastConnection.
82
     *
83
     * @param \DateTime $lastConnection
84
     *
85
     * @return COnlineConnected
86
     */
87
    public function setLastConnection($lastConnection)
88
    {
89
        $this->lastConnection = $lastConnection;
90
91
        return $this;
92
    }
93
94
    /**
95
     * Get lastConnection.
96
     *
97
     * @return \DateTime
98
     */
99
    public function getLastConnection()
100
    {
101
        return $this->lastConnection;
102
    }
103
104
    /**
105
     * Set cId.
106
     *
107
     * @param int $cId
108
     *
109
     * @return COnlineConnected
110
     */
111
    public function setCId($cId)
112
    {
113
        $this->cId = $cId;
114
115
        return $this;
116
    }
117
118
    /**
119
     * Get cId.
120
     *
121
     * @return int
122
     */
123
    public function getCId()
124
    {
125
        return $this->cId;
126
    }
127
128
}
129