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