﻿CREATE TABLE [dbo].[TraderFeedbacks] (
    [TraderFeedbacksId]     INT           IDENTITY (1, 1) NOT NULL,
    [KnokId] BIGINT NOT NULL, 
    [UserId] BIGINT NOT NULL, 
    [FeedbackType] INT NOT NULL, 
    [Comment] NVARCHAR(MAX) NOT NULL, 
    [Clear] INT NULL, 
    [Educational ] INT NULL, 
    [Comprehensive ] INT NULL, 
    [KnokBenefit] INT NULL, 
    [UserReviewPerTrader] FLOAT NULL, 
    CONSTRAINT [PK__TraderFeedback] PRIMARY KEY CLUSTERED ([TraderFeedbacksId] ASC),

);


GO

CREATE UNIQUE INDEX [IX_TraderFeedbacks_FeedbackType_UserId_KnokId] ON [dbo].[TraderFeedbacks] ([FeedbackType], [KnokId], [UserId])
