1 <?xml version=
"1.0" encoding=
"iso-8859-1" ?>
4 <base>CRM/Member
</base>
5 <class>Membership
</class>
6 <name>civicrm_membership
</name>
7 <comment>Contact Membership records.
</comment>
12 <uniqueName>membership_id
</uniqueName>
13 <type>int unsigned
</type>
14 <required>true
</required>
16 <title>Membership ID
</title>
17 <headerPattern>/^(m(embership\s)?id)$/i
</headerPattern>
18 <comment>Membership Id
</comment>
23 <autoincrement>true
</autoincrement>
27 <name>contact_id
</name>
28 <uniqueName>membership_contact_id
</uniqueName>
29 <type>int unsigned
</type>
30 <required>true
</required>
31 <title>Contact ID
</title>
32 <headerPattern>/contact(.?id)?/i
</headerPattern>
33 <dataPattern>/^\d+$/
</dataPattern>
35 <comment>FK to Contact ID
</comment>
38 <type>EntityRef
</type>
42 <name>contact_id
</name>
43 <table>civicrm_contact
</table>
46 <onDelete>CASCADE
</onDelete>
49 <name>membership_type_id
</name>
50 <type>int unsigned
</type>
51 <title>Membership Type Id
</title>
53 <headerPattern>/^(m(embership\s)?type)$/i
</headerPattern>
54 <export>false
</export>
55 <required>true
</required>
56 <comment>FK to Membership Type
</comment>
58 <table>civicrm_membership_type
</table>
59 <keyColumn>id
</keyColumn>
60 <labelColumn>name
</labelColumn>
68 <name>membership_type_id
</name>
69 <table>civicrm_membership_type
</table>
72 <onDelete>CASCADE
</onDelete>
75 <name>join_date
</name>
76 <title>Member Since
</title>
79 <headerPattern>/^join|(j(oin\s)?date)$/i
</headerPattern>
80 <dataPattern>/\d{
4}-?\d{
2}-?\d{
2}/
</dataPattern>
81 <comment>Beginning of initial membership period (member since...).
</comment>
84 <type>Select Date
</type>
85 <format>activityDate
</format>
89 <name>start_date
</name>
90 <uniqueName>membership_start_date
</uniqueName>
91 <title>Membership Start Date
</title>
94 <headerPattern>/(member(ship)?.)?start(s)?(.date$)?/i
</headerPattern>
95 <dataPattern>/\d{
4}-?\d{
2}-?\d{
2}/
</dataPattern>
96 <comment>Beginning of current uninterrupted membership period.
</comment>
99 <type>Select Date
</type>
100 <format>activityDate
</format>
104 <name>end_date
</name>
105 <uniqueName>membership_end_date
</uniqueName>
106 <title>Membership Expiration Date
</title>
108 <import>true
</import>
109 <headerPattern>/(member(ship)?.)?end(s)?(.date$)?/i
</headerPattern>
110 <dataPattern>/\d{
4}-?\d{
2}-?\d{
2}/
</dataPattern>
111 <comment>Current membership period expire date.
</comment>
114 <type>Select Date
</type>
115 <format>activityDate
</format>
120 <uniqueName>membership_source
</uniqueName>
121 <title>Source
</title>
122 <import>true
</import>
123 <headerPattern>/^(member(ship?))?source$/i
</headerPattern>
132 <name>status_id
</name>
133 <title>Membership Status Id
</title>
134 <import>true
</import>
135 <headerPattern>/(member(ship|).)?(status)$/i
</headerPattern>
136 <type>int unsigned
</type>
137 <export>false
</export>
138 <required>true
</required>
139 <comment>FK to Membership Status
</comment>
141 <table>civicrm_membership_status
</table>
142 <keyColumn>id
</keyColumn>
143 <labelColumn>label
</labelColumn>
151 <name>status_id
</name>
152 <table>civicrm_membership_status
</table>
155 <onDelete>CASCADE
</onDelete>
158 <name>is_override
</name>
159 <title>Status Override
</title>
160 <import>true
</import>
161 <headerPattern>/override$/i
</headerPattern>
163 <comment>Admin users may set a manual status which overrides the calculated status. When this flag is true, automated status update scripts should NOT modify status for the record.
</comment>
165 <type>CheckBox
</type>
170 <name>owner_membership_id
</name>
171 <type>int unsigned
</type>
172 <title>Primary Member ID
</title>
173 <comment>Optional FK to Parent Membership.
</comment>
174 <export>true
</export>
178 <name>owner_membership_id
</name>
179 <table>civicrm_membership
</table>
182 <onDelete>SET NULL
</onDelete>
185 <name>index_owner_membership_id
</name>
186 <fieldName>owner_membership_id
</fieldName>
190 <name>max_related
</name>
192 <comment>Maximum number of related memberships (membership_type override).
</comment>
201 <uniqueName>member_is_test
</uniqueName>
204 <import>true
</import>
205 <headerPattern>/(is.)?test(.member(ship)?)?/i
</headerPattern>
207 <type>CheckBox
</type>
211 <name>is_pay_later
</name>
212 <uniqueName>member_is_pay_later
</uniqueName>
213 <title>Is Pay Later
</title>
216 <import>true
</import>
217 <headerPattern>/(is.)?(pay(.)?later)$/i
</headerPattern>
220 <type>CheckBox
</type>
224 <name>contribution_recur_id
</name>
225 <title>Membership Recurring Contribution
</title>
226 <type>int unsigned
</type>
227 <comment>Conditional foreign key to civicrm_contribution_recur id. Each membership in connection with a recurring contribution carries a foreign key to the recurring contribution record. This assumes we can track these processor initiated events.
</comment>
231 <name>contribution_recur_id
</name>
232 <table>civicrm_contribution_recur
</table>
235 <onDelete>SET NULL
</onDelete>
238 <name>campaign_id
</name>
239 <uniqueName>member_campaign_id
</uniqueName>
240 <type>int unsigned
</type>
241 <title>Campaign
</title>
242 <import>true
</import>
243 <comment>The campaign for which this membership is attached.
</comment>
245 <table>civicrm_campaign
</table>
246 <keyColumn>id
</keyColumn>
247 <labelColumn>title
</labelColumn>
255 <name>campaign_id
</name>
256 <table>civicrm_campaign
</table>
258 <onDelete>SET NULL
</onDelete>