TICKET
Stores data related to a ticket.
Primary Key
Primary Key |
Field Type |
ID |
uniqueidentifier |
Fields
Field |
Field Type |
Null |
Notes |
Description |
PRICE |
money |
|
Default = 0 |
The price of the ticket |
STATUSCODE |
tinyint |
|
Default = 0 |
Specifies the particular state of a ticket. |
ISACTIVE |
bit |
|
Default = 1 |
Describes whether the ticket is active. |
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. |
TICKETNUMBER |
bigint (Computed) |
yes |
dbo.UFN_TICKET_GETTICKETNUMBER(ID) |
The event specific ticket number. |
APPLIEDTOMEMBERSHIP |
bit |
|
Default = 0 |
Describes whether the ticket has been applied to a membership. |
SCANDATEWITHTIMEOFFSET |
datetimeoffset |
yes |
|
|
AMOUNTPAID |
money |
yes |
Default = 0 |
|
ORDERLEVELDISCOUNTSAPPLIED |
money |
yes |
Default = 0 |
|
ITEMLEVELDISCOUNTSAPPLIED |
money |
yes |
Default = 0 |
|
STATUS |
nvarchar(9) (Computed) |
yes |
CASE [STATUSCODE] WHEN 0 THEN N'Active' WHEN 1 THEN N'Reserved' WHEN 2 THEN N'Canceled' WHEN 3 THEN N'Exchanged' END |
|
ISREFUNDED |
bit |
|
Default = 0 |
|
Foreign Keys
Foreign Key |
Field Type |
Null |
Notes |
Description |
EVENTID |
uniqueidentifier |
yes |
EVENT.ID
|
ID of the event in which the ticket is linked. |
PRICETYPECODEID |
uniqueidentifier |
|
PRICETYPECODE.ID
|
The ID of the Price Type that belongs to the Ticket. |
HOLDID |
uniqueidentifier |
yes |
HOLD.ID
|
The entity that is holding the ticket. |
ADDEDBYID |
uniqueidentifier |
|
CHANGEAGENT.ID
|
FK to CHANGEAGENT. |
CHANGEDBYID |
uniqueidentifier |
|
CHANGEAGENT.ID
|
FK to CHANGEAGENT. |
SALESORDERITEMTICKETID |
uniqueidentifier |
yes |
SALESORDERITEMTICKET.ID
|
The order ticket that created this ticket. |
PROGRAMID |
uniqueidentifier |
yes |
PROGRAM.ID
|
The program of this ticket. |
APPLIEDTOMEMBERSHIPSALESORDERID |
uniqueidentifier |
yes |
SALESORDER.ID
|
The sales order that ticket has been applied to. |
Indexes
Index Name |
Fields |
Unique |
Primary |
Clustered |
IX_TICKET_DATEADDED |
DATEADDED |
|
|
yes |
IX_TICKET_DATECHANGED |
DATECHANGED |
|
|
|
IX_TICKET_EVENTID |
EVENTID |
|
|
|
IX_TICKET_PROGRAMID |
PROGRAMID |
|
|
|
IX_TICKET_SALESORDERITEMTICKETID |
SALESORDERITEMTICKETID |
|
|
|
IX_TICKET_SCANDATEWITHTIMEOFFSET |
SCANDATEWITHTIMEOFFSET |
|
|
|
PK_TICKET |
ID |
yes |
yes |
|
Triggers
Referenced by