GROUPSIZEDISCOUNT
Stores group size information for a given discount
Primary Key
Primary Key |
Field Type |
ID |
uniqueidentifier |
Fields
Field |
Field Type |
Null |
Notes |
Description |
GROUPSIZE |
int |
|
Default = 1 |
The size of the group |
PERCENT |
decimal(5, 2) |
|
Default = 0.00 |
The percentage of a discount. |
AMOUNT |
money |
|
Default = 0.00 |
The amount for a discount. |
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 |
yes |
DISCOUNT.ID
|
The ID of the discount in which the size information is linked. |
ADDEDBYID |
uniqueidentifier |
|
CHANGEAGENT.ID
|
FK to CHANGEAGENT. |
CHANGEDBYID |
uniqueidentifier |
|
CHANGEAGENT.ID
|
FK to CHANGEAGENT. |
Indexes
Index Name |
Fields |
Unique |
Primary |
Clustered |
IX_GROUPSIZEDISCOUNT_DATEADDED |
DATEADDED |
|
|
yes |
IX_GROUPSIZEDISCOUNT_DATECHANGED |
DATECHANGED |
|
|
|
IX_GROUPSIZEDISCOUNT_DISCOUNTID |
DISCOUNTID |
|
|
|
PK_GROUPSIZEDISCOUNT |
ID |
yes |
yes |
|
Triggers