Merge pull request #3745 from colemanw/relMemberApi
[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
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>
23 <title>Survey Title</title>
24 <type>varchar</type>
25 <length>255</length>
26 <required>true</required>
27 <localizable>true</localizable>
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>
36 <default>NULL</default>
37 <comment>Foreign key to the Campaign.</comment>
38 <pseudoconstant>
39 <table>civicrm_campaign</table>
40 <keyColumn>id</keyColumn>
41 <labelColumn>title</labelColumn>
42 </pseudoconstant>
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>
52
53 <field>
54 <name>activity_type_id</name>
55 <title>Activity Type</title>
56 <type>int unsigned</type>
57 <default>NULL</default>
58 <comment>Implicit FK to civicrm_option_value where option_group = activity_type</comment>
59 <import>true</import>
60 <add>3.3</add>
61 <pseudoconstant>
62 <optionGroupName>activity_type</optionGroupName>
63 </pseudoconstant>
64 <html>
65 <type>Select</type>
66 </html>
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>
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 <type>text</type>
89 <localizable>true</localizable>
90 <comment>Script instructions for volunteers to use for the survey.</comment>
91 <html>
92 <type>TextArea</type>
93 <rows>20</rows>
94 <cols>80</cols>
95 </html>
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>
106
107 <field>
108 <name>max_number_of_contacts</name>
109 <title>Maximum number of contacts</title>
110 <type>int unsigned</type>
111 <default>NULL</default>
112 <comment>Maximum number of contacts to allow for survey.</comment>
113 <add>3.3</add>
114 </field>
115
116 <field>
117 <name>default_number_of_contacts</name>
118 <title>Default number of contacts</title>
119 <type>int unsigned</type>
120 <default>NULL</default>
121 <comment>Default number of contacts to allow for survey.</comment>
122 <add>3.3</add>
123 </field>
124
125 <field>
126 <name>is_active</name>
127 <type>boolean</type>
128 <default>1</default>
129 <comment>Is this survey enabled or disabled/cancelled?</comment>
130 <add>3.3</add>
131 </field>
132
133 <field>
134 <name>is_default</name>
135 <type>boolean</type>
136 <default>0</default>
137 <comment>Is this default survey?</comment>
138 <add>3.3</add>
139 </field>
140
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>
154
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>
162
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>
176
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>
211 <html>
212 <type>TextArea</type>
213 <rows>8</rows>
214 <cols>60</cols>
215 </html>
216 <localizable>true</localizable>
217 <comment>text and html allowed. displayed above result on success page</comment>
218 <add>4.2</add>
219 </field>
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>
228 </table>