CRM-13497 - Add html type to schema xml
[civicrm-core.git] / xml / schema / Member / MembershipType.xml
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2
3 <table>
4 <base>CRM/Member</base>
5 <class>MembershipType</class>
6 <name>civicrm_membership_type</name>
7 <comment>Sites can configure multiple types of memberships. They encode the owner organization, fee, and the rules needed to set start and end (expire) dates when a member signs up for that type.</comment>
8 <add>1.5</add>
9 <log>true</log>
10 <field>
11 <name>id</name>
12 <type>int unsigned</type>
13 <required>true</required>
14 <comment>Membership Id</comment>
15 <add>1.5</add>
16 </field>
17 <primaryKey>
18 <name>id</name>
19 <autoincrement>true</autoincrement>
20 </primaryKey>
21 <field>
22 <name>domain_id</name>
23 <type>int unsigned</type>
24 <required>true</required>
25 <comment>Which Domain is this match entry for</comment>
26 <add>3.0</add>
27 </field>
28 <foreignKey>
29 <name>domain_id</name>
30 <table>civicrm_domain</table>
31 <key>id</key>
32 <add>3.0</add>
33 </foreignKey>
34 <field>
35 <name>name</name>
36 <uniqueName>membership_type</uniqueName>
37 <title>Membership Type</title>
38 <type>varchar</type>
39 <import>true</import>
40 <length>128</length>
41 <localizable>true</localizable>
42 <comment>Name of Membership Type</comment>
43 <add>1.5</add>
44 </field>
45 <field>
46 <name>description</name>
47 <type>varchar</type>
48 <html>
49 <type>TextArea</type>
50 </html>
51
52 <rows>6</rows>
53 <cols>50</cols>
54 <length>255</length>
55 <localizable>true</localizable>
56 <comment>Description of Membership Type</comment>
57 <add>1.5</add>
58 </field>
59 <field>
60 <name>member_of_contact_id</name>
61 <type>int unsigned</type>
62 <required>true</required>
63 <comment>Owner organization for this membership type. FK to Contact ID</comment>
64 <add>1.5</add>
65 </field>
66 <foreignKey>
67 <name>member_of_contact_id</name>
68 <table>civicrm_contact</table>
69 <key>id</key>
70 <add>1.5</add>
71 <onDelete>RESTRICT</onDelete>
72 </foreignKey>
73 <field>
74 <name>contribution_type_id</name>
75 <type>int unsigned</type>
76 <required>true</required>
77 <comment>If membership is paid by a contribution - what contribution type should be used. FK to Contribution Type ID</comment>
78 <add>1.5</add>
79 <drop>4.3</drop>
80 </field>
81 <foreignKey>
82 <name>contribution_type_id</name>
83 <table>civicrm_contribution_type</table>
84 <key>id</key>
85 <add>1.5</add>
86 <drop>4.3</drop>
87 </foreignKey>
88 <field>
89 <name>financial_type_id</name>
90 <type>int unsigned</type>
91 <required>true</required>
92 <comment>If membership is paid by a contribution - what financial type should be used. FK to civicrm_financial_type.id</comment>
93 <add>4.3</add>
94 </field>
95 <foreignKey>
96 <name>financial_type_id</name>
97 <table>civicrm_financial_type</table>
98 <key>id</key>
99 <add>4.3</add>
100 </foreignKey>
101 <field>
102 <name>minimum_fee</name>
103 <type>decimal</type>
104 <comment>Minimum fee for this membership (0 for free/complimentary memberships).</comment>
105 <default>0</default>
106 <add>1.5</add>
107 </field>
108 <field>
109 <name>duration_unit</name>
110 <type>enum</type>
111 <values>day, month, year, lifetime</values>
112 <comment>Unit in which membership period is expressed.</comment>
113 <add>1.5</add>
114 </field>
115 <field>
116 <name>duration_interval</name>
117 <type>int</type>
118 <comment>Number of duration units in membership period (e.g. 1 year, 12 months).</comment>
119 <add>1.5</add>
120 </field>
121 <field>
122 <name>period_type</name>
123 <type>enum</type>
124 <values>rolling, fixed</values>
125 <comment>Rolling membership period starts on signup date. Fixed membership periods start on fixed_period_start_day.</comment>
126 <add>1.5</add>
127 </field>
128 <field>
129 <name>fixed_period_start_day</name>
130 <type>int</type>
131 <comment>For fixed period memberships, month and day (mmdd) on which subscription/membership will start. Period start is back-dated unless after rollover day.</comment>
132 <add>1.5</add>
133 </field>
134 <field>
135 <name>fixed_period_rollover_day</name>
136 <type>int</type>
137 <comment>For fixed period memberships, signups after this day (mmdd) rollover to next period.</comment>
138 <add>1.5</add>
139 </field>
140 <field>
141 <name>relationship_type_id</name>
142 <type>varchar</type>
143 <length>64</length>
144 <comment>FK to Relationship Type ID</comment>
145 <add>1.5</add>
146 </field>
147 <foreignKey>
148 <name>relationship_type_id</name>
149 <table>civicrm_relationship_type</table>
150 <key>id</key>
151 <add>1.5</add>
152 <drop>3.3</drop>
153 </foreignKey>
154 <index>
155 <name>index_relationship_type_id</name>
156 <fieldName>relationship_type_id</fieldName>
157 <add>3.3</add>
158 </index>
159 <field>
160 <name>relationship_direction</name>
161 <type>varchar</type>
162 <length>128</length>
163 <add>1.7</add>
164 </field>
165 <field>
166 <name>max_related</name>
167 <type>int</type>
168 <comment>Maximum number of related memberships.</comment>
169 <add>4.3</add>
170 </field>
171 <field>
172 <name>visibility</name>
173 <title>Visible</title>
174 <type>varchar</type>
175 <length>64</length>
176 <add>1.5</add>
177 <pseudoconstant>
178 <optionGroupName>visibility</optionGroupName>
179 </pseudoconstant>
180 </field>
181 <field>
182 <name>weight</name>
183 <title>Weight</title>
184 <type>int</type>
185 <add>1.5</add>
186 </field>
187 <field>
188 <name>receipt_text_signup</name>
189 <type>varchar</type>
190 <html>
191 <type>TextArea</type>
192 </html>
193
194 <rows>6</rows>
195 <cols>50</cols>
196 <length>255</length>
197 <comment>Receipt Text for membership signup</comment>
198 <add>2.0</add>
199 </field>
200 <field>
201 <name>receipt_text_renewal</name>
202 <type>varchar</type>
203 <html>
204 <type>TextArea</type>
205 </html>
206
207 <rows>6</rows>
208 <cols>50</cols>
209 <length>255</length>
210 <comment>Receipt Text for membership renewal</comment>
211 <add>2.0</add>
212 </field>
213 <field>
214 <name>auto_renew</name>
215 <type>boolean</type>
216 <default>0</default>
217 <comment>0 = No auto-renew option; 1 = Give option, but not required; 2 = Auto-renew required;</comment>
218 <add>3.3</add>
219 </field>
220 <field>
221 <name>is_active</name>
222 <title>Is Active</title>
223 <type>boolean</type>
224 <default>1</default>
225 <comment>Is this membership_type enabled</comment>
226 <add>1.5</add>
227 </field>
228 </table>