Case, Campaign, Language PseudoConstants CRM-12464
[civicrm-core.git] / xml / schema / Case / Case.xml
CommitLineData
6a488035
TO
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 <comment>This table stores information about cases grouping activities.</comment>
7 <add>1.8</add>
8 <log>true</log>
9 <field>
10 <name>id</name>
11 <type>int unsigned</type>
12 <uniqueName>case_id</uniqueName>
13 <required>true</required>
14 <import>true</import>
15 <title>Case ID</title>
16 <comment>Unique Case ID</comment>
17 <add>1.8</add>
18 </field>
19 <primaryKey>
20 <name>id</name>
21 <autoincrement>true</autoincrement>
22 </primaryKey>
23 <field>
24 <name>contact_id</name>
25 <type>int unsigned</type>
26 <uniqueName>case_contact_id</uniqueName>
27 <required>true</required>
28 <comment>Contact ID of contact record given case belongs to.</comment>
29 <add>1.8</add>
30 <drop>2.1</drop>
31 </field>
32 <foreignKey>
33 <name>contact_id</name>
34 <table>civicrm_contact</table>
35 <key>id</key>
36 <add>1.8</add>
37 <drop>2.1</drop>
38 <onDelete>CASCADE</onDelete>
39 </foreignKey>
40 <field>
41 <name>case_type_id</name>
42 <type>varchar</type>
43 <length>128</length>
44 <required>true</required>
45 <import>true</import>
46 <export>false</export>
47 <title>Case Type Id</title>
3f3a3ba0
CW
48 <comment>Multivalued pseudo-fk to option_value table where option_group_name = case_type.</comment>
49 <pseudoconstant>
50 <optionGroupName>case_type</optionGroupName>
51 </pseudoconstant>
6a488035
TO
52 <add>2.0</add>
53 </field>
54 <index>
55 <name>index_case_type_id</name>
56 <fieldName>case_type_id</fieldName>
57 <add>2.0</add>
58 </index>
59 <field>
60 <name>casetag1_id</name>
61 <type>varchar</type>
62 <length>128</length>
63 <required>true</required>
64 <comment>Id of first case category.</comment>
65 <add>1.8</add>
66 <drop>2.0</drop>
67 </field>
68 <index>
69 <name>index_casetag1_id</name>
70 <fieldName>casetag1_id</fieldName>
71 <add>1.8</add>
72 <drop>2.0</drop>
73 </index>
74 <field>
75 <name>casetag2_id</name>
76 <type>varchar</type>
77 <length>128</length>
78 <required>true</required>
79 <comment>Id of second case category.</comment>
80 <add>1.8</add>
81 <drop>2.0</drop>
82 </field>
83 <index>
84 <name>index_casetag2_id</name>
85 <fieldName>casetag2_id</fieldName>
86 <add>1.8</add>
87 <drop>2.0</drop>
88 </index>
89 <field>
90 <name>casetag3_id</name>
91 <type>varchar</type>
92 <length>128</length>
93 <required>true</required>
94 <comment>Id of third case category.</comment>
95 <add>1.8</add>
96 <drop>2.0</drop>
97 </field>
98 <index>
99 <name>index_casetag3_id</name>
100 <fieldName>casetag3_id</fieldName>
101 <add>1.8</add>
102 <drop>2.0</drop>
103 </index>
104 <field>
105 <name>subject</name>
106 <type>varchar</type>
107 <length>128</length>
108 <title>Case Subject</title>
109 <import>true</import>
110 <uniqueName>case_subject</uniqueName>
111 <comment>Short name of the case.</comment>
112 <add>1.8</add>
113 </field>
114 <field>
115 <name>start_date</name>
116 <uniqueName>case_start_date</uniqueName>
117 <title>Case Start Date</title>
118 <import>true</import>
119 <type>date</type>
120 <comment>Date on which given case starts.</comment>
121 <add>1.8</add>
122 </field>
123 <field>
124 <name>end_date</name>
125 <uniqueName>case_end_date</uniqueName>
126 <title>Case End Date</title>
127 <import>true</import>
128 <type>date</type>
129 <comment>Date on which given case ends.</comment>
130 <add>1.8</add>
131 </field>
132 <field>
133 <name>details</name>
134 <type>text</type>
135 <htmlType>textarea</htmlType>
136 <rows>8</rows>
137 <cols>60</cols>
138 <comment>Details about the meeting (agenda, notes, etc).</comment>
139 <add>1.8</add>
140 </field>
141 <field>
142 <name>status_id</name>
143 <type>int unsigned</type>
144 <uniqueName>case_status_id</uniqueName>
145 <required>true</required>
146 <import>true</import>
147 <export>false</export>
148 <title>Case Status Id</title>
149 <comment>Id of case status.</comment>
3f3a3ba0
CW
150 <pseudoconstant>
151 <optionGroupName>case_status</optionGroupName>
152 </pseudoconstant>
6a488035
TO
153 <add>1.8</add>
154 </field>
155 <field>
156 <name>is_deleted</name>
157 <title>Case is in the Trash</title>
158 <uniqueName>case_deleted</uniqueName>
159 <type>boolean</type>
160 <default>0</default>
161 <import>true</import>
162 <title>Case Deleted</title>
163 <add>2.2</add>
164 </field>
165 <index>
166 <name>index_is_deleted</name>
167 <fieldName>is_deleted</fieldName>
168 <add>2.2</add>
169 </index>
170</table>