CREATE TABLE [dbo].[Accounts] (
    [AccountId]            BIGINT          IDENTITY (1, 1) NOT NULL,
    [UserId]               BIGINT          NOT NULL,
    [Symbol]               VARCHAR (30)    NULL,
    [CurrentBalance]       DECIMAL (22, 8) NULL,
    [CurrentBonusBalance]  DECIMAL (22, 8) NULL,
    [TotalPending]         DECIMAL (22, 8) NULL,
    [CreateDate]           DATETIME        NOT NULL,
    [LastModifyDate]       DATETIME        NULL,
    [LastModifyOrigin]     [sysname]       NULL,
    [LastModifyOperatorId] INT             NULL,
    [WalletAddress] NCHAR(42) NOT NULL, 
    CONSTRAINT [PK_Accounts] PRIMARY KEY CLUSTERED ([AccountId] ASC)
);




GO
CREATE UNIQUE NONCLUSTERED INDEX [IX_U_Accounts_UserId_Symbol]
    ON [dbo].[Accounts]([UserId] ASC, [Symbol] ASC);

