MEMBERSHIPPROMOCODE

Promotion codes for membership promotions

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
PROMOTIONALCODE nvarchar(50) Default = '' The Promotion Code for the discount.
VALIDFROM datetime yes Valid from date for the promotion code.
VALIDTO datetime yes Valid to date for the promotion code.
SEQUENCE int Default = 0 The sequence in which promotion codes are entered.
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.

Foreign Keys

Foreign Key Field Type Null Notes Description
MEMBERSHIPPROMOID uniqueidentifier MEMBERSHIPPROMO.ID The ID of the Membership Promotion the Promotion Code belongs to.
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.

Indexes

Index Name Fields Unique Primary Clustered
IX_MEMBERSHIPPROMOCODE_DATEADDED DATEADDED yes
IX_MEMBERSHIPPROMOCODE_DATECHANGED DATECHANGED
PK_MEMBERSHIPPROMOCODE ID yes yes
UC_MEMBERSHIPPROMOCODE_PROMOTIONALCODE PROMOTIONALCODE yes

Triggers

Trigger Name Description
TR_MEMBERSHIPPROMOCODE_AUDIT_UPDATE
TR_MEMBERSHIPPROMOCODE_AUDIT_DELETE