你的位置:首页 > ASP.net教程

[ASP.net教程]【无私分享:从入门到精通ASP.NET MVC】从0开始,一起搭框架、做项目(5.3) 登录功能的实现,丰富数据表、建立关联


声明:本系列为原创,分享本人现用框架,未经本人同意,禁止转载!http://yuangang.cnblogs.com

希望大家好好一步一步做,所有的技术和项目,都毫无保留的提供,希望大家能自己跟着做一套,还有,请大家放心,只要大家喜欢,有人需要,绝对不会烂尾,我会坚持写完~

如果你感觉文章有帮助,点一下推荐,让更多的朋友参与进来,也是对本人劳动成果的鼓励,谢谢大家!由于还要工作,所以基本都是牺牲午休时间来写博客的,写博客呢不是简单的Ctrl+C、Ctrl+V,我是要挨着做一遍的,这也是对大家负责,所以有些时候更新不及时,或者问题没有及时解答,希望大家谅解,再次感谢大家!!

因为我引用了许多以前积累的类库,所以有些东西是重复的(后来更新),有些东西是过时的,包括我写的代码,希望大家不要纯粹的复制,取其精华去其糟粕>_<。

在项目最后我会把每个部分、每个阶段的Demo提供下载给大家,其实,如果跟着做完,并且剔除掉了我代码不好的地方,你也不需要这些Demo了,是吧~

索引

 【无私分享:从入门到精通ASP.NET MVC】从0开始,一起搭框架、做项目(1)搭建MVC环境 注册区域

 【无私分享:从入门到精通ASP.NET MVC】从0开始,一起搭框架、做项目(2)创建数据库和数据模型

 【无私分享:从入门到精通ASP.NET MVC】从0开始,一起搭框架、做项目(3)公共基础数据操作类 RepositoryBase

 【无私分享:从入门到精通ASP.NET MVC】从0开始,一起搭框架、做项目(4)对前面的一些问题汇总和总结

 【无私分享:从入门到精通ASP.NET MVC】从0开始,一起搭框架、做项目(5.1) 登录功能的实现,开始接触Spring IOC、DI

【无私分享:从入门到精通ASP.NET MVC】从0开始,一起搭框架、做项目(5.2) 登录功能的实现,接口注入、log4net的使用

简述

今天新建几个表,建立它们之间的关联

项目准备

我们用的工具是:VS 2013 + SqlServer 2012 + IIS7.5

希望大家对ASP.NET MVC有一个初步的理解,理论性的东西我们不做过多解释,有些地方不理解也没关系,会用就行了,用的多了,用的久了,自然就理解了。

项目开始

一、新增数据表

数据库名:wkmvc_db
 
表名:SYS_CODE
 
序号列名数据类型长度小数位标识主键外键允许空默认值说明
1IDint40  主键ID
2CODETYPEnvarchar500    代码类型
3NAMETEXTnvarchar2000    代码显示文本
4CODEVALUEnvarchar1000    代码值
5SHOWORDERint40    排序值
6ISCODEint40    是否为编码(0否1是)
7REMARKnvarchar20000    备注
8CREATEDATEdatetime83    创建时间
9CREATEUSERnvarchar360    创建者
10UPDATEDATEdatetime83    修改时间
11UPDATEUSERnvarchar360    修改者
12PARENTIDint40    父级ID(使用时注意ISCODE为0)

 
表名:SYS_CODE_AREA
 
序号列名数据类型长度小数位标识主键外键允许空默认值说明
1IDvarchar500   ID
2PIDvarchar500    上级ID
3NAMEnvarchar2000    名称
4LEVELStinyint10    级别

 
表名:SYS_DEPARTMENT
 
序号列名数据类型长度小数位标识主键外键允许空默认值说明
1IDnvarchar360   主键ID
2CODEnvarchar1000    部门编号,横向增长
3NAMEnvarchar2000    部门名称
4BUSINESSLEVELint40    业务等级
5SHOWORDERint40    部门排序
6CREATEPERIDnvarchar360    创建者编号
7CREATEDATEdate30    创建时间
8PARENTIDnvarchar360    上级部门ID
9UPDATEDATEdate30    修改时间
10UPDATEUSERnvarchar360    修改人
11PARENTCODEnvarchar1000     

 
表名:SYS_MODULE
 
序号列名数据类型长度小数位标识主键外键允许空默认值说明
1IDint40  主键ID
2FK_BELONGSYSTEMnvarchar360   所属系统
3PARENTIDint40    父ID,级联
4NAMEnvarchar500    显示名称
5ALIASnvarchar500    别名
6MODULETYPEint40    模块类型
7ICONnvarchar2000    自定义图标
8MODULEPATHnvarchar5000    连接路径
9ISSHOWint40    是否展示(0否1是)
10SHOWORDERint40    排序值
11LEVELSint40    级别
12IsVillagebit10     
13CREATEUSERnvarchar500    创建者
14CREATEDATEdatetime83    创建时间
15UPDATEUSERnvarchar360    修改者
16UPDATEDATEdatetime83    修改时间

 
表名:SYS_PERMISSION
 
序号列名数据类型长度小数位标识主键外键允许空默认值说明
1IDint40  主键ID
2MODULEIDint40   模块ID
3NAMEnvarchar360    授权名称
4PERVALUEnvarchar1000    权限值(对应SYS_CODE表)
5ICONnvarchar500    图标ID
6SHOWORDERint40    显示排序
7CREATEDATEdate30    创建时间
8CREATEUSERnvarchar360    创建者
9UPDATEDATEdate30    修改时间
10UPDATEUSERnvarchar360    修改者

 
表名:SYS_POST
 
序号列名数据类型长度小数位标识主键外键允许空默认值说明
1IDnvarchar360   主键ID
2POSTNAMEnvarchar1000    岗位名称
3POSTTYPEnvarchar360    岗位类型
4REMARKnvarchar5000    岗位备注
5SHOWORDERint40    排序
6CREATEUSERIDint40    创建者ID
7CREATEDATEdatetime83    创建时间
8UPDATEDATEdatetime83    修改时间
9UPDATEUSERnvarchar360    修改者

 
表名:SYS_POST_DEPARTMENT
 
