|
1
|
|
|
<?php |
|
2
|
|
|
/* For licensing terms, see /license.txt */ |
|
3
|
|
|
|
|
4
|
|
|
namespace Chamilo\CourseBundle\Entity; |
|
5
|
|
|
|
|
6
|
|
|
use Doctrine\ORM\Mapping as ORM; |
|
7
|
|
|
|
|
8
|
|
|
/** |
|
9
|
|
|
* CStudentPublicationRelDocument |
|
10
|
|
|
* |
|
11
|
|
|
* @ORM\Table( |
|
12
|
|
|
* name="c_student_publication_rel_document", |
|
13
|
|
|
* indexes={ |
|
14
|
|
|
* @ORM\Index(name="course", columns={"c_id"}), |
|
15
|
|
|
* @ORM\Index(name="work", columns={"work_id"}), |
|
16
|
|
|
* @ORM\Index(name="document", columns={"document_id"}) |
|
17
|
|
|
* } |
|
18
|
|
|
* ) |
|
19
|
|
|
* @ORM\Entity |
|
20
|
|
|
*/ |
|
21
|
|
View Code Duplication |
class CStudentPublicationRelDocument |
|
|
|
|
|
|
22
|
|
|
{ |
|
23
|
|
|
/** |
|
24
|
|
|
* @var integer |
|
25
|
|
|
* |
|
26
|
|
|
* @ORM\Column(name="iid", type="integer") |
|
27
|
|
|
* @ORM\Id |
|
28
|
|
|
* @ORM\GeneratedValue |
|
29
|
|
|
*/ |
|
30
|
|
|
private $iid; |
|
|
|
|
|
|
31
|
|
|
|
|
32
|
|
|
/** |
|
33
|
|
|
* @var integer |
|
34
|
|
|
* |
|
35
|
|
|
* @ORM\Column(name="c_id", type="integer") |
|
36
|
|
|
*/ |
|
37
|
|
|
private $cId; |
|
38
|
|
|
|
|
39
|
|
|
/** |
|
40
|
|
|
* @var integer |
|
41
|
|
|
* |
|
42
|
|
|
* @ORM\Column(name="id", type="integer", nullable=true) |
|
43
|
|
|
*/ |
|
44
|
|
|
private $id; |
|
45
|
|
|
|
|
46
|
|
|
/** |
|
47
|
|
|
* @var integer |
|
48
|
|
|
* |
|
49
|
|
|
* @ORM\Column(name="work_id", type="integer", nullable=false) |
|
50
|
|
|
*/ |
|
51
|
|
|
private $workId; |
|
52
|
|
|
|
|
53
|
|
|
/** |
|
54
|
|
|
* @var integer |
|
55
|
|
|
* |
|
56
|
|
|
* @ORM\Column(name="document_id", type="integer", nullable=false) |
|
57
|
|
|
*/ |
|
58
|
|
|
private $documentId; |
|
59
|
|
|
|
|
60
|
|
|
/** |
|
61
|
|
|
* Set workId |
|
62
|
|
|
* |
|
63
|
|
|
* @param integer $workId |
|
64
|
|
|
* @return CStudentPublicationRelDocument |
|
65
|
|
|
*/ |
|
66
|
|
|
public function setWorkId($workId) |
|
67
|
|
|
{ |
|
68
|
|
|
$this->workId = $workId; |
|
69
|
|
|
|
|
70
|
|
|
return $this; |
|
71
|
|
|
} |
|
72
|
|
|
|
|
73
|
|
|
/** |
|
74
|
|
|
* Get workId |
|
75
|
|
|
* |
|
76
|
|
|
* @return integer |
|
77
|
|
|
*/ |
|
78
|
|
|
public function getWorkId() |
|
79
|
|
|
{ |
|
80
|
|
|
return $this->workId; |
|
81
|
|
|
} |
|
82
|
|
|
|
|
83
|
|
|
/** |
|
84
|
|
|
* Set documentId |
|
85
|
|
|
* |
|
86
|
|
|
* @param integer $documentId |
|
87
|
|
|
* @return CStudentPublicationRelDocument |
|
88
|
|
|
*/ |
|
89
|
|
|
public function setDocumentId($documentId) |
|
90
|
|
|
{ |
|
91
|
|
|
$this->documentId = $documentId; |
|
92
|
|
|
|
|
93
|
|
|
return $this; |
|
94
|
|
|
} |
|
95
|
|
|
|
|
96
|
|
|
/** |
|
97
|
|
|
* Get documentId |
|
98
|
|
|
* |
|
99
|
|
|
* @return integer |
|
100
|
|
|
*/ |
|
101
|
|
|
public function getDocumentId() |
|
102
|
|
|
{ |
|
103
|
|
|
return $this->documentId; |
|
104
|
|
|
} |
|
105
|
|
|
|
|
106
|
|
|
/** |
|
107
|
|
|
* Set cId |
|
108
|
|
|
* |
|
109
|
|
|
* @param integer $cId |
|
110
|
|
|
* @return CStudentPublicationRelDocument |
|
111
|
|
|
*/ |
|
112
|
|
|
public function setCId($cId) |
|
113
|
|
|
{ |
|
114
|
|
|
$this->cId = $cId; |
|
115
|
|
|
|
|
116
|
|
|
return $this; |
|
117
|
|
|
} |
|
118
|
|
|
|
|
119
|
|
|
/** |
|
120
|
|
|
* Get cId |
|
121
|
|
|
* |
|
122
|
|
|
* @return integer |
|
123
|
|
|
*/ |
|
124
|
|
|
public function getCId() |
|
125
|
|
|
{ |
|
126
|
|
|
return $this->cId; |
|
127
|
|
|
} |
|
128
|
|
|
|
|
129
|
|
|
/** |
|
130
|
|
|
* Get id |
|
131
|
|
|
* |
|
132
|
|
|
* @return integer |
|
133
|
|
|
*/ |
|
134
|
|
|
public function getId() |
|
135
|
|
|
{ |
|
136
|
|
|
return $this->id; |
|
137
|
|
|
} |
|
138
|
|
|
} |
|
139
|
|
|
|
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.