DAILYSALEITEM

Holds data about daily sale items.

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
TYPECODE tinyint Default = 0 The type of daily sale item represented.
ISACTIVE bit Default = 1 Indication of use status for daily sale item.
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.
DESCRIPTIONFIELD1 nvarchar(20) Default = '' The first line of the button text.
DESCRIPTIONFIELD2 nvarchar(20) Default = '' The second line of the button text.
DESCRIPTIONFIELD3 nvarchar(20) Default = '' The third line of the button text.
DESCRIPTIONFIELD1TYPECODE tinyint Default = 0 The type of description for the line of button text.
DESCRIPTIONFIELD2TYPECODE tinyint Default = 0 The type of description for the line of button text.
DESCRIPTIONFIELD3TYPECODE tinyint Default = 0 The type of description for the line of button text.
DESCRIPTIONFIELD1TYPE nvarchar(26) (Computed) yes CASE [DESCRIPTIONFIELD1TYPECODE] WHEN 0 THEN N'Blank' WHEN 1 THEN N'Custom' WHEN 2 THEN N'Program name' WHEN 3 THEN N'Price type name' WHEN 4 THEN N'Price' WHEN 5 THEN N'Membership level' WHEN 6 THEN N'Membership term' WHEN 7 THEN N'Membership term and price' WHEN 8 THEN N'Discount name' WHEN 9 THEN N'Discount value' WHEN 10 THEN N'Discount calculation type' WHEN 11 THEN N'Donation default amount' WHEN 12 THEN N'Donation designation name' WHEN 13 THEN N'Program price and capacity' WHEN 14 THEN N'Event time' WHEN 15 THEN N'Capacity' WHEN 16 THEN N'Event date' WHEN 17 THEN N'Event location' WHEN 18 THEN N'Event name' WHEN 19 THEN N'Combination name' END Provides a translation for the 'DESCRIPTIONFIELD1TYPECODE' field.
DESCRIPTIONFIELD2TYPE nvarchar(26) (Computed) yes CASE [DESCRIPTIONFIELD2TYPECODE] WHEN 0 THEN N'Blank' WHEN 1 THEN N'Custom' WHEN 2 THEN N'Program name' WHEN 3 THEN N'Price type name' WHEN 4 THEN N'Price' WHEN 5 THEN N'Membership level' WHEN 6 THEN N'Membership term' WHEN 7 THEN N'Membership term and price' WHEN 8 THEN N'Discount name' WHEN 9 THEN N'Discount value' WHEN 10 THEN N'Discount calculation type' WHEN 11 THEN N'Donation default amount' WHEN 12 THEN N'Donation designation name' WHEN 13 THEN N'Program price and capacity' WHEN 14 THEN N'Event time' WHEN 15 THEN N'Capacity' WHEN 16 THEN N'Event date' WHEN 17 THEN N'Event location' WHEN 18 THEN N'Event name' WHEN 19 THEN N'Combination name' END Provides a translation for the 'DESCRIPTIONFIELD2TYPECODE' field.
DESCRIPTIONFIELD3TYPE nvarchar(26) (Computed) yes CASE [DESCRIPTIONFIELD3TYPECODE] WHEN 0 THEN N'Blank' WHEN 1 THEN N'Custom' WHEN 2 THEN N'Program name' WHEN 3 THEN N'Price type name' WHEN 4 THEN N'Price' WHEN 5 THEN N'Membership level' WHEN 6 THEN N'Membership term' WHEN 7 THEN N'Membership term and price' WHEN 8 THEN N'Discount name' WHEN 9 THEN N'Discount value' WHEN 10 THEN N'Discount calculation type' WHEN 11 THEN N'Donation default amount' WHEN 12 THEN N'Donation designation name' WHEN 13 THEN N'Program price and capacity' WHEN 14 THEN N'Event time' WHEN 15 THEN N'Capacity' WHEN 16 THEN N'Event date' WHEN 17 THEN N'Event location' WHEN 18 THEN N'Event name' WHEN 19 THEN N'Combination name' END Provides a translation for the 'DESCRIPTIONFIELD3TYPECODE' field.
TYPE nvarchar(24) (Computed) yes CASE [TYPECODE] WHEN 0 THEN N'Daily admission programs' WHEN 1 THEN N'Scheduled programs' WHEN 2 THEN N'Memberships' WHEN 3 THEN N'Discounts' WHEN 4 THEN N'Donations' WHEN 5 THEN N'Event registration' WHEN 6 THEN N'Combination' WHEN 7 THEN N'Membership promotion' END Provides a translation for the 'TYPECODE' field.
BUTTONORDER int Default = 0 The order of the button

Foreign Keys

Foreign Key Field Type Null Notes Description
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.

Indexes

Index Name Fields Unique Primary Clustered
IX_DAILYSALEITEM_DATEADDED DATEADDED yes
IX_DAILYSALEITEM_DATECHANGED DATECHANGED
PK_DAILYSALEITEM ID yes yes

Triggers

Trigger Name Description
TR_DAILYSALEITEM_AUDIT_UPDATE
TR_DAILYSALEITEM_AUDIT_DELETE

Referenced by

Referenced by Field
DAILYSALEITEMCOMBINATION ID
DAILYSALEITEMDISCOUNT ID
DAILYSALEITEMDONATION ID
DAILYSALEITEMEVENTREGISTRATION ID
DAILYSALEITEMMEMBERSHIP ID
DAILYSALEITEMMEMBERSHIPPROMO ID
DAILYSALEITEMPROGRAM ID