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
|
|
|
|
12
|
|
|
/** |
13
|
|
|
* Chat. |
14
|
|
|
*/ |
15
|
|
|
#[ORM\Table(name: 'chat_video', options: ['row_format' => 'DYNAMIC'])] |
16
|
|
|
#[ORM\Index(name: 'idx_chat_video_to_user', columns: ['to_user'])] |
17
|
|
|
#[ORM\Index(name: 'idx_chat_video_from_user', columns: ['from_user'])] |
18
|
|
|
#[ORM\Index(name: 'idx_chat_video_users', columns: ['from_user', 'to_user'])] |
19
|
|
|
#[ORM\Index(name: 'idx_chat_video_title', columns: ['title'])] |
20
|
|
|
#[ORM\Entity] |
21
|
|
|
class ChatVideo |
22
|
|
|
{ |
23
|
|
|
#[ORM\Column(name: 'id', type: 'integer')] |
24
|
|
|
#[ORM\Id] |
25
|
|
|
#[ORM\GeneratedValue(strategy: 'IDENTITY')] |
26
|
|
|
protected ?int $id = null; |
27
|
|
|
|
28
|
|
|
#[ORM\Column(name: 'from_user', type: 'integer', nullable: false)] |
29
|
|
|
protected int $fromUser; |
30
|
|
|
|
31
|
|
|
#[ORM\Column(name: 'to_user', type: 'integer', nullable: false)] |
32
|
|
|
protected int $toUser; |
33
|
|
|
|
34
|
|
|
#[ORM\Column(name: 'title', type: 'string', nullable: false)] |
35
|
|
|
protected string $title; |
36
|
|
|
|
37
|
|
|
#[ORM\Column(name: 'datetime', type: 'datetime', nullable: false)] |
38
|
|
|
protected DateTime $datetime; |
39
|
|
|
|
40
|
|
|
/** |
41
|
|
|
* Set fromUser. |
42
|
|
|
* |
43
|
|
|
* @return ChatVideo |
44
|
|
|
*/ |
45
|
|
|
public function setFromUser(int $fromUser) |
46
|
|
|
{ |
47
|
|
|
$this->fromUser = $fromUser; |
48
|
|
|
|
49
|
|
|
return $this; |
50
|
|
|
} |
51
|
|
|
|
52
|
|
|
/** |
53
|
|
|
* Get fromUser. |
54
|
|
|
* |
55
|
|
|
* @return int |
56
|
|
|
*/ |
57
|
|
|
public function getFromUser() |
58
|
|
|
{ |
59
|
|
|
return $this->fromUser; |
60
|
|
|
} |
61
|
|
|
|
62
|
|
|
/** |
63
|
|
|
* Set toUser. |
64
|
|
|
* |
65
|
|
|
* @return ChatVideo |
66
|
|
|
*/ |
67
|
|
|
public function setToUser(int $toUser) |
68
|
|
|
{ |
69
|
|
|
$this->toUser = $toUser; |
70
|
|
|
|
71
|
|
|
return $this; |
72
|
|
|
} |
73
|
|
|
|
74
|
|
|
/** |
75
|
|
|
* Get toUser. |
76
|
|
|
* |
77
|
|
|
* @return int |
78
|
|
|
*/ |
79
|
|
|
public function getToUser() |
80
|
|
|
{ |
81
|
|
|
return $this->toUser; |
82
|
|
|
} |
83
|
|
|
|
84
|
|
|
/** |
85
|
|
|
* Set title. |
86
|
|
|
* |
87
|
|
|
* @return ChatVideo |
88
|
|
|
*/ |
89
|
|
|
public function setTitle(string $title) |
90
|
|
|
{ |
91
|
|
|
$this->title = $title; |
92
|
|
|
|
93
|
|
|
return $this; |
94
|
|
|
} |
95
|
|
|
|
96
|
|
|
/** |
97
|
|
|
* Get title. |
98
|
|
|
* |
99
|
|
|
* @return string |
100
|
|
|
*/ |
101
|
|
|
public function getTitle() |
102
|
|
|
{ |
103
|
|
|
return $this->title; |
104
|
|
|
} |
105
|
|
|
|
106
|
|
|
/** |
107
|
|
|
* Set datetime. |
108
|
|
|
* |
109
|
|
|
* @return ChatVideo |
110
|
|
|
*/ |
111
|
|
|
public function setDatetime(DateTime $datetime) |
112
|
|
|
{ |
113
|
|
|
$this->datetime = $datetime; |
114
|
|
|
|
115
|
|
|
return $this; |
116
|
|
|
} |
117
|
|
|
|
118
|
|
|
/** |
119
|
|
|
* Get datetime. |
120
|
|
|
* |
121
|
|
|
* @return DateTime |
122
|
|
|
*/ |
123
|
|
|
public function getDatetime() |
124
|
|
|
{ |
125
|
|
|
return $this->datetime; |
126
|
|
|
} |
127
|
|
|
|
128
|
|
|
/** |
129
|
|
|
* Get id. |
130
|
|
|
* |
131
|
|
|
* @return int |
132
|
|
|
*/ |
133
|
|
|
public function getId() |
134
|
|
|
{ |
135
|
|
|
return $this->id; |
136
|
|
|
} |
137
|
|
|
} |
138
|
|
|
|