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

索引

【无私分享:从入门到精通ASP.NET MVC】从0开始,一起搭框架、做项目 目录索引

简述

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

项目准备

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

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

项目开始

一、新增数据表

数据库名:wkmvc_db
 
表名:SYS_CODE
 
序号 列名 数据类型 长度 小数位 标识 主键 外键 允许空 默认值 说明
1 ID int 4 0     主键ID
2 CODETYPE nvarchar 50 0         代码类型
3 NAMETEXT nvarchar 200 0         代码显示文本
4 CODEVALUE nvarchar 100 0         代码值
5 SHOWORDER int 4 0         排序值
6 ISCODE int 4 0         是否为编码(0否1是)
7 REMARK nvarchar 2000 0         备注
8 CREATEDATE datetime 8 3         创建时间
9 CREATEUSER nvarchar 36 0         创建者
10 UPDATEDATE datetime 8 3         修改时间
11 UPDATEUSER nvarchar 36 0         修改者
12 PARENTID int 4 0         父级ID(使用时注意ISCODE为0)
 
表名:SYS_CODE_AREA
 
序号 列名 数据类型 长度 小数位 标识 主键 外键 允许空 默认值 说明
1 ID varchar 50 0       ID
2 PID varchar 50 0         上级ID
3 NAME nvarchar 200 0         名称
4 LEVELS tinyint 1 0         级别
 
表名:SYS_DEPARTMENT
 
序号 列名 数据类型 长度 小数位 标识 主键 外键 允许空 默认值 说明
1 ID nvarchar 36 0       主键ID
2 CODE nvarchar 100 0         部门编号,横向增长
3 NAME nvarchar 200 0         部门名称
4 BUSINESSLEVEL int 4 0         业务等级
5 SHOWORDER int 4 0         部门排序
6 CREATEPERID nvarchar 36 0         创建者编号
7 CREATEDATE date 3 0         创建时间
8 PARENTID nvarchar 36 0         上级部门ID
9 UPDATEDATE date 3 0         修改时间
10 UPDATEUSER nvarchar 36 0         修改人
11 PARENTCODE nvarchar 100 0          
 
表名:SYS_MODULE
 
序号 列名 数据类型 长度 小数位 标识 主键 外键 允许空 默认值 说明
1 ID int 4 0     主键ID
2 FK_BELONGSYSTEM nvarchar 36 0       所属系统
3 PARENTID int 4 0         父ID,级联
4 NAME nvarchar 50 0         显示名称
5 ALIAS nvarchar 50 0         别名
6 MODULETYPE int 4 0         模块类型
7 ICON nvarchar 200 0         自定义图标
8 MODULEPATH nvarchar 500 0         连接路径
9 ISSHOW int 4 0         是否展示(0否1是)
10 SHOWORDER int 4 0         排序值
11 LEVELS int 4 0         级别
12 IsVillage bit 1 0          
13 CREATEUSER nvarchar 50 0         创建者
14 CREATEDATE datetime 8 3         创建时间
15 UPDATEUSER nvarchar 36 0         修改者
16 UPDATEDATE datetime 8 3         修改时间
 
表名:SYS_PERMISSION
 
序号 列名 数据类型 长度 小数位 标识 主键 外键 允许空 默认值 说明
1 ID int 4 0     主键ID
2 MODULEID int 4 0       模块ID
3 NAME nvarchar 36 0         授权名称
4 PERVALUE nvarchar 100 0         权限值(对应SYS_CODE表)
5 ICON nvarchar 50 0         图标ID
6 SHOWORDER int 4 0         显示排序
7 CREATEDATE date 3 0         创建时间
8 CREATEUSER nvarchar 36 0         创建者
9 UPDATEDATE date 3 0         修改时间
10 UPDATEUSER nvarchar 36 0         修改者
 
表名:SYS_POST
 
