|
0
|
1 |
<?php |
|
|
2 |
/* |
|
|
3 |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
|
|
4 |
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
|
|
5 |
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
|
|
6 |
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
|
|
7 |
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
|
|
8 |
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
|
|
9 |
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
|
|
10 |
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
|
|
11 |
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
|
|
12 |
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
|
|
13 |
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|
|
14 |
* |
|
|
15 |
* This software consists of voluntary contributions made by many individuals |
|
|
16 |
* and is licensed under the LGPL. For more information, see |
|
|
17 |
* <http://www.doctrine-project.org>. |
|
|
18 |
*/ |
|
|
19 |
|
|
|
20 |
namespace Doctrine\ORM\Mapping; |
|
|
21 |
|
|
|
22 |
use Doctrine\Common\Annotations\Annotation; |
|
|
23 |
|
|
|
24 |
/* Annotations */ |
|
|
25 |
|
|
|
26 |
/** @Annotation */ |
|
|
27 |
final class Entity extends Annotation { |
|
|
28 |
public $repositoryClass; |
|
|
29 |
public $readOnly = false; |
|
|
30 |
} |
|
|
31 |
|
|
|
32 |
/** @Annotation */ |
|
|
33 |
final class MappedSuperclass extends Annotation {} |
|
|
34 |
|
|
|
35 |
/** @Annotation */ |
|
|
36 |
final class InheritanceType extends Annotation {} |
|
|
37 |
|
|
|
38 |
/** @Annotation */ |
|
|
39 |
final class DiscriminatorColumn extends Annotation { |
|
|
40 |
public $name; |
|
|
41 |
public $fieldName; // field name used in non-object hydration (array/scalar) |
|
|
42 |
public $type; |
|
|
43 |
public $length; |
|
|
44 |
} |
|
|
45 |
|
|
|
46 |
/** @Annotation */ |
|
|
47 |
final class DiscriminatorMap extends Annotation {} |
|
|
48 |
|
|
|
49 |
/** @Annotation */ |
|
|
50 |
final class Id extends Annotation {} |
|
|
51 |
|
|
|
52 |
/** @Annotation */ |
|
|
53 |
final class GeneratedValue extends Annotation { |
|
|
54 |
public $strategy = 'AUTO'; |
|
|
55 |
} |
|
|
56 |
|
|
|
57 |
/** @Annotation */ |
|
|
58 |
final class Version extends Annotation {} |
|
|
59 |
|
|
|
60 |
/** @Annotation */ |
|
|
61 |
final class JoinColumn extends Annotation { |
|
|
62 |
public $name; |
|
|
63 |
public $fieldName; // field name used in non-object hydration (array/scalar) |
|
|
64 |
public $referencedColumnName = 'id'; |
|
|
65 |
public $unique = false; |
|
|
66 |
public $nullable = true; |
|
|
67 |
public $onDelete; |
|
|
68 |
public $onUpdate; |
|
|
69 |
public $columnDefinition; |
|
|
70 |
} |
|
|
71 |
|
|
|
72 |
/** @Annotation */ |
|
|
73 |
final class JoinColumns extends Annotation {} |
|
|
74 |
|
|
|
75 |
/** @Annotation */ |
|
|
76 |
final class Column extends Annotation { |
|
|
77 |
public $type = 'string'; |
|
|
78 |
public $length; |
|
|
79 |
// The precision for a decimal (exact numeric) column (Applies only for decimal column) |
|
|
80 |
public $precision = 0; |
|
|
81 |
// The scale for a decimal (exact numeric) column (Applies only for decimal column) |
|
|
82 |
public $scale = 0; |
|
|
83 |
public $unique = false; |
|
|
84 |
public $nullable = false; |
|
|
85 |
public $name; |
|
|
86 |
public $options = array(); |
|
|
87 |
public $columnDefinition; |
|
|
88 |
} |
|
|
89 |
|
|
|
90 |
/** @Annotation */ |
|
|
91 |
final class OneToOne extends Annotation { |
|
|
92 |
public $targetEntity; |
|
|
93 |
public $mappedBy; |
|
|
94 |
public $inversedBy; |
|
|
95 |
public $cascade; |
|
|
96 |
public $fetch = 'LAZY'; |
|
|
97 |
public $orphanRemoval = false; |
|
|
98 |
} |
|
|
99 |
|
|
|
100 |
/** @Annotation */ |
|
|
101 |
final class OneToMany extends Annotation { |
|
|
102 |
public $mappedBy; |
|
|
103 |
public $targetEntity; |
|
|
104 |
public $cascade; |
|
|
105 |
public $fetch = 'LAZY'; |
|
|
106 |
public $orphanRemoval = false; |
|
|
107 |
public $indexBy; |
|
|
108 |
} |
|
|
109 |
|
|
|
110 |
/** @Annotation */ |
|
|
111 |
final class ManyToOne extends Annotation { |
|
|
112 |
public $targetEntity; |
|
|
113 |
public $cascade; |
|
|
114 |
public $fetch = 'LAZY'; |
|
|
115 |
public $inversedBy; |
|
|
116 |
} |
|
|
117 |
|
|
|
118 |
/** @Annotation */ |
|
|
119 |
final class ManyToMany extends Annotation { |
|
|
120 |
public $targetEntity; |
|
|
121 |
public $mappedBy; |
|
|
122 |
public $inversedBy; |
|
|
123 |
public $cascade; |
|
|
124 |
public $fetch = 'LAZY'; |
|
|
125 |
public $indexBy; |
|
|
126 |
} |
|
|
127 |
|
|
|
128 |
/** @Annotation */ |
|
|
129 |
final class ElementCollection extends Annotation { |
|
|
130 |
public $tableName; |
|
|
131 |
} |
|
|
132 |
|
|
|
133 |
/** @Annotation */ |
|
|
134 |
final class Table extends Annotation { |
|
|
135 |
public $name; |
|
|
136 |
public $schema; |
|
|
137 |
public $indexes; |
|
|
138 |
public $uniqueConstraints; |
|
|
139 |
} |
|
|
140 |
|
|
|
141 |
/** @Annotation */ |
|
|
142 |
final class UniqueConstraint extends Annotation { |
|
|
143 |
public $name; |
|
|
144 |
public $columns; |
|
|
145 |
} |
|
|
146 |
|
|
|
147 |
/** @Annotation */ |
|
|
148 |
final class Index extends Annotation { |
|
|
149 |
public $name; |
|
|
150 |
public $columns; |
|
|
151 |
} |
|
|
152 |
|
|
|
153 |
/** @Annotation */ |
|
|
154 |
final class JoinTable extends Annotation { |
|
|
155 |
public $name; |
|
|
156 |
public $schema; |
|
|
157 |
public $joinColumns = array(); |
|
|
158 |
public $inverseJoinColumns = array(); |
|
|
159 |
} |
|
|
160 |
|
|
|
161 |
/** @Annotation */ |
|
|
162 |
final class SequenceGenerator extends Annotation { |
|
|
163 |
public $sequenceName; |
|
|
164 |
public $allocationSize = 1; |
|
|
165 |
public $initialValue = 1; |
|
|
166 |
} |
|
|
167 |
|
|
|
168 |
/** @Annotation */ |
|
|
169 |
final class ChangeTrackingPolicy extends Annotation {} |
|
|
170 |
|
|
|
171 |
/** @Annotation */ |
|
|
172 |
final class OrderBy extends Annotation {} |
|
|
173 |
|
|
|
174 |
/** @Annotation */ |
|
|
175 |
final class NamedQueries extends Annotation {} |
|
|
176 |
|
|
|
177 |
/** @Annotation */ |
|
|
178 |
final class NamedQuery extends Annotation { |
|
|
179 |
public $name; |
|
|
180 |
public $query; |
|
|
181 |
} |
|
|
182 |
|
|
|
183 |
/* Annotations for lifecycle callbacks */ |
|
|
184 |
/** @Annotation */ |
|
|
185 |
final class HasLifecycleCallbacks extends Annotation {} |
|
|
186 |
|
|
|
187 |
/** @Annotation */ |
|
|
188 |
final class PrePersist extends Annotation {} |
|
|
189 |
|
|
|
190 |
/** @Annotation */ |
|
|
191 |
final class PostPersist extends Annotation {} |
|
|
192 |
|
|
|
193 |
/** @Annotation */ |
|
|
194 |
final class PreUpdate extends Annotation {} |
|
|
195 |
|
|
|
196 |
/** @Annotation */ |
|
|
197 |
final class PostUpdate extends Annotation {} |
|
|
198 |
|
|
|
199 |
/** @Annotation */ |
|
|
200 |
final class PreRemove extends Annotation {} |
|
|
201 |
|
|
|
202 |
/** @Annotation */ |
|
|
203 |
final class PostRemove extends Annotation {} |
|
|
204 |
|
|
|
205 |
/** @Annotation */ |
|
|
206 |
final class PostLoad extends Annotation {} |