| Primary Key | Field Type |
|---|---|
ID |
uniqueidentifier |
| Field | Field Type | Null | Notes | Description |
|---|---|---|---|---|
NAMEONCARD |
nvarchar(700) | Default = '' | The name to use on the card. | |
CARDNUMBER |
nvarchar(100) | Default = '' | The number of the membership card. | |
EXPIRATIONDATE |
datetime | ![]() |
The expiration date of the membership card. | |
STATUSCODE |
tinyint | Default = 0 | The status of the card: 0 - Issued, 1 - Printed, 2 - Cancelled. | |
PRINTDATE |
datetime | ![]() |
The date the card was printed. | |
COMMENTS |
nvarchar(1000) | Default = '' | Remarks about this membership card. | |
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) | ![]() |
CONVERT(bigint, TS) | Numeric representation of the timestamp. |
STATUS |
nvarchar(9) (Computed) | ![]() |
CASE [STATUSCODE] WHEN 0 THEN N'Issued' WHEN 1 THEN N'Printed' WHEN 2 THEN N'Cancelled' END | Provides a translation for the 'STATUSCODE' field. |
| Foreign Key | Field Type | Null | Notes | Description |
|---|---|---|---|---|
MEMBERID |
uniqueidentifier | MEMBER.ID | FK to MEMBER | |
PRINTEDBYID |
uniqueidentifier | ![]() |
CHANGEAGENT.ID | The change agent that printed the card. |
ADDEDBYID |
uniqueidentifier | CHANGEAGENT.ID | FK to CHANGEAGENT. | |
CHANGEDBYID |
uniqueidentifier | CHANGEAGENT.ID | FK to CHANGEAGENT. | |
PRINTMEMBERSHIPCARDSPROCESSSTATUSID |
uniqueidentifier | ![]() |
PRINTMEMBERSHIPCARDSPROCESSSTATUS.ID | Foreign key to the process status that printed the card. |
| Index Name | Field(s) | Unique | Primary | Clustered |
|---|---|---|---|---|
IX_MEMBERSHIPCARD_CARDNUMBER |
CARDNUMBER | |||
IX_MEMBERSHIPCARD_DATEADDED |
DATEADDED | ![]() |
||
IX_MEMBERSHIPCARD_DATECHANGED |
DATECHANGED | |||
IX_MEMBERSHIPCARD_MEMBERID |
MEMBERID | |||
PK_MEMBERSHIPCARD |
ID | ![]() |
![]() |
| Trigger Name | Description |
|---|---|
TR_MEMBERSHIPCARD_AUDIT_UPDATE |
|
TR_MEMBERSHIPCARD_AUDIT_DELETE |
| Referenced by | Field |
|---|---|
SALESORDERITEMMEMBERSHIPCARD |
MEMBERSHIPCARDID |

ID
NAMEONCARD
TSLONG
MEMBERID
IX_MEMBERSHIPCARD_CARDNUMBER
IX_MEMBERSHIPCARD_DATEADDED