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> | |
81 | </html> | |
6a488035 TO |
82 | </field> |
83 | <field> | |
8f069c03 EM |
84 | <name>end_date</name> |
85 | <type>date</type> | |
86 | <title>Relationship End Date</title> | |
87 | <comment>date when the relationship ended</comment> | |
88 | <add>1.1</add> | |
db3ec100 TM |
89 | <html> |
90 | <type>Select Date</type> | |
91 | </html> | |
6a488035 TO |
92 | </field> |
93 | <field> | |
8f069c03 EM |
94 | <name>is_active</name> |
95 | <type>boolean</type> | |
96 | <title>Relationship Is Active</title> | |
97 | <default>1</default> | |
98 | <comment>is the relationship active ?</comment> | |
99 | <add>1.1</add> | |
db3ec100 TM |
100 | <html> |
101 | <type>CheckBox</type> | |
102 | </html> | |
6a488035 TO |
103 | </field> |
104 | <field> | |
8f069c03 EM |
105 | <name>description</name> |
106 | <type>varchar</type> | |
107 | <title>Relationship Description</title> | |
108 | <length>255</length> | |
109 | <comment>Optional verbose description for the relationship.</comment> | |
110 | <add>1.5</add> | |
db3ec100 TM |
111 | <html> |
112 | <type>Text</type> | |
113 | </html> | |
6a488035 TO |
114 | </field> |
115 | <field> | |
8f069c03 EM |
116 | <name>is_permission_a_b</name> |
117 | <type>boolean</type> | |
118 | <title>Contact A has Permission Over Contact B</title> | |
119 | <default>0</default> | |
120 | <comment>is contact a has permission to view / edit contact and | |
121 | related data for contact b ? | |
122 | </comment> | |
123 | <add>2.1</add> | |
db3ec100 TM |
124 | <html> |
125 | <type>CheckBox</type> | |
126 | </html> | |
6a488035 TO |
127 | </field> |
128 | <field> | |
8f069c03 EM |
129 | <name>is_permission_b_a</name> |
130 | <type>boolean</type> | |
131 | <title>Contact B has Permission Over Contact A</title> | |
132 | <default>0</default> | |
133 | <comment>is contact b has permission to view / edit contact and | |
134 | related data for contact a ? | |
135 | </comment> | |
136 | <add>2.1</add> | |
db3ec100 TM |
137 | <html> |
138 | <type>CheckBox</type> | |
139 | </html> | |
6a488035 TO |
140 | </field> |
141 | <field> | |
8f069c03 EM |
142 | <name>case_id</name> |
143 | <type>int unsigned</type> | |
144 | <title>Relationship Case</title> | |
145 | <default>NULL</default> | |
146 | <comment>FK to civicrm_case</comment> | |
147 | <add>2.2</add> | |
6a488035 | 148 | </field> |
3c7d2158 | 149 | <foreignKey> |
8f069c03 EM |
150 | <name>case_id</name> |
151 | <table>civicrm_case</table> | |
152 | <key>id</key> | |
153 | <add>2.2</add> | |
154 | <onDelete>CASCADE</onDelete> | |
6a488035 TO |
155 | </foreignKey> |
156 | </table> |