USE [Chloe]
GO
/****** Object: Table [dbo].[Sys_Department] Script Date: 2016/12/11 15:05:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Sys_Department](
[Id] [varchar](50) NOT NULL,
[EnCode] [nvarchar](50) NULL,
[Name] [nvarchar](50) NULL,
[Manager] [nvarchar](50) NULL,
[Telephone] [nvarchar](50) NULL,
[MobilePhone] [nvarchar](50) NULL,
[WeChat] [nvarchar](50) NULL,
[Fax] [nvarchar](50) NULL,
[Email] [nvarchar](50) NULL,
[SortCode] [int] NULL,
[Description] [nvarchar](500) NULL,
[CreationTime] [datetime] NOT NULL,
[CreateUserId] [varchar](50) NULL,
[IsDeleted] [bit] NOT NULL,
[DeletionTime] [datetime] NULL,
[DeleteUserId] [varchar](50) NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object: Table [dbo].[Sys_Duty] Script Date: 2016/12/11 15:05:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Sys_Duty](
[Id] [varchar](50) NOT NULL,
[Name] [nvarchar](50) NULL,
[DepartmentId] [varchar](50) NULL,
[SortCode] [int] NULL,
[CreationTime] [datetime] NOT NULL,
[CreateUserId] [varchar](50) NULL,
[IsDeleted] [bit] NOT NULL,
[DeletionTime] [datetime] NULL,
[DeleteUserId] [varchar](50) NULL,
CONSTRAINT [PK_Sys_Duty] 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
/****** Object: Table [dbo].[Sys_Log] Script Date: 2016/12/11 15:05:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Sys_Log](
[Id] [int] IDENTITY(1,1) NOT NULL,
[UserId] [varchar](50) NULL,
[RealName] [nvarchar](50) NULL,
[Type] [int] NOT NULL,
[IP] [nvarchar](50) NULL,
[IPAddress] [nvarchar](50) NULL,
[ModuleId] [nvarchar](50) NULL,
[ModuleName] [nvarchar](50) NULL,
[Result] [bit] NULL,
[Description] [nvarchar](500) NULL,
[CreationTime] [datetime] NOT NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object: Table [dbo].[Sys_Module] Script Date: 2016/12/11 15:05:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Sys_Module](
[Id] [varchar](50) NOT NULL,
[ParentId] [varchar](50) NULL,
[EnCode] [nvarchar](50) NULL,
[Name] [nvarchar](50) NULL,
[Icon] [nvarchar](50) NULL,
[UrlAddress] [nvarchar](500) NULL,
[OpenTarget] [nvarchar](50) NULL,
[IsMenu] [bit] NOT NULL,
[IsExpand] [bit] NOT NULL,
[IsPublic] [bit] NOT NULL,
[SortCode] [int] NULL,
[Description] [nvarchar](500) NULL,
[CreationTime] [datetime] NOT NULL,
[CreateUserId] [varchar](50) NULL,
[LastModifyTime] [datetime] NULL,
[LastModifyUserId] [varchar](50) NULL,
[IsEnabled] [bit] NOT NULL,
[IsDeleted] [bit] NOT NULL,
[DeleteTime] [datetime] NULL,
[DeleteUserId] [varchar](50) NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object: Table [dbo].[Sys_Role] Script Date: 2016/12/11 15:05:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Sys_Role](
[Id] [varchar](50) NOT NULL,
[EnCode] [varchar](50) NULL,
[Name] [varchar](50) NULL,
[SortCode] [int] NULL,
[IsEnabled] [bit] NULL,
[Description] [varchar](500) NULL,
[CreationTime] [datetime] NULL,
[CreateUserId] [varchar](50) NULL,
[LastModifyTime] [datetime] NULL,
[LastModifyUserId] [varchar](50) NULL,
[IsDeleted] [bit] NULL,
[DeletionTime] [datetime] NULL,
[DeleteUserId] [varchar](500) NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** Object: Table [dbo].[Sys_RoleAuthorize] Script Date: 2016/12/11 15:05:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Sys_RoleAuthorize](
[Id] [varchar](50) NOT NULL,
[ModuleId] [varchar](50) NULL,
[RoleId] [