[dbo].[PlasticWebDealDetail]
CREATE TABLE [dbo].[PlasticWebDealDetail]
(
[WebDealDetailID] [int] NOT NULL IDENTITY(1, 1),
[DealFID] [int] NULL,
[MoversConnectFID] [bigint] NOT NULL,
[OkToUseForFuturePayments] [bit] NOT NULL,
[SourceIpAddress] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[WebActivityDate] [datetime] NOT NULL,
[CreatedDate] [datetime] NOT NULL CONSTRAINT [DF_PlasticWebDealDetail_CreatedDate] DEFAULT (getutcdate()),
[WebDealFID] [int] NULL,
[StatementDetailFID] [int] NULL,
[InstrumentFID] [int] NULL,
[PostingInProgress] [bit] NOT NULL CONSTRAINT [DF_PlasticWebDealDetail_PostingInProgress] DEFAULT ((0)),
[OnlineResponseFID] [bigint] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[PlasticWebDealDetail] ADD CONSTRAINT [PK_PlasticWebDealDetail] PRIMARY KEY CLUSTERED ([WebDealDetailID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[PlasticWebDealDetail] ADD CONSTRAINT [FK_PlasticWebDeal_DealFID] FOREIGN KEY ([DealFID]) REFERENCES [dbo].[PlasticDeal] ([DealID])
GO
ALTER TABLE [dbo].[PlasticWebDealDetail] ADD CONSTRAINT [FK_PlasticWebDeal_InstrumentFID] FOREIGN KEY ([InstrumentFID]) REFERENCES [dbo].[PlasticInstrument] ([InstrumentID])
GO
ALTER TABLE [dbo].[PlasticWebDealDetail] ADD CONSTRAINT [FK_PlasticWebDeal_StatementDetailFID] FOREIGN KEY ([StatementDetailFID]) REFERENCES [dbo].[StatementDetail] ([SDPriKey])
GO
ALTER TABLE [dbo].[PlasticWebDealDetail] ADD CONSTRAINT [FK_PlasticWebDeal_WebDealFID] FOREIGN KEY ([WebDealFID]) REFERENCES [dbo].[PlasticWebDeal] ([WebDealID])
GO
GRANT SELECT ON [dbo].[PlasticWebDealDetail] TO [MssExec]
GRANT INSERT ON [dbo].[PlasticWebDealDetail] TO [MssExec]
GRANT DELETE ON [dbo].[PlasticWebDealDetail] TO [MssExec]
GRANT UPDATE ON [dbo].[PlasticWebDealDetail] TO [MssExec]
GO