Merge pull request #18316 from civicrm/5.29
[civicrm-core.git] / xml / schema / Contact / Contact.xml
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2
3 <table>
4 <base>CRM/Contact</base>
5 <class>Contact</class>
6 <name>civicrm_contact</name>
7 <comment>Contact objects are defined by a civicrm_contact record plus a related civicrm_contact_type record.</comment>
8 <add>1.1</add>
9 <log>true</log>
10 <icon>fa-address-book-o</icon>
11 <field>
12 <name>id</name>
13 <type>int unsigned</type>
14 <title>Contact ID</title>
15 <import>true</import>
16 <headerPattern>/internal|contact?|id$/i</headerPattern>
17 <required>true</required>
18 <comment>Unique Contact ID</comment>
19 <add>1.1</add>
20 </field>
21 <primaryKey>
22 <name>id</name>
23 <autoincrement>true</autoincrement>
24 </primaryKey>
25 <field>
26 <name>contact_type</name>
27 <title>Contact Type</title>
28 <type>varchar</type>
29 <length>64</length>
30 <comment>Type of Contact.</comment>
31 <export>true</export>
32 <pseudoconstant>
33 <table>civicrm_contact_type</table>
34 <keyColumn>name</keyColumn>
35 <labelColumn>label</labelColumn>
36 <condition>parent_id IS NULL</condition>
37 </pseudoconstant>
38 <html>
39 <type>Select</type>
40 </html>
41 <add>1.1</add>
42 <change>3.1</change>
43 <contactType>null</contactType>
44 </field>
45 <index>
46 <name>index_contact_type</name>
47 <fieldName>contact_type</fieldName>
48 <add>2.1</add>
49 </index>
50 <field>
51 <name>contact_sub_type</name>
52 <title>Contact Subtype</title>
53 <type>varchar</type>
54 <length>255</length>
55 <export>true</export>
56 <import>true</import>
57 <headerPattern>/C(ontact )?(subtype|sub-type|sub type)/i</headerPattern>
58 <comment>May be used to over-ride contact view and edit templates.</comment>
59 <pseudoconstant>
60 <table>civicrm_contact_type</table>
61 <keyColumn>name</keyColumn>
62 <labelColumn>label</labelColumn>
63 <condition>parent_id IS NOT NULL</condition>
64 </pseudoconstant>
65 <html>
66 <type>Select</type>
67 <multiple>1</multiple>
68 </html>
69 <serialize>SEPARATOR_BOOKEND</serialize>
70 <add>1.5</add>
71 </field>
72 <index>
73 <name>index_contact_sub_type</name>
74 <fieldName>contact_sub_type</fieldName>
75 <add>2.1</add>
76 </index>
77 <field>
78 <name>do_not_email</name>
79 <type>boolean</type>
80 <import>true</import>
81 <headerPattern>/d(o )?(not )?(email)/i</headerPattern>
82 <dataPattern>/^\d{1,}$/</dataPattern>
83 <default>0</default>
84 <html>
85 <type>CheckBox</type>
86 </html>
87 <add>1.1</add>
88 </field>
89 <field>
90 <name>do_not_phone</name>
91 <type>boolean</type>
92 <default>0</default>
93 <import>true</import>
94 <headerPattern>/d(o )?(not )?(call|phone)/i</headerPattern>
95 <dataPattern>/^\d{1,}$/</dataPattern>
96 <add>1.1</add>
97 <html>
98 <type>CheckBox</type>
99 </html>
100 </field>
101 <field>
102 <name>do_not_mail</name>
103 <type>boolean</type>
104 <import>true</import>
105 <headerPattern>/^(d(o\s)?n(ot\s)?mail)|(\w*)?bulk\s?(\w*)$/i</headerPattern>
106 <dataPattern>/^\d{1,}$/</dataPattern>
107 <default>0</default>
108 <add>1.1</add>
109 <html>
110 <type>CheckBox</type>
111 </html>
112 </field>
113 <field>
114 <name>do_not_sms</name>
115 <type>boolean</type>
116 <import>true</import>
117 <headerPattern>/d(o )?(not )?(sms)/i</headerPattern>
118 <dataPattern>/^\d{1,}$/</dataPattern>
119 <default>0</default>
120 <add>3.0</add>
121 <html>
122 <type>CheckBox</type>
123 </html>
124 </field>
125 <field>
126 <name>do_not_trade</name>
127 <type>boolean</type>
128 <import>true</import>
129 <headerPattern>/d(o )?(not )?(trade)/i</headerPattern>
130 <dataPattern>/^\d{1,}$/</dataPattern>
131 <default>0</default>
132 <add>1.1</add>
133 <html>
134 <type>CheckBox</type>
135 </html>
136 </field>
137 <field>
138 <name>is_opt_out</name>
139 <type>boolean</type>
140 <title>No Bulk Emails (User Opt Out)</title>
141 <default>0</default>
142 <import>true</import>
143 <required>true</required>
144 <comment>Has the contact opted out from receiving all bulk email from the organization or site domain?</comment>
145 <add>1.1</add>
146 <html>
147 <type>CheckBox</type>
148 </html>
149 </field>
150 <field>
151 <name>legal_identifier</name>
152 <type>varchar</type>
153 <length>32</length>
154 <import>true</import>
155 <headerPattern>/legal\s?id/i</headerPattern>
156 <dataPattern>/\w+?\d{5,}/</dataPattern>
157 <comment>May be used for SSN, EIN/TIN, Household ID (census) or other applicable unique legal/government ID.</comment>
158 <add>1.1</add>
159 <html>
160 <type>Text</type>
161 </html>
162 </field>
163 <field>
164 <name>external_identifier</name>
165 <type>varchar</type>
166 <length>64</length>
167 <html>
168 <type>Text</type>
169 <size>8</size>
170 </html>
171
172 <import>true</import>
173 <headerPattern>/external\s?id/i</headerPattern>
174 <dataPattern>/^\d{11,}$/</dataPattern>
175 <comment>Unique trusted external ID (generally from a legacy app/datasource). Particularly useful for deduping operations.</comment>
176 <add>1.1</add>
177 </field>
178 <index>
179 <name>UI_external_identifier</name>
180 <unique>true</unique>
181 <fieldName>external_identifier</fieldName>
182 <add>1.7</add>
183 </index>
184 <field>
185 <name>sort_name</name>
186 <title>Sort Name</title>
187 <type>varchar</type>
188 <length>128</length>
189 <html>
190 <type>Text</type>
191 <size>30</size>
192 </html>
193
194 <export>true</export>
195 <comment>Name used for sorting different contact types</comment>
196 <add>1.1</add>
197 </field>
198 <index>
199 <name>index_sort_name</name>
200 <fieldName>sort_name</fieldName>
201 <add>2.1</add>
202 </index>
203 <field>
204 <name>display_name</name>
205 <title>Display Name</title>
206 <type>varchar</type>
207 <length>128</length>
208 <html>
209 <type>Text</type>
210 <size>30</size>
211 </html>
212
213 <export>true</export>
214 <comment>Formatted name representing preferred format for display/print/other output.</comment>
215 <add>1.1</add>
216 </field>
217 <field>
218 <name>nick_name</name>
219 <title>Nickname</title>
220 <type>varchar</type>
221 <length>128</length>
222 <html>
223 <type>Text</type>
224 <size>30</size>
225 </html>
226
227 <import>true</import>
228 <headerPattern>/n(ick\s)name|nick$/i</headerPattern>
229 <dataPattern>/^\w+$/</dataPattern>
230 <comment>Nickname.</comment>
231 <fulltext/>
232 <add>1.1</add>
233 </field>
234 <field>
235 <name>legal_name</name>
236 <type>varchar</type>
237 <length>128</length>
238 <html>
239 <type>Text</type>
240 <size>30</size>
241 </html>
242 <contactType>Organization</contactType>
243 <import>true</import>
244 <headerPattern>/^legal|(l(egal\s)?name)$/i</headerPattern>
245 <comment>Legal Name.</comment>
246 <fulltext/>
247 <add>1.1</add>
248 </field>
249 <field>
250 <name>image_URL</name>
251 <type>text</type>
252 <import>true</import>
253 <comment>optional URL for preferred image (photo, logo, etc.) to display for this contact.</comment>
254 <add>1.1</add>
255 <html>
256 <type>File</type>
257 <size>30</size>
258 </html>
259 </field>
260 <field>
261 <name>preferred_communication_method</name>
262 <title>Preferred Communication Method</title>
263 <type>varchar</type>
264 <length>255</length>
265 <import>true</import>
266 <headerPattern>/^p(ref\w*\s)?c(omm\w*)|( meth\w*)$/i</headerPattern>
267 <dataPattern>/^\w+$/</dataPattern>
268 <comment>What is the preferred mode of communication.</comment>
269 <add>1.1</add>
270 <pseudoconstant>
271 <optionGroupName>preferred_communication_method</optionGroupName>
272 </pseudoconstant>
273 <html>
274 <type>Select</type>
275 <multiple>1</multiple>
276 </html>
277 <serialize>SEPARATOR_BOOKEND</serialize>
278 </field>
279 <index>
280 <name>index_preferred_communication_method</name>
281 <fieldName>preferred_communication_method</fieldName>
282 <add>1.6</add>
283 </index>
284 <field>
285 <name>preferred_language</name>
286 <title>Preferred Language</title>
287 <type>varchar</type>
288 <length>5</length>
289 <comment>Which language is preferred for communication. FK to languages in civicrm_option_value.</comment>
290 <headerPattern>/^lang/i</headerPattern>
291 <import>true</import>
292 <pseudoconstant>
293 <optionGroupName>languages</optionGroupName>
294 <keyColumn>name</keyColumn>
295 </pseudoconstant>
296 <html>
297 <type>Select</type>
298 </html>
299 <add>3.2</add>
300 </field>
301 <field>
302 <name>preferred_mail_format</name>
303 <type>varchar</type>
304 <length>8</length>
305 <default>"Both"</default>
306 <import>true</import>
307 <headerPattern>/^p(ref\w*\s)?m(ail\s)?f(orm\w*)$/i</headerPattern>
308 <comment>What is the preferred mode of sending an email.</comment>
309 <add>1.1</add>
310 <pseudoconstant>
311 <callback>CRM_Core_SelectValues::pmf</callback>
312 </pseudoconstant>
313 <html>
314 <type>Select</type>
315 </html>
316 </field>
317 <field>
318 <name>hash</name>
319 <title>Contact Hash</title>
320 <type>varchar</type>
321 <length>32</length>
322 <comment>Key for validating requests related to this contact.</comment>
323 <add>1.1</add>
324 <change>1.5</change>
325 <export>true</export>
326 </field>
327 <index>
328 <name>index_hash</name>
329 <fieldName>hash</fieldName>
330 <add>2.1</add>
331 </index>
332 <field>
333 <name>api_key</name>
334 <type>varchar</type>
335 <length>32</length>
336 <comment>API Key for validating requests related to this contact.</comment>
337 <add>2.2</add>
338 <permission>
339 <or>administer CiviCRM, edit api keys</or>
340 </permission>
341 </field>
342 <index>
343 <name>index_api_key</name>
344 <fieldName>api_key</fieldName>
345 <add>2.1</add>
346 </index>
347 <field>
348 <name>source</name>
349 <title>Contact Source</title>
350 <uniqueName>contact_source</uniqueName>
351 <type>varchar</type>
352 <length>255</length>
353 <html>
354 <type>Text</type>
355 <size>30</size>
356 </html>
357
358 <import>true</import>
359 <headerPattern>/(C(ontact\s)?Source)$/i</headerPattern>
360 <comment>where contact come from, e.g. import, donate module insert...</comment>
361 <add>1.1</add>
362 </field>
363 <field>
364 <name>first_name</name>
365 <type>varchar</type>
366 <length>64</length>
367 <html>
368 <type>Text</type>
369 <size>30</size>
370 </html>
371 <import>true</import>
372 <headerPattern>/^first|(f(irst\s)?name)$/i</headerPattern>
373 <dataPattern>/^\w+$/</dataPattern>
374 <fulltext/>
375 <comment>First Name.</comment>
376 <add>1.1</add>
377 <contactType>Individual</contactType>
378 </field>
379 <index>
380 <name>index_first_name</name>
381 <fieldName>first_name</fieldName>
382 <add>1.8</add>
383 </index>
384 <field>
385 <name>middle_name</name>
386 <type>varchar</type>
387 <length>64</length>
388 <html>
389 <type>Text</type>
390 <size>30</size>
391 </html>
392 <import>true</import>
393 <headerPattern>/^middle|(m(iddle\s)?name)$/i</headerPattern>
394 <dataPattern>/^\w+$/</dataPattern>
395 <fulltext/>
396 <comment>Middle Name.</comment>
397 <add>1.1</add>
398 <contactType>Individual</contactType>
399 </field>
400 <field>
401 <name>last_name</name>
402 <type>varchar</type>
403 <length>64</length>
404 <html>
405 <type>Text</type>
406 <size>30</size>
407 </html>
408 <import>true</import>
409 <headerPattern>/^last|(l(ast\s)?name)$/i</headerPattern>
410 <dataPattern>/^\w+(\s\w+)?+$/</dataPattern>
411 <comment>Last Name.</comment>
412 <fulltext/>
413 <add>1.1</add>
414 <contactType>Individual</contactType>
415 </field>
416 <index>
417 <name>index_last_name</name>
418 <fieldName>last_name</fieldName>
419 <add>1.8</add>
420 </index>
421 <field>
422 <name>prefix_id</name>
423 <title>Individual Prefix</title>
424 <type>int unsigned</type>
425 <comment>Prefix or Title for name (Ms, Mr...). FK to prefix ID</comment>
426 <pseudoconstant>
427 <optionGroupName>individual_prefix</optionGroupName>
428 </pseudoconstant>
429 <html>
430 <type>Select</type>
431 </html>
432 <headerPattern>/^(prefix|title)/i</headerPattern>
433 <dataPattern>/^(mr|ms|mrs|sir|dr)\.?$/i</dataPattern>
434 <import>true</import>
435 <add>1.2</add>
436 <contactType>Individual</contactType>
437 </field>
438 <index>
439 <name>UI_prefix</name>
440 <fieldName>prefix_id</fieldName>
441 <add>1.6</add>
442 </index>
443 <field>
444 <name>suffix_id</name>
445 <title>Individual Suffix</title>
446 <type>int unsigned</type>
447 <pseudoconstant>
448 <optionGroupName>individual_suffix</optionGroupName>
449 </pseudoconstant>
450 <html>
451 <type>Select</type>
452 </html>
453 <import>true</import>
454 <comment>Suffix for name (Jr, Sr...). FK to suffix ID</comment>
455 <headerPattern>/^suffix$/i</headerPattern>
456 <dataPattern>/^(sr|jr)\.?|i{2,}$/</dataPattern>
457 <add>1.2</add>
458 <contactType>Individual</contactType>
459 </field>
460 <index>
461 <name>UI_suffix</name>
462 <fieldName>suffix_id</fieldName>
463 <add>1.6</add>
464 </index>
465 <field>
466 <name>formal_title</name>
467 <type>varchar</type>
468 <length>64</length>
469 <import>true</import>
470 <html>
471 <type>Text</type>
472 </html>
473 <headerPattern>/^title/i</headerPattern>
474 <comment>Formal (academic or similar) title in front of name. (Prof., Dr. etc.)</comment>
475 <add>4.5</add>
476 <contactType>Individual</contactType>
477 </field>
478 <field>
479 <name>communication_style_id</name>
480 <title>Communication Style</title>
481 <type>int unsigned</type>
482 <pseudoconstant>
483 <optionGroupName>communication_style</optionGroupName>
484 </pseudoconstant>
485 <export>true</export>
486 <import>true</import>
487 <headerPattern>/style/i</headerPattern>
488 <comment>Communication style (e.g. formal vs. familiar) to use with this contact. FK to communication styles in civicrm_option_value.</comment>
489 <add>4.4</add>
490 <html>
491 <type>Select</type>
492 </html>
493 </field>
494 <index>
495 <name>index_communication_style_id</name>
496 <fieldName>communication_style_id</fieldName>
497 <add>4.4</add>
498 </index>
499 <field>
500 <name>email_greeting_id</name>
501 <type>int unsigned</type>
502 <title>Email Greeting ID</title>
503 <export>true</export>
504 <comment>FK to civicrm_option_value.id, that has to be valid registered Email Greeting.</comment>
505 <add>3.0</add>
506 <html>
507 <type>Select</type>
508 </html>
509 <pseudoconstant>
510 <optionGroupName>email_greeting</optionGroupName>
511 </pseudoconstant>
512 </field>
513 <field>
514 <name>email_greeting_custom</name>
515 <type>varchar</type>
516 <length>128</length>
517 <import>true</import>
518 <export>false</export>
519 <comment>Custom Email Greeting.</comment>
520 <add>3.0</add>
521 <html>
522 <type>Text</type>
523 </html>
524 </field>
525 <field>
526 <name>email_greeting_display</name>
527 <title>Email Greeting</title>
528 <type>varchar</type>
529 <length>255</length>
530 <comment>Cache Email Greeting.</comment>
531 <add>3.0</add>
532 </field>
533 <field>
534 <name>postal_greeting_id</name>
535 <type>int unsigned</type>
536 <title>Postal Greeting ID</title>
537 <export>true</export>
538 <comment>FK to civicrm_option_value.id, that has to be valid registered Postal Greeting.</comment>
539 <add>3.0</add>
540 <html>
541 <type>Select</type>
542 </html>
543 <pseudoconstant>
544 <optionGroupName>postal_greeting</optionGroupName>
545 </pseudoconstant>
546 </field>
547 <field>
548 <name>postal_greeting_custom</name>
549 <type>varchar</type>
550 <length>128</length>
551 <import>true</import>
552 <export>false</export>
553 <comment>Custom Postal greeting.</comment>
554 <add>3.0</add>
555 <html>
556 <type>Text</type>
557 </html>
558 </field>
559 <field>
560 <name>postal_greeting_display</name>
561 <title>Postal Greeting</title>
562 <type>varchar</type>
563 <length>255</length>
564 <comment>Cache Postal greeting.</comment>
565 <add>3.0</add>
566 </field>
567 <field>
568 <name>addressee_id</name>
569 <type>int unsigned</type>
570 <title>Addressee ID</title>
571 <comment>FK to civicrm_option_value.id, that has to be valid registered Addressee.</comment>
572 <add>3.0</add>
573 <export>true</export>
574 <html>
575 <type>Select</type>
576 </html>
577 <pseudoconstant>
578 <optionGroupName>addressee</optionGroupName>
579 </pseudoconstant>
580 </field>
581 <field>
582 <name>addressee_custom</name>
583 <type>varchar</type>
584 <length>128</length>
585 <import>true</import>
586 <export>false</export>
587 <comment>Custom Addressee.</comment>
588 <add>3.0</add>
589 <html>
590 <type>Text</type>
591 </html>
592 </field>
593 <field>
594 <name>addressee_display</name>
595 <title>Addressee</title>
596 <type>varchar</type>
597 <length>255</length>
598 <comment>Cache Addressee.</comment>
599 <add>3.0</add>
600 </field>
601 <field>
602 <name>job_title</name>
603 <type>varchar</type>
604 <length>255</length>
605 <html>
606 <type>Text</type>
607 <size>30</size>
608 </html>
609 <import>true</import>
610 <headerPattern>/^job|(j(ob\s)?title)$/i</headerPattern>
611 <dataPattern>//</dataPattern>
612 <comment>Job Title</comment>
613 <add>1.1</add>
614 <contactType>Individual</contactType>
615 </field>
616 <field>
617 <name>gender_id</name>
618 <title>Gender ID</title>
619 <type>int unsigned</type>
620 <pseudoconstant>
621 <optionGroupName>gender</optionGroupName>
622 </pseudoconstant>
623 <html>
624 <type>Select</type>
625 <label>Gender</label>
626 </html>
627 <headerPattern>/^gender$/i</headerPattern>
628 <comment>FK to gender ID</comment>
629 <import>true</import>
630 <add>1.2</add>
631 <contactType>Individual</contactType>
632 </field>
633 <index>
634 <name>UI_gender</name>
635 <fieldName>gender_id</fieldName>
636 <add>1.6</add>
637 </index>
638 <field>
639 <name>birth_date</name>
640 <type>date</type>
641 <import>true</import>
642 <headerPattern>/^birth|(b(irth\s)?date)|D(\W*)O(\W*)B(\W*)$/i</headerPattern>
643 <dataPattern>/\d{4}-?\d{2}-?\d{2}/</dataPattern>
644 <comment>Date of birth</comment>
645 <add>1.1</add>
646 <html>
647 <type>Select Date</type>
648 <formatType>birth</formatType>
649 </html>
650 <contactType>Individual</contactType>
651 </field>
652 <field>
653 <name>is_deceased</name>
654 <title>Deceased</title>
655 <import>true</import>
656 <export>true</export>
657 <headerPattern>/i(s\s)?d(eceased)$/i</headerPattern>
658 <type>boolean</type>
659 <default>0</default>
660 <add>1.1</add>
661 <required>true</required>
662 <html>
663 <type>CheckBox</type>
664 </html>
665 <contactType>Individual</contactType>
666 </field>
667 <index>
668 <name>index_is_deceased</name>
669 <fieldName>is_deceased</fieldName>
670 <add>4.7</add>
671 </index>
672 <field>
673 <name>deceased_date</name>
674 <type>date</type>
675 <import>true</import>
676 <export>true</export>
677 <headerPattern>/^deceased|(d(eceased\s)?date)$/i</headerPattern>
678 <comment>Date of deceased</comment>
679 <add>1.5</add>
680 <html>
681 <type>Select Date</type>
682 <formatType>birth</formatType>
683 </html>
684 <contactType>Individual</contactType>
685 </field>
686 <field>
687 <name>household_name</name>
688 <type>varchar</type>
689 <length>128</length>
690 <html>
691 <type>Text</type>
692 <size>30</size>
693 </html>
694 <import>true</import>
695 <headerPattern>/^household|(h(ousehold\s)?name)$/i</headerPattern>
696 <dataPattern>/^\w+$/</dataPattern>
697 <comment>Household Name.</comment>
698 <fulltext/>
699 <add>1.1</add>
700 <contactType>Household</contactType>
701 </field>
702 <index>
703 <name>index_household_name</name>
704 <fieldName>household_name</fieldName>
705 <add>1.8</add>
706 </index>
707 <field>
708 <name>primary_contact_id</name>
709 <type>int unsigned</type>
710 <title>Household Primary Contact ID</title>
711 <comment>Optional FK to Primary Contact for this household.</comment>
712 <add>1.1</add>
713 <contactType>Household</contactType>
714 </field>
715 <foreignKey>
716 <name>primary_contact_id</name>
717 <table>civicrm_contact</table>
718 <key>id</key>
719 <add>1.1</add>
720 <onDelete>SET NULL</onDelete>
721 </foreignKey>
722 <field>
723 <name>organization_name</name>
724 <type>varchar</type>
725 <length>128</length>
726 <html>
727 <type>Text</type>
728 <size>30</size>
729 </html>
730 <import>true</import>
731 <headerPattern>/^organization|(o(rganization\s)?name)$/i</headerPattern>
732 <dataPattern>/^\w+$/</dataPattern>
733 <comment>Organization Name.</comment>
734 <fulltext/>
735 <add>1.1</add>
736 <contactType>Organization</contactType>
737 </field>
738 <index>
739 <name>index_organization_name</name>
740 <fieldName>organization_name</fieldName>
741 <add>1.8</add>
742 </index>
743 <field>
744 <name>sic_code</name>
745 <type>varchar</type>
746 <length>8</length>
747 <import>true</import>
748 <headerPattern>/^sic|(s(ic\s)?code)$/i</headerPattern>
749 <comment>Standard Industry Classification Code.</comment>
750 <add>1.1</add>
751 <html>
752 <type>Text</type>
753 </html>
754 <contactType>Organization</contactType>
755 </field>
756 <field>
757 <name>user_unique_id</name>
758 <rule>url</rule>
759 <title>Unique ID (OpenID)</title>
760 <type>varchar</type>
761 <length>255</length>
762 <import>true</import>
763 <headerPattern>/^Open\s?ID|u(niq\w*)?\s?ID/i</headerPattern>
764 <dataPattern>/^[\w\/\:\.]+$/</dataPattern>
765 <comment>the OpenID (or OpenID-style http://username.domain/) unique identifier for this contact mainly used for logging in to CiviCRM</comment>
766 <add>2.0</add>
767 <html>
768 <type>Text</type>
769 </html>
770 </field>
771 <field>
772 <name>employer_id</name>
773 <title>Current Employer ID</title>
774 <uniqueName>current_employer_id</uniqueName>
775 <type>int unsigned</type>
776 <comment>OPTIONAL FK to civicrm_contact record.</comment>
777 <export>true</export>
778 <add>2.1</add>
779 <html>
780 <type>EntityRef</type>
781 <label>Current Employer</label>
782 </html>
783 <contactType>Individual</contactType>
784 </field>
785 <foreignKey>
786 <name>employer_id</name>
787 <table>civicrm_contact</table>
788 <key>id</key>
789 <add>2.1</add>
790 <onDelete>SET NULL</onDelete>
791 </foreignKey>
792 <field>
793 <name>is_deleted</name>
794 <title>Contact is in Trash</title>
795 <uniqueName>contact_is_deleted</uniqueName>
796 <type>boolean</type>
797 <default>0</default>
798 <required>true</required>
799 <export>true</export>
800 <add>3.2</add>
801 <html>
802 <type>CheckBox</type>
803 </html>
804 <permission>access deleted contacts</permission>
805 </field>
806 <index>
807 <name>index_is_deleted_sort_name</name>
808 <fieldName>is_deleted</fieldName>
809 <fieldName>sort_name</fieldName>
810 <fieldName>id</fieldName>
811 <add>4.4</add>
812 </index>
813 <field>
814 <name>created_date</name>
815 <type>timestamp</type>
816 <comment>When was the contact was created.</comment>
817 <required>false</required>
818 <export>true</export>
819 <default>NULL</default>
820 <add>4.3</add>
821 </field>
822 <index>
823 <name>index_created_date</name>
824 <fieldName>created_date</fieldName>
825 <add>5.18</add>
826 </index>
827 <field>
828 <name>modified_date</name>
829 <type>timestamp</type>
830 <comment>When was the contact (or closely related entity) was created or modified or deleted.</comment>
831 <required>false</required>
832 <export>true</export>
833 <default>CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP</default>
834 <add>4.3</add>
835 </field>
836 <index>
837 <name>index_modified_date</name>
838 <fieldName>modified_date</fieldName>
839 <add>5.18</add>
840 </index>
841 </table>