Table: User_Session
Columns
NameTypeConstraintsDescription
user_session_guiduniqueidentifierNOT NULLA database generated unique key for this table.
staff_KEYintNOT NULLKey to the Staff that this session is for.
login_datedatetimeNOT NULLThe date and time the session was opened in UTC.
logout_datedatetimeNOT NULLThe date and time that the user logged out, or that the session was deemed expired or killed, in UTC.
user_session_pattern_guiduniqueidentifierNOT NULLKey to the User_Session_Pattern table.
expiration_datedatetimeNOT NULLThe date and time that this session will expire in UTC.
last_access_datedatetimeNOT NULLDate and time this session was last active in UTC.
user_session_status_KEYintNOT NULLThe status of this session (1=Open, 2=Closed, 3=Expired, 4=Killed)
Primary key
NameColumnsDescription
PK_User_Session$user_session_guiduser_session_guidCLUSTERED
Indexes
NameColumnsDescription
IX_User_Session$staff_KEYstaff_KEYIndex supports foreign key FK_User_Session__Staff__staff_KEY
IX_User_Session$user_session_pattern_guiduser_session_pattern_guidIndex supports foreign key FK_User_Session__User_Session_Pattern__user_session_pattern_guid
IX_User_Session$user_session_status_KEYuser_session_status_KEYIndex supports foreign key FK_User_Session__User_Session_Status__user_session_status_KEY
Foreign keys
NameColumnsReferenced tableDescription
FK_User_Session__Staff__staff_KEYstaff_KEYStaffon delete cascade;
FK_User_Session__User_Session_Pattern__user_session_pattern_guiduser_session_pattern_guidUser_Session_Pattern

Schema diagram