CREATE TABLE [dbo].[PreLoanRequest]
(
	[Id] INT NOT NULL PRIMARY KEY identity(1,1),
	[RequestedDate]    DATETIME NOT NULL DEFAULT GETDATE(),
	[BorrowerId]       INT           NOT NULL,
	[Amount]           FLOAT (53)    NOT NULL,
	[Term]             INT           NOT NULL,
	[TermTypeId]       INT NOT NULL,
	[FirstPaymentDate] DATETIME      NOT NULL,
	[ReferenceNumber]  NVARCHAR(50) NULL, 
	[LoanRequestStatusId] INT NOT NULL, 
	CONSTRAINT [FK_PreLoanRequest_Profile] FOREIGN KEY ([BorrowerId]) REFERENCES [dbo].[Profile] ([Id]),
	CONSTRAINT [FK_PreLoanRequest_LoanRequestStatus] FOREIGN KEY ([LoanRequestStatusId]) REFERENCES [dbo].[LoanRequestStatus] ([Id]), 
	CONSTRAINT [FK_PreLoanRequest_TermType] FOREIGN KEY ([TermTypeId]) REFERENCES [TermType]([Id])
)
