Device
The Device
table is used to store information about devices used by users in the system. It includes columns for the device ID, user ID, device code, mobile status, device token, device session, status, user who last modified the record, and the corresponding date and time.
Table Structure
[ID]
(bigint
,auto-incrementing
,primary key
): Represents the unique identifier for each device record.[User_ID]
(bigint
,foreign key
,not null
): Represents the user associated with the device.[Device_Code]
(varchar(100)
,not null
): Represents the code of the device.[Is_Mobile]
(bit
): Represents the mobile status of the device.[Device_Token]
(varchar(250)
): Represents the token of the device.[Device_Session]
(varchar(100)
): Represents the session of the device.[Status]
(nvarchar(10)
): Represents the status of the device.[Modified_By]
(bigint
): Represents the user who last modified the record.[Modified_Date]
(datetime
,not null
, Default:getutcdate()
): Represents the date and time when the record was last modified.[Created_By]
(bigint
): Represents the user who created the record.[Created_Date]
(datetime
,not null
, Default:getutcdate()
): Represents the date and time when the record was created.
Constraints
[PK_Device]
: Primary key constraint on the[ID]
column.[FK_Device_User]
: Foreign key constraint on the[User_ID]
column, referencing the[JFW]
.[User].[ID] column.[DF_Device_ModifiedDate]
: Default constraint to set[Modified_Date]
to the current UTC date and time.[DF_Device_CreatedDate]
: Default constraint to set[Created_Date]
to the current UTC date and time.
Example Data
1
1234567890
1
ABCDE12345
1234567890
1
Last updated
Was this helpful?