序号 列名 数据类型 长度 小数位 标识 主键 外键 允许空 默认值 说明
1 ID nvarchar 36 0       主键ID
2 POSTNAME nvarchar 100 0         岗位名称
3 POSTTYPE nvarchar 36 0         岗位类型
4 REMARK nvarchar 500 0         岗位备注
5 SHOWORDER int 4 0         排序
6 CREATEUSERID int 4 0         创建者ID
7 CREATEDATE datetime 8 3         创建时间
8 UPDATEDATE datetime 8 3         修改时间
9 UPDATEUSER nvarchar 36 0         修改者
 
表名:SYS_POST_DEPARTMENT
 
序号 列名 数据类型 长度 小数位 标识 主键 外键 允许空 默认值 说明
1 ID int 4 0     主键ID
2 FK_DEPARTMENT_ID nvarchar 36 0       部门ID
3 FK_POST_ID nvarchar 36 0         岗位ID
 
表名:SYS_POST_USER
 
序号 列名 数据类型 长度 小数位 标识 主键 外键 允许空 默认值 说明
1 ID int 4 0     主键ID
2 FK_USERID int 4 0         用户ID
3 FK_POST_DEPARTMENTID int 4 0       岗位部门ID
表名:SYS_ROLE
 
序号 列名 数据类型 长度 小数位 标识 主键 外键 允许空 默认值 说明
1 ID int 4 0     主键ID
2 ROLENAME nvarchar 50 0         角色名称
3 ISCUSTOM int 4 0         是否自定义(0否1是)
4 ROLEDESC nvarchar 1000 0         角色说明
5 CREATEPERID nvarchar 36 0         创建者ID(关联SYS_USER的ID)
6 CREATEDATE datetime 8 3         创建时间
7 UPDATEDATE datetime 8 3         修改时间
8 UPDATEUSER nvarchar 36 0         修改者
 
表名:SYS_ROLE_PERMISSION
 
序号 列名 数据类型 长度 小数位 标识 主键 外键 允许空 默认值 说明
1 ID int 4 0     主键ID
2 ROLEID int 4 0         角色ID
3 PERMISSIONID int 4 0       授权ID
 
表名:SYS_SYSTEM
 
序号 列名 数据类型 长度 小数位 标识 主键 外键 允许空 默认值 说明
1 ID nvarchar 36 0       主键ID
2 NAME nvarchar 200 0         系统名称
3 SITEURL nvarchar 500 0         系统地址
4 IS_LOGIN tinyint 1 0         是否允许登录系统(0否1是)
5 DOCKUSER nvarchar 100 0         系统对接用户名
6 DOCKPASS nvarchar 200 0         系统对接密码
7 CREATEDATE date 3 0         系统创建时间
8 REMARK nvarchar 2000 0         备注
 
表名:SYS_USER_DEPARTMENT
 
序号 列名 数据类型 长度 小数位 标识 主键 外键 允许空 默认值 说明
1 ID int 4 0     主键ID
2 USER_ID int 4 0         用户ID
3 DEPARTMENT_ID nvarchar 36 0       部门ID
 
表名:SYS_USER_PERMISSION
 
序号 列名 数据类型 长度 小数位 标识 主键 外键 允许空 默认值 说明
1 ID int 4 0     主键ID
2 FK_USERID int 4 0         用户ID
3 FK_PERMISSIONID int 4 0       授权ID
 
表名:SYS_USER_ROLE
 
序号 列名 数据类型 长度 小数位 标识 主键 外键 允许空 默认值 说明
1 ID int 4 0     主键ID
2 FK_USERID int 4 0         用户ID
3 FK_ROLEID int 4 0       角色ID
 
表名:SYS_USERINFO
 
