CREATE TABLE [dbo].[UserState] (
    [UserId]           BIGINT          NOT NULL,
    [UserStatusId]     TINYINT         CONSTRAINT [DF_UserState_UserStatusId] DEFAULT ((1)) NOT NULL,
    [IsKnoker]         BIT             CONSTRAINT [DF_UserState_IsKnoker] DEFAULT ((0)) NOT NULL,
    [IsPurchaser]      TINYINT         CONSTRAINT [DF_UserState_IsPurchaser] DEFAULT ((0)) NOT NULL,
    [FirstDepositDate] DATETIME        NULL,
    [FirsPublishDate]  DATETIME        NULL,
    [FirsPurchaseDate] DATETIME        NULL,
    [ExposureTypeId]   TINYINT         NOT NULL,
    [KnokerRank]       DECIMAL (18, 2) CONSTRAINT [DF_UserState_KnokerRank] DEFAULT ((0)) NOT NULL,
    [PurchaserRank]    DECIMAL (18, 2) CONSTRAINT [DF_UserState_PurchaserRank] DEFAULT ((0)) NOT NULL,
    [TotalRank]        DECIMAL (18, 2) CONSTRAINT [DF_UserState_TotalRank] DEFAULT ((0)) NOT NULL,
    [LastModifyDate]   DATETIME        NULL,
    [LastStatusDate]   DATETIME        NULL,
    CONSTRAINT [PK_UserState] PRIMARY KEY CLUSTERED ([UserId] ASC)
);

