Completed
Push — master ( 506c79...7daaad )
by Julito
12:09
created

LogEvent::setId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 5
rs 10
c 1
b 0
f 0
1
<?php
2
/* For licensing terms, see /license.txt */
3
4
namespace Chamilo\PluginBundle\Entity\WhispeakAuth;
5
6
use Chamilo\UserBundle\Entity\User;
7
use DateTime;
8
use Doctrine\ORM\Mapping as ORM;
9
10
/**
11
 * Class LogEvent.
12
 *
13
 * @package Chamilo\PluginBundle\Entity\WhispeakAuth
14
 *
15
 * @ORM\Table(name="whispeak_log_event")
16
 * @ORM\Entity()
17
 * @ORM\InheritanceType("SINGLE_TABLE")
18
 * @ORM\DiscriminatorColumn(name="discr", type="string")
19
 * @ORM\DiscriminatorMap({
20
 *     "log_event" = "Chamilo\PluginBundle\Entity\WhispeakAuth\LogEvent",
21
 *     "log_event_lp" = "Chamilo\PluginBundle\Entity\WhispeakAuth\LogEventLp",
22
 *     "log_event_quiz" = "Chamilo\PluginBundle\Entity\WhispeakAuth\LogEventQuiz"
23
 * })
24
 */
25
class LogEvent
26
{
27
    const STATUS_FAILED = 0;
28
    const STATUS_SUCCESS = 1;
29
30
    /**
31
     * @var int
32
     *
33
     * @ORM\Column(name="id", type="integer")
34
     * @ORM\Id()
35
     * @ORM\GeneratedValue()
36
     */
37
    private $id;
38
    /**
39
     * @var DateTime
40
     *
41
     * @ORM\Column(name="datetime", type="datetime")
42
     */
43
    private $datetime;
44
    /**
45
     * @var int
46
     *
47
     * @ORM\Column(name="action_status", type="smallint")
48
     */
49
    private $actionStatus;
50
    /**
51
     * @var User
52
     *
53
     * @ORM\ManyToOne(targetEntity="Chamilo\UserBundle\Entity\User")
54
     * @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=false)
55
     */
56
    private $user;
57
58
    /**
59
     * @return int
60
     */
61
    public function getId()
62
    {
63
        return $this->id;
64
    }
65
66
    /**
67
     * @param int $id
68
     *
69
     * @return LogEvent
70
     */
71
    public function setId($id)
72
    {
73
        $this->id = $id;
74
75
        return $this;
76
    }
77
78
    /**
79
     * @return DateTime
80
     */
81
    public function getDatetime()
82
    {
83
        return $this->datetime;
84
    }
85
86
    /**
87
     * @param DateTime $datetime
88
     *
89
     * @return LogEvent
90
     */
91
    public function setDatetime($datetime)
92
    {
93
        $this->datetime = $datetime;
94
95
        return $this;
96
    }
97
98
    /**
99
     * @return int
100
     */
101
    public function getActionStatus()
102
    {
103
        return $this->actionStatus;
104
    }
105
106
    /**
107
     * @param int $actionStatus
108
     *
109
     * @return LogEvent
110
     */
111
    public function setActionStatus($actionStatus)
112
    {
113
        $this->actionStatus = $actionStatus;
114
115
        return $this;
116
    }
117
118
    /**
119
     * @return User
120
     */
121
    public function getUser()
122
    {
123
        return $this->user;
124
    }
125
126
    /**
127
     * @param User $user
128
     *
129
     * @return LogEvent
130
     */
131
    public function setUser($user)
132
    {
133
        $this->user = $user;
134
135
        return $this;
136
    }
137
138
    /**
139
     * @return string
140
     */
141
    public function getTypeString()
142
    {
143
        return  '-';
144
    }
145
}
146