1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Cdf\BiCoreBundle\Entity; |
4
|
|
|
|
5
|
|
|
use Doctrine\ORM\Mapping as ORM; |
6
|
|
|
|
7
|
|
|
/** |
8
|
|
|
* Cdf\BiCoreBundle\Permessi. |
9
|
|
|
* |
10
|
|
|
* @ORM\Entity() |
11
|
|
|
* @ORM\Table(name="Permessi", indexes={@ORM\Index(name="fk_Permessi_Ruoli1_idx", columns={"ruoli_id"}), @ORM\Index(name="fk_Permessi_Operatori1_idx", columns={"operatori_id"})}) |
12
|
|
|
* @ORM\InheritanceType("SINGLE_TABLE") |
13
|
|
|
* @ORM\DiscriminatorColumn(name="discr", type="string") |
14
|
|
|
* @ORM\DiscriminatorMap({"base":"BasePermessi", "extended":"Permessi"}) |
15
|
|
|
*/ |
16
|
|
|
class BasePermessi |
17
|
|
|
{ |
18
|
|
|
/** |
19
|
|
|
* @ORM\Id |
20
|
|
|
* @ORM\Column(type="integer") |
21
|
|
|
* @ORM\GeneratedValue(strategy="AUTO") |
22
|
|
|
*/ |
23
|
|
|
protected $id; |
24
|
|
|
|
25
|
|
|
/** |
26
|
|
|
* @ORM\Column(type="string", length=255, nullable=true) |
27
|
|
|
*/ |
28
|
|
|
protected $modulo; |
29
|
|
|
|
30
|
|
|
/** |
31
|
|
|
* @ORM\Column(type="string", length=45, nullable=true) |
32
|
|
|
*/ |
33
|
|
|
protected $crud; |
34
|
|
|
|
35
|
|
|
/** |
36
|
|
|
* @ORM\Column(type="integer", nullable=true) |
37
|
|
|
*/ |
38
|
|
|
protected $ruoli_id; |
39
|
|
|
|
40
|
|
|
/** |
41
|
|
|
* @ORM\Column(type="integer", nullable=true) |
42
|
|
|
*/ |
43
|
|
|
protected $operatori_id; |
44
|
|
|
|
45
|
|
|
/** |
46
|
|
|
* @ORM\ManyToOne(targetEntity="Ruoli", inversedBy="permessis") |
47
|
|
|
* @ORM\JoinColumn(name="ruoli_id", referencedColumnName="id") |
48
|
|
|
*/ |
49
|
|
|
protected $ruoli; |
50
|
|
|
|
51
|
|
|
/** |
52
|
|
|
* @ORM\ManyToOne(targetEntity="Operatori", inversedBy="permessis") |
53
|
|
|
* @ORM\JoinColumn(name="operatori_id", referencedColumnName="id") |
54
|
|
|
*/ |
55
|
|
|
protected $operatori; |
56
|
|
|
|
57
|
4 |
|
public function __construct() |
58
|
|
|
{ |
59
|
4 |
|
} |
60
|
|
|
|
61
|
|
|
/** |
62
|
|
|
* Set the value of id. |
63
|
|
|
* |
64
|
|
|
* @param int $id |
65
|
|
|
* |
66
|
|
|
* @return \Cdf\BiCoreBundle\Entity\Permessi |
67
|
|
|
*/ |
68
|
|
|
public function setId($id) |
69
|
|
|
{ |
70
|
|
|
$this->id = $id; |
71
|
|
|
|
72
|
|
|
return $this; |
73
|
|
|
} |
74
|
|
|
|
75
|
|
|
/** |
76
|
|
|
* Get the value of id. |
77
|
|
|
* |
78
|
|
|
* @return int |
79
|
|
|
*/ |
80
|
3 |
|
public function getId() |
81
|
|
|
{ |
82
|
3 |
|
return $this->id; |
83
|
|
|
} |
84
|
|
|
|
85
|
|
|
/** |
86
|
|
|
* Set the value of modulo. |
87
|
|
|
* |
88
|
|
|
* @param string $modulo |
89
|
|
|
* |
90
|
|
|
* @return \Cdf\BiCoreBundle\Entity\Permessi |
91
|
|
|
*/ |
92
|
4 |
|
public function setModulo($modulo) |
93
|
|
|
{ |
94
|
4 |
|
$this->modulo = $modulo; |
95
|
|
|
|
96
|
4 |
|
return $this; |
97
|
|
|
} |
98
|
|
|
|
99
|
|
|
/** |
100
|
|
|
* Get the value of modulo. |
101
|
|
|
* |
102
|
|
|
* @return string |
103
|
|
|
*/ |
104
|
2 |
|
public function getModulo() |
105
|
|
|
{ |
106
|
2 |
|
return $this->modulo; |
107
|
|
|
} |
108
|
|
|
|
109
|
|
|
/** |
110
|
|
|
* Set the value of crud. |
111
|
|
|
* |
112
|
|
|
* @param string $crud |
113
|
|
|
* |
114
|
|
|
* @return \Cdf\BiCoreBundle\Entity\Permessi |
115
|
|
|
*/ |
116
|
3 |
|
public function setCrud($crud) |
117
|
|
|
{ |
118
|
3 |
|
$this->crud = $crud; |
119
|
|
|
|
120
|
3 |
|
return $this; |
121
|
|
|
} |
122
|
|
|
|
123
|
|
|
/** |
124
|
|
|
* Get the value of crud. |
125
|
|
|
* |
126
|
|
|
* @return string |
127
|
|
|
*/ |
128
|
6 |
|
public function getCrud() |
129
|
|
|
{ |
130
|
6 |
|
return $this->crud; |
131
|
|
|
} |
132
|
|
|
|
133
|
|
|
/** |
134
|
|
|
* Set the value of ruoli_id. |
135
|
|
|
* |
136
|
|
|
* @param int $ruoli_id |
137
|
|
|
* |
138
|
|
|
* @return \Cdf\BiCoreBundle\Entity\Permessi |
139
|
|
|
*/ |
140
|
|
|
public function setRuoliId($ruoli_id) |
141
|
|
|
{ |
142
|
|
|
$this->ruoli_id = $ruoli_id; |
143
|
|
|
|
144
|
|
|
return $this; |
145
|
|
|
} |
146
|
|
|
|
147
|
|
|
/** |
148
|
|
|
* Get the value of ruoli_id. |
149
|
|
|
* |
150
|
|
|
* @return int |
151
|
|
|
*/ |
152
|
1 |
|
public function getRuoliId() |
153
|
|
|
{ |
154
|
1 |
|
return $this->ruoli_id; |
155
|
|
|
} |
156
|
|
|
|
157
|
|
|
/** |
158
|
|
|
* Set the value of operatori_id. |
159
|
|
|
* |
160
|
|
|
* @param int $operatori_id |
161
|
|
|
* |
162
|
|
|
* @return \Cdf\BiCoreBundle\Entity\Permessi |
163
|
|
|
*/ |
164
|
|
|
public function setOperatoriId($operatori_id) |
165
|
|
|
{ |
166
|
|
|
$this->operatori_id = $operatori_id; |
167
|
|
|
|
168
|
|
|
return $this; |
169
|
|
|
} |
170
|
|
|
|
171
|
|
|
/** |
172
|
|
|
* Get the value of operatori_id. |
173
|
|
|
* |
174
|
|
|
* @return int |
175
|
|
|
*/ |
176
|
1 |
|
public function getOperatoriId() |
177
|
|
|
{ |
178
|
1 |
|
return $this->operatori_id; |
179
|
|
|
} |
180
|
|
|
|
181
|
|
|
/** |
182
|
|
|
* Set Ruoli entity (many to one). |
183
|
|
|
* |
184
|
|
|
* @param \Cdf\BiCoreBundle\Entity\Ruoli $ruoli |
185
|
|
|
* |
186
|
|
|
* @return \Cdf\BiCoreBundle\Entity\Permessi |
187
|
|
|
*/ |
188
|
4 |
|
public function setRuoli(Ruoli $ruoli = null) |
189
|
|
|
{ |
190
|
4 |
|
$this->ruoli = $ruoli; |
191
|
|
|
|
192
|
4 |
|
return $this; |
193
|
|
|
} |
194
|
|
|
|
195
|
|
|
/** |
196
|
|
|
* Get Ruoli entity (many to one). |
197
|
|
|
* |
198
|
|
|
* @return \Cdf\BiCoreBundle\Entity\Ruoli |
199
|
|
|
*/ |
200
|
1 |
|
public function getRuoli() |
201
|
|
|
{ |
202
|
1 |
|
return $this->ruoli; |
203
|
|
|
} |
204
|
|
|
|
205
|
|
|
/** |
206
|
|
|
* Set Operatori entity (many to one). |
207
|
|
|
* |
208
|
|
|
* @param \Cdf\BiCoreBundle\Entity\Operatori $operatori |
209
|
|
|
* |
210
|
|
|
* @return \Cdf\BiCoreBundle\Entity\Permessi |
211
|
|
|
*/ |
212
|
2 |
|
public function setOperatori(Operatori $operatori = null) |
213
|
|
|
{ |
214
|
2 |
|
$this->operatori = $operatori; |
215
|
|
|
|
216
|
2 |
|
return $this; |
217
|
|
|
} |
218
|
|
|
|
219
|
|
|
/** |
220
|
|
|
* Get Operatori entity (many to one). |
221
|
|
|
* |
222
|
|
|
* @return \Cdf\BiCoreBundle\Entity\Operatori |
223
|
|
|
*/ |
224
|
1 |
|
public function getOperatori() |
225
|
|
|
{ |
226
|
1 |
|
return $this->operatori; |
227
|
|
|
} |
228
|
|
|
|
229
|
|
|
public function __sleep() |
230
|
|
|
{ |
231
|
|
|
return array('id', 'modulo', 'crud', 'ruoli_id', 'operatori_id'); |
232
|
|
|
} |
233
|
|
|
} |
234
|
|
|
|