CREATE TABLE [dbo].[PlasticProvider]
(
[ProviderID] [int] NOT NULL IDENTITY(1, 1),
[Provider] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[ProviderTypeFID] [int] NOT NULL,
[StatementDescriptor] [varchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[UserName] [varchar] (1000) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Credentials] [varchar] (1000) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[AccountCode] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[HppBaseUrl] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[DateModified] [datetime] NOT NULL CONSTRAINT [DF_PlasticProvider_DateModified] DEFAULT (getdate()),
[ModifiedBySysUserFID] [int] NOT NULL,
[Inactive] [bit] NOT NULL CONSTRAINT [DF_PlasticProvider_Inactive] DEFAULT ((0)),
[CanHandleCards] [bit] NOT NULL CONSTRAINT [DF_PlasticProvider_CanHandleCards] DEFAULT ((1)),
[CanHandleChecking] [bit] NOT NULL CONSTRAINT [DF_PlasticProvider_CanHandleChecking] DEFAULT ((1)),
[CanHandleSavings] [bit] NOT NULL CONSTRAINT [DF_PlasticProvider_CanHandleSavings] DEFAULT ((1)),
[PaymentNoteTypeFID] [smallint] NULL,
[UseMoversConnectCredentials] [bit] NOT NULL CONSTRAINT [DF_PlasticProvider_UseMoversConnectCredentials] DEFAULT ((0)),
[ClientId] [varchar] (1000) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL CONSTRAINT [DF_PlasticProvider_ClientId] DEFAULT (''),
[DisableNewInstruments] [bit] NOT NULL CONSTRAINT [DF_PlasticProvider_DisableNewInstruments] DEFAULT ((0)),
[DisableNewSales] [bit] NOT NULL CONSTRAINT [DF_PlasticProvider_DisableNewSales] DEFAULT ((0)),
[PreferenceOrder] [int] NULL,
[CurrencyCode] [varchar] (3) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL CONSTRAINT [DF_PlasticProvider_CurrencyCode] DEFAULT ('USD'),
[UseProductionUrl] [bit] NOT NULL CONSTRAINT [DF_PlasticProvider_UseProductionUrl] DEFAULT ((1)),
[CalculateBestGuessDepositDate] [bit] NOT NULL CONSTRAINT [DF_PlasticProvider_CalculateBestGuessDepositDate] DEFAULT ((0)),
[AdjustmentDays] [int] NOT NULL CONSTRAINT [DF_PlasticProvider_AdjustmentDays] DEFAULT ((0)),
[CutoffTime] [datetime] NOT NULL CONSTRAINT [DF_PlasticProvider_CutoffTime] DEFAULT ('1899-12-30 18:00:00'),
[IsSaturdayBusinessDay] [bit] NOT NULL CONSTRAINT [DF_PlasticProvider_IsSaturdayBusinessDay] DEFAULT ((0)),
[IsSundayBusinessDay] [bit] NOT NULL CONSTRAINT [DF_PlasticProvider_IsSundayBusinessDay] DEFAULT ((0)),
[AdjustForHolidays] [bit] NOT NULL CONSTRAINT [DF_PlasticProvider_AdjustForHolidays] DEFAULT ((0)),
[AllowAuthorizations] [bit] NOT NULL CONSTRAINT [DF_PlasticProvider_AllowAuthorizations] DEFAULT ((0)),
[WarningCaptureDays] [int] NULL,
[MaxCaptureDays] [int] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[PlasticProvider] ADD CONSTRAINT [PK_PlasticProvider] PRIMARY KEY CLUSTERED ([ProviderID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[PlasticProvider] ADD CONSTRAINT [IX_PlasticProvider_Provider] UNIQUE NONCLUSTERED ([Provider]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_PlasticProvider_ModifiedBySysUserFID] ON [dbo].[PlasticProvider] ([ModifiedBySysUserFID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_PlasticProvider_PaymentNoteType] ON [dbo].[PlasticProvider] ([PaymentNoteTypeFID]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_PlasticProvider_ProviderType] ON [dbo].[PlasticProvider] ([ProviderTypeFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[PlasticProvider] ADD CONSTRAINT [FK_PlasticProvider_ModifiedBySysUserFID] FOREIGN KEY ([ModifiedBySysUserFID]) REFERENCES [dbo].[Sysuser] ([SysUserID])
GO
ALTER TABLE [dbo].[PlasticProvider] ADD CONSTRAINT [FK_PlasticProvider_NoteTypeFID] FOREIGN KEY ([PaymentNoteTypeFID]) REFERENCES [dbo].[NoteType] ([NoteTypeID])
GO
ALTER TABLE [dbo].[PlasticProvider] ADD CONSTRAINT [FK_PlasticProvider_ProviderTypeFID] FOREIGN KEY ([ProviderTypeFID]) REFERENCES [dbo].[PlasticProviderType] ([ProviderTypeID])
GO
GRANT SELECT ON [dbo].[PlasticProvider] TO [MssExec]
GRANT INSERT ON [dbo].[PlasticProvider] TO [MssExec]
GRANT DELETE ON [dbo].[PlasticProvider] TO [MssExec]
GRANT UPDATE ON [dbo].[PlasticProvider] TO [MssExec]
GO