SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [EmailConfig](
	[ConfigID] [int] IDENTITY(1,1) NOT NULL,
	[Smtp] [varchar](100) NULL,
	[Account] [varchar](50) NULL,
	[Password] [varchar](50) NULL,
	[MailAddress] [varchar](50) NULL,
	[RegisterSubject] [nvarchar](100) NULL,
	[RegisterBody] [nvarchar](max) NULL,
	[ForgotPasswordSubject] [nvarchar](100) NULL,
	[ForgotPasswordBody] [nvarchar](max) NULL,
	[RegisterMaximumQuantity] [int] NULL,
	[ForgotPasswordMaximumQuantity] [int] NULL,
	[RegisterStatus] [int] NULL CONSTRAINT [DF_EmailConfig_RegisterStatus_1]  DEFAULT ((0)),
	[ForgotPasswordStatus] [int] NULL CONSTRAINT [DF_EmailConfig_ForgotPasswordStatus_1]  DEFAULT ((0)),
 CONSTRAINT [PK_EmailConfig] PRIMARY KEY CLUSTERED 
(
	[ConfigID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO
SET IDENTITY_INSERT [EmailConfig] ON 

INSERT [EmailConfig] ([ConfigID], [Smtp], [Account], [Password], [MailAddress], [RegisterSubject], [RegisterBody], [ForgotPasswordSubject], [ForgotPasswordBody], [RegisterMaximumQuantity], [ForgotPasswordMaximumQuantity], [RegisterStatus], [ForgotPasswordStatus]) VALUES (1, N'smtp.qq.com', N'123456', N'1223', N'123456@qq.com', N'邮箱验证', N'你好,亲爱的用户:{account}
这是你的邮箱验证码:{authcode} 请妥善保管

日期:{date}', N'密码找回', N'尊敬的{account}，您好：
你的验证码是：
{authcode}
', 0, 0, 1, 1)
SET IDENTITY_INSERT [EmailConfig] OFF
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'邮箱SMTP服务器' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'EmailConfig', @level2type=N'COLUMN',@level2name=N'Smtp'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'邮箱登录账号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'EmailConfig', @level2type=N'COLUMN',@level2name=N'Account'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'邮箱登录密码' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'EmailConfig', @level2type=N'COLUMN',@level2name=N'Password'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'发送者邮箱' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'EmailConfig', @level2type=N'COLUMN',@level2name=N'MailAddress'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'注册验证邮件主题' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'EmailConfig', @level2type=N'COLUMN',@level2name=N'RegisterSubject'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'注册验证邮件正文模板;{account}账号,{link}链接地址' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'EmailConfig', @level2type=N'COLUMN',@level2name=N'RegisterBody'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'密码找回邮件主题' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'EmailConfig', @level2type=N'COLUMN',@level2name=N'ForgotPasswordSubject'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'密码找回邮件正文模板,参数同上' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'EmailConfig', @level2type=N'COLUMN',@level2name=N'ForgotPasswordBody'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'发送注册邮件最大发送次数限制' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'EmailConfig', @level2type=N'COLUMN',@level2name=N'RegisterMaximumQuantity'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'找回密码邮件最大发送次数限制' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'EmailConfig', @level2type=N'COLUMN',@level2name=N'ForgotPasswordMaximumQuantity'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'注册邮件状态,0关闭,1开启' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'EmailConfig', @level2type=N'COLUMN',@level2name=N'RegisterStatus'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'找回密码功能状态,0关闭,1开启' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'EmailConfig', @level2type=N'COLUMN',@level2name=N'ForgotPasswordStatus'
GO
