Merge pull request #22154 from eileenmcnaughton/n3
[civicrm-core.git] / xml / schema / Case / Case.xml
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2 <table>
3 <base>CRM/Case</base>
4 <class>Case</class>
5 <name>civicrm_case</name>
6 <description>Collections of activities and relationships for a given purpose.</description>
7 <comment>This table stores information about cases grouping activities.</comment>
8 <add>1.8</add>
9 <log>true</log>
10 <icon>fa-folder-open</icon>
11 <labelField>subject</labelField>
12 <component>CiviCase</component>
13 <field>
14 <name>id</name>
15 <type>int unsigned</type>
16 <uniqueName>case_id</uniqueName>
17 <required>true</required>
18 <import>true</import>
19 <title>Case ID</title>
20 <comment>Unique Case ID</comment>
21 <html>
22 <type>Number</type>
23 </html>
24 <add>1.8</add>
25 </field>
26 <primaryKey>
27 <name>id</name>
28 <autoincrement>true</autoincrement>
29 </primaryKey>
30 <field>
31 <name>case_type_id</name>
32 <type>int unsigned</type>
33 <import>true</import>
34 <export>false</export>
35 <title>Case Type ID</title>
36 <required>true</required>
37 <comment>FK to civicrm_case_type.id</comment>
38 <html>
39 <type>Select</type>
40 <label>Case Type</label>
41 </html>
42 <pseudoconstant>
43 <table>civicrm_case_type</table>
44 <keyColumn>id</keyColumn>
45 <labelColumn>title</labelColumn>
46 </pseudoconstant>
47 <add>2.0</add>
48 </field>
49 <index>
50 <name>index_case_type_id</name>
51 <fieldName>case_type_id</fieldName>
52 <add>2.0</add>
53 </index>
54 <foreignKey>
55 <name>case_type_id</name>
56 <table>civicrm_case_type</table>
57 <key>id</key>
58 <add>4.5</add>
59 </foreignKey>
60 <field>
61 <name>subject</name>
62 <type>varchar</type>
63 <length>128</length>
64 <title>Case Subject</title>
65 <import>true</import>
66 <uniqueName>case_subject</uniqueName>
67 <comment>Short name of the case.</comment>
68 <html>
69 <type>Text</type>
70 </html>
71 <add>1.8</add>
72 </field>
73 <field>
74 <name>start_date</name>
75 <uniqueName>case_start_date</uniqueName>
76 <title>Case Start Date</title>
77 <import>true</import>
78 <type>date</type>
79 <comment>Date on which given case starts.</comment>
80 <html>
81 <type>Select Date</type>
82 <formatType>activityDateTime</formatType>
83 </html>
84 <add>1.8</add>
85 </field>
86 <field>
87 <name>end_date</name>
88 <uniqueName>case_end_date</uniqueName>
89 <title>Case End Date</title>
90 <import>true</import>
91 <type>date</type>
92 <comment>Date on which given case ends.</comment>
93 <html>
94 <type>Select Date</type>
95 <formatType>activityDateTime</formatType>
96 </html>
97 <add>1.8</add>
98 </field>
99 <field>
100 <name>details</name>
101 <type>text</type>
102 <html>
103 <type>TextArea</type>
104 <rows>8</rows>
105 <cols>60</cols>
106 <label>Details</label>
107 </html>
108 <comment>Details populated from Open Case. Only used in the CiviCase extension.</comment>
109 <add>1.8</add>
110 </field>
111 <field>
112 <name>status_id</name>
113 <type>int unsigned</type>
114 <uniqueName>case_status_id</uniqueName>
115 <required>true</required>
116 <import>true</import>
117 <export>false</export>
118 <title>Case Status</title>
119 <comment>ID of case status.</comment>
120 <pseudoconstant>
121 <optionGroupName>case_status</optionGroupName>
122 </pseudoconstant>
123 <html>
124 <type>Select</type>
125 </html>
126 <add>1.8</add>
127 </field>
128 <field>
129 <name>is_deleted</name>
130 <title>Case is in the Trash</title>
131 <uniqueName>case_deleted</uniqueName>
132 <type>boolean</type>
133 <default>0</default>
134 <import>true</import>
135 <html>
136 <type>CheckBox</type>
137 </html>
138 <add>2.2</add>
139 </field>
140 <index>
141 <name>index_is_deleted</name>
142 <fieldName>is_deleted</fieldName>
143 <add>2.2</add>
144 </index>
145 <field>
146 <name>created_date</name>
147 <uniqueName>case_created_date</uniqueName>
148 <type>timestamp</type>
149 <comment>When was the case was created.</comment>
150 <required>false</required>
151 <export>true</export>
152 <default>NULL</default>
153 <html>
154 <label>Created Date</label>
155 </html>
156 <add>4.7</add>
157 </field>
158 <field>
159 <name>modified_date</name>
160 <uniqueName>case_modified_date</uniqueName>
161 <type>timestamp</type>
162 <comment>When was the case (or closely related entity) was created or modified or deleted.</comment>
163 <required>false</required>
164 <export>true</export>
165 <default>CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP</default>
166 <html>
167 <label>Modified Date</label>
168 </html>
169 <readonly>true</readonly>
170 <add>4.7</add>
171 </field>
172 </table>