CRM-19958 Fix invalid name of variable subtype
[civicrm-core.git] / xml / schema / Event / Participant.xml
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2
3 <table>
4 <base>CRM/Event</base>
5 <class>Participant</class>
6 <name>civicrm_participant</name>
7 <add>1.7</add>
8 <log>true</log>
9 <field>
10 <name>id</name>
11 <uniqueName>participant_id</uniqueName>
12 <title>Participant ID</title>
13 <type>int unsigned</type>
14 <required>true</required>
15 <comment>Participant Id</comment>
16 <import>true</import>
17 <headerPattern>/(^(participant(.)?)?id$)/i</headerPattern>
18 <add>1.7</add>
19 </field>
20 <primaryKey>
21 <name>id</name>
22 <autoincrement>true</autoincrement>
23 </primaryKey>
24 <field>
25 <name>contact_id</name>
26 <uniqueName>participant_contact_id</uniqueName>
27 <type>int unsigned</type>
28 <title>Contact ID</title>
29 <headerPattern>/contact(.?id)?/i</headerPattern>
30 <import>true</import>
31 <required>true</required>
32 <comment>FK to Contact ID</comment>
33 <add>1.7</add>
34 </field>
35 <foreignKey>
36 <name>contact_id</name>
37 <table>civicrm_contact</table>
38 <key>id</key>
39 <onDelete>CASCADE</onDelete>
40 </foreignKey>
41 <field>
42 <name>event_id</name>
43 <type>int unsigned</type>
44 <title>Event</title>
45 <import>true</import>
46 <headerPattern>/event id$/i</headerPattern>
47 <required>true</required>
48 <comment>FK to Event ID</comment>
49 <add>1.7</add>
50 </field>
51 <foreignKey>
52 <name>event_id</name>
53 <table>civicrm_event</table>
54 <key>id</key>
55 <onDelete>CASCADE</onDelete>
56 </foreignKey>
57 <field>
58 <name>status_id</name>
59 <uniqueName>participant_status_id</uniqueName>
60 <title>Participant Status</title>
61 <headerPattern>/(participant.)?(status)$/i</headerPattern>
62 <import>true</import>
63 <type>int unsigned</type>
64 <export>true</export>
65 <required>true</required>
66 <default>1</default>
67 <comment>Participant status ID. FK to civicrm_participant_status_type. Default of 1 should map to status = Registered.</comment>
68 <add>1.7</add>
69 <pseudoconstant>
70 <table>civicrm_participant_status_type</table>
71 <keyColumn>id</keyColumn>
72 <labelColumn>label</labelColumn>
73 </pseudoconstant>
74 <html>
75 <type>Select</type>
76 </html>
77 </field>
78 <foreignKey>
79 <name>status_id</name>
80 <table>civicrm_participant_status_type</table>
81 <key>id</key>
82 <add>3.0</add>
83 </foreignKey>
84 <index>
85 <name>index_status_id</name>
86 <fieldName>status_id</fieldName>
87 <add>1.8</add>
88 </index>
89 <field>
90 <name>role_id</name>
91 <uniqueName>participant_role_id</uniqueName>
92 <title>Participant Role</title>
93 <pseudoconstant>
94 <optionGroupName>participant_role</optionGroupName>
95 </pseudoconstant>
96 <html>
97 <type>Select</type>
98 </html>
99 <headerPattern>/(participant.)?(role)$/i</headerPattern>
100 <import>true</import>
101 <type>varchar</type>
102 <length>128</length>
103 <export>true</export>
104 <default>NULL</default>
105 <comment>Participant role ID. Implicit FK to civicrm_option_value where option_group = participant_role.</comment>
106 <add>1.7</add>
107 </field>
108 <index>
109 <name>index_role_id</name>
110 <fieldName>role_id</fieldName>
111 <add>1.8</add>
112 </index>
113 <field>
114 <name>register_date</name>
115 <uniqueName>participant_register_date</uniqueName>
116 <title>Register date</title>
117 <headerPattern>/^(r(egister\s)?date)$/i</headerPattern>
118 <import>true</import>
119 <type>datetime</type>
120 <comment>When did contact register for event?</comment>
121 <add>1.7</add>
122 <html>
123 <type>Select Date</type>
124 <format>activityDateTime</format>
125 </html>
126 </field>
127 <field>
128 <name>source</name>
129 <uniqueName>participant_source</uniqueName>
130 <title>Participant Source</title>
131 <headerPattern>/(participant.)?(source)$/i</headerPattern>
132 <import>true</import>
133 <type>varchar</type>
134 <length>128</length>
135 <comment>Source of this event registration.</comment>
136 <add>1.7</add>
137 </field>
138 <field>
139 <name>fee_level</name>
140 <uniqueName>participant_fee_level</uniqueName>
141 <title>Fee level</title>
142 <headerPattern>/^(f(ee\s)?level)$/i</headerPattern>
143 <type>text</type>
144 <import>true</import>
145 <comment>Populate with the label (text) associated with a fee level for paid events with multiple levels. Note that
146 we store the label value and not the key
147 </comment>
148 <add>1.7</add>
149 </field>
150 <field>
151 <name>is_test</name>
152 <uniqueName>participant_is_test</uniqueName>
153 <title>Test</title>
154 <type>boolean</type>
155 <default>0</default>
156 <import>true</import>
157 <add>1.7</add>
158 </field>
159 <field>
160 <name>is_pay_later</name>
161 <uniqueName>participant_is_pay_later</uniqueName>
162 <title>Is Pay Later</title>
163 <type>boolean</type>
164 <default>0</default>
165 <import>true</import>
166 <headerPattern>/(is.)?(pay(.)?later)$/i</headerPattern>
167 <add>2.1</add>
168 </field>
169
170 <field>
171 <name>fee_amount</name>
172 <uniqueName>participant_fee_amount</uniqueName>
173 <title>Fee Amount</title>
174 <type>decimal</type>
175 <import>true</import>
176 <headerPattern>/fee(.?am(ou)?nt)?/i</headerPattern>
177 <dataPattern>/^\d+(\.\d{2})?$/</dataPattern>
178 <comment>actual processor fee if known - may be 0.</comment>
179 <add>2.1</add>
180 </field>
181 <field>
182 <name>registered_by_id</name>
183 <uniqueName>participant_registered_by_id</uniqueName>
184 <type>int unsigned</type>
185 <title>Registered By ID</title>
186 <import>true</import>
187 <default>NULL</default>
188 <comment>FK to Participant ID</comment>
189 <add>2.1</add>
190 <export>true</export>
191 </field>
192 <foreignKey>
193 <name>registered_by_id</name>
194 <table>civicrm_participant</table>
195 <key>id</key>
196 <add>2.1</add>
197 <onDelete>SET NULL</onDelete>
198 </foreignKey>
199 <field>
200 <name>discount_id</name>
201 <uniqueName>participant_discount_id</uniqueName>
202 <type>int unsigned</type>
203 <title>Discount ID</title>
204 <default>NULL</default>
205 <comment>FK to Discount ID</comment>
206 <add>2.1</add>
207 </field>
208 <foreignKey>
209 <name>discount_id</name>
210 <table>civicrm_discount</table>
211 <key>id</key>
212 <add>2.1</add>
213 <onDelete>SET NULL</onDelete>
214 </foreignKey>
215 <field>
216 <name>fee_currency</name>
217 <uniqueName>participant_fee_currency</uniqueName>
218 <title>Fee Currency</title>
219 <type>varchar</type>
220 <length>3</length>
221 <default>NULL</default>
222 <import>true</import>
223 <headerPattern>/(fee)?.?cur(rency)?/i</headerPattern>
224 <dataPattern>/^[A-Z]{3}$/i</dataPattern>
225 <comment>3 character string, value derived from config setting.</comment>
226 <add>3.0</add>
227 <pseudoconstant>
228 <table>civicrm_currency</table>
229 <keyColumn>name</keyColumn>
230 <labelColumn>full_name</labelColumn>
231 <nameColumn>name</nameColumn>
232 </pseudoconstant>
233 <html>
234 <type>Select</type>
235 </html>
236 </field>
237 <field>
238 <name>campaign_id</name>
239 <uniqueName>participant_campaign_id</uniqueName>
240 <type>int unsigned</type>
241 <title>Campaign</title>
242 <import>true</import>
243 <comment>The campaign for which this participant has been registered.</comment>
244 <pseudoconstant>
245 <table>civicrm_campaign</table>
246 <keyColumn>id</keyColumn>
247 <labelColumn>title</labelColumn>
248 </pseudoconstant>
249 <add>3.4</add>
250 </field>
251 <foreignKey>
252 <name>campaign_id</name>
253 <table>civicrm_campaign</table>
254 <key>id</key>
255 <onDelete>SET NULL</onDelete>
256 </foreignKey>
257 <field>
258 <name>discount_amount</name>
259 <type>int unsigned</type>
260 <title>Discount Amount</title>
261 <comment>Discount Amount</comment>
262 <add>4.1</add>
263 </field>
264 <field>
265 <name>cart_id</name>
266 <type>int unsigned</type>
267 <title>Event Cart ID</title>
268 <comment>FK to civicrm_event_carts</comment>
269 <add>4.1</add>
270 </field>
271 <foreignKey>
272 <name>cart_id</name>
273 <table>civicrm_event_carts</table>
274 <key>id</key>
275 <onDelete>SET NULL</onDelete>
276 </foreignKey>
277 <field>
278 <name>must_wait</name>
279 <type>int</type>
280 <title>Must Wait on List</title>
281 <comment>On Waiting List</comment>
282 <add>4.1</add>
283 </field>
284 <field>
285 <name>transferred_to_contact_id</name>
286 <uniqueName>transferred_to_contact_id</uniqueName>
287 <type>int unsigned</type>
288 <default>NULL</default>
289 <title>Transferred to Contact ID</title>
290 <headerPattern>/transfer(.?id)?/i</headerPattern>
291 <import>true</import>
292 <comment>FK to Contact ID</comment>
293 <add>4.7</add>
294 </field>
295 <foreignKey>
296 <name>transferred_to_contact_id</name>
297 <table>civicrm_contact</table>
298 <key>id</key>
299 <onDelete>SET NULL</onDelete>
300 </foreignKey>
301 </table>