序号 列名 数据类型 长度 小数位 标识 主键 外键 允许空 默认值 说明
1 ID int 4 0       主键ID
2 USERID int 4 0       用户ID,外键
3 POSTCODE int 4 0         职务,编码
4 PHONE nvarchar 200 0         手机号码
5 OFFICEPHONE nvarchar 200 0         办公电话
6 EMAILADDRESS nvarchar 200 0         Email
7 SECONDPHONE nvarchar 200 0         第二手机号码
8 WORKCODE int 4 0         在岗状态,编码
9 SEXCODE int 4 0         性别,编码
10 BIRTHDAY datetime 8 3         出生日期
11 NATIONCODE int 4 0         民族,编码
12 IDNUMBER nvarchar 18 0         身份证号码
13 MARRYCODE int 4 0         婚姻状况,编码
14 IDENTITYCODE int 4 0         政治面貌,编码
15 HomeTown nvarchar 200 0         籍贯,编码(关联至TBCode_Area的CodeValue)
16 ACCOUNTLOCATION nvarchar 200 0         户籍所在地
17 XUELI int 4 0         学历,编码
18 ZHICHENG int 4 0         职称,编码
19 GRADUATIONSCHOOL nvarchar 200 0         毕业院校
20 SPECIALTY nvarchar 200 0         专业
21 PHOTOOLDNAME nvarchar 200 0         照片原文件名
22 PHOTONEWNAME nvarchar 200 0         照片新文件名
23 PHOTOTYPE nvarchar 200 0         照片格式
24 RESUMEOLDNAME nvarchar 200 0         简历原文件名
25 RESUMENEWNAME nvarchar 200 0         简历新文件名
26 RESUMETYPE nvarchar 200 0         简历格式
27 HuJiSuoZaiDi nvarchar 200 0         户籍所在地,编码(关联至TBCode_Area的CodeValue)
28 HUJIPAICHUSUO nvarchar 200 0         户籍所在派出所
29 WORKDATE datetime 8 3         工作时间
30 JINRUDATE datetime 8 3         加入公司时间
31 CARNUMBER nvarchar 200 0         车牌号
32 QQ nvarchar 15 0         QQ号
33 WEBCHATOPENID nvarchar 200 0         微信公众账号对应的OpenID
34 CREATEDATE datetime 8 3         创建时间
35 CREATEUSER nvarchar 36 0         创建者
36 UPDATEDATE datetime 8 3         修改时间
37 UPDATEUSER nvarchar 36 0         修改者

 

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 GO
102 /****** Object:  Table [dbo].[SYS_PERMISSION]    Script Date: 2016/5/17 9:30:01 ******/
103 SET ANSI_NULLS ON
104 GO
105 SET QUOTED_IDENTIFIER ON
106 GO
107 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] ASC
121 )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 GO
125 /****** Object:  Table [dbo].[SYS_POST]    Script Date: 2016/5/17 9:30:01 ******/
126 SET ANSI_NULLS ON
127 GO
128 SET QUOTED_IDENTIFIER ON
129 GO
130 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] ASC
143 )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 GO
147 /****** Object:  Table [dbo].[SYS_POST_DEPARTMENT]    Script Date: 2016/5/17 9:30:01 ******/
148 SET ANSI_NULLS ON
149 GO
150 SET QUOTED_IDENTIFIER ON
151 GO
152 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] ASC
159 )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 GO
163 /****** Object:  Table [dbo].[SYS_POST_USER]    Script Date: 2016/5/17 9:30:01 ******/
164 SET ANSI_NULLS ON
165 GO
166 SET QUOTED_IDENTIFIER ON
167 GO
168 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] ASC
175 )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 GO
179 /****** Object:  Table [dbo].[SYS_ROLE]    Script Date: 2016/5/17 9:30:01 ******/
180 SET ANSI_NULLS ON
181 GO
182 SET QUOTED_IDENTIFIER ON
183 GO
184 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] ASC
196 )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 GO
200 /****** Object:  Table [dbo].[SYS_ROLE_PERMISSION]    Script Date: 2016/5/17 9:30:01 ******/
201 SET ANSI_NULLS ON
202 GO
203 SET QUOTED_IDENTIFIER ON
204 GO
205 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] ASC
212 )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 GO
216 /****** Object:  Table [dbo].[SYS_SYSTEM]    Script Date: 2016/5/17 9:30:01 ******/
217 SET ANSI_NULLS ON
218 GO
219 SET QUOTED_IDENTIFIER ON
220 GO
221 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] ASC
233 )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 GO
237 /****** Object:  Table [dbo].[SYS_USER_DEPARTMENT]    Script Date: 2016/5/17 9:30:01 ******/
238 SET ANSI_NULLS ON
239 GO
240 SET QUOTED_IDENTIFIER ON
241 GO
242 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] ASC
249 )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 GO
253 /****** Object:  Table [dbo].[SYS_USER_PERMISSION]    Script Date: 2016/5/17 9:30:01 ******/
254 SET ANSI_NULLS ON
255 GO
256 SET QUOTED_IDENTIFIER ON
257 GO
258 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] ASC
265 )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 GO
269 /****** Object:  Table [dbo].[SYS_USER_ROLE]    Script Date: 2016/5/17 9:30:01 ******/
270 SET ANSI_NULLS ON
271 GO
272 SET QUOTED_IDENTIFIER ON
273 GO
274 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] ASC
281 )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 GO
285 /****** Object:  Table [dbo].[SYS_USERINFO]    Script Date: 2016/5/17 9:30:01 ******/
286 SET ANSI_NULLS ON
287 GO
288 SET QUOTED_IDENTIFIER ON
289 GO
290 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] ASC
331 )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 GO
335 ALTER TABLE [dbo].[SYS_MODULE]  WITH CHECK ADD  CONSTRAINT [FK_SYS_MODULE_SYSTEMID] FOREIGN KEY([FK_BELONGSYSTEM])
336 REFERENCES [dbo].[SYS_SYSTEM] ([ID])
337 GO
338 ALTER TABLE [dbo].[SYS_MODULE] CHECK CONSTRAINT [FK_SYS_MODULE_SYSTEMID]
339 GO
340 ALTER TABLE [dbo].[SYS_PERMISSION]  WITH CHECK ADD  CONSTRAINT [FK_SYS_PERMISSION_MODULEID] FOREIGN KEY([MODULEID])
341 REFERENCES [dbo].[SYS_MODULE] ([ID])
342 GO
343 ALTER TABLE [dbo].[SYS_PERMISSION] CHECK CONSTRAINT [FK_SYS_PERMISSION_MODULEID]
344 GO
345 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 GO
348 ALTER TABLE [dbo].[SYS_POST_DEPARTMENT] CHECK CONSTRAINT [FK_SYS_POST_DEPARTMENT_DPTID]
349 GO
350 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 GO
353 ALTER TABLE [dbo].[SYS_POST_DEPARTMENT] CHECK CONSTRAINT [FK_SYS_POST_DEPARTMENT_POSTID]
354 GO
355 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 GO
358 ALTER TABLE [dbo].[SYS_POST_USER] CHECK CONSTRAINT [FK_SYS_POST_USER_POSTDPTID]
359 GO
360 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 GO
363 ALTER TABLE [dbo].[SYS_POST_USER] CHECK CONSTRAINT [FK_SYS_POST_USER_USERID]
364 GO
365 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 GO
368 ALTER TABLE [dbo].[SYS_ROLE_PERMISSION] CHECK CONSTRAINT [FK_SYS_ROLE_PERMISSION_PERID]
369 GO
370 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 GO
373 ALTER TABLE [dbo].[SYS_ROLE_PERMISSION] CHECK CONSTRAINT [FK_SYS_ROLE_PERMISSION_ROLEID]
374 GO
375 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 GO
378 ALTER TABLE [dbo].[SYS_USER_DEPARTMENT] CHECK CONSTRAINT [FK_SYS_USER_DEPARTMENT_DPTID]
379 GO
380 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 GO
383 ALTER TABLE [dbo].[SYS_USER_DEPARTMENT] CHECK CONSTRAINT [FK_SYS_USER_DEPARTMENT_USERID]
384 GO
385 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 GO
388 ALTER TABLE [dbo].[SYS_USER_PERMISSION] CHECK CONSTRAINT [FK_SYS_USER_PERMISSION_PERID]
389 GO
390 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 GO
393 ALTER TABLE [dbo].[SYS_USER_PERMISSION] CHECK CONSTRAINT [FK_SYS_USER_PERMISSION_USERID]
394 GO
395 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 GO
398 ALTER TABLE [dbo].[SYS_USER_ROLE] CHECK CONSTRAINT [FK_SYS_USER_ROLE_ROLEID]
399 GO
400 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 GO
403 ALTER TABLE [dbo].[SYS_USER_ROLE] CHECK CONSTRAINT [FK_SYS_USER_ROLE_USERID]
404 GO
405 ALTER TABLE [dbo].[SYS_USERINFO]  WITH CHECK ADD  CONSTRAINT [FK_SYS_USERINFO_SYSUSERID] FOREIGN KEY([USERID])
406 REFERENCES [dbo].[SYS_USER] ([ID])
407 GO
408 ALTER TABLE [dbo].[SYS_USERINFO] CHECK CONSTRAINT [FK_SYS_USERINFO_SYSUSERID]
409 GO
410 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 GO
412 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 GO
414 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 GO
416 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 GO
418 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 GO
420 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 GO
422 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 GO
424 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 GO
426 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 GO
428 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 GO
430 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 GO
432 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 GO
434 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 GO
436 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 GO
438 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 GO
440 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 GO
442 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 GO
444 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 GO
446 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 GO
448 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 GO
450 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 GO
452 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 GO
454 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 GO
456 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 GO
458 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 GO
460 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 GO
462 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 GO
464 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 GO
466 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 GO
468 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 GO
470 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 GO
472 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 GO
474 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 GO
476 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 GO
478 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 GO
480 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 GO
482 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 GO
484 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 GO
486 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 GO
488 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 GO
490 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 GO
492 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 GO
494 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 GO
496 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 GO
498 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 GO
500 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 GO
502 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 GO
504 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 GO
506 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 GO
508 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 GO
510 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 GO
512 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 GO
514 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 GO
516 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 GO
518 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 GO
520 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 GO
522 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 GO
524 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 GO
526 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 GO
528 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 GO
530 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 GO
532 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 GO
534 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 GO
536 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 GO
538 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 GO
540 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 GO
542 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 GO
544 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 GO
546 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 GO
548 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 GO
550 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 GO
552 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 GO
554 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 GO
556 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 GO
558 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 GO
560 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 GO
562 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 GO
564 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 GO
566 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 GO
568 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 GO
570 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 GO
572 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 GO
574 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 GO
576 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 GO
578 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 GO
580 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 GO
582 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 GO
584 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 GO
586 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 GO
588 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 GO
590 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 GO
592 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 GO
594 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 GO
596 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 GO
598 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 GO
600 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 GO
602 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 GO
604 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 GO
606 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 GO
608 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 GO
610 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 GO
612 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 GO
614 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 GO
616 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 GO
618 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 GO
620 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 GO
622 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 GO
624 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 GO
626 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 GO
628 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 GO
630 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 GO
632 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 GO
634 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 GO
636 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 GO
638 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 GO
640 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 GO
642 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 GO
644 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 GO
646 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 GO
648 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 GO
650 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 GO
652 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 GO
654 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 GO
656 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 GO
658 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 GO
660 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 GO
662 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 GO
664 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 GO
666 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 GO
668 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 GO
670 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)

 

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

 

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

posted @ 2016-05-17 09:54 果冻布丁喜之郎 阅读(...) 评论(...) 编辑 收藏