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