SALESORDERITEMMEMBERSHIP
Stores membership information for sales orders.
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. |
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. |
EXPIRATIONDATE |
datetime |
yes |
|
The expiration date of this membership. |
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. |
MEMBERSHIPPROGRAMNAME |
nvarchar(100) |
|
Default = '' |
Name of membership program at time of sale. |
TYPECODE |
tinyint |
|
Default = 1 |
Membership item type code. |
TYPE |
nvarchar(15) (Computed) |
yes |
CASE [TYPECODE] WHEN 1 THEN N'Membership' WHEN 250 THEN N'Midterm upgrade' END |
Provides a translation for the 'TYPECODE' field. |
Foreign Keys
Indexes
Index Name |
Fields |
Unique |
Primary |
Clustered |
IX_SALESORDERITEMMEMBERSHIP_DATEADDED |
DATEADDED |
|
|
yes |
IX_SALESORDERITEMMEMBERSHIP_DATECHANGED |
DATECHANGED |
|
|
|
IX_SALESORDERITEMMEMBERSHIP_GIVENBYID |
GIVENBYID |
|
|
|
PK_SALESORDERITEMMEMBERSHIP |
ID |
yes |
yes |
|
UIX_SALESORDERITEMMEMBERSHIP_MEMBERSHIPTRANSACTIONID |
MEMBERSHIPTRANSACTIONID |
yes |
|
|
Triggers
Referenced by