Merge pull request #2845 from elcapo/activity-contact-api
[civicrm-core.git] / xml / schema / Campaign / Survey.xml
CommitLineData
6a488035
TO
1<?xml version="1.0" encoding="iso-8859-1" ?>
2<table>
3 <base>CRM/Campaign</base>
4 <class>Survey</class>
5 <name>civicrm_survey</name>
6 <comment>Campaign Survey Details.</comment>
7 <add>3.2</add>
f813f78e 8
6a488035
TO
9 <field>
10 <name>id</name>
11 <type>int unsigned</type>
12 <required>true</required>
13 <comment>Survey id.</comment>
14 <add>3.3</add>
15 </field>
16 <primaryKey>
17 <name>id</name>
18 <autoincrement>true</autoincrement>
19 </primaryKey>
20
21 <field>
22 <name>title</name>
f813f78e 23 <title>Survey Title</title>
6a488035
TO
24 <type>varchar</type>
25 <length>255</length>
26 <required>true</required>
434cdb95 27 <localizable>true</localizable>
6a488035
TO
28 <comment>Title of the Survey.</comment>
29 <import>true</import>
30 <add>3.3</add>
31 </field>
32
33 <field>
34 <name>campaign_id</name>
35 <type>int unsigned</type>
f813f78e 36 <default>NULL</default>
6a488035 37 <comment>Foreign key to the Campaign.</comment>
3e3eacd0
CW
38 <pseudoconstant>
39 <table>civicrm_campaign</table>
40 <keyColumn>id</keyColumn>
41 <labelColumn>title</labelColumn>
3e3eacd0 42 </pseudoconstant>
6a488035
TO
43 <add>3.3</add>
44 </field>
45 <foreignKey>
46 <name>campaign_id</name>
47 <table>civicrm_campaign</table>
48 <key>id</key>
49 <add>3.3</add>
50 <onDelete>SET NULL</onDelete>
51 </foreignKey>
f813f78e 52
6a488035
TO
53 <field>
54 <name>activity_type_id</name>
f813f78e 55 <title>Activity Type ID</title>
56 <type>int unsigned</type>
57 <default>NULL</default>
3c7d2158 58 <comment>Implicit FK to civicrm_option_value where option_group = activity_type</comment>
6a488035 59 <import>true</import>
f813f78e 60 <add>3.3</add>
4080e473
AS
61 <pseudoconstant>
62 <optionGroupName>activity_type</optionGroupName>
63 </pseudoconstant>
614d72ec 64 <html>
e0991796 65 <type>Select</type>
614d72ec 66 </html>
6a488035
TO
67 </field>
68 <index>
69 <name>UI_activity_type_id</name>
70 <fieldName>activity_type_id</fieldName>
71 <add>3.3</add>
72 </index>
73
74 <field>
75 <name>recontact_interval</name>
76 <type>text</type>
77 <comment>Recontact intervals for each status.</comment>
7deea513 78 <html>
79 <type>TextArea</type>
817807ab 80 <rows>20</rows>
81 <cols>80</cols>
7deea513 82 </html>
6a488035
TO
83 <add>3.3</add>
84 </field>
f813f78e 85
6a488035
TO
86 <field>
87 <name>instructions</name>
88 <type>text</type>
434cdb95 89 <localizable>true</localizable>
6a488035 90 <comment>Script instructions for volunteers to use for the survey.</comment>
7deea513 91 <html>
92 <type>TextArea</type>
817807ab 93 <rows>20</rows>
94 <cols>80</cols>
7deea513 95 </html>
6a488035
TO
96 <add>3.3</add>
97 </field>
98
99 <field>
100 <name>release_frequency</name>
101 <type>int unsigned</type>
102 <default>NULL</default>
103 <comment>Number of days for recurrence of release.</comment>
104 <add>3.3</add>
105 </field>
f813f78e 106
107 <field>
6a488035
TO
108 <name>max_number_of_contacts</name>
109 <title>Maximum number of contacts</title>
f813f78e 110 <type>int unsigned</type>
6a488035 111 <default>NULL</default>
f813f78e 112 <comment>Maximum number of contacts to allow for survey.</comment>
6a488035
TO
113 <add>3.3</add>
114 </field>
f813f78e 115
116 <field>
6a488035
TO
117 <name>default_number_of_contacts</name>
118 <title>Default number of contacts</title>
f813f78e 119 <type>int unsigned</type>
6a488035 120 <default>NULL</default>
f813f78e 121 <comment>Default number of contacts to allow for survey.</comment>
6a488035
TO
122 <add>3.3</add>
123 </field>
f813f78e 124
125 <field>
126 <name>is_active</name>
6a488035 127 <type>boolean</type>
f813f78e 128 <default>1</default>
129 <comment>Is this survey enabled or disabled/cancelled?</comment>
130 <add>3.3</add>
6a488035 131 </field>
f813f78e 132
133 <field>
134 <name>is_default</name>
6a488035 135 <type>boolean</type>
f813f78e 136 <default>0</default>
137 <comment>Is this default survey?</comment>
138 <add>3.3</add>
139 </field>
140
6a488035
TO
141 <field>
142 <name>created_id</name>
143 <type>int unsigned</type>
144 <comment>FK to civicrm_contact, who created this Survey.</comment>
145 <add>3.3</add>
146 </field>
147 <foreignKey>
148 <name>created_id</name>
149 <table>civicrm_contact</table>
150 <key>id</key>
151 <add>3.3</add>
152 <onDelete>SET NULL</onDelete>
153 </foreignKey>
f813f78e 154
6a488035
TO
155 <field>
156 <name>created_date</name>
157 <type>datetime</type>
158 <title>Campaign Created Date</title>
159 <comment>Date and time that Survey was created.</comment>
160 <add>3.3</add>
161 </field>
f813f78e 162
6a488035
TO
163 <field>
164 <name>last_modified_id</name>
165 <type>int unsigned</type>
166 <comment>FK to civicrm_contact, who recently edited this Survey.</comment>
167 <add>3.3</add>
168 </field>
169 <foreignKey>
170 <name>last_modified_id</name>
171 <table>civicrm_contact</table>
172 <key>id</key>
173 <add>3.3</add>
174 <onDelete>SET NULL</onDelete>
175 </foreignKey>
f813f78e 176
6a488035
TO
177 <field>
178 <name>last_modified_date</name>
179 <type>datetime</type>
180 <comment>Date and time that Survey was edited last time.</comment>
181 <add>3.3</add>
182 </field>
183
184 <field>
185 <name>result_id</name>
186 <type>int unsigned</type>
187 <default>NULL</default>
188 <comment>Used to store option group id.</comment>
189 <add>3.3</add>
190 </field>
191 <field>
192 <name>bypass_confirm</name>
193 <type>boolean</type>
194 <default>0</default>
195 <comment>Bypass the email verification.</comment>
196 <add>4.2</add>
197 </field>
198 <field>
199 <name>thankyou_title</name>
200 <title>Thank-you Title</title>
201 <type>varchar</type>
202 <length>255</length>
203 <localizable>true</localizable>
204 <comment>Title for Thank-you page (header title tag, and display at the top of the page).</comment>
205 <add>4.2</add>
206 </field>
207 <field>
208 <name>thankyou_text</name>
209 <title>Thank-you Text</title>
210 <type>text</type>
7deea513 211 <html>
212 <type>TextArea</type>
817807ab 213 <rows>8</rows>
214 <cols>60</cols>
7deea513 215 </html>
6a488035
TO
216 <localizable>true</localizable>
217 <comment>text and html allowed. displayed above result on success page</comment>
218 <add>4.2</add>
219 </field>
424392c5 220 <field>
221 <name>is_share</name>
222 <title>Is shared through social media</title>
223 <type>boolean</type>
224 <default>1</default>
225 <comment>Can people share the petition through social media?</comment>
226 <add>4.4</add>
227 </field>
6a488035 228</table>