SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[User_Log](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[type] [int] NOT NULL CONSTRAINT [DF_Administrator_Log_adminlog_type]  DEFAULT ((0)),
	[objectpage] [text] COLLATE Chinese_PRC_CI_AS NOT NULL CONSTRAINT [DF_User_Log_object]  DEFAULT (''),
	[intro] [text] COLLATE Chinese_PRC_CI_AS NOT NULL CONSTRAINT [DF_Administrator_Log_adminlog_content]  DEFAULT (''),
	[ip] [nvarchar](20) COLLATE Chinese_PRC_CI_AS NOT NULL CONSTRAINT [DF_Administrator_Log_adminlog_ip]  DEFAULT (''),
	[addtime] [datetime] NOT NULL,
	[username] [nvarchar](30) COLLATE Chinese_PRC_CI_AS NOT NULL CONSTRAINT [DF_User_Log_userid]  DEFAULT ((0)),
 CONSTRAINT [PK_Administrator_Log] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'管理员操作日志(主键)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'User_Log', @level2type=N'COLUMN', @level2name=N'id'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'管理员操作日志(操作类型0:登录进来,1:添加类,2:编辑类,3:删除类)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'User_Log', @level2type=N'COLUMN', @level2name=N'type'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'管理员操作日志(对象目标页,标题或url地址)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'User_Log', @level2type=N'COLUMN', @level2name=N'objectpage'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'管理员操作日志(操作内容组合)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'User_Log', @level2type=N'COLUMN', @level2name=N'intro'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'管理员操作日志(操作IP)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'User_Log', @level2type=N'COLUMN', @level2name=N'ip'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'管理员操作日志(添加时间)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'User_Log', @level2type=N'COLUMN', @level2name=N'addtime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'管理员操作日志(操作会员帐户名)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'User_Log', @level2type=N'COLUMN', @level2name=N'username'
