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 <required>true
</required>
123 <comment>is the relationship active ?
</comment>
126 <type>CheckBox
</type>
130 <name>description
</name>
132 <title>Relationship Description
</title>
134 <comment>Optional verbose description for the relationship.
</comment>
141 <name>is_permission_a_b
</name>
142 <type>int unsigned
</type>
143 <title>Contact A has Permission Over Contact B
</title>
144 <required>true
</required>
146 <comment>Permission that Contact A has to view/update Contact B
</comment>
149 <callback>CRM_Core_SelectValues::getPermissionedRelationshipOptions
</callback>
156 <name>is_permission_b_a
</name>
157 <type>int unsigned
</type>
158 <title>Contact B has Permission Over Contact A
</title>
159 <required>true
</required>
161 <comment>Permission that Contact B has to view/update Contact A
</comment>
164 <callback>CRM_Core_SelectValues::getPermissionedRelationshipOptions
</callback>
172 <type>int unsigned
</type>
173 <component>CiviCase
</component>
174 <title>Case ID
</title>
175 <default>NULL
</default>
176 <comment>FK to civicrm_case
</comment>
183 <name>created_date
</name>
184 <type>timestamp
</type>
185 <comment>Relationship created date.
</comment>
186 <required>true
</required>
187 <default>CURRENT_TIMESTAMP
</default>
191 <name>modified_date
</name>
192 <title>Relationship Modified Date
</title>
193 <type>timestamp
</type>
194 <required>true
</required>
195 <comment>Relationship last modified.
</comment>
196 <default>CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
</default>
198 <readonly>true
</readonly>
202 <table>civicrm_case
</table>
205 <onDelete>CASCADE
</onDelete>