Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | <?xml version="1.0" encoding="iso-8859-1" ?> |
2 | ||
3 | <table> | |
4 | <base>CRM/Contact</base> | |
5 | <class>Relationship</class> | |
6 | <name>civicrm_relationship</name> | |
7 | <comment>Relationship between any 2 types of contacts.</comment> | |
8 | <add>1.1</add> | |
9 | <log>true</log> | |
449c4e6b | 10 | <icon>fa-handshake-o</icon> |
6a488035 | 11 | <field> |
8f069c03 EM |
12 | <name>id</name> |
13 | <type>int unsigned</type> | |
14 | <title>Relationship ID</title> | |
15 | <required>true</required> | |
16 | <comment>Relationship ID</comment> | |
17 | <add>1.1</add> | |
6a488035 TO |
18 | </field> |
19 | <primaryKey> | |
8f069c03 EM |
20 | <name>id</name> |
21 | <autoincrement>true</autoincrement> | |
6a488035 TO |
22 | </primaryKey> |
23 | <field> | |
8f069c03 EM |
24 | <name>contact_id_a</name> |
25 | <type>int unsigned</type> | |
26 | <title>Contact A</title> | |
27 | <required>true</required> | |
28 | <comment>id of the first contact</comment> | |
29 | <add>1.1</add> | |
6a488035 TO |
30 | </field> |
31 | <foreignKey> | |
8f069c03 EM |
32 | <name>contact_id_a</name> |
33 | <table>civicrm_contact</table> | |
34 | <key>id</key> | |
35 | <add>1.1</add> | |
36 | <onDelete>CASCADE</onDelete> | |
6a488035 TO |
37 | </foreignKey> |
38 | <field> | |
8f069c03 EM |
39 | <name>contact_id_b</name> |
40 | <type>int unsigned</type> | |
41 | <title>Contact B</title> | |
42 | <required>true</required> | |
43 | <comment>id of the second contact</comment> | |
44 | <add>1.1</add> | |
db3ec100 TM |
45 | <html> |
46 | <type>EntityRef</type> | |
47 | </html> | |
6a488035 TO |
48 | </field> |
49 | <foreignKey> | |
8f069c03 EM |
50 | <name>contact_id_b</name> |
51 | <table>civicrm_contact</table> | |
52 | <key>id</key> | |
53 | <add>1.1</add> | |
54 | <onDelete>CASCADE</onDelete> | |
6a488035 TO |
55 | </foreignKey> |
56 | <field> | |
8f069c03 EM |
57 | <name>relationship_type_id</name> |
58 | <type>int unsigned</type> | |
59 | <title>Relationship Type</title> | |
60 | <required>true</required> | |
61 | <comment>id of the relationship</comment> | |
62 | <add>1.1</add> | |
db3ec100 TM |
63 | <html> |
64 | <type>Select</type> | |
65 | </html> | |
6a488035 TO |
66 | </field> |
67 | <foreignKey> | |
8f069c03 EM |
68 | <name>relationship_type_id</name> |
69 | <table>civicrm_relationship_type</table> | |
70 | <key>id</key> | |
71 | <add>1.1</add> | |
72 | <onDelete>CASCADE</onDelete> | |
6a488035 TO |
73 | </foreignKey> |
74 | <field> | |
8f069c03 | 75 | <name>start_date</name> |
cc1b27ee | 76 | <uniqueName>relationship_start_date</uniqueName> |
8f069c03 EM |
77 | <type>date</type> |
78 | <title>Relationship Start Date</title> | |
79 | <comment>date when the relationship started</comment> | |
80 | <add>1.1</add> | |
db3ec100 TM |
81 | <html> |
82 | <type>Select Date</type> | |
425d6064 | 83 | <formatType>activityDate</formatType> |
db3ec100 | 84 | </html> |
6a488035 TO |
85 | </field> |
86 | <field> | |
8f069c03 | 87 | <name>end_date</name> |
cc1b27ee | 88 | <uniqueName>relationship_end_date</uniqueName> |
8f069c03 EM |
89 | <type>date</type> |
90 | <title>Relationship End Date</title> | |
91 | <comment>date when the relationship ended</comment> | |
92 | <add>1.1</add> | |
db3ec100 TM |
93 | <html> |
94 | <type>Select Date</type> | |
425d6064 | 95 | <formatType>activityDate</formatType> |
db3ec100 | 96 | </html> |
6a488035 TO |
97 | </field> |
98 | <field> | |
8f069c03 EM |
99 | <name>is_active</name> |
100 | <type>boolean</type> | |
101 | <title>Relationship Is Active</title> | |
102 | <default>1</default> | |
103 | <comment>is the relationship active ?</comment> | |
104 | <add>1.1</add> | |
db3ec100 TM |
105 | <html> |
106 | <type>CheckBox</type> | |
107 | </html> | |
6a488035 TO |
108 | </field> |
109 | <field> | |
8f069c03 EM |
110 | <name>description</name> |
111 | <type>varchar</type> | |
112 | <title>Relationship Description</title> | |
113 | <length>255</length> | |
114 | <comment>Optional verbose description for the relationship.</comment> | |
115 | <add>1.5</add> | |
db3ec100 TM |
116 | <html> |
117 | <type>Text</type> | |
118 | </html> | |
6a488035 TO |
119 | </field> |
120 | <field> | |
8f069c03 | 121 | <name>is_permission_a_b</name> |
f871c3a9 | 122 | <type>int unsigned</type> |
8f069c03 | 123 | <title>Contact A has Permission Over Contact B</title> |
f871c3a9 | 124 | <required>true</required> |
8f069c03 | 125 | <default>0</default> |
f871c3a9 | 126 | <comment>Permission that Contact A has to view/update Contact B</comment> |
8f069c03 | 127 | <add>2.1</add> |
f871c3a9 AS |
128 | <pseudoconstant> |
129 | <callback>CRM_Core_SelectValues::getPermissionedRelationshipOptions</callback> | |
130 | </pseudoconstant> | |
db3ec100 | 131 | <html> |
f871c3a9 | 132 | <type>Radio</type> |
db3ec100 | 133 | </html> |
6a488035 TO |
134 | </field> |
135 | <field> | |
8f069c03 | 136 | <name>is_permission_b_a</name> |
f871c3a9 | 137 | <type>int unsigned</type> |
8f069c03 | 138 | <title>Contact B has Permission Over Contact A</title> |
f871c3a9 | 139 | <required>true</required> |
8f069c03 | 140 | <default>0</default> |
f871c3a9 | 141 | <comment>Permission that Contact B has to view/update Contact A</comment> |
8f069c03 | 142 | <add>2.1</add> |
f871c3a9 AS |
143 | <pseudoconstant> |
144 | <callback>CRM_Core_SelectValues::getPermissionedRelationshipOptions</callback> | |
145 | </pseudoconstant> | |
db3ec100 | 146 | <html> |
f871c3a9 | 147 | <type>Radio</type> |
db3ec100 | 148 | </html> |
6a488035 TO |
149 | </field> |
150 | <field> | |
8f069c03 EM |
151 | <name>case_id</name> |
152 | <type>int unsigned</type> | |
153 | <title>Relationship Case</title> | |
154 | <default>NULL</default> | |
155 | <comment>FK to civicrm_case</comment> | |
156 | <add>2.2</add> | |
6a488035 | 157 | </field> |
3c7d2158 | 158 | <foreignKey> |
8f069c03 EM |
159 | <name>case_id</name> |
160 | <table>civicrm_case</table> | |
161 | <key>id</key> | |
162 | <add>2.2</add> | |
163 | <onDelete>CASCADE</onDelete> | |
6a488035 TO |
164 | </foreignKey> |
165 | </table> |