序号列名数据类型长度小数位标识主键外键允许空默认值说明
1IDint40  主键ID
2FK_DEPARTMENT_IDnvarchar360   部门ID
3FK_POST_IDnvarchar360    岗位ID

 
表名:SYS_POST_USER
 
序号列名数据类型长度小数位标识主键外键允许空默认值说明
1IDint40  主键ID
2FK_USERIDint40    用户ID
3FK_POST_DEPARTMENTIDint40   岗位部门ID

表名:SYS_ROLE
 
序号列名数据类型长度小数位标识主键外键允许空默认值说明
1IDint40  主键ID
2ROLENAMEnvarchar500    角色名称
3ISCUSTOMint40    是否自定义(0否1是)
4ROLEDESCnvarchar10000    角色说明
5CREATEPERIDnvarchar360    创建者ID(关联SYS_USER的ID)
6CREATEDATEdatetime83    创建时间
7UPDATEDATEdatetime83    修改时间
8UPDATEUSERnvarchar360    修改者

 
表名:SYS_ROLE_PERMISSION
 
序号列名数据类型长度小数位标识主键外键允许空默认值说明
1IDint40  主键ID
2ROLEIDint40    角色ID
3PERMISSIONIDint40   授权ID

 
表名:SYS_SYSTEM
 
序号列名数据类型长度小数位标识主键外键允许空默认值说明
1IDnvarchar360   主键ID
2NAMEnvarchar2000    系统名称
3SITEURLnvarchar5000    系统地址
4IS_LOGINtinyint10    是否允许登录系统(0否1是)
5DOCKUSERnvarchar1000    系统对接用户名
6DOCKPASSnvarchar2000    系统对接密码
7CREATEDATEdate30    系统创建时间
8REMARKnvarchar20000    备注

 
表名:SYS_USER_DEPARTMENT
 
序号列名数据类型长度小数位标识主键外键允许空默认值说明
1IDint40  主键ID
2USER_IDint40    用户ID
3DEPARTMENT_IDnvarchar360   部门ID

 
表名:SYS_USER_PERMISSION
 
序号列名数据类型长度小数位标识主键外键允许空默认值说明
1IDint40  主键ID
2FK_USERIDint40    用户ID
3FK_PERMISSIONIDint40   授权ID

 
表名:SYS_USER_ROLE
 
序号列名数据类型长度小数位标识主键外键允许空默认值说明
1IDint40  主键ID
2FK_USERIDint40    用户ID
3FK_ROLEIDint40   角色ID

 
表名:SYS_USERINFO
 
序号列名数据类型长度小数位标识主键外键允许空默认值说明
1IDint40   主键ID
2USERIDint40   用户ID,外键
3POSTCODEint40    职务,编码
4PHONEnvarchar2000    手机号码
5OFFICEPHONEnvarchar2000    办公电话
6EMAILADDRESSnvarchar2000    Email
7SECONDPHONEnvarchar2000    第二手机号码
8WORKCODEint40    在岗状态,编码
9SEXCODEint40    性别,编码
10BIRTHDAYdatetime83    出生日期
11NATIONCODEint40    民族,编码
12IDNUMBERnvarchar180    身份证号码
13MARRYCODEint40    婚姻状况,编码
14IDENTITYCODEint40    政治面貌,编码
15HomeTownnvarchar2000    籍贯,编码(关联至TBCode_Area的CodeValue)
16ACCOUNTLOCATIONnvarchar2000    户籍所在地
17XUELIint40    学历,编码
18ZHICHENGint40    职称,编码
19GRADUATIONSCHOOLnvarchar2000    毕业院校
20SPECIALTYnvarchar2000    专业
21PHOTOOLDNAMEnvarchar2000    照片原文件名
22PHOTONEWNAMEnvarchar2000    照片新文件名
23PHOTOTYPEnvarchar2000    照片格式
24RESUMEOLDNAMEnvarchar2000    简历原文件名
25RESUMENEWNAMEnvarchar2000    简历新文件名
26RESUMETYPEnvarchar2000    简历格式
27HuJiSuoZaiDinvarchar2000    户籍所在地,编码(关联至TBCode_Area的CodeValue)
28HUJIPAICHUSUOnvarchar2000    户籍所在派出所
29WORKDATEdatetime83    工作时间
30JINRUDATEdatetime83    加入公司时间
31CARNUMBERnvarchar2000    车牌号
32QQnvarchar150    QQ号
33WEBCHATOPENIDnvarchar2000    微信公众账号对应的OpenID
34CREATEDATEdatetime83    创建时间
35CREATEUSERnvarchar360    创建者
36UPDATEDATEdatetime83    修改时间
37UPDATEUSERnvarchar360    修改者


 

