DISCOUNTQUALIFYINGPRICETYPE

Stores information for qualifying discount price types.

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
SEQUENCE int Default = 0 The sequence in which price types 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
DISCOUNTID uniqueidentifier DISCOUNT.ID The ID of the Discount the Price Type belongs to.
PRICETYPECODEID uniqueidentifier yes PRICETYPECODE.ID The ID of the qualifying Price Type for a discount - null is all price types.
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.

Indexes

Index Name Fields Unique Primary Clustered
IX_DISCOUNTQUALIFYINGPRICETYPE_DATEADDED DATEADDED yes
IX_DISCOUNTQUALIFYINGPRICETYPE_DATECHANGED DATECHANGED
PK_DISCOUNTQUALIFYINGPRICETYPE ID yes yes
UIX_DISCOUNTQUALIFYINGPRICETYPE_DISCOUNTID_PRICETYPECODEID DISCOUNTID, PRICETYPECODEID yes

Triggers

Trigger Name Description
TR_DISCOUNTQUALIFYINGPRICETYPE_AUDIT_UPDATE
TR_DISCOUNTQUALIFYINGPRICETYPE_AUDIT_DELETE