if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[员工权限表]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[员工权限表]
GO

CREATE TABLE [dbo].[员工权限表] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[cid] [int] NULL ,
	[权限组名称] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[权限] [varchar] (500) COLLATE Chinese_PRC_CI_AS NULL ,
	[序号] [int] NULL ,
	[部门权限] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[员工权限] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[员工权限表] WITH NOCHECK ADD 
	CONSTRAINT [DF_员工权限表_cid] DEFAULT ((-1)) FOR [cid],
	CONSTRAINT [DF_员工权限表_权限组名称] DEFAULT ((-1)) FOR [权限组名称],
	CONSTRAINT [DF_员工权限表_权限] DEFAULT ((-1)) FOR [权限],
	CONSTRAINT [DF_员工权限表_序号] DEFAULT (0) FOR [序号],
	CONSTRAINT [DF_员工权限表_部门权限] DEFAULT (',') FOR [部门权限],
	CONSTRAINT [DF_员工权限表_员工权限] DEFAULT (',') FOR [员工权限],
	CONSTRAINT [PK_员工权限表] PRIMARY KEY  NONCLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 
GO

