1 <?xml version=
"1.0" encoding=
"iso-8859-1" ?>
4 <base>CRM/Contact
</base>
5 <class>Relationship
</class>
6 <name>civicrm_relationship
</name>
7 <comment>Relationship between any
2 types of contacts.
</comment>
10 <icon>fa-handshake-o
</icon>
12 <view>civicrm/contact/view/rel?action=view
&reset=
1&cid=[contact_id_a]
&id=[id]
</view>
13 <delete>civicrm/contact/view/rel?action=delete
&reset=
1&cid=[contact_id_a]
&id=[id]
</delete>
18 <type>int unsigned
</type>
19 <title>Relationship ID
</title>
20 <required>true
</required>
21 <comment>Relationship ID
</comment>
29 <autoincrement>true
</autoincrement>
32 <name>contact_id_a
</name>
33 <type>int unsigned
</type>
34 <title>Contact A ID
</title>
35 <required>true
</required>
36 <comment>id of the first contact
</comment>
38 <label>Contact A
</label>
43 <name>contact_id_a
</name>
44 <table>civicrm_contact
</table>
47 <onDelete>CASCADE
</onDelete>
50 <name>contact_id_b
</name>
51 <type>int unsigned
</type>
52 <title>Contact B ID
</title>
53 <required>true
</required>
54 <comment>id of the second contact
</comment>
57 <type>EntityRef
</type>
58 <label>Contact B
</label>
62 <name>contact_id_b
</name>
63 <table>civicrm_contact
</table>
66 <onDelete>CASCADE
</onDelete>
69 <name>relationship_type_id
</name>
70 <type>int unsigned
</type>
71 <title>Relationship Type ID
</title>
72 <required>true
</required>
73 <comment>Type of relationship
</comment>
77 <label>Relationship Type
</label>
80 <table>civicrm_relationship_type
</table>
81 <keyColumn>id
</keyColumn>
82 <nameColumn>name_a_b
</nameColumn>
83 <labelColumn>label_a_b
</labelColumn>
87 <name>relationship_type_id
</name>
88 <table>civicrm_relationship_type
</table>
91 <onDelete>CASCADE
</onDelete>
94 <name>start_date
</name>
95 <uniqueName>relationship_start_date
</uniqueName>
97 <title>Relationship Start Date
</title>
98 <comment>date when the relationship started
</comment>
101 <type>Select Date
</type>
102 <formatType>activityDate
</formatType>
106 <name>end_date
</name>
107 <uniqueName>relationship_end_date
</uniqueName>
109 <title>Relationship End Date
</title>
110 <comment>date when the relationship ended
</comment>
113 <type>Select Date
</type>
114 <formatType>activityDate
</formatType>
118 <name>is_active
</name>
120 <title>Relationship Is Active
</title>
122 <comment>is the relationship active ?
</comment>
125 <type>CheckBox
</type>
129 <name>description
</name>
131 <title>Relationship Description
</title>
133 <comment>Optional verbose description for the relationship.
</comment>
140 <name>is_permission_a_b
</name>
141 <type>int unsigned
</type>
142 <title>Contact A has Permission Over Contact B
</title>
143 <required>true
</required>
145 <comment>Permission that Contact A has to view/update Contact B
</comment>
148 <callback>CRM_Core_SelectValues::getPermissionedRelationshipOptions
</callback>
155 <name>is_permission_b_a
</name>
156 <type>int unsigned
</type>
157 <title>Contact B has Permission Over Contact A
</title>
158 <required>true
</required>
160 <comment>Permission that Contact B has to view/update Contact A
</comment>
163 <callback>CRM_Core_SelectValues::getPermissionedRelationshipOptions
</callback>
171 <type>int unsigned
</type>
172 <component>CiviCase
</component>
173 <title>Case ID
</title>
174 <default>NULL
</default>
175 <comment>FK to civicrm_case
</comment>
182 <name>created_date
</name>
183 <type>timestamp
</type>
184 <comment>Relationship created date.
</comment>
185 <required>true
</required>
186 <default>CURRENT_TIMESTAMP
</default>
190 <name>modified_date
</name>
191 <title>Relationship Modified Date
</title>
192 <type>timestamp
</type>
193 <required>true
</required>
194 <comment>Relationship last modified.
</comment>
195 <default>CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
</default>
197 <readonly>true
</readonly>
201 <table>civicrm_case
</table>
204 <onDelete>CASCADE
</onDelete>