DAILYSALEITEMDISCOUNT
Holds data relative to a daily sale discount item.
Primary Key
Primary Key |
Field Type |
ID |
uniqueidentifier |
Fields
Field |
Field Type |
Null |
Notes |
Description |
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. |
DISCOUNTLIMITAPPLICATIONTYPECODE |
tinyint |
|
Default = 0 |
The way to limit the discount. |
DISCOUNTLIMITAPPLICATIONTYPE |
nvarchar(20) (Computed) |
yes |
CASE [DISCOUNTLIMITAPPLICATIONTYPECODE] WHEN 0 THEN N'To all valid tickets' WHEN 1 THEN N'Once' END |
Provides a translation for the 'DISCOUNTLIMITAPPLICATIONTYPECODE' field. |
Foreign Keys
Foreign Key |
Field Type |
Null |
Notes |
Description |
ID |
uniqueidentifier |
|
DAILYSALEITEM.ID
|
Primary Key. |
DISCOUNTID |
uniqueidentifier |
|
DISCOUNT.ID
|
The discount for this daily sale item. |
ADDEDBYID |
uniqueidentifier |
|
CHANGEAGENT.ID
|
FK to CHANGEAGENT. |
CHANGEDBYID |
uniqueidentifier |
|
CHANGEAGENT.ID
|
FK to CHANGEAGENT. |
Indexes
Index Name |
Fields |
Unique |
Primary |
Clustered |
IX_DAILYSALEITEMDISCOUNT_DATEADDED |
DATEADDED |
|
|
yes |
IX_DAILYSALEITEMDISCOUNT_DATECHANGED |
DATECHANGED |
|
|
|
PK_DAILYSALEITEMDISCOUNT |
ID |
yes |
yes |
|
Triggers