USE FastMoneyPro_Remit
GO

--ALTER TABLE dbo.REFERRAL_APPLICATION_USER ADD wrongPwdCount INT NULL

CREATE TABLE [dbo].[REFERRAL_APPLICATION_USER]
(
[rowId] BIGINT IDENTITY(1,1) NOT NULL,
[referalCode] VARCHAR(50) NOT NULL,
[pwd] VARCHAR(50) NULL,
[isLocked] BIT,
[lockedDate] DATETIME,
[IsActive] BIT,
[IpAddress] VARCHAR(128),
[IsDeleted] BIT,
[DeletedDate] DATETIME,
[DeletedBy] VARCHAR(100),
[LastPwdChangedDate] DATETIME,
[isforceChangePwd] BIT,
[pwdChangeDays] DECIMAL,
[pwdChangeWarningDays] INT NULL,
[lastLoginDate] DATETIME,
[wrongPwdCount] INT NULL,
PRIMARY KEY CLUSTERED 
(
	[rowId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

CREATE TABLE [dbo].[REFERRAL_LOGIN_LOGS]
(
[rowId] BIGINT IDENTITY(1,1) NOT NULL,
[referralUserId] BIGINT NULL,
[logType] VARCHAR(50) NULL,	
[IP] VARCHAR(100) NULL,	
[Reason] VARCHAR(2000) NULL,	
[fieldValue] VARCHAR(2000) NULL,	
[createdBy] VARCHAR(100) NULL	,
[createdDate] DATETIME NULL	,
[UserData] VARCHAR(MAX),
PRIMARY KEY CLUSTERED 
(
	[rowId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO