2016-11-06 16:01:14 +08:00
|
|
|
|
USE [master]
|
2016-10-20 17:55:29 +08:00
|
|
|
|
GO
|
2016-10-22 20:55:07 +08:00
|
|
|
|
Create database [BootstrapAdmin]
|
2016-10-20 17:55:29 +08:00
|
|
|
|
GO
|
2016-10-22 20:55:07 +08:00
|
|
|
|
ALTER DATABASE [BootstrapAdmin] SET RECOVERY SIMPLE
|
2016-10-20 17:55:29 +08:00
|
|
|
|
GO
|
2016-10-22 20:55:07 +08:00
|
|
|
|
ALTER DATABASE [BootstrapAdmin] SET AUTO_SHRINK ON
|
2016-10-20 17:55:29 +08:00
|
|
|
|
GO
|
2016-10-22 20:55:07 +08:00
|
|
|
|
USE [BootstrapAdmin]
|
2016-10-20 17:55:29 +08:00
|
|
|
|
GO
|
2016-11-12 15:51:04 +08:00
|
|
|
|
/****** Object: Table [dbo].[Users] Script Date: 11/12/2016 15:49:11 ******/
|
2016-10-20 17:55:29 +08:00
|
|
|
|
SET ANSI_NULLS ON
|
|
|
|
|
GO
|
|
|
|
|
SET QUOTED_IDENTIFIER ON
|
|
|
|
|
GO
|
2016-11-06 16:01:14 +08:00
|
|
|
|
SET ANSI_PADDING ON
|
|
|
|
|
GO
|
2016-10-22 20:55:07 +08:00
|
|
|
|
CREATE TABLE [dbo].[Users](
|
2016-11-06 16:01:14 +08:00
|
|
|
|
[ID] [int] IDENTITY(1,1) NOT NULL,
|
|
|
|
|
[UserName] [varchar](50) NOT NULL,
|
|
|
|
|
[Password] [varchar](50) NOT NULL,
|
|
|
|
|
[PassSalt] [varchar](50) NOT NULL,
|
|
|
|
|
[DisplayName] [nvarchar](50) NOT NULL,
|
|
|
|
|
[RegisterTime] [datetime] NOT NULL,
|
|
|
|
|
[ApprovedTime] [datetime] NULL,
|
2016-11-12 15:51:04 +08:00
|
|
|
|
[ApprovedBy] [varchar](50) NULL,
|
2016-11-10 12:20:26 +08:00
|
|
|
|
[Description] [nvarchar](500) NOT NULL,
|
2016-11-12 15:51:04 +08:00
|
|
|
|
[RejectedBy] [varchar](50) NULL,
|
|
|
|
|
[RejectedTime] [datetime] NULL,
|
|
|
|
|
[RejectedReason] [nvarchar](50) NULL,
|
2019-01-12 10:27:37 +08:00
|
|
|
|
[Icon] [varchar](50) NULL,
|
2017-06-13 11:34:06 +08:00
|
|
|
|
[Css] [varchar](50) NULL,
|
2016-10-22 20:55:07 +08:00
|
|
|
|
CONSTRAINT [PK_Users] PRIMARY KEY CLUSTERED
|
2016-10-20 17:55:29 +08:00
|
|
|
|
(
|
2016-11-06 16:01:14 +08:00
|
|
|
|
[ID] ASC
|
2016-10-20 17:55:29 +08:00
|
|
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
|
|
|
) ON [PRIMARY]
|
|
|
|
|
GO
|
2016-11-06 16:01:14 +08:00
|
|
|
|
SET ANSI_PADDING OFF
|
|
|
|
|
GO
|
2016-10-22 20:55:07 +08:00
|
|
|
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Users', @level2type=N'COLUMN',@level2name=N'ID'
|
2016-10-20 17:55:29 +08:00
|
|
|
|
GO
|
2016-10-23 23:42:49 +08:00
|
|
|
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户名' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Users', @level2type=N'COLUMN',@level2name=N'UserName'
|
2016-10-22 20:55:07 +08:00
|
|
|
|
GO
|
2016-10-23 23:42:49 +08:00
|
|
|
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'密码' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Users', @level2type=N'COLUMN',@level2name=N'Password'
|
2016-10-22 20:55:07 +08:00
|
|
|
|
GO
|
2016-10-24 16:09:36 +08:00
|
|
|
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'密码盐' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Users', @level2type=N'COLUMN',@level2name=N'PassSalt'
|
|
|
|
|
GO
|
|
|
|
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'显示名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Users', @level2type=N'COLUMN',@level2name=N'DisplayName'
|
2016-10-22 20:55:07 +08:00
|
|
|
|
GO
|
2016-11-06 16:01:14 +08:00
|
|
|
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'注册时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Users', @level2type=N'COLUMN',@level2name=N'RegisterTime'
|
|
|
|
|
GO
|
|
|
|
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'批复时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Users', @level2type=N'COLUMN',@level2name=N'ApprovedTime'
|
|
|
|
|
GO
|
2016-11-12 15:51:04 +08:00
|
|
|
|
/****** Object: Table [dbo].[UserRole] Script Date: 11/12/2016 15:49:11 ******/
|
2016-10-20 17:55:29 +08:00
|
|
|
|
SET ANSI_NULLS ON
|
|
|
|
|
GO
|
|
|
|
|
SET QUOTED_IDENTIFIER ON
|
|
|
|
|
GO
|
2016-11-07 12:27:04 +08:00
|
|
|
|
CREATE TABLE [dbo].[UserRole](
|
|
|
|
|
[ID] [int] IDENTITY(1,1) NOT NULL,
|
|
|
|
|
[UserID] [int] NOT NULL,
|
|
|
|
|
[RoleID] [int] NOT NULL,
|
|
|
|
|
CONSTRAINT [PK_UserRole] PRIMARY KEY CLUSTERED
|
2016-10-31 13:08:38 +08:00
|
|
|
|
(
|
2016-11-07 12:27:04 +08:00
|
|
|
|
[ID] ASC
|
2016-10-31 13:08:38 +08:00
|
|
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
|
|
|
) ON [PRIMARY]
|
|
|
|
|
GO
|
2016-11-07 12:27:04 +08:00
|
|
|
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserRole', @level2type=N'COLUMN',@level2name=N'ID'
|
2016-10-31 13:08:38 +08:00
|
|
|
|
GO
|
2016-11-07 12:27:04 +08:00
|
|
|
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserRole', @level2type=N'COLUMN',@level2name=N'UserID'
|
2016-10-31 13:08:38 +08:00
|
|
|
|
GO
|
2016-11-07 12:27:04 +08:00
|
|
|
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'角色ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserRole', @level2type=N'COLUMN',@level2name=N'RoleID'
|
2016-10-31 13:08:38 +08:00
|
|
|
|
GO
|
2016-11-12 15:51:04 +08:00
|
|
|
|
/****** Object: Table [dbo].[UserGroup] Script Date: 11/12/2016 15:49:11 ******/
|
2016-10-20 17:55:29 +08:00
|
|
|
|
SET ANSI_NULLS ON
|
|
|
|
|
GO
|
|
|
|
|
SET QUOTED_IDENTIFIER ON
|
|
|
|
|
GO
|
2016-10-22 20:55:07 +08:00
|
|
|
|
CREATE TABLE [dbo].[UserGroup](
|
2016-11-07 12:27:04 +08:00
|
|
|
|
[ID] [int] IDENTITY(1,1) NOT NULL,
|
|
|
|
|
[UserID] [int] NOT NULL,
|
|
|
|
|
[GroupID] [int] NOT NULL,
|
2016-10-22 20:55:07 +08:00
|
|
|
|
CONSTRAINT [PK_UserGroup] PRIMARY KEY CLUSTERED
|
2016-10-20 17:55:29 +08:00
|
|
|
|
(
|
2016-11-07 12:27:04 +08:00
|
|
|
|
[ID] ASC
|
2016-10-20 17:55:29 +08:00
|
|
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
|
|
|
) ON [PRIMARY]
|
|
|
|
|
GO
|
2016-10-22 20:55:07 +08:00
|
|
|
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserGroup', @level2type=N'COLUMN',@level2name=N'ID'
|
|
|
|
|
GO
|
2016-10-23 23:42:49 +08:00
|
|
|
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserGroup', @level2type=N'COLUMN',@level2name=N'UserID'
|
2016-10-20 17:55:29 +08:00
|
|
|
|
GO
|
2016-10-23 23:42:49 +08:00
|
|
|
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'部门ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'UserGroup', @level2type=N'COLUMN',@level2name=N'GroupID'
|
2016-10-22 20:55:07 +08:00
|
|
|
|
GO
|
2016-11-12 15:51:04 +08:00
|
|
|
|
/****** Object: Table [dbo].[Roles] Script Date: 11/12/2016 15:49:11 ******/
|
2016-10-20 17:55:29 +08:00
|
|
|
|
SET ANSI_NULLS ON
|
|
|
|
|
GO
|
|
|
|
|
SET QUOTED_IDENTIFIER ON
|
|
|
|
|
GO
|
2016-11-07 12:27:04 +08:00
|
|
|
|
CREATE TABLE [dbo].[Roles](
|
|
|
|
|
[ID] [int] IDENTITY(1,1) NOT NULL,
|
|
|
|
|
[RoleName] [nvarchar](50) NULL,
|
|
|
|
|
[Description] [nvarchar](500) NULL,
|
|
|
|
|
CONSTRAINT [PK_Roles] PRIMARY KEY CLUSTERED
|
2016-10-20 17:55:29 +08:00
|
|
|
|
(
|
2016-11-07 12:27:04 +08:00
|
|
|
|
[ID] ASC
|
2016-10-20 17:55:29 +08:00
|
|
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
|
|
|
) ON [PRIMARY]
|
|
|
|
|
GO
|
2016-11-07 12:27:04 +08:00
|
|
|
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Roles', @level2type=N'COLUMN',@level2name=N'ID'
|
2016-10-20 17:55:29 +08:00
|
|
|
|
GO
|
2016-11-07 12:27:04 +08:00
|
|
|
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'角色名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Roles', @level2type=N'COLUMN',@level2name=N'RoleName'
|
2016-10-20 17:55:29 +08:00
|
|
|
|
GO
|
2016-11-07 12:27:04 +08:00
|
|
|
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'描述' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Roles', @level2type=N'COLUMN',@level2name=N'Description'
|
2016-10-22 20:55:07 +08:00
|
|
|
|
GO
|
2016-11-12 15:51:04 +08:00
|
|
|
|
/****** Object: Table [dbo].[RoleGroup] Script Date: 11/12/2016 15:49:11 ******/
|
2016-10-20 17:55:29 +08:00
|
|
|
|
SET ANSI_NULLS ON
|
|
|
|
|
GO
|
|
|
|
|
SET QUOTED_IDENTIFIER ON
|
|
|
|
|
GO
|
2016-10-22 20:55:07 +08:00
|
|
|
|
CREATE TABLE [dbo].[RoleGroup](
|
2016-11-07 12:27:04 +08:00
|
|
|
|
[ID] [int] IDENTITY(1,1) NOT NULL,
|
|
|
|
|
[RoleID] [int] NOT NULL,
|
|
|
|
|
[GroupID] [int] NOT NULL,
|
2016-10-22 20:55:07 +08:00
|
|
|
|
CONSTRAINT [PK_RoleGroup] PRIMARY KEY CLUSTERED
|
|
|
|
|
(
|
2016-11-07 12:27:04 +08:00
|
|
|
|
[ID] ASC
|
2016-10-22 20:55:07 +08:00
|
|
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
|
|
|
) ON [PRIMARY]
|
|
|
|
|
GO
|
|
|
|
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RoleGroup', @level2type=N'COLUMN',@level2name=N'ID'
|
2016-10-20 17:55:29 +08:00
|
|
|
|
GO
|
2016-10-23 23:42:49 +08:00
|
|
|
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'角色ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RoleGroup', @level2type=N'COLUMN',@level2name=N'RoleID'
|
|
|
|
|
GO
|
|
|
|
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'部门ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RoleGroup', @level2type=N'COLUMN',@level2name=N'GroupID'
|
|
|
|
|
GO
|
2016-11-12 15:51:04 +08:00
|
|
|
|
/****** Object: Table [dbo].[Notifications] Script Date: 11/12/2016 15:49:11 ******/
|
2016-11-10 11:35:27 +08:00
|
|
|
|
SET ANSI_NULLS ON
|
|
|
|
|
GO
|
|
|
|
|
SET QUOTED_IDENTIFIER ON
|
|
|
|
|
GO
|
|
|
|
|
CREATE TABLE [dbo].[Notifications](
|
2016-11-10 16:39:07 +08:00
|
|
|
|
[ID] [int] IDENTITY(1,1) NOT NULL,
|
2016-11-10 11:35:27 +08:00
|
|
|
|
[Category] [nvarchar](50) NOT NULL,
|
|
|
|
|
[Title] [nvarchar](50) NOT NULL,
|
|
|
|
|
[Content] [nvarchar](50) NOT NULL,
|
|
|
|
|
[RegisterTime] [datetime] NOT NULL,
|
|
|
|
|
[ProcessTime] [datetime] NULL,
|
|
|
|
|
[ProcessBy] [nvarchar](50) NULL,
|
2016-11-10 15:24:09 +08:00
|
|
|
|
[ProcessResult] [nvarchar](50) NULL,
|
2016-11-10 16:39:07 +08:00
|
|
|
|
[Status] [nvarchar](50) NOT NULL,
|
|
|
|
|
CONSTRAINT [PK_Notifications] PRIMARY KEY CLUSTERED
|
|
|
|
|
(
|
|
|
|
|
[ID] ASC
|
|
|
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
2016-11-10 11:35:27 +08:00
|
|
|
|
) ON [PRIMARY]
|
|
|
|
|
GO
|
|
|
|
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'0 标示未处理 1 标示已处理' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Notifications', @level2type=N'COLUMN',@level2name=N'Status'
|
|
|
|
|
GO
|
2019-01-12 11:39:23 +08:00
|
|
|
|
|
|
|
|
|
/****** Object: Default [DF_Notifications_Status] Script Date: 11/12/2016 15:49:11 ******/
|
|
|
|
|
ALTER TABLE [dbo].[Notifications] ADD CONSTRAINT [DF_Notifications_Status] DEFAULT ((0)) FOR [Status]
|
|
|
|
|
GO
|
|
|
|
|
|
2016-11-12 15:51:04 +08:00
|
|
|
|
/****** Object: Table [dbo].[Navigations] Script Date: 11/12/2016 15:49:11 ******/
|
2016-10-23 23:42:49 +08:00
|
|
|
|
SET ANSI_NULLS ON
|
|
|
|
|
GO
|
|
|
|
|
SET QUOTED_IDENTIFIER ON
|
|
|
|
|
GO
|
2016-11-07 12:27:04 +08:00
|
|
|
|
SET ANSI_PADDING ON
|
|
|
|
|
GO
|
|
|
|
|
CREATE TABLE [dbo].[Navigations](
|
2016-11-03 11:24:34 +08:00
|
|
|
|
[ID] [int] IDENTITY(1,1) NOT NULL,
|
2016-11-07 12:27:04 +08:00
|
|
|
|
[ParentId] [int] NOT NULL,
|
2016-11-03 11:24:34 +08:00
|
|
|
|
[Name] [nvarchar](50) NOT NULL,
|
2016-11-07 12:27:04 +08:00
|
|
|
|
[Order] [int] NOT NULL,
|
|
|
|
|
[Icon] [varchar](50) NULL,
|
2016-11-23 18:26:22 +08:00
|
|
|
|
[Url] [varchar](4000) NULL,
|
2016-11-07 12:27:04 +08:00
|
|
|
|
[Category] [nvarchar](50) NOT NULL,
|
2016-11-24 20:58:47 +08:00
|
|
|
|
[Target] [varchar](10) NOT NULL,
|
2018-11-02 22:43:49 +08:00
|
|
|
|
[IsResource] [int] NOT NULL,
|
2017-03-03 13:34:53 +08:00
|
|
|
|
[Application] [nvarchar](200) NOT NULL,
|
2016-11-07 12:27:04 +08:00
|
|
|
|
CONSTRAINT [PK_Navigations] PRIMARY KEY CLUSTERED
|
2016-10-23 20:05:03 +08:00
|
|
|
|
(
|
2016-11-03 11:24:34 +08:00
|
|
|
|
[ID] ASC
|
2016-11-07 12:27:04 +08:00
|
|
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
2016-10-23 20:05:03 +08:00
|
|
|
|
) ON [PRIMARY]
|
|
|
|
|
GO
|
2019-01-12 11:39:23 +08:00
|
|
|
|
|
|
|
|
|
/****** Object: Default [DF_Navigations_ParentId] Script Date: 11/12/2016 15:49:11 ******/
|
|
|
|
|
ALTER TABLE [dbo].[Navigations] ADD CONSTRAINT [DF_Navigations_ParentId] DEFAULT ((0)) FOR [ParentId]
|
|
|
|
|
GO
|
|
|
|
|
/****** Object: Default [DF_Navigations_Order] Script Date: 11/12/2016 15:49:11 ******/
|
|
|
|
|
ALTER TABLE [dbo].[Navigations] ADD CONSTRAINT [DF_Navigations_Order] DEFAULT ((0)) FOR [Order]
|
|
|
|
|
GO
|
|
|
|
|
/****** Object: Default [DF_Navigations_Icon] Script Date: 11/12/2016 15:49:11 ******/
|
|
|
|
|
ALTER TABLE [dbo].[Navigations] ADD CONSTRAINT [DF_Navigations_Icon] DEFAULT ('none') FOR [Icon]
|
|
|
|
|
GO
|
|
|
|
|
/****** Object: Default [DF_Navigations_Category] Script Date: 11/12/2016 15:49:11 ******/
|
|
|
|
|
ALTER TABLE [dbo].[Navigations] ADD CONSTRAINT [DF_Navigations_Category] DEFAULT ((0)) FOR [Category]
|
|
|
|
|
GO
|
|
|
|
|
|
|
|
|
|
ALTER TABLE [dbo].[Navigations] ADD CONSTRAINT [DF_Navigations_IsResource] DEFAULT ((0)) FOR [IsResource]
|
|
|
|
|
GO
|
|
|
|
|
|
|
|
|
|
ALTER TABLE [dbo].[Navigations] ADD CONSTRAINT [DF_Navigations_Application] DEFAULT ((0)) FOR [Application]
|
|
|
|
|
GO
|
|
|
|
|
|
|
|
|
|
ALTER TABLE [dbo].[Navigations] ADD CONSTRAINT [DF_Navigations_Target] DEFAULT ('_self') FOR [Target]
|
|
|
|
|
GO
|
|
|
|
|
|
2016-11-07 12:27:04 +08:00
|
|
|
|
SET ANSI_PADDING OFF
|
2016-10-22 20:55:07 +08:00
|
|
|
|
GO
|
2016-11-12 15:51:04 +08:00
|
|
|
|
/****** Object: Table [dbo].[NavigationRole] Script Date: 11/12/2016 15:49:11 ******/
|
2016-11-07 12:27:04 +08:00
|
|
|
|
SET ANSI_NULLS ON
|
2016-10-31 13:08:38 +08:00
|
|
|
|
GO
|
2016-11-07 12:27:04 +08:00
|
|
|
|
SET QUOTED_IDENTIFIER ON
|
2016-10-31 13:08:38 +08:00
|
|
|
|
GO
|
2016-11-07 12:27:04 +08:00
|
|
|
|
CREATE TABLE [dbo].[NavigationRole](
|
|
|
|
|
[ID] [int] IDENTITY(1,1) NOT NULL,
|
|
|
|
|
[NavigationID] [int] NOT NULL,
|
|
|
|
|
[RoleID] [int] NOT NULL,
|
|
|
|
|
CONSTRAINT [PK_NavigationRole] PRIMARY KEY CLUSTERED
|
|
|
|
|
(
|
|
|
|
|
[ID] ASC
|
|
|
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
|
|
|
) ON [PRIMARY]
|
2016-11-02 15:35:25 +08:00
|
|
|
|
GO
|
2016-11-12 15:51:04 +08:00
|
|
|
|
/****** Object: Table [dbo].[Logs] Script Date: 11/12/2016 15:49:11 ******/
|
2016-10-28 16:57:27 +08:00
|
|
|
|
SET ANSI_NULLS ON
|
|
|
|
|
GO
|
|
|
|
|
SET QUOTED_IDENTIFIER ON
|
|
|
|
|
GO
|
2016-11-02 15:35:25 +08:00
|
|
|
|
SET ANSI_PADDING ON
|
|
|
|
|
GO
|
2016-10-28 16:57:27 +08:00
|
|
|
|
CREATE TABLE [dbo].[Logs](
|
2016-11-02 15:35:25 +08:00
|
|
|
|
[ID] [int] IDENTITY(1,1) NOT NULL,
|
2017-03-29 13:25:33 +08:00
|
|
|
|
[CRUD] [nvarchar](50) NOT NULL,
|
2016-11-02 15:35:25 +08:00
|
|
|
|
[UserName] [varchar](50) NOT NULL,
|
2016-11-05 15:26:42 +08:00
|
|
|
|
[LogTime] [datetime] NOT NULL,
|
|
|
|
|
[ClientIp] [varchar](15) NOT NULL,
|
|
|
|
|
[ClientAgent] [nvarchar](500) NOT NULL,
|
|
|
|
|
[RequestUrl] [nvarchar](500) NOT NULL,
|
2016-10-28 16:57:27 +08:00
|
|
|
|
CONSTRAINT [PK_Logs] PRIMARY KEY CLUSTERED
|
|
|
|
|
(
|
2016-11-02 15:35:25 +08:00
|
|
|
|
[ID] ASC
|
2016-10-28 16:57:27 +08:00
|
|
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
|
|
|
|
) ON [PRIMARY]
|
|
|
|
|
GO
|
2016-11-02 15:35:25 +08:00
|
|
|
|
SET ANSI_PADDING OFF
|
|
|
|
|
GO
|
2016-10-28 16:57:27 +08:00
|
|
|
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Logs', @level2type=N'COLUMN',@level2name=N'ID'
|
|
|
|
|
GO
|
2016-11-07 09:08:12 +08:00
|
|
|
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Logs', @level2type=N'COLUMN',@level2name=N'CRUD'
|
2016-10-28 16:57:27 +08:00
|
|
|
|
GO
|
2016-11-12 15:51:04 +08:00
|
|
|
|
/****** Object: Table [dbo].[Groups] Script Date: 11/12/2016 15:49:11 ******/
|
2016-11-07 12:27:04 +08:00
|
|
|
|
SET ANSI_NULLS ON
|
|
|
|
|
GO
|
|
|
|
|
SET QUOTED_IDENTIFIER ON
|
|
|
|
|
GO
|
|
|
|
|
CREATE TABLE [dbo].[Groups](
|
|
|
|
|
[ID] [int] IDENTITY(1,1) NOT NULL,
|
|
|
|
|
[GroupName] [nvarchar](50) NULL,
|
|
|
|
|
[Description] [nvarchar](500) NULL,
|
|
|
|
|
CONSTRAINT [PK_Groups] PRIMARY KEY CLUSTERED
|
2016-10-23 23:42:49 +08:00
|
|
|
|
(
|
2016-11-07 12:27:04 +08:00
|
|
|
|
[ID] ASC
|
2016-10-23 23:42:49 +08:00
|
|
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
2016-10-28 15:51:08 +08:00
|
|
|
|
) ON [PRIMARY]
|
|
|
|
|
GO
|
2016-11-07 12:27:04 +08:00
|
|
|
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Groups', @level2type=N'COLUMN',@level2name=N'ID'
|
|
|
|
|
GO
|
|
|
|
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'部门名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Groups', @level2type=N'COLUMN',@level2name=N'GroupName'
|
|
|
|
|
GO
|
|
|
|
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'描述' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Groups', @level2type=N'COLUMN',@level2name=N'Description'
|
|
|
|
|
GO
|
2016-11-12 15:51:04 +08:00
|
|
|
|
/****** Object: Table [dbo].[Exceptions] Script Date: 11/12/2016 15:49:11 ******/
|
2016-11-10 16:39:07 +08:00
|
|
|
|
SET ANSI_NULLS ON
|
|
|
|
|
GO
|
|
|
|
|
SET QUOTED_IDENTIFIER ON
|
|
|
|
|
GO
|
|
|
|
|
SET ANSI_PADDING ON
|
|
|
|
|
GO
|
|
|
|
|
CREATE TABLE [dbo].[Exceptions](
|
|
|
|
|
[ID] [int] IDENTITY(1,1) NOT NULL,
|
|
|
|
|
[AppDomainName] [varchar](50) NOT NULL,
|
|
|
|
|
[ErrorPage] [varchar](50) NOT NULL,
|
2017-04-06 13:28:25 +08:00
|
|
|
|
[UserID] [varchar](50) NULL,
|
|
|
|
|
[UserIp] [varchar](15) NULL,
|
2016-11-18 10:18:41 +08:00
|
|
|
|
[ExceptionType] [nvarchar](max) NOT NULL,
|
2016-11-10 16:39:07 +08:00
|
|
|
|
[Message] [nvarchar](max) NOT NULL,
|
2017-01-09 17:17:28 +08:00
|
|
|
|
[StackTrace] [nvarchar](max) NULL,
|
2016-11-10 16:39:07 +08:00
|
|
|
|
[LogTime] [datetime] NOT NULL,
|
|
|
|
|
CONSTRAINT [PK_Exceptions] PRIMARY KEY CLUSTERED
|
|
|
|
|
(
|
|
|
|
|
[ID] 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
|
|
|
|
|
SET ANSI_PADDING OFF
|
|
|
|
|
GO
|
2016-11-12 15:51:04 +08:00
|
|
|
|
/****** Object: Table [dbo].[Dicts] Script Date: 11/12/2016 15:49:11 ******/
|
2016-10-28 15:51:08 +08:00
|
|
|
|
SET ANSI_NULLS ON
|
|
|
|
|
GO
|
|
|
|
|
SET QUOTED_IDENTIFIER ON
|
|
|
|
|
GO
|
2016-11-07 12:27:04 +08:00
|
|
|
|
CREATE TABLE [dbo].[Dicts](
|
|
|
|
|
[ID] [int] IDENTITY(1,1) NOT NULL,
|
|
|
|
|
[Category] [nvarchar](50) NOT NULL,
|
|
|
|
|
[Name] [nvarchar](50) NOT NULL,
|
2018-06-06 13:25:55 +08:00
|
|
|
|
[Code] [nvarchar](500) NOT NULL,
|
2016-11-07 12:27:04 +08:00
|
|
|
|
[Define] [int] NOT NULL,
|
|
|
|
|
CONSTRAINT [PK_dbo.Dict] PRIMARY KEY CLUSTERED
|
2016-10-28 15:51:08 +08:00
|
|
|
|
(
|
2016-11-07 12:27:04 +08:00
|
|
|
|
[ID] ASC
|
2016-10-28 15:51:08 +08:00
|
|
|
|
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
2016-10-23 23:42:49 +08:00
|
|
|
|
) ON [PRIMARY]
|
|
|
|
|
GO
|
2016-11-07 12:27:04 +08:00
|
|
|
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'字典Id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dicts', @level2type=N'COLUMN',@level2name=N'ID'
|
|
|
|
|
GO
|
|
|
|
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'字典种类' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dicts', @level2type=N'COLUMN',@level2name=N'Category'
|
|
|
|
|
GO
|
|
|
|
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'字典名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dicts', @level2type=N'COLUMN',@level2name=N'Name'
|
|
|
|
|
GO
|
|
|
|
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'字典代码' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dicts', @level2type=N'COLUMN',@level2name=N'Code'
|
|
|
|
|
GO
|
|
|
|
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'0表示系统使用,1表示自定义' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dicts', @level2type=N'COLUMN',@level2name=N'Define'
|
|
|
|
|
GO
|
2019-01-12 17:59:42 +08:00
|
|
|
|
|
2016-11-12 15:51:04 +08:00
|
|
|
|
/****** Object: Default [DF_Dicts_Define] Script Date: 11/12/2016 15:49:11 ******/
|
2016-11-07 12:27:04 +08:00
|
|
|
|
ALTER TABLE [dbo].[Dicts] ADD CONSTRAINT [DF_Dicts_Define] DEFAULT ((1)) FOR [Define]
|
2016-10-22 20:55:07 +08:00
|
|
|
|
GO
|
2017-03-03 13:34:53 +08:00
|
|
|
|
|
2016-11-14 09:42:59 +08:00
|
|
|
|
/****** Object: Table [dbo].[Messages] Script Date: 11/14/2016 13:59:21 ******/
|
2016-11-12 14:57:23 +08:00
|
|
|
|
SET ANSI_NULLS ON
|
|
|
|
|
GO
|
|
|
|
|
|
|
|
|
|
SET QUOTED_IDENTIFIER ON
|
|
|
|
|
GO
|
|
|
|
|
|
2016-11-14 09:42:59 +08:00
|
|
|
|
SET ANSI_PADDING ON
|
|
|
|
|
GO
|
|
|
|
|
|
2016-11-12 14:57:23 +08:00
|
|
|
|
CREATE TABLE [dbo].[Messages](
|
|
|
|
|
[ID] [int] IDENTITY(1,1) NOT NULL,
|
|
|
|
|
[Title] [nvarchar](50) NOT NULL,
|
|
|
|
|
[Content] [nvarchar](500) NOT NULL,
|
2016-11-12 20:52:48 +08:00
|
|
|
|
[From] [varchar](50) NOT NULL,
|
|
|
|
|
[To] [varchar](50) NOT NULL,
|
2016-11-12 14:57:23 +08:00
|
|
|
|
[SendTime] [datetime] NOT NULL,
|
|
|
|
|
[Status] [nvarchar](50) NOT NULL,
|
2016-11-15 15:00:17 +08:00
|
|
|
|
[Flag] [int] NOT NULL,
|
2016-11-14 09:42:59 +08:00
|
|
|
|
[IsDelete] [int] NOT NULL,
|
|
|
|
|
[Label] [nvarchar](50) NOT NULL,
|
2016-11-12 14:57:23 +08:00
|
|
|
|
CONSTRAINT [PK_Messages] PRIMARY KEY CLUSTERED
|
|
|
|
|
(
|
|
|
|
|
[ID] 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
|
2016-11-14 09:42:59 +08:00
|
|
|
|
|
|
|
|
|
SET ANSI_PADDING OFF
|
2016-11-15 15:00:17 +08:00
|
|
|
|
GO
|
|
|
|
|
|
|
|
|
|
ALTER TABLE [dbo].[Messages] ADD CONSTRAINT [DF_Messages_Mark] DEFAULT ((0)) FOR [Flag]
|
|
|
|
|
GO
|
|
|
|
|
|
|
|
|
|
ALTER TABLE [dbo].[Messages] ADD CONSTRAINT [DF_Messages_IsDelete] DEFAULT ((0)) FOR [IsDelete]
|
|
|
|
|
GO
|
|
|
|
|
|
|
|
|
|
ALTER TABLE [dbo].[Messages] ADD CONSTRAINT [DF_Messages_Label] DEFAULT ((0)) FOR [Label]
|
|
|
|
|
GO
|
2016-11-16 17:27:03 +08:00
|
|
|
|
|
2016-11-17 09:41:13 +08:00
|
|
|
|
/****** Object: Table [dbo].[Tasks] Script Date: 11/16/2016 15:40:02 ******/
|
|
|
|
|
SET ANSI_NULLS ON
|
|
|
|
|
GO
|
|
|
|
|
SET QUOTED_IDENTIFIER ON
|
|
|
|
|
GO
|
|
|
|
|
SET ANSI_PADDING ON
|
|
|
|
|
GO
|
|
|
|
|
CREATE TABLE [dbo].[Tasks](
|
|
|
|
|
[ID] [int] IDENTITY(1,1) NOT NULL,
|
|
|
|
|
[TaskName] [varchar](500) NOT NULL,
|
|
|
|
|
[AssignName] [varchar](50) NOT NULL,
|
|
|
|
|
[UserName] [varchar](50) NOT NULL,
|
|
|
|
|
[TaskTime] [int] NOT NULL,
|
|
|
|
|
[TaskProgress] [float] NOT NULL,
|
|
|
|
|
[AssignTime] [datetime] NOT NULL,
|
|
|
|
|
CONSTRAINT [PK_Tasks] PRIMARY KEY CLUSTERED
|
|
|
|
|
(
|
|
|
|
|
[ID] 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
|
|
|
|
|
SET ANSI_PADDING OFF
|
|
|
|
|
GO
|
|
|
|
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'任务名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tasks', @level2type=N'COLUMN',@level2name=N'TaskName'
|
|
|
|
|
GO
|
|
|
|
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'分配人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tasks', @level2type=N'COLUMN',@level2name=N'AssignName'
|
|
|
|
|
GO
|
|
|
|
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'完成任务人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tasks', @level2type=N'COLUMN',@level2name=N'UserName'
|
|
|
|
|
GO
|
|
|
|
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'任务所需时间(天)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tasks', @level2type=N'COLUMN',@level2name=N'TaskTime'
|
|
|
|
|
GO
|
|
|
|
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'完成进度' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tasks', @level2type=N'COLUMN',@level2name=N'TaskProgress'
|
|
|
|
|
GO
|
|
|
|
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'分配时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Tasks', @level2type=N'COLUMN',@level2name=N'AssignTime'
|
|
|
|
|
GO
|
2018-09-08 16:16:51 +08:00
|
|
|
|
|
|
|
|
|
/****** Object: Table [dbo].[RejectUsers] Script Date: 09/08/2018 15:34:25 ******/
|
|
|
|
|
SET ANSI_NULLS ON
|
|
|
|
|
GO
|
|
|
|
|
|
|
|
|
|
SET QUOTED_IDENTIFIER ON
|
|
|
|
|
GO
|
|
|
|
|
|
|
|
|
|
SET ANSI_PADDING ON
|
|
|
|
|
GO
|
|
|
|
|
|
|
|
|
|
CREATE TABLE [dbo].[RejectUsers](
|
|
|
|
|
[ID] [int] IDENTITY(1,1) NOT NULL,
|
|
|
|
|
[UserName] [varchar](50) NOT NULL,
|
|
|
|
|
[DisplayName] [nvarchar](50) NOT NULL,
|
|
|
|
|
[RegisterTime] [datetime] NOT NULL,
|
|
|
|
|
[RejectedBy] [varchar](50) NULL,
|
|
|
|
|
[RejectedTime] [datetime] NULL,
|
|
|
|
|
[RejectedReason] [nvarchar](50) NULL,
|
|
|
|
|
CONSTRAINT [PK_RejectUsers] PRIMARY KEY CLUSTERED
|
|
|
|
|
(
|
|
|
|
|
[ID] 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
|
|
|
|
|
|
|
|
|
|
SET ANSI_PADDING OFF
|
|
|
|
|
GO
|
|
|
|
|
|
|
|
|
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户名' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RejectUsers', @level2type=N'COLUMN',@level2name=N'UserName'
|
|
|
|
|
GO
|
|
|
|
|
|
|
|
|
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'显示名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RejectUsers', @level2type=N'COLUMN',@level2name=N'DisplayName'
|
|
|
|
|
GO
|
|
|
|
|
|
|
|
|
|
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'注册时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'RejectUsers', @level2type=N'COLUMN',@level2name=N'RegisterTime'
|
|
|
|
|
GO
|