CRM-15168 stdise whitespace across schema xml to make editing easier
[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>false</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 =
68 Registered.
69 </comment>
70 <add>1.7</add>
71 <pseudoconstant>
72 <table>civicrm_participant_status_type</table>
73 <keyColumn>id</keyColumn>
74 <labelColumn>label</labelColumn>
75 </pseudoconstant>
76 <html>
77 <type>Select</type>
78 </html>
79 </field>
80 <foreignKey>
81 <name>status_id</name>
82 <table>civicrm_participant_status_type</table>
83 <key>id</key>
84 <add>3.0</add>
85 </foreignKey>
86 <index>
87 <name>index_status_id</name>
88 <fieldName>status_id</fieldName>
89 <add>1.8</add>
90 </index>
91 <field>
92 <name>role_id</name>
93 <uniqueName>participant_role_id</uniqueName>
94 <title>Participant Role(s)</title>
95 <pseudoconstant>
96 <optionGroupName>participant_role</optionGroupName>
97 </pseudoconstant>
98 <html>
99 <type>Select</type>
100 </html>
101 <headerPattern>/(participant.)?(role)$/i</headerPattern>
102 <import>true</import>
103 <type>varchar</type>
104 <length>128</length>
105 <export>false</export>
106 <default>NULL</default>
107 <comment>Participant role ID. Implicit FK to civicrm_option_value where option_group = participant_role.</comment>
108 <add>1.7</add>
109 </field>
110 <index>
111 <name>index_role_id</name>
112 <fieldName>role_id</fieldName>
113 <add>1.8</add>
114 </index>
115 <field>
116 <name>register_date</name>
117 <uniqueName>participant_register_date</uniqueName>
118 <title>Register date</title>
119 <headerPattern>/^(r(egister\s)?date)$/i</headerPattern>
120 <import>true</import>
121 <type>datetime</type>
122 <comment>When did contact register for event?</comment>
123 <add>1.7</add>
124 </field>
125 <field>
126 <name>source</name>
127 <uniqueName>participant_source</uniqueName>
128 <title>Participant Source</title>
129 <headerPattern>/(participant.)?(source)$/i</headerPattern>
130 <import>true</import>
131 <type>varchar</type>
132 <length>128</length>
133 <comment>Source of this event registration.</comment>
134 <add>1.7</add>
135 </field>
136 <field>
137 <name>fee_level</name>
138 <uniqueName>participant_fee_level</uniqueName>
139 <title>Fee level</title>
140 <headerPattern>/^(f(ee\s)?level)$/i</headerPattern>
141 <type>text</type>
142 <import>true</import>
143 <comment>Populate with the label (text) associated with a fee level for paid events with multiple levels. Note that
144 we store the label value and not the key
145 </comment>
146 <add>1.7</add>
147 </field>
148 <field>
149 <name>is_test</name>
150 <uniqueName>participant_is_test</uniqueName>
151 <title>Test</title>
152 <type>boolean</type>
153 <default>0</default>
154 <import>true</import>
155 <add>1.7</add>
156 </field>
157 <field>
158 <name>is_pay_later</name>
159 <uniqueName>participant_is_pay_later</uniqueName>
160 <title>Is Pay Later</title>
161 <type>boolean</type>
162 <default>0</default>
163 <import>true</import>
164 <headerPattern>/(is.)?(pay(.)?later)$/i</headerPattern>
165 <add>2.1</add>
166 </field>
167
168 <field>
169 <name>fee_amount</name>
170 <uniqueName>participant_fee_amount</uniqueName>
171 <title>Fee Amount</title>
172 <type>decimal</type>
173 <import>true</import>
174 <headerPattern>/fee(.?am(ou)?nt)?/i</headerPattern>
175 <dataPattern>/^\d+(\.\d{2})?$/</dataPattern>
176 <comment>actual processor fee if known - may be 0.</comment>
177 <add>2.1</add>
178 </field>
179 <field>
180 <name>registered_by_id</name>
181 <uniqueName>participant_registered_by_id</uniqueName>
182 <type>int unsigned</type>
183 <title>Registered By ID</title>
184 <import>true</import>
185 <default>NULL</default>
186 <comment>FK to Participant ID</comment>
187 <add>2.1</add>
188 <export>true</export>
189 </field>
190 <foreignKey>
191 <name>registered_by_id</name>
192 <table>civicrm_participant</table>
193 <key>id</key>
194 <add>2.1</add>
195 <onDelete>SET NULL</onDelete>
196 </foreignKey>
197 <field>
198 <name>discount_id</name>
199 <uniqueName>participant_discount_id</uniqueName>
200 <type>int unsigned</type>
201 <title>Discount ID</title>
202 <default>NULL</default>
203 <comment>FK to Discount ID</comment>
204 <add>2.1</add>
205 </field>
206 <foreignKey>
207 <name>discount_id</name>
208 <table>civicrm_discount</table>
209 <key>id</key>
210 <add>2.1</add>
211 <onDelete>SET NULL</onDelete>
212 </foreignKey>
213 <field>
214 <name>fee_currency</name>
215 <uniqueName>participant_fee_currency</uniqueName>
216 <title>Fee Currency</title>
217 <type>varchar</type>
218 <length>3</length>
219 <default>NULL</default>
220 <import>true</import>
221 <headerPattern>/(fee)?.?cur(rency)?/i</headerPattern>
222 <dataPattern>/^[A-Z]{3}$/i</dataPattern>
223 <comment>3 character string, value derived from config setting.</comment>
224 <add>3.0</add>
225 <pseudoconstant>
226 <table>civicrm_currency</table>
227 <keyColumn>name</keyColumn>
228 <labelColumn>full_name</labelColumn>
229 <nameColumn>numeric_code</nameColumn>
230 </pseudoconstant>
231 <html>
232 <type>Select</type>
233 </html>
234 </field>
235 <field>
236 <name>campaign_id</name>
237 <uniqueName>participant_campaign_id</uniqueName>
238 <type>int unsigned</type>
239 <title>Campaign</title>
240 <import>true</import>
241 <comment>The campaign for which this participant has been registered.</comment>
242 <pseudoconstant>
243 <table>civicrm_campaign</table>
244 <keyColumn>id</keyColumn>
245 <labelColumn>title</labelColumn>
246 </pseudoconstant>
247 <add>3.4</add>
248 </field>
249 <foreignKey>
250 <name>campaign_id</name>
251 <table>civicrm_campaign</table>
252 <key>id</key>
253 <onDelete>SET NULL</onDelete>
254 </foreignKey>
255 <field>
256 <name>discount_amount</name>
257 <type>int unsigned</type>
258 <title>Discount Amount</title>
259 <comment>Discount Amount</comment>
260 <add>4.1</add>
261 </field>
262 <field>
263 <name>cart_id</name>
264 <type>int unsigned</type>
265 <title>Event Cart ID</title>
266 <comment>FK to civicrm_event_carts</comment>
267 <add>4.1</add>
268 </field>
269 <foreignKey>
270 <name>cart_id</name>
271 <table>civicrm_event_carts</table>
272 <key>id</key>
273 <onDelete>SET NULL</onDelete>
274 </foreignKey>
275 <field>
276 <name>must_wait</name>
277 <type>int</type>
278 <title>Must Wait on List</title>
279 <comment>On Waiting List</comment>
280 <add>4.1</add>
281 </field>
282 </table>