CREATE TABLE [dbo].[FicaComplianceDocuments] (
    [Id]               INT IDENTITY (1, 1) NOT NULL,
    [FicaComplianceId] INT NOT NULL,
    [DocumentTypeId]   INT NOT NULL,
    [FileId]           INT NOT NULL,
    CONSTRAINT [PK_FicaComplianceDocuments] PRIMARY KEY CLUSTERED ([Id] ASC),
    CONSTRAINT [FK_FicaComplianceDocuments_DocumentType] FOREIGN KEY ([DocumentTypeId]) REFERENCES [dbo].[DocumentType] ([Id]),
    CONSTRAINT [FK_FicaComplianceDocuments_FicaCompliance] FOREIGN KEY ([FicaComplianceId]) REFERENCES [dbo].[FicaCompliance] ([ProfileId]),
    CONSTRAINT [FK_FicaComplianceDocuments_FileData] FOREIGN KEY ([FileId]) REFERENCES [dbo].[FileData] ([Id])
);

