时间:2021-07-01 10:21:17 帮助过:15人阅读
本文仅聚焦在表单身份认证(Forms Authentication)的个性化定制
CREATE TABLE [dbo].[User]
(
[Id] [bigint] IDENTITY(1,1) NOT NULL,
[Login] [nvarchar](50) NOT NULL,
[EMail] [nvarchar](255) NOT NULL,
[Password] [nvarchar](500) NULL,
[CreationDate] [datetime] NULL,
[ApprovalDate] [datetime] NULL,
[LastLoginDate] [datetime] NULL,
[IsLocked] [bit] NOT NULL,
[PasswordQuestion] [nvarchar](max) NULL,
[PasswordAnswer] [nvarchar](max) NULL,
[ActivationToken] [nvarchar](200) NULL,
[EmailConfirmed] [bit] NOT NULL,
[SecurityStamp] [nvarchar](max) NULL,
[PhoneNumber] [nvarchar](50) NULL,
[PhoneNumberConfirmed] [bit] NOT NULL,
[TwoFactorEnabled] [bit] NOT NULL,
[LockoutEndDateUtc] [datetime2](7) NULL,
[LockoutEnabled] [bit] NOT NULL,
[AccessFailedCount] [int] NOT NULL,
CONSTRAINT [PK_User] PRIMARY KEY CLUSTERED
(
[Id] ASC
),
CONSTRAINT [UX_User_EMail] UNIQUE NONCLUSTERED
(
[EMail] ASC
),
CONSTRAINT [UX_User_Login] UNIQUE NONCLUSTERED
(
[Login] ASC
)
)
GO
ALTER TABLE [dbo].[User] ADD CONSTRAINT [DF_User_IsLocked] DEFAULT ((0)) FOR [IsLocked]
GO
ALTER TABLE [dbo].[User] ADD