PROGRAMSALESMETHOD

Links a program to one or more sales types and provides on-sale information

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
ONSALETYPECODE tinyint Default = 0 Indicates when this sales method will be available for this program
ONSALEDATE datetime yes When PERIODBEGINSCODE is 1, this determines the date tickets go on sale
ONSALETIME UDT_HOURMINUTE Default = '' When PERIODBEGINSCODE is not 0, this determines the time tickets go on sale
ONSALETIMEBEFORE int Default = 0 When PERIODBEGINSCODE is 2, 3, or 4, this determines how soon before the event tickets go on sale
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.
ONSALETYPE nvarchar(19) (Computed) yes CASE [ONSALETYPECODE] WHEN 0 THEN N'Immediately' WHEN 1 THEN N'Specific date' WHEN 2 THEN N'Days before event' WHEN 3 THEN N'Weeks before event' WHEN 4 THEN N'Months before event' END Provides a translation for the 'ONSALETYPECODE' field.
ONSALEENDTYPECODE tinyint Default = 0 Indicates when this sales method will stop being available for this program
ONSALEENDTYPE nvarchar(20) (Computed) yes CASE [ONSALEENDTYPECODE] WHEN 0 THEN N'Event start time' WHEN 1 THEN N'Minutes before start' WHEN 2 THEN N'Hours before start' WHEN 3 THEN N'Minutes after start' END Provides a translation for the 'ONSALEENDTYPECODE' field.
ONSALEENDINTERVAL int Default = 0 Number of minutes or hours before start time that the event tickets will stop being available for sale

Foreign Keys

Foreign Key Field Type Null Notes Description
PROGRAMID uniqueidentifier yes PROGRAM.ID FK to PROGRAM
SALESMETHODID uniqueidentifier yes SALESMETHOD.ID FK to SALESMETHOD
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.

Indexes

Index Name Fields Unique Primary Clustered
IX_PROGRAMSALESMETHOD_DATEADDED DATEADDED yes
IX_PROGRAMSALESMETHOD_DATECHANGED DATECHANGED
PK_PROGRAMSALESMETHOD ID yes yes
UIX_PROGRAMSALESMETHOD_PROGRAMID_SALESMETHODID PROGRAMID, SALESMETHODID yes

Triggers

Trigger Name Description
TR_PROGRAMSALESMETHOD_AUDIT_UPDATE
TR_PROGRAMSALESMETHOD_AUDIT_DELETE