User Setting

The UserSetting table is used to store user settings in the system. It includes columns for the user ID, tracking level, package ID, expiry date, theme style, referral code, commission, waiting period, language code, time zone ID, sign-in detection flag, and the user who created or last modified the record, along with the corresponding date and time.

Table Structure
  • [ID] (bigint, auto-incrementing, primary key): Represents the unique identifier for each user setting record.

  • [User_ID] (bigint, foreign key, not null): Represents the user associated with the setting.

  • [Tracking_Level] (smallint, not null): Represents the tracking level.

  • [Package_ID] (bigint, not null): Represents the package ID associated with the user.

  • [Expiry_Date] (datetime, not null): Represents the expiry date of the package.

  • [Theme_Style] (varchar(50), nullable): Represents the theme style.

  • [Referral_Code] (varchar(10), nullable): Represents the referral code.

  • [Commission] (float, not null): Represents the commission for the user.

  • [Waiting_Period] (smallint, not null): Represents the waiting period.

  • [Language_Code] (varchar(15), nullable): Represents the language code.

  • [TimeZone_ID] (bigint, nullable): Represents the time zone ID.

  • [Enable_Sign_In_Detection] (bit, not null): Flag indicating whether sign-in detection is enabled.

  • [Modified_By] (bigint): Represents the user who last modified the setting.

  • [Modified_Date] (datetime, not null): Represents the date and time when the setting was last modified.

  • [Created_By] (bigint): Represents the user who created the setting.

  • [Created_Date] (datetime, not null): Represents the date and time when the setting was created.

Constraints
  • [PK_UserSetting]: Primary key constraint on [ID] column

  • [DF_UserSetting_TrackingLevel]: Default constraint on [Tracking_Level] column with default value 1000

  • [DF_UserSetting_PackageID]: Default constraint on [Package_ID] column with default value 1

  • [DF_UserSetting_Expiry_Date]: Default constraint on [Expiry_Date] column with default value of the current UTC date and time

  • [DF_UserSetting_Commission]: Default constraint on [Commission] column with default value 0

  • [DF_UserSetting_WaitingPeriod]: Default constraint on [Waiting_Period] column with default value 14

  • [DF_UserSetting_EnableSignInDetection]: Default constraint on [Enable_Sign_In_Detection] column with default value 0

  • [DF_UserSetting_ModifiedDate]: Default constraint on [Modified_Date] column with default value of the current UTC date and time

  • [DF_UserSetting_CreatedDate]: Default constraint on [Created_Date] column with default value of the current UTC date and time

Example Data

User_ID
Tracking_Level
Package_ID
Expiry_Date
Theme_Style
Referral_Code
Commission
Waiting_Period
Language_Code
TimeZone_ID
Enable_Sign_In_Detection

1

1000

1

2022-12-31 23:59:59

Light

ABCDE12345

10

14

en-US

1

0

Last updated

Was this helpful?