CREATE TABLE [dbo].[LoanOffer]
(
	[Id] INT NOT NULL PRIMARY KEY IDENTITY(1,1), 
    --[ProfileId] INT NOT NULL, 
    [LenderId] INT NOT NULL, 
    [Amount] FLOAT NOT NULL, 
	[Balance] FLOAT NOT NULL DEFAULT 0 , 
    [InterestRate] FLOAT NOT NULL, 
    [Term] INT NOT NULL, 
    [TermTypeId] INT NOT NULL, 
    [IsActive] BIT NOT NULL, 
    [DateCreated] DATETIME NOT NULL, 
    [ExpiryDate] DATETIME NULL, 
    [IsDeleted] BIT NOT NULL DEFAULT 0, 
  
    --CONSTRAINT [FK_LoanOffer_Profile] FOREIGN KEY (ProfileId) REFERENCES Profile(Id), 
    CONSTRAINT [FK_LoanOffer_Lender] FOREIGN KEY ([LenderId]) REFERENCES Lender(Id), 
    CONSTRAINT [FK_LoanOffer_TermType] FOREIGN KEY ([TermTypeId]) REFERENCES [TermType]([Id]) 
)
