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