T-SQL:

 1 USE [wkmvc_db] 2 GO 3 /****** Object: Table [dbo].[SYS_CODE]  Script Date: 2016/5/17 9:30:01 ******/ 4 SET ANSI_NULLS ON 5 GO 6 SET QUOTED_IDENTIFIER ON 7 GO 8 CREATE TABLE [dbo].[SYS_CODE]( 9   [ID] [int] IDENTITY(1,1) NOT NULL, 10   [CODETYPE] [nvarchar](50) NULL, 11   [NAMETEXT] [nvarchar](200) NULL, 12   [CODEVALUE] [nvarchar](100) NULL, 13   [SHOWORDER] [int] NULL, 14   [ISCODE] [int] NULL, 15   [REMARK] [nvarchar](2000) NULL, 16   [CREATEDATE] [datetime] NULL, 17   [CREATEUSER] [nvarchar](36) NULL, 18   [UPDATEDATE] [datetime] NULL, 19   [UPDATEUSER] [nvarchar](36) NULL, 20   [PARENTID] [int] NULL, 21 CONSTRAINT [PK_SYS_CODE] PRIMARY KEY CLUSTERED  22 ( 23   [ID] ASC 24 )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] 25 ) ON [PRIMARY] 26  27 GO 28 /****** Object: Table [dbo].[SYS_CODE_AREA]  Script Date: 2016/5/17 9:30:01 ******/ 29 SET ANSI_NULLS ON 30 GO 31 SET QUOTED_IDENTIFIER ON 32 GO 33 SET ANSI_PADDING ON 34 GO 35 CREATE TABLE [dbo].[SYS_CODE_AREA]( 36   [ID] [varchar](50) NOT NULL, 37   [PID] [varchar](50) NOT NULL, 38   [NAME] [nvarchar](200) NULL, 39   [LEVELS] [tinyint] NOT NULL, 40 CONSTRAINT [PK_SYS_CODE_AREA] PRIMARY KEY CLUSTERED  41 ( 42   [ID] ASC 43 )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] 44 ) ON [PRIMARY] 45  46 GO 47 SET ANSI_PADDING OFF 48 GO 49 /****** Object: Table [dbo].[SYS_DEPARTMENT]  Script Date: 2016/5/17 9:30:01 ******/ 50 SET ANSI_NULLS ON 51 GO 52 SET QUOTED_IDENTIFIER ON 53 GO 54 CREATE TABLE [dbo].[SYS_DEPARTMENT]( 55   [ID] [nvarchar](36) NOT NULL, 56   [CODE] [nvarchar](100) NULL, 57   [NAME] [nvarchar](200) NULL, 58   [BUSINESSLEVEL] [int] NULL, 59   [SHOWORDER] [int] NULL, 60   [CREATEPERID] [nvarchar](36) NULL, 61   [CREATEDATE] [date] NULL, 62   [PARENTID] [nvarchar](36) NULL, 63   [UPDATEDATE] [date] NULL, 64   [UPDATEUSER] [nvarchar](36) NULL, 65   [PARENTCODE] [nvarchar](100) NULL, 66 CONSTRAINT [PK_SYS_DEPARTMENT] PRIMARY KEY CLUSTERED  67 ( 68   [ID] ASC 69 )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] 70 ) ON [PRIMARY] 71  72 GO 73 /****** Object: Table [dbo].[SYS_MODULE]  Script Date: 2016/5/17 9:30:01 ******/ 74 SET ANSI_NULLS ON 75 GO 76 SET QUOTED_IDENTIFIER ON 77 GO 78 CREATE TABLE [dbo].[SYS_MODULE]( 79   [ID] [int] IDENTITY(1,1) NOT NULL, 80   [FK_BELONGSYSTEM] [nvarchar](36) NOT NULL, 81   [PARENTID] [int] NOT NULL, 82   [NAME] [nvarchar](50) NULL, 83   [ALIAS] [nvarchar](50) NULL, 84   [MODULETYPE] [int] NOT NULL, 85   [ICON] [nvarchar](200) NULL, 86   [MODULEPATH] [nvarchar](500) NULL, 87   [ISSHOW] [int] NOT NULL, 88   [SHOWORDER] [int] NOT NULL, 89   [LEVELS] [int] NOT NULL, 90   [IsVillage] [bit] NOT NULL, 91   [CREATEUSER] [nvarchar](50) NULL, 92   [CREATEDATE] [datetime] NULL, 93   [UPDATEUSER] [nvarchar](36) NULL, 94   [UPDATEDATE] [datetime] NULL, 95 CONSTRAINT [PK_SYS_MODULE] PRIMARY KEY CLUSTERED  96 ( 97   [ID] ASC 98 )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] 99 ) ON [PRIMARY]100 101 GO102 /****** Object: Table [dbo].[SYS_PERMISSION]  Script Date: 2016/5/17 9:30:01 ******/103 SET ANSI_NULLS ON104 GO105 SET QUOTED_IDENTIFIER ON106 GO107 CREATE TABLE [dbo].[SYS_PERMISSION](108   [ID] [int] IDENTITY(1,1) NOT NULL,109   [MODULEID] [int] NOT NULL,110   [NAME] [nvarchar](36) NULL,111   [PERVALUE] [nvarchar](100) NULL,112   [ICON] [nvarchar](50) NULL,113   [SHOWORDER] [int] NULL,114   [CREATEDATE] [date] NULL,115   [CREATEUSER] [nvarchar](36) NULL,116   [UPDATEDATE] [date] NULL,117   [UPDATEUSER] [nvarchar](36) NULL,118 CONSTRAINT [PK_SYS_PERMISSION] PRIMARY KEY CLUSTERED 119 (120   [ID] ASC121 )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]122 ) ON [PRIMARY]123 124 GO125 /****** Object: Table [dbo].[SYS_POST]  Script Date: 2016/5/17 9:30:01 ******/126 SET ANSI_NULLS ON127 GO128 SET QUOTED_IDENTIFIER ON129 GO130 CREATE TABLE [dbo].[SYS_POST](131   [ID] [nvarchar](36) NOT NULL,132   [POSTNAME] [nvarchar](100) NULL,133   [POSTTYPE] [nvarchar](36) NOT NULL,134   [REMARK] [nvarchar](500) NULL,135   [SHOWORDER] [int] NULL,136   [CREATEUSERID] [int] NULL,137   [CREATEDATE] [datetime] NOT NULL,138   [UPDATEDATE] [datetime] NULL,139   [UPDATEUSER] [nvarchar](36) NULL,140 CONSTRAINT [PK_SYS_POST] PRIMARY KEY CLUSTERED 141 (142   [ID] ASC143 )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]144 ) ON [PRIMARY]145 146 GO147 /****** Object: Table [dbo].[SYS_POST_DEPARTMENT]  Script Date: 2016/5/17 9:30:01 ******/148 SET ANSI_NULLS ON149 GO150 SET QUOTED_IDENTIFIER ON151 GO152 CREATE TABLE [dbo].[SYS_POST_DEPARTMENT](153   [ID] [int] IDENTITY(1,1) NOT NULL,154   [FK_DEPARTMENT_ID] [nvarchar](36) NOT NULL,155   [FK_POST_ID] [nvarchar](36) NOT NULL,156 CONSTRAINT [PK_SYS_POST_DEPARTMENT] PRIMARY KEY CLUSTERED 157 (158   [ID] ASC159 )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]160 ) ON [PRIMARY]161 162 GO163 /****** Object: Table [dbo].[SYS_POST_USER]  Script Date: 2016/5/17 9:30:01 ******/164 SET ANSI_NULLS ON165 GO166 SET QUOTED_IDENTIFIER ON167 GO168 CREATE TABLE [dbo].[SYS_POST_USER](169   [ID] [int] IDENTITY(1,1) NOT NULL,170   [FK_USERID] [int] NOT NULL,171   [FK_POST_DEPARTMENTID] [int] NOT NULL,172 CONSTRAINT [PK_SYS_POST_USER] PRIMARY KEY CLUSTERED 173 (174   [ID] ASC175 )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]176 ) ON [PRIMARY]177 178 GO179 /****** Object: Table [dbo].[SYS_ROLE]  Script Date: 2016/5/17 9:30:01 ******/180 SET ANSI_NULLS ON181 GO182 SET QUOTED_IDENTIFIER ON183 GO184 CREATE TABLE [dbo].[SYS_ROLE](185   [ID] [int] IDENTITY(1,1) NOT NULL,186   [ROLENAME] [nvarchar](50) NULL,187   [ISCUSTOM] [int] NOT NULL,188   [ROLEDESC] [nvarchar](1000) NULL,189   [CREATEPERID] [nvarchar](36) NOT NULL,190   [CREATEDATE] [datetime] NOT NULL,191   [UPDATEDATE] [datetime] NOT NULL,192   [UPDATEUSER] [nvarchar](36) NULL,193 CONSTRAINT [PK_SYS_ROLE] PRIMARY KEY CLUSTERED 194 (195   [ID] ASC196 )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]197 ) ON [PRIMARY]198 199 GO200 /****** Object: Table [dbo].[SYS_ROLE_PERMISSION]  Script Date: 2016/5/17 9:30:01 ******/201 SET ANSI_NULLS ON202 GO203 SET QUOTED_IDENTIFIER ON204 GO205 CREATE TABLE [dbo].[SYS_ROLE_PERMISSION](206   [ID] [int] IDENTITY(1,1) NOT NULL,207   [ROLEID] [int] NOT NULL,208   [PERMISSIONID] [int] NOT NULL,209 CONSTRAINT [PK_SYS_ROLE_PERMISSION] PRIMARY KEY CLUSTERED 210 (211   [ID] ASC212 )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]213 ) ON [PRIMARY]214 215 GO216 /****** Object: Table [dbo].[SYS_SYSTEM]  Script Date: 2016/5/17 9:30:01 ******/217 SET ANSI_NULLS ON218 GO219 SET QUOTED_IDENTIFIER ON220 GO221 CREATE TABLE [dbo].[SYS_SYSTEM](222   [ID] [nvarchar](36) NOT NULL,223   [NAME] [nvarchar](200) NULL,224   [SITEURL] [nvarchar](500) NULL,225   [IS_LOGIN] [tinyint] NULL,226   [DOCKUSER] [nvarchar](100) NULL,227   [DOCKPASS] [nvarchar](200) NULL,228   [CREATEDATE] [date] NULL,229   [REMARK] [nvarchar](2000) NULL,230 CONSTRAINT [PK_SYS_SYSTEM] PRIMARY KEY CLUSTERED 231 (232   [ID] ASC233 )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]234 ) ON [PRIMARY]235 236 GO237 /****** Object: Table [dbo].[SYS_USER_DEPARTMENT]  Script Date: 2016/5/17 9:30:01 ******/238 SET ANSI_NULLS ON239 GO240 SET QUOTED_IDENTIFIER ON241 GO242 CREATE TABLE [dbo].[SYS_USER_DEPARTMENT](243   [ID] [int] IDENTITY(1,1) NOT NULL,244   [USER_ID] [int] NOT NULL,245   [DEPARTMENT_ID] [nvarchar](36) NOT NULL,246 CONSTRAINT [PK_SYS_USER_DEPARTMENT] PRIMARY KEY CLUSTERED 247 (248   [ID] ASC249 )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]250 ) ON [PRIMARY]251 252 GO253 /****** Object: Table [dbo].[SYS_USER_PERMISSION]  Script Date: 2016/5/17 9:30:01 ******/254 SET ANSI_NULLS ON255 GO256 SET QUOTED_IDENTIFIER ON257 GO258 CREATE TABLE [dbo].[SYS_USER_PERMISSION](259   [ID] [int] IDENTITY(1,1) NOT NULL,260   [FK_USERID] [int] NOT NULL,261   [FK_PERMISSIONID] [int] NOT NULL,262 CONSTRAINT [PK_SYS_USER_PERMISSION] PRIMARY KEY CLUSTERED 263 (264   [ID] ASC265 )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]266 ) ON [PRIMARY]267 268 GO269 /****** Object: Table [dbo].[SYS_USER_ROLE]  Script Date: 2016/5/17 9:30:01 ******/270 SET ANSI_NULLS ON271 GO272 SET QUOTED_IDENTIFIER ON273 GO274 CREATE TABLE [dbo].[SYS_USER_ROLE](275   [ID] [int] IDENTITY(1,1) NOT NULL,276   [FK_USERID] [int] NOT NULL,277   [FK_ROLEID] [int] NOT NULL,278 CONSTRAINT [PK_SYS_USER_ROLE] PRIMARY KEY CLUSTERED 279 (280   [ID] ASC281 )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]282 ) ON [PRIMARY]283 284 GO285 /****** Object: Table [dbo].[SYS_USERINFO]  Script Date: 2016/5/17 9:30:01 ******/286 SET ANSI_NULLS ON287 GO288 SET QUOTED_IDENTIFIER ON289 GO290 CREATE TABLE [dbo].[SYS_USERINFO](291   [ID] [int] NOT NULL,292   [USERID] [int] NOT NULL,293   [POSTCODE] [int] NULL,294   [PHONE] [nvarchar](200) NULL,295   [OFFICEPHONE] [nvarchar](200) NULL,296   [EMAILADDRESS] [nvarchar](200) NULL,297   [SECONDPHONE] [nvarchar](200) NULL,298   [WORKCODE] [int] NULL,299   [SEXCODE] [int] NULL,300   [BIRTHDAY] [datetime] NULL,301   [NATIONCODE] [int] NULL,302   [IDNUMBER] [nvarchar](18) NULL,303   [MARRYCODE] [int] NULL,304   [IDENTITYCODE] [int] NULL,305   [HomeTown] [nvarchar](200) NULL,306   [ACCOUNTLOCATION] [nvarchar](200) NULL,307   [XUELI] [int] NULL,308   [ZHICHENG] [int] NULL,309   [GRADUATIONSCHOOL] [nvarchar](200) NULL,310   [SPECIALTY] [nvarchar](200) NULL,311   [PHOTOOLDNAME] [nvarchar](200) NULL,312   [PHOTONEWNAME] [nvarchar](200) NULL,313   [PHOTOTYPE] [nvarchar](200) NULL,314   [RESUMEOLDNAME] [nvarchar](200) NULL,315   [RESUMENEWNAME] [nvarchar](200) NULL,316   [RESUMETYPE] [nvarchar](200) NULL,317   [HuJiSuoZaiDi] [nvarchar](200) NULL,318   [HUJIPAICHUSUO] [nvarchar](200) NULL,319   [WORKDATE] [datetime] NULL,320   [JINRUDATE] [datetime] NULL,321   [CARNUMBER] [nvarchar](200) NULL,322   [QQ] [nvarchar](15) NULL,323   [WEBCHATOPENID] [nvarchar](200) NULL,324   [CREATEDATE] [datetime] NULL,325   [CREATEUSER] [nvarchar](36) NULL,326   [UPDATEDATE] [datetime] NULL,327   [UPDATEUSER] [nvarchar](36) NULL,328 CONSTRAINT [PK_SYS_USERINFO] PRIMARY KEY CLUSTERED 329 (330   [ID] ASC331 )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]332 ) ON [PRIMARY]333 334 GO335 ALTER TABLE [dbo].[SYS_MODULE] WITH CHECK ADD CONSTRAINT [FK_SYS_MODULE_SYSTEMID] FOREIGN KEY([FK_BELONGSYSTEM])336 REFERENCES [dbo].[SYS_SYSTEM] ([ID])337 GO338 ALTER TABLE [dbo].[SYS_MODULE] CHECK CONSTRAINT [FK_SYS_MODULE_SYSTEMID]339 GO340 ALTER TABLE [dbo].[SYS_PERMISSION] WITH CHECK ADD CONSTRAINT [FK_SYS_PERMISSION_MODULEID] FOREIGN KEY([MODULEID])341 REFERENCES [dbo].[SYS_MODULE] ([ID])342 GO343 ALTER TABLE [dbo].[SYS_PERMISSION] CHECK CONSTRAINT [FK_SYS_PERMISSION_MODULEID]344 GO345 ALTER TABLE [dbo].[SYS_POST_DEPARTMENT] WITH CHECK ADD CONSTRAINT [FK_SYS_POST_DEPARTMENT_DPTID] FOREIGN KEY([FK_DEPARTMENT_ID])346 REFERENCES [dbo].[SYS_DEPARTMENT] ([ID])347 GO348 ALTER TABLE [dbo].[SYS_POST_DEPARTMENT] CHECK CONSTRAINT [FK_SYS_POST_DEPARTMENT_DPTID]349 GO350 ALTER TABLE [dbo].[SYS_POST_DEPARTMENT] WITH CHECK ADD CONSTRAINT [FK_SYS_POST_DEPARTMENT_POSTID] FOREIGN KEY([FK_POST_ID])351 REFERENCES [dbo].[SYS_POST] ([ID])352 GO353 ALTER TABLE [dbo].[SYS_POST_DEPARTMENT] CHECK CONSTRAINT [FK_SYS_POST_DEPARTMENT_POSTID]354 GO355 ALTER TABLE [dbo].[SYS_POST_USER] WITH CHECK ADD CONSTRAINT [FK_SYS_POST_USER_POSTDPTID] FOREIGN KEY([FK_POST_DEPARTMENTID])356 REFERENCES [dbo].[SYS_POST_DEPARTMENT] ([ID])357 GO358 ALTER TABLE [dbo].[SYS_POST_USER] CHECK CONSTRAINT [FK_SYS_POST_USER_POSTDPTID]359 GO360 ALTER TABLE [dbo].[SYS_POST_USER] WITH CHECK ADD CONSTRAINT [FK_SYS_POST_USER_USERID] FOREIGN KEY([FK_USERID])361 REFERENCES [dbo].[SYS_USER] ([ID])362 GO363 ALTER TABLE [dbo].[SYS_POST_USER] CHECK CONSTRAINT [FK_SYS_POST_USER_USERID]364 GO365 ALTER TABLE [dbo].[SYS_ROLE_PERMISSION] WITH CHECK ADD CONSTRAINT [FK_SYS_ROLE_PERMISSION_PERID] FOREIGN KEY([PERMISSIONID])366 REFERENCES [dbo].[SYS_PERMISSION] ([ID])367 GO368 ALTER TABLE [dbo].[SYS_ROLE_PERMISSION] CHECK CONSTRAINT [FK_SYS_ROLE_PERMISSION_PERID]369 GO370 ALTER TABLE [dbo].[SYS_ROLE_PERMISSION] WITH CHECK ADD CONSTRAINT [FK_SYS_ROLE_PERMISSION_ROLEID] FOREIGN KEY([ROLEID])371 REFERENCES [dbo].[SYS_ROLE] ([ID])372 GO373 ALTER TABLE [dbo].[SYS_ROLE_PERMISSION] CHECK CONSTRAINT [FK_SYS_ROLE_PERMISSION_ROLEID]374 GO375 ALTER TABLE [dbo].[SYS_USER_DEPARTMENT] WITH CHECK ADD CONSTRAINT [FK_SYS_USER_DEPARTMENT_DPTID] FOREIGN KEY([DEPARTMENT_ID])376 REFERENCES [dbo].[SYS_DEPARTMENT] ([ID])377 GO378 ALTER TABLE [dbo].[SYS_USER_DEPARTMENT] CHECK CONSTRAINT [FK_SYS_USER_DEPARTMENT_DPTID]379 GO380 ALTER TABLE [dbo].[SYS_USER_DEPARTMENT] WITH CHECK ADD CONSTRAINT [FK_SYS_USER_DEPARTMENT_USERID] FOREIGN KEY([USER_ID])381 REFERENCES [dbo].[SYS_USER] ([ID])382 GO383 ALTER TABLE [dbo].[SYS_USER_DEPARTMENT] CHECK CONSTRAINT [FK_SYS_USER_DEPARTMENT_USERID]384 GO385 ALTER TABLE [dbo].[SYS_USER_PERMISSION] WITH CHECK ADD CONSTRAINT [FK_SYS_USER_PERMISSION_PERID] FOREIGN KEY([FK_PERMISSIONID])386 REFERENCES [dbo].[SYS_PERMISSION] ([ID])387 GO388 ALTER TABLE [dbo].[SYS_USER_PERMISSION] CHECK CONSTRAINT [FK_SYS_USER_PERMISSION_PERID]389 GO390 ALTER TABLE [dbo].[SYS_USER_PERMISSION] WITH CHECK ADD CONSTRAINT [FK_SYS_USER_PERMISSION_USERID] FOREIGN KEY([FK_USERID])391 REFERENCES [dbo].[SYS_USER] ([ID])392 GO393 ALTER TABLE [dbo].[SYS_USER_PERMISSION] CHECK CONSTRAINT [FK_SYS_USER_PERMISSION_USERID]394 GO395 ALTER TABLE [dbo].[SYS_USER_ROLE] WITH CHECK ADD CONSTRAINT [FK_SYS_USER_ROLE_ROLEID] FOREIGN KEY([FK_ROLEID])396 REFERENCES [dbo].[SYS_ROLE] ([ID])397 GO398 ALTER TABLE [dbo].[SYS_USER_ROLE] CHECK CONSTRAINT [FK_SYS_USER_ROLE_ROLEID]399 GO400 ALTER TABLE [dbo].[SYS_USER_ROLE] WITH CHECK ADD CONSTRAINT [FK_SYS_USER_ROLE_USERID] FOREIGN KEY([FK_USERID])401 REFERENCES [dbo].[SYS_USER] ([ID])402 GO403 ALTER TABLE [dbo].[SYS_USER_ROLE] CHECK CONSTRAINT [FK_SYS_USER_ROLE_USERID]404 GO405 ALTER TABLE [dbo].[SYS_USERINFO] WITH CHECK ADD CONSTRAINT [FK_SYS_USERINFO_SYSUSERID] FOREIGN KEY([USERID])406 REFERENCES [dbo].[SYS_USER] ([ID])407 GO408 ALTER TABLE [dbo].[SYS_USERINFO] CHECK CONSTRAINT [FK_SYS_USERINFO_SYSUSERID]409 GO410 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_CODE', @level2type=N'COLUMN',@level2name=N'ID'411 GO412 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'代码类型' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_CODE', @level2type=N'COLUMN',@level2name=N'CODETYPE'413 GO414 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'代码显示文本' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_CODE', @level2type=N'COLUMN',@level2name=N'NAMETEXT'415 GO416 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'代码值' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_CODE', @level2type=N'COLUMN',@level2name=N'CODEVALUE'417 GO418 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'排序值' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_CODE', @level2type=N'COLUMN',@level2name=N'SHOWORDER'419 GO420 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否为编码(0否1是)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_CODE', @level2type=N'COLUMN',@level2name=N'ISCODE'421 GO422 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_CODE', @level2type=N'COLUMN',@level2name=N'REMARK'423 GO424 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_CODE', @level2type=N'COLUMN',@level2name=N'CREATEDATE'425 GO426 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建者' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_CODE', @level2type=N'COLUMN',@level2name=N'CREATEUSER'427 GO428 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'修改时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_CODE', @level2type=N'COLUMN',@level2name=N'UPDATEDATE'429 GO430 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'修改者' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_CODE', @level2type=N'COLUMN',@level2name=N'UPDATEUSER'431 GO432 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'父级ID(使用时注意ISCODE为0)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_CODE', @level2type=N'COLUMN',@level2name=N'PARENTID'433 GO434 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_CODE_AREA', @level2type=N'COLUMN',@level2name=N'ID'435 GO436 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'上级ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_CODE_AREA', @level2type=N'COLUMN',@level2name=N'PID'437 GO438 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_CODE_AREA', @level2type=N'COLUMN',@level2name=N'NAME'439 GO440 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'级别' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_CODE_AREA', @level2type=N'COLUMN',@level2name=N'LEVELS'441 GO442 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_DEPARTMENT', @level2type=N'COLUMN',@level2name=N'ID'443 GO444 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'部门编号,横向增长' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_DEPARTMENT', @level2type=N'COLUMN',@level2name=N'CODE'445 GO446 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'部门名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_DEPARTMENT', @level2type=N'COLUMN',@level2name=N'NAME'447 GO448 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'业务等级' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_DEPARTMENT', @level2type=N'COLUMN',@level2name=N'BUSINESSLEVEL'449 GO450 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'部门排序' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_DEPARTMENT', @level2type=N'COLUMN',@level2name=N'SHOWORDER'451 GO452 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建者编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_DEPARTMENT', @level2type=N'COLUMN',@level2name=N'CREATEPERID'453 GO454 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_DEPARTMENT', @level2type=N'COLUMN',@level2name=N'CREATEDATE'455 GO456 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'上级部门ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_DEPARTMENT', @level2type=N'COLUMN',@level2name=N'PARENTID'457 GO458 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'修改时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_DEPARTMENT', @level2type=N'COLUMN',@level2name=N'UPDATEDATE'459 GO460 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'修改人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_DEPARTMENT', @level2type=N'COLUMN',@level2name=N'UPDATEUSER'461 GO462 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_MODULE', @level2type=N'COLUMN',@level2name=N'ID'463 GO464 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'所属系统' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_MODULE', @level2type=N'COLUMN',@level2name=N'FK_BELONGSYSTEM'465 GO466 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'父ID,级联' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_MODULE', @level2type=N'COLUMN',@level2name=N'PARENTID'467 GO468 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'显示名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_MODULE', @level2type=N'COLUMN',@level2name=N'NAME'469 GO470 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'别名' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_MODULE', @level2type=N'COLUMN',@level2name=N'ALIAS'471 GO472 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'模块类型' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_MODULE', @level2type=N'COLUMN',@level2name=N'MODULETYPE'473 GO474 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'自定义图标' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_MODULE', @level2type=N'COLUMN',@level2name=N'ICON'475 GO476 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'连接路径' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_MODULE', @level2type=N'COLUMN',@level2name=N'MODULEPATH'477 GO478 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否展示(0否1是)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_MODULE', @level2type=N'COLUMN',@level2name=N'ISSHOW'479 GO480 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'排序值' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_MODULE', @level2type=N'COLUMN',@level2name=N'SHOWORDER'481 GO482 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'级别' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_MODULE', @level2type=N'COLUMN',@level2name=N'LEVELS'483 GO484 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建者' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_MODULE', @level2type=N'COLUMN',@level2name=N'CREATEUSER'485 GO486 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_MODULE', @level2type=N'COLUMN',@level2name=N'CREATEDATE'487 GO488 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'修改者' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_MODULE', @level2type=N'COLUMN',@level2name=N'UPDATEUSER'489 GO490 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'修改时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_MODULE', @level2type=N'COLUMN',@level2name=N'UPDATEDATE'491 GO492 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_PERMISSION', @level2type=N'COLUMN',@level2name=N'ID'493 GO494 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'模块ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_PERMISSION', @level2type=N'COLUMN',@level2name=N'MODULEID'495 GO496 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'授权名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_PERMISSION', @level2type=N'COLUMN',@level2name=N'NAME'497 GO498 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'权限值(对应SYS_CODE表)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_PERMISSION', @level2type=N'COLUMN',@level2name=N'PERVALUE'499 GO500 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'图标ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_PERMISSION', @level2type=N'COLUMN',@level2name=N'ICON'501 GO502 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'显示排序' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_PERMISSION', @level2type=N'COLUMN',@level2name=N'SHOWORDER'503 GO504 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_PERMISSION', @level2type=N'COLUMN',@level2name=N'CREATEDATE'505 GO506 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建者' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_PERMISSION', @level2type=N'COLUMN',@level2name=N'CREATEUSER'507 GO508 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'修改时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_PERMISSION', @level2type=N'COLUMN',@level2name=N'UPDATEDATE'509 GO510 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'修改者' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_PERMISSION', @level2type=N'COLUMN',@level2name=N'UPDATEUSER'511 GO512 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_POST', @level2type=N'COLUMN',@level2name=N'ID'513 GO514 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'岗位名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_POST', @level2type=N'COLUMN',@level2name=N'POSTNAME'515 GO516 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'岗位类型' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_POST', @level2type=N'COLUMN',@level2name=N'POSTTYPE'517 GO518 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'岗位备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_POST', @level2type=N'COLUMN',@level2name=N'REMARK'519 GO520 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'排序' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_POST', @level2type=N'COLUMN',@level2name=N'SHOWORDER'521 GO522 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建者ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_POST', @level2type=N'COLUMN',@level2name=N'CREATEUSERID'523 GO524 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_POST', @level2type=N'COLUMN',@level2name=N'CREATEDATE'525 GO526 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'修改时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_POST', @level2type=N'COLUMN',@level2name=N'UPDATEDATE'527 GO528 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'修改者' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_POST', @level2type=N'COLUMN',@level2name=N'UPDATEUSER'529 GO530 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_POST_DEPARTMENT', @level2type=N'COLUMN',@level2name=N'ID'531 GO532 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'部门ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_POST_DEPARTMENT', @level2type=N'COLUMN',@level2name=N'FK_DEPARTMENT_ID'533 GO534 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'岗位ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_POST_DEPARTMENT', @level2type=N'COLUMN',@level2name=N'FK_POST_ID'535 GO536 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_POST_USER', @level2type=N'COLUMN',@level2name=N'ID'537 GO538 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_POST_USER', @level2type=N'COLUMN',@level2name=N'FK_USERID'539 GO540 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'岗位部门ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_POST_USER', @level2type=N'COLUMN',@level2name=N'FK_POST_DEPARTMENTID'541 GO542 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_ROLE', @level2type=N'COLUMN',@level2name=N'ID'543 GO544 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'角色名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_ROLE', @level2type=N'COLUMN',@level2name=N'ROLENAME'545 GO546 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否自定义(0否1是)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_ROLE', @level2type=N'COLUMN',@level2name=N'ISCUSTOM'547 GO548 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'角色说明' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_ROLE', @level2type=N'COLUMN',@level2name=N'ROLEDESC'549 GO550 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建者ID(关联SYS_USER的ID)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_ROLE', @level2type=N'COLUMN',@level2name=N'CREATEPERID'551 GO552 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_ROLE', @level2type=N'COLUMN',@level2name=N'CREATEDATE'553 GO554 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'修改时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_ROLE', @level2type=N'COLUMN',@level2name=N'UPDATEDATE'555 GO556 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'修改者' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_ROLE', @level2type=N'COLUMN',@level2name=N'UPDATEUSER'557 GO558 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_ROLE_PERMISSION', @level2type=N'COLUMN',@level2name=N'ID'559 GO560 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'角色ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_ROLE_PERMISSION', @level2type=N'COLUMN',@level2name=N'ROLEID'561 GO562 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'授权ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_ROLE_PERMISSION', @level2type=N'COLUMN',@level2name=N'PERMISSIONID'563 GO564 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_SYSTEM', @level2type=N'COLUMN',@level2name=N'ID'565 GO566 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'系统名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_SYSTEM', @level2type=N'COLUMN',@level2name=N'NAME'567 GO568 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'系统地址' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_SYSTEM', @level2type=N'COLUMN',@level2name=N'SITEURL'569 GO570 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否允许登录系统(0否1是)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_SYSTEM', @level2type=N'COLUMN',@level2name=N'IS_LOGIN'571 GO572 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'系统对接用户名' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_SYSTEM', @level2type=N'COLUMN',@level2name=N'DOCKUSER'573 GO574 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'系统对接密码' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_SYSTEM', @level2type=N'COLUMN',@level2name=N'DOCKPASS'575 GO576 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'系统创建时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_SYSTEM', @level2type=N'COLUMN',@level2name=N'CREATEDATE'577 GO578 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_SYSTEM', @level2type=N'COLUMN',@level2name=N'REMARK'579 GO580 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_USER_DEPARTMENT', @level2type=N'COLUMN',@level2name=N'ID'581 GO582 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_USER_DEPARTMENT', @level2type=N'COLUMN',@level2name=N'USER_ID'583 GO584 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'部门ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_USER_DEPARTMENT', @level2type=N'COLUMN',@level2name=N'DEPARTMENT_ID'585 GO586 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_USER_PERMISSION', @level2type=N'COLUMN',@level2name=N'ID'587 GO588 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_USER_PERMISSION', @level2type=N'COLUMN',@level2name=N'FK_USERID'589 GO590 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'授权ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_USER_PERMISSION', @level2type=N'COLUMN',@level2name=N'FK_PERMISSIONID'591 GO592 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_USER_ROLE', @level2type=N'COLUMN',@level2name=N'ID'593 GO594 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_USER_ROLE', @level2type=N'COLUMN',@level2name=N'FK_USERID'595 GO596 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'角色ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_USER_ROLE', @level2type=N'COLUMN',@level2name=N'FK_ROLEID'597 GO598 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_USERINFO', @level2type=N'COLUMN',@level2name=N'ID'599 GO600 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户ID,外键' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_USERINFO', @level2type=N'COLUMN',@level2name=N'USERID'601 GO602 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'职务,编码' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_USERINFO', @level2type=N'COLUMN',@level2name=N'POSTCODE'603 GO604 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'手机号码' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_USERINFO', @level2type=N'COLUMN',@level2name=N'PHONE'605 GO606 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'办公电话' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_USERINFO', @level2type=N'COLUMN',@level2name=N'OFFICEPHONE'607 GO608 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Email' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_USERINFO', @level2type=N'COLUMN',@level2name=N'EMAILADDRESS'609 GO610 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'第二手机号码' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_USERINFO', @level2type=N'COLUMN',@level2name=N'SECONDPHONE'611 GO612 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'在岗状态,编码' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_USERINFO', @level2type=N'COLUMN',@level2name=N'WORKCODE'613 GO614 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'性别,编码' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_USERINFO', @level2type=N'COLUMN',@level2name=N'SEXCODE'615 GO616 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'出生日期' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_USERINFO', @level2type=N'COLUMN',@level2name=N'BIRTHDAY'617 GO618 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'民族,编码' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_USERINFO', @level2type=N'COLUMN',@level2name=N'NATIONCODE'619 GO620 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'身份证号码' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_USERINFO', @level2type=N'COLUMN',@level2name=N'IDNUMBER'621 GO622 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'婚姻状况,编码' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_USERINFO', @level2type=N'COLUMN',@level2name=N'MARRYCODE'623 GO624 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'政治面貌,编码' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_USERINFO', @level2type=N'COLUMN',@level2name=N'IDENTITYCODE'625 GO626 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'籍贯,编码(关联至TBCode_Area的CodeValue)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_USERINFO', @level2type=N'COLUMN',@level2name=N'HomeTown'627 GO628 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'户籍所在地' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_USERINFO', @level2type=N'COLUMN',@level2name=N'ACCOUNTLOCATION'629 GO630 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'学历,编码' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_USERINFO', @level2type=N'COLUMN',@level2name=N'XUELI'631 GO632 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'职称,编码' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_USERINFO', @level2type=N'COLUMN',@level2name=N'ZHICHENG'633 GO634 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'毕业院校' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_USERINFO', @level2type=N'COLUMN',@level2name=N'GRADUATIONSCHOOL'635 GO636 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'专业' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_USERINFO', @level2type=N'COLUMN',@level2name=N'SPECIALTY'637 GO638 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'照片原文件名' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_USERINFO', @level2type=N'COLUMN',@level2name=N'PHOTOOLDNAME'639 GO640 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'照片新文件名' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_USERINFO', @level2type=N'COLUMN',@level2name=N'PHOTONEWNAME'641 GO642 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'照片格式' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_USERINFO', @level2type=N'COLUMN',@level2name=N'PHOTOTYPE'643 GO644 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'简历原文件名' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_USERINFO', @level2type=N'COLUMN',@level2name=N'RESUMEOLDNAME'645 GO646 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'简历新文件名' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_USERINFO', @level2type=N'COLUMN',@level2name=N'RESUMENEWNAME'647 GO648 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'简历格式' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_USERINFO', @level2type=N'COLUMN',@level2name=N'RESUMETYPE'649 GO650 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'户籍所在地,编码(关联至TBCode_Area的CodeValue)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_USERINFO', @level2type=N'COLUMN',@level2name=N'HuJiSuoZaiDi'651 GO652 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'户籍所在派出所' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_USERINFO', @level2type=N'COLUMN',@level2name=N'HUJIPAICHUSUO'653 GO654 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'工作时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_USERINFO', @level2type=N'COLUMN',@level2name=N'WORKDATE'655 GO656 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'加入公司时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_USERINFO', @level2type=N'COLUMN',@level2name=N'JINRUDATE'657 GO658 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'车牌号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_USERINFO', @level2type=N'COLUMN',@level2name=N'CARNUMBER'659 GO660 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'QQ号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_USERINFO', @level2type=N'COLUMN',@level2name=N'QQ'661 GO662 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'微信公众账号对应的OpenID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_USERINFO', @level2type=N'COLUMN',@level2name=N'WEBCHATOPENID'663 GO664 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_USERINFO', @level2type=N'COLUMN',@level2name=N'CREATEDATE'665 GO666 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建者' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_USERINFO', @level2type=N'COLUMN',@level2name=N'CREATEUSER'667 GO668 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'修改时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_USERINFO', @level2type=N'COLUMN',@level2name=N'UPDATEDATE'669 GO670 EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'修改者' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SYS_USERINFO', @level2type=N'COLUMN',@level2name=N'UPDATEUSER'671 GO

View Code

 

二、生成数据模型、建立关联(DbFirst)

 

我们先创建几个数据表,这些表干什么用的,相信大家看了上面的数据文档应该比较清晰,下一篇,我们将会逐渐用到这些表,并且还有些表,我们在需要的时间继续创建。

提供一下上一篇(5.2)的Demo下载:百度网盘

 

原创文章 转载请尊重劳动成果 http://yuangang.cnblogs.com