CREATE TABLE [dbo].[StudyTemplate] (
    [Id]           BIGINT        IDENTITY (1, 1) NOT NULL,
    [Client]       VARCHAR (100) NOT NULL,
    [User]         VARCHAR (300) NOT NULL,
    [TemplateName] VARCHAR (300) NOT NULL,
    [Content]      TEXT          NOT NULL,
    [CreateDate]   DATETIME      DEFAULT (getutcdate()) NOT NULL,
    PRIMARY KEY CLUSTERED ([Id] ASC)
);


GO
CREATE UNIQUE NONCLUSTERED INDEX [IX_StudyTemplate_Client_User_TemplateName]
    ON [dbo].[StudyTemplate]([Client] ASC, [User] ASC, [TemplateName] ASC);


GO
CREATE NONCLUSTERED INDEX [IX_StudyTemplate_Client_User]
    ON [dbo].[StudyTemplate]([Client] ASC, [User] ASC);

