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>
12 <type>int unsigned
</type>
13 <title>Relationship ID
</title>
14 <required>true
</required>
15 <comment>Relationship ID
</comment>
20 <autoincrement>true
</autoincrement>
23 <name>contact_id_a
</name>
24 <type>int unsigned
</type>
25 <title>Contact A
</title>
26 <required>true
</required>
27 <comment>id of the first contact
</comment>
31 <name>contact_id_a
</name>
32 <table>civicrm_contact
</table>
35 <onDelete>CASCADE
</onDelete>
38 <name>contact_id_b
</name>
39 <type>int unsigned
</type>
40 <title>Contact B
</title>
41 <required>true
</required>
42 <comment>id of the second contact
</comment>
45 <type>EntityRef
</type>
49 <name>contact_id_b
</name>
50 <table>civicrm_contact
</table>
53 <onDelete>CASCADE
</onDelete>
56 <name>relationship_type_id
</name>
57 <type>int unsigned
</type>
58 <title>Relationship Type
</title>
59 <required>true
</required>
60 <comment>id of the relationship
</comment>
67 <name>relationship_type_id
</name>
68 <table>civicrm_relationship_type
</table>
71 <onDelete>CASCADE
</onDelete>
74 <name>start_date
</name>
75 <uniqueName>relationship_start_date
</uniqueName>
77 <title>Relationship Start Date
</title>
78 <comment>date when the relationship started
</comment>
81 <type>Select Date
</type>
82 <formatType>activityDate
</formatType>
87 <uniqueName>relationship_end_date
</uniqueName>
89 <title>Relationship End Date
</title>
90 <comment>date when the relationship ended
</comment>
93 <type>Select Date
</type>
94 <formatType>activityDate
</formatType>
98 <name>is_active
</name>
100 <title>Relationship Is Active
</title>
102 <comment>is the relationship active ?
</comment>
105 <type>CheckBox
</type>
109 <name>description
</name>
111 <title>Relationship Description
</title>
113 <comment>Optional verbose description for the relationship.
</comment>
120 <name>is_permission_a_b
</name>
121 <type>int unsigned
</type>
122 <title>Contact A has Permission Over Contact B
</title>
123 <required>true
</required>
125 <comment>Permission that Contact A has to view/update Contact B
</comment>
128 <callback>CRM_Core_SelectValues::getPermissionedRelationshipOptions
</callback>
135 <name>is_permission_b_a
</name>
136 <type>int unsigned
</type>
137 <title>Contact B has Permission Over Contact A
</title>
138 <required>true
</required>
140 <comment>Permission that Contact B has to view/update Contact A
</comment>
143 <callback>CRM_Core_SelectValues::getPermissionedRelationshipOptions
</callback>
151 <type>int unsigned
</type>
152 <title>Relationship Case
</title>
153 <default>NULL
</default>
154 <comment>FK to civicrm_case
</comment>
159 <table>civicrm_case
</table>
162 <onDelete>CASCADE
</onDelete>