Primary Key Field Type
 ID uniqueidentifier

Field Field Type Null Notes Description
 STATUSCODE tinyint   Default = 0 Status of the reservation.
 STATUSDATE datetime  
 COMMENTS nvarchar(500)   Default = '' Comments related to the resevation status history.
 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) CONVERT(bigint, TS) Numeric representation of the timestamp.
 STATUS nvarchar(31) (Computed) CASE [STATUSCODE] WHEN 0 THEN N'Pending' WHEN 1 THEN N'Complete' WHEN 2 THEN N'Tentative' WHEN 3 THEN N'Confirmed' WHEN 4 THEN N'Finalized' WHEN 5 THEN N'Cancelled' WHEN 6 THEN N'Contract Sent' WHEN 7 THEN N'Contract Received' WHEN 8 THEN N'Contract Marked Not Sent' WHEN 9 THEN N'Contract Marked Not Received' WHEN 10 THEN N'Final Count Marked Not Received' WHEN 11 THEN N'Final Count Received' WHEN 12 THEN N'Order balance sent' WHEN 13 THEN N'Order balance marked not sent' END Provides a translation for the 'STATUSCODE' field.
 STATUSDATEWITHOFFSET datetimeoffset

Foreign Key Field Type Null Notes Description
 RESERVATIONID uniqueidentifier   RESERVATION.ID The reservation in which the reservation status history belongs.
 ADDEDBYID uniqueidentifier   CHANGEAGENT.ID FK to CHANGEAGENT.
 CHANGEDBYID uniqueidentifier   CHANGEAGENT.ID FK to CHANGEAGENT.

Index Name Field(s) Unique Primary Clustered
 IX_RESERVATIONSTATUSHISTORY_DATEADDED DATEADDED    
 IX_RESERVATIONSTATUSHISTORY_DATECHANGED DATECHANGED      
 PK_RESERVATIONSTATUSHISTORY ID  

Trigger Name Description
 TR_RESERVATIONSTATUSHISTORY_AUDIT_UPDATE
 TR_RESERVATIONSTATUSHISTORY_AUDIT_DELETE

Entity-Relationship diagram of this table