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