MEMBERSHIP
Stores membership records.
Primary Key
Primary Key | Field Type |
---|---|
ID | uniqueidentifier |
Fields
Field | Field Type | Null | Notes | Description |
---|---|---|---|---|
NUMBEROFCHILDREN | smallint | Default = ((0)) | The number of children allowed on this membership. | |
COMMENTS | nvarchar(1000) | Default = '' | Remarks about this membership. | |
ISGIFT | bit | Default = 0 | Denotes that this membership is a gift. | |
SENDRENEWALCODE | tinyint | Default = 1 | Specifies who to send renewals if this membership is a gift. | |
JOINDATE | datetime | yes | The join date of this membership. | |
EXPIRATIONDATE | datetime | yes | The expiration date of this membership. | |
LASTRENEWEDON | datetime | yes | The date this membership was last renewed. | |
STATUSCODE | tinyint | Default = 0 | The status of the membership: 0 - Active, 1 - Dropped, 2 - Pending | |
DATEADDED | datetime | Default = getdate() | Indicates the date this record was added. | |
DATECHANGED | datetime | Default = getdate() | Indicates the date this record was last changed. | |
TS | timestamp | Timestamp. | ||
TSLONG | bigint (Computed) | yes | CONVERT(bigint, TS) | Numeric representation of the timestamp. |
LASTCARDNUMBER | smallint | Default = ((0)) | The last number appended to the end of a computed card number for the membership. | |
CUSTOMIDENTIFIER | nvarchar(100) | Default = '' | User-definable custom identifier. | |
SEQUENCEID | int | Identity column used to increment the default lookupid. | ||
SENDRENEWAL | nvarchar(24) (Computed) | yes | CASE [SENDRENEWALCODE] WHEN 0 THEN N'Giver' WHEN 1 THEN N'Primary member' WHEN 2 THEN N'Giver and primary member' END | Provides a translation for the 'SENDRENEWALCODE' field. |
LOOKUPID | nvarchar(100) (Computed) | yes | (CASE LEN(CUSTOMIDENTIFIER) WHEN 0 THEN '8-' + CAST(SEQUENCEID AS nvarchar(20)) ELSE CUSTOMIDENTIFIER END) | Unique identifier that supports user defined values as well as system generated values. |
NUMBEROFADDONADULTS | smallint | Default = ((0)) | The number of additional members on this membership. | |
NUMBEROFADDONGUESTS | smallint | Default = ((0)) | The number of guests allowed on this membership. | |
STATUS | nvarchar(9) (Computed) | yes | CASE [STATUSCODE] WHEN 0 THEN N'Active' WHEN 1 THEN N'Cancelled' WHEN 2 THEN N'Pending' WHEN 3 THEN N'Grace' WHEN 4 THEN N'Lapsed' WHEN 5 THEN N'Expired' END | |
AUTOMATICALLYRENEWMEMBERSHIP | bit | Default = 0 |
Foreign Keys
Foreign Key | Field Type | Null | Notes | Description |
---|---|---|---|---|
MEMBERSHIPPROGRAMID | uniqueidentifier | MEMBERSHIPPROGRAM.ID | The membership program of this record. | |
MEMBERSHIPLEVELID | uniqueidentifier | MEMBERSHIPLEVEL.ID | FK to MEMBERSHIPLEVEL | |
MEMBERSHIPLEVELTERMID | uniqueidentifier | MEMBERSHIPLEVELTERM.ID | FK to MEMBERSHIPLEVELTERM | |
MEMBERSHIPLEVELTYPECODEID | uniqueidentifier | yes | MEMBERSHIPLEVELTYPECODE.ID | The type of membership. |
GIVENBYID | uniqueidentifier | yes | CONSTITUENT.LOCALID | The constituent that is responsible for giving the membership as a gift. |
ADDEDBYID | uniqueidentifier | CHANGEAGENT.ID | FK to CHANGEAGENT. | |
CHANGEDBYID | uniqueidentifier | CHANGEAGENT.ID | FK to CHANGEAGENT. | |
CANCELLATIONREASONCODEID | uniqueidentifier | yes | MEMBERSHIPCANCELLATIONCODE.ID |
Indexes
Index Name | Fields | Unique | Primary | Clustered |
---|---|---|---|---|
IX_MEMBERSHIP_DATEADDED | DATEADDED | |||
IX_MEMBERSHIP_DATECHANGED | DATECHANGED | |||
IX_MEMBERSHIP_GIVENBYID | GIVENBYID | |||
IX_MEMBERSHIP_ID | ID | |||
IX_MEMBERSHIP_MEMBERSHIPLEVELID | MEMBERSHIPLEVELID | |||
IX_MEMBERSHIP_MEMBERSHIPLEVELTERMID | MEMBERSHIPLEVELTERMID | |||
IX_MEMBERSHIP_MEMBERSHIPPROGRAMID | MEMBERSHIPPROGRAMID | |||
IX_MEMBERSHIP_SEQUENCEID | SEQUENCEID | yes | ||
PK_MEMBERSHIP | ID | yes | yes | |
UC_MEMBERSHIP_LOOKUPID | LOOKUPID | yes |
Triggers
Trigger Name | Description |
---|---|
TR_MEMBERSHIP_AUDIT_ETLDELETEDID | |
TR_MEMBERSHIP_UPDATE_CANCELLATIONREASONCODEID | |
TR_MEMBERSHIP_AUDIT_UPDATE | |
TR_MEMBERSHIP_AUDIT_DELETE |
Referenced by
Referenced by | Field |
---|---|
BATCHBBNCMEMBERSHIP | MEMBERSHIPID |
BATCHMEMBERSHIPDUES | EXISTINGMEMBERSHIPID |
CREDITITEMMEMBERSHIP | MEMBERSHIPID |
MEMBER | MEMBERSHIPID |
MEMBERATTACHMENT | MEMBERSHIPID |
MEMBERMEDIALINK | MEMBERSHIPID |
MEMBERNOTE | MEMBERSHIPID |
MEMBERSHIPADDON | MEMBERSHIPID |
MEMBERSHIPPROGRAMCONTRIBUTIONREVENUE | MEMBERSHIPID |
MEMBERSHIPTRANSACTION | MEMBERSHIPID |
SALESORDERITEMMEMBERSHIP | MEMBERSHIPID |
SALESORDERITEMMEMBERSHIPADDON | MEMBERSHIPID |