﻿CREATE TABLE [dbo].[fds__payments] (
    [Id]               BIGINT          IDENTITY (1, 1) NOT NULL,
    [ExternalID]       VARCHAR (50)    NULL,
    [InvId]            VARCHAR (10)    NOT NULL,
    [CustomerId]       BIGINT          NULL,
    [DateReceived]     DATETIME        NOT NULL,
    [AllocationStatus] CHAR (1)        CONSTRAINT [DF_fds__payments_IsAllocated] DEFAULT ((0)) NULL,
    [IBAN]             VARCHAR (25)    NULL,
    [sender]           VARCHAR (255)   NULL,
    [reference]        VARCHAR (35)    NULL,
    [purpose]          VARCHAR (140)   NULL,
    [amount]           NUMERIC (10, 3) NOT NULL,
    [rec_account]      VARCHAR (25)    NULL,
    CONSTRAINT [PK_fds__payments] PRIMARY KEY CLUSTERED ([Id] ASC)
);

