西部信托数据库设计.DDL
上传用户:mingda
上传日期:2017-06-20
资源大小:27691k
文件大小:100k
源码类别:

OA系统

开发平台:

Java

  1. /*    此 SQL DDL 脚本由 Microsoft Visual Studio(发布日期:LOCAL BUILD)生成。                              */
  2. /*    所用驱动程序:Microsoft Visual Studio - Microsoft SQL Server 驱动程序。                             */
  3. /*    文档:E:HomePageWestTI_OAdoc西部信托数据库设计.vsd。                                             */
  4. /*    创建时间:2003年12月1日 9:46。                                                                   */
  5. /*    操作:来自 Visio 生成向导。                                                                       */
  6. /*    已连接的数据源:没有连接。                                                                           */
  7. /*    已连接的服务器:没有连接。                                                                           */
  8. /*    已连接的数据库:不适用。                                                                            */
  9. /* 创建 WestTI_OA 数据库。                                                                          */
  10. use master  
  11. go
  12. create database "WestTI_OA"  
  13. go
  14. use "WestTI_OA"  
  15. go
  16. /* 创建新表 "ApproveRecordInfo"。                                                                  */
  17. /* "ApproveRecordInfo" : Table of 审批记录信息表                                                     */
  18. /*  "ID" : ID 标识 审批记录信息表                                                                      */
  19. /*  "FlowTacheID" : 流程环节ID 属于 审批记录信息表                                                         */
  20. /*  "DocumentID" : 公文ID 属于 审批记录信息表                                                            */
  21. /*  "ApproveUserID" : 审批用户ID 属于 审批记录信息表                                                       */
  22. /*  "ApproveTime" : 审批时间 属于 审批记录信息表                                                           */
  23. /*  "ApproveFromIP" : 审批来源IP地址 属于 审批记录信息表                                                     */
  24. /*  "IsRead" : 是否查阅 属于 审批记录信息表                                                                */  
  25. create table "ApproveRecordInfo" ( 
  26. "ID" int identity not null,
  27. "FlowTacheID" int null,
  28. "DocumentID" int null,
  29. "ApproveUserID" int null,
  30. "ApproveTime" datetime null,
  31. "ApproveFromIP" varchar(300) null,
  32. "IsRead" varchar(300) null)  
  33. go
  34. alter table "ApproveRecordInfo"
  35. add constraint "ApproveRecordInfo_PK" primary key ("ID")   
  36. go
  37. /* 创建新表 "DocFieldsValue"。                                                                     */
  38. /* "DocFieldsValue" : Table of 公文字段值信息表                                                       */
  39. /*  "ID" : ID 标识 公文字段值信息表                                                                     */
  40. /*  "DocumentID" : 公文ID 部分标识 公文字段值信息表                                                         */
  41. /*  "DocTempletFieldsID" : 公文模板字段ID 属于 公文字段值信息表                                               */
  42. /*  "FieldValue" : 字段值 属于 公文字段值信息表                                                            */
  43. /*  "ApproveFlowID" : 审批流程记录ID 属于 公文字段值信息表                                                    */  
  44. create table "DocFieldsValue" ( 
  45. "ID" int identity not null,
  46. "DocumentID" int null,
  47. "DocTempletFieldsID" int null,
  48. "FieldValue" varchar(8000) null,
  49. "ApproveFlowID" int null)  
  50. go
  51. alter table "DocFieldsValue"
  52. add constraint "DocFieldsValue_PK" primary key ("ID")   
  53. go
  54. /* 创建新表 "Document"。                                                                           */
  55. /* "Document" : Table of 公文报表信息表                                                              */
  56. /*  "ID" : ID 标识 公文报表信息表                                                                      */
  57. /*  "DocumentName" : 公文名称 属于 公文报表信息表                                                          */
  58. /*  "DocFlowTempletID" : 公文流转模板ID 属于 公文报表信息表                                                  */
  59. /*  "BuildTime" : 生成时间 属于 公文报表信息表                                                             */
  60. /*  "BuildUserID" : 生成用户ID 属于 公文报表信息表                                                         */
  61. /*  "FillUserID" : 填表用户ID 属于 公文报表信息表                                                          */
  62. /*  "IsPigeonholed" : 是否已经归档 属于 公文报表信息表                                                       */
  63. /*  "CurrentFlowTacheID" : 当前流程环节ID 属于 公文报表信息表                                                */
  64. /*  "IsReminded" : 是否已经提醒 属于 公文报表信息表                                                          */
  65. /*  "RemindTime" : 提醒时间 属于 公文报表信息表                                                            */  
  66. create table "Document" ( 
  67. "ID" int identity not null,
  68. "DocumentName" varchar(300) null,
  69. "DocFlowTempletID" int null,
  70. "BuildTime" datetime null,
  71. "BuildUserID" int null,
  72. "FillUserID" int null,
  73. "IsPigeonholed" bit null,
  74. "CurrentFlowTacheID" int null,
  75. "IsReminded" bit null,
  76. "RemindTime" datetime null)  
  77. go
  78. alter table "Document"
  79. add constraint "Document_PK" primary key ("ID")   
  80. go
  81. /* 创建新表 "DocTempletMoveFlow"。                                                                 */
  82. /* "DocTempletMoveFlow" : Table of 公文流转模板信息表                                                  */
  83. /*  "ID" : ID 标识 公文流转模板信息表                                                                    */
  84. /*  "Name" : 公文流转模板名称 属于 公文流转模板信息表                                                            */
  85. /*  "DocTempletID" : 公文模板ID 属于 公文流转模板信息表                                                      */
  86. /*  "DocTempletTableName" : 公文模板表名称 属于 公文流转模板信息表                                              */
  87. /*  "MoveFlowID" : 流转流程ID 属于 公文流转模板信息表                                                        */
  88. /*  "UpdateUserID" : 更新用户ID 属于 公文流转模板信息表                                                      */
  89. /*  "UpdateTime" : 更新时间 属于 公文流转模板信息表                                                          */
  90. /*  "UpdateFromIP" : 更新来自IP地址 属于 公文流转模板信息表                                                    */
  91. /*  "ApproveUserID" : 审核用户ID 属于 公文流转模板信息表                                                     */
  92. /*  "ApproveTime" : 审核时间 属于 公文流转模板信息表                                                         */
  93. /*  "StopUseTime" : 停用时间 属于 公文流转模板信息表                                                         */
  94. /*  "StarUseTime" : 启用时间 属于 公文流转模板信息表                                                         */
  95. /*  "IsUseful" : 是否可用 属于 公文流转模板信息表                                                            */
  96. /*  "WritableUserIDs" : 可写用户IDs 属于 公文流转模板信息表                                                  */
  97. /*  "WritableDepartIDs" : 可写部门IDs 属于 公文流转模板信息表                                                */
  98. /*  "ReadOnlyUserIDs" : 只读用户IDs 属于 公文流转模板信息表                                                  */
  99. /*  "ReadOnlyDepartIDs" : 只读部门IDs 属于 公文流转模板信息表                                                */  
  100. create table "DocTempletMoveFlow" ( 
  101. "ID" int identity not null,
  102. "Name" varchar(300) null,
  103. "DocTempletID" int null,
  104. "DocTempletTableName" varchar(300) null,
  105. "MoveFlowID" int null,
  106. "UpdateUserID" int null,
  107. "UpdateTime" datetime null,
  108. "UpdateFromIP" varchar(300) null,
  109. "ApproveUserID" int null,
  110. "ApproveTime" datetime null,
  111. "StopUseTime" datetime null,
  112. "StarUseTime" datetime null,
  113. "IsUseful" bit null,
  114. "WritableUserIDs" varchar(300) null,
  115. "WritableDepartIDs" varchar(300) null,
  116. "ReadOnlyUserIDs" varchar(300) null,
  117. "ReadOnlyDepartIDs" varchar(300) null)  
  118. go
  119. alter table "DocTempletMoveFlow"
  120. add constraint "DocTempletMoveFlow_PK" primary key ("ID")   
  121. go
  122. /* 创建新表 "FlowTacheInfo"。                                                                      */
  123. /* "FlowTacheInfo" : Table of 流程环节信息表                                                         */
  124. /*  "ID" : ID 标识 流程环节信息表                                                                      */
  125. /*  "TacheName" : 环节名称 属于 流程环节信息表                                                             */
  126. /*  "FromTacheID" : 来自环节ID 属于 流程环节信息表                                                         */
  127. /*  "TacheStatus" : 环节状态 属于 流程环节信息表                                                           */
  128. /*  "TacheDescription" : 环节描述 属于 流程环节信息表                                                      */
  129. /*  "ApproveUserIDs" : 审批用户IDs 属于 流程环节信息表                                                     */
  130. /*  "TacheType" : 环节类型 属于 流程环节信息表                                                             */
  131. /*  "FlowID" : 流程ID 属于 流程环节信息表                                                                */
  132. /*  "UpdateUserID" : 更新用户ID 属于 流程环节信息表                                                        */
  133. /*  "UpdateTime" : 更新时间 属于 流程环节信息表                                                            */
  134. /*  "UpdateFromIP" : 更新来源IP地址 属于 流程环节信息表                                                      */
  135. /*  "IsRecordRead" : 是否记录查阅 属于 流程环节信息表                                                        */
  136. /*  "RemindInterval" : 提醒时间间隔 属于 流程环节信息表                                                      */
  137. /*  "MaxWaitTime" : 最大停留时间 属于 流程环节信息表                                                         */
  138. /*  "IsFromDefault" : 是否环节默认 属于 流程环节信息表                                                       */
  139. /*  "IsFinishedByRead" : 查阅是否自动完成该环节 属于 流程环节信息表                                               */  
  140. create table "FlowTacheInfo" ( 
  141. "ID" int identity not null,
  142. "TacheName" varchar(300) null,
  143. "FromTacheID" varchar(300) null,
  144. "TacheStatus" varchar(300) null,
  145. "TacheDescription" varchar(300) null,
  146. "ApproveUserIDs" varchar(300) null,
  147. "TacheType" varchar(300) null,
  148. "FlowID" int null,
  149. "UpdateUserID" int null,
  150. "UpdateTime" datetime null,
  151. "UpdateFromIP" varchar(300) null,
  152. "IsRecordRead" bit null,
  153. "RemindInterval" int null,
  154. "MaxWaitTime" int null,
  155. "IsFromDefault" bit null,
  156. "IsFinishedByRead" bit null)  
  157. go
  158. alter table "FlowTacheInfo"
  159. add constraint "FlowTacheInfo_PK" primary key ("ID")   
  160. go
  161. /* 创建新表 "MoveFlowInfo"。                                                                       */
  162. /* "MoveFlowInfo" : Table of 流转流程信息表                                                          */
  163. /*  "ID" : ID 标识 流转流程信息表                                                                      */
  164. /*  "FlowName" : 流程名称 属于 流转流程信息表                                                              */
  165. /*  "BuildTime" : 创建时间 属于 流转流程信息表                                                             */
  166. /*  "BuildUserID" : 创建用户ID 属于 流转流程信息表                                                         */
  167. /*  "FlowContent" : 流程说明 属于 流转流程信息表                                                           */
  168. /*  "WritableUserIDs" : 可写用户IDs 属于 流转流程信息表                                                    */
  169. /*  "WritableDepartIDs" : 可写部门IDs 属于 流转流程信息表                                                  */  
  170. create table "MoveFlowInfo" ( 
  171. "ID" int identity not null,
  172. "FlowName" varchar(300) null,
  173. "BuildTime" datetime null,
  174. "BuildUserID" int null,
  175. "FlowContent" varchar(600) null,
  176. "WritableUserIDs" varchar(300) null,
  177. "WritableDepartIDs" varchar(300) null)  
  178. go
  179. alter table "MoveFlowInfo"
  180. add constraint "MoveFlowInfo_PK" primary key ("ID")   
  181. go
  182. /* 创建新表 "DocTempletFields"。                                                                   */
  183. /* "DocTempletFields" : Table of 公文模板字段信息表                                                    */
  184. /*  "ID" : ID 标识 公文模板字段信息表                                                                    */
  185. /*  "FieldName" : 字段名称 属于 公文模板字段信息表                                                           */
  186. /*  "FieldType" : 字段类型 属于 公文模板字段信息表                                                           */
  187. /*  "EnglishAb" : 英文缩写 属于 公文模板字段信息表                                                           */
  188. /*  "OrderNumber" : 排序编号 属于 公文模板字段信息表                                                         */
  189. /*  "Event" : 激活事件 属于 公文模板字段信息表                                                               */
  190. /*  "Options" : 选项内容 属于 公文模板字段信息表                                                             */
  191. /*  "FieldContent" : 字段填写说明 属于 公文模板字段信息表                                                      */
  192. /*  "IsMustFill" : 是否必须填写 属于 公文模板字段信息表                                                        */
  193. /*  "WritableUserIDs" : 可写用户IDs 属于 公文模板字段信息表                                                  */
  194. /*  "ReadableUserIDs" : 可读用户IDs 属于 公文模板字段信息表                                                  */
  195. /*  "IsUseful" : 是否可用 属于 公文模板字段信息表                                                            */
  196. /*  "SearchType" : 搜索类型 属于 公文模板字段信息表                                                          */
  197. /*  "SearchFieldsInForm" : 搜索对应字段 属于 公文模板字段信息表                                                */
  198. /*  "TempletID" : 模板ID 属于 公文模板字段信息表                                                           */
  199. /*  "MaxLength" : 字段最大长度 属于 公文模板字段信息表                                                         */
  200. /*  "DefaultValue" : 默认值 属于 公文模板字段信息表                                                         */  
  201. create table "DocTempletFields" ( 
  202. "ID" int identity not null,
  203. "FieldName" varchar(300) null,
  204. "FieldType" varchar(300) null,
  205. "EnglishAb" varchar(300) null,
  206. "OrderNumber" int null,
  207. "Event" varchar(300) null,
  208. "Options" varchar(600) null,
  209. "FieldContent" varchar(300) null,
  210. "IsMustFill" bit null,
  211. "WritableUserIDs" varchar(300) null,
  212. "ReadableUserIDs" varchar(300) null,
  213. "IsUseful" bit null,
  214. "SearchType" varchar(300) null,
  215. "SearchFieldsInForm" varchar(300) null,
  216. "TempletID" int null,
  217. "MaxLength" int null,
  218. "DefaultValue" varchar(300) null)  
  219. go
  220. alter table "DocTempletFields"
  221. add constraint "DocTempletFields_PK" primary key ("ID")   
  222. go
  223. /* 创建新表 "DocumentTemplet"。                                                                    */
  224. /* "DocumentTemplet" : Table of 公文模板信息表                                                       */
  225. /*  "ID" : ID 标识 公文模板信息表                                                                      */
  226. /*  "TempletName" : 模板名称 属于 公文模板信息表                                                           */
  227. /*  "BuildTime" : 模板创建时间 属于 公文模板信息表                                                           */
  228. /*  "BuildUserID" : 创建用户ID 属于 公文模板信息表                                                         */
  229. /*  "TempletNumber" : 模板编号 属于 公文模板信息表                                                         */
  230. /*  "EnglishAb" : 英文缩写 属于 公文模板信息表                                                             */
  231. /*  "WritableUserIDs" : 可写用户IDs 属于 公文模板信息表                                                    */
  232. /*  "WritableDepartIDs" : 可写部门IDs 属于 公文模板信息表                                                  */
  233. /*  "ReadOnlyUserIDs" : 只读用户IDs 属于 公文模板信息表                                                    */
  234. /*  "ReadOnlyDeprtIDs" : 只读部门IDs 属于 公文模板信息表                                                   */
  235. /*  "PrintHTMLCode" : 打印HTML代码 属于 公文模板信息表                                                     */
  236. /*  "SysDirID" : 系统目录ID 属于 公文模板信息表                                                            */
  237. /*  "IsAutoBuild" : 是否自动生成 属于 公文模板信息表                                                         */
  238. /*  "TypesetHTMLCode" : 排版格式HTML代码 属于 公文模板信息表                                                 */
  239. /*  "FormEvent" : 表单事件 属于 公文模板信息表                                                             */
  240. /*  "JavaScriptCode" : 嵌套JavaScript代码 属于 公文模板信息表                                              */  
  241. create table "DocumentTemplet" ( 
  242. "ID" int identity not null,
  243. "TempletName" varchar(300) null,
  244. "BuildTime" datetime null,
  245. "BuildUserID" int null,
  246. "TempletNumber" varchar(300) null,
  247. "EnglishAb" varchar(300) null,
  248. "WritableUserIDs" varchar(300) null,
  249. "WritableDepartIDs" varchar(300) null,
  250. "ReadOnlyUserIDs" varchar(300) null,
  251. "ReadOnlyDeprtIDs" varchar(300) null,
  252. "PrintHTMLCode" text null,
  253. "SysDirID" int null,
  254. "IsAutoBuild" bit null,
  255. "TypesetHTMLCode" text null,
  256. "FormEvent" varchar(300) null,
  257. "JavaScriptCode" text null)  
  258. go
  259. alter table "DocumentTemplet"
  260. add constraint "DocumentTemplet_PK" primary key ("ID")   
  261. go
  262. /* 创建新表 "PactInfo"。                                                                           */
  263. /* "PactInfo" : Table of 合同信息表                                                                */
  264. /*  "ID" : ID 标识 合同信息表                                                                        */
  265. /*  "PactNumber" : 合同编号 属于 合同信息表                                                              */
  266. /*  "IntrustFund" : 信托资金 属于 合同信息表                                                             */
  267. /*  "PactTermStart" : 合同期限开始时间 属于 合同信息表                                                       */
  268. /*  "PactTermEnd" : 合同期限结束时间 属于 合同信息表                                                         */
  269. /*  "FirstSideName" : 甲方名称 属于 合同信息表                                                           */
  270. /*  "FirstSideIDCardNumber" : 甲方身份证或营业执照 属于 合同信息表                                             */
  271. /*  "FirstSideCorporation" : 甲方法定代表人 属于 合同信息表                                                 */
  272. /*  "FirstSideAddress" : 甲方地址 属于 合同信息表                                                        */
  273. /*  "FirstSideTel" : 甲方电话 属于 合同信息表                                                            */
  274. /*  "FirstSideDeputy" : 甲方代理人 属于 合同信息表                                                        */
  275. /*  "FirstSideSignTime" : 甲方签字日期 属于 合同信息表                                                     */
  276. /*  "SecondSideName" : 乙方名称 属于 合同信息表                                                          */
  277. /*  "SecondSideIDCardNumber" : 乙方身份证或者营业执照 属于 合同信息表                                           */
  278. /*  "SecondSideCorporation" : 乙方法定代表人 属于 合同信息表                                                */
  279. /*  "SecondSideAddress" : 乙方地址 属于 合同信息表                                                       */
  280. /*  "SecondSideTel" : 乙方电话 属于 合同信息表                                                           */
  281. /*  "SecondSideDeputy" : 乙方代理人 属于 合同信息表                                                       */
  282. /*  "SecondSideSignTime" : 乙方签字日期 属于 合同信息表                                                    */
  283. /*  "PactTitle" : 合同标题 属于 合同信息表                                                               */
  284. /*  "PactContent" : 合同内容 属于 合同信息表                                                             */
  285. /*  "AddTime" : 增加时间 属于 合同信息表                                                                 */
  286. /*  "AddUserID" : 增加用户ID 属于 合同信息表                                                             */  
  287. create table "PactInfo" ( 
  288. "ID" int identity not null,
  289. "PactNumber" varchar(60) null,
  290. "IntrustFund" money null,
  291. "PactTermStart" datetime null,
  292. "PactTermEnd" datetime null,
  293. "FirstSideName" varchar(160) null,
  294. "FirstSideIDCardNumber" varchar(60) null,
  295. "FirstSideCorporation" varchar(60) null,
  296. "FirstSideAddress" varchar(160) null,
  297. "FirstSideTel" varchar(60) null,
  298. "FirstSideDeputy" varchar(60) null,
  299. "FirstSideSignTime" datetime null,
  300. "SecondSideName" varchar(160) null,
  301. "SecondSideIDCardNumber" varchar(60) null,
  302. "SecondSideCorporation" varchar(60) null,
  303. "SecondSideAddress" varchar(160) null,
  304. "SecondSideTel" varchar(60) null,
  305. "SecondSideDeputy" varchar(60) null,
  306. "SecondSideSignTime" datetime null,
  307. "PactTitle" varchar(160) null,
  308. "PactContent" text null,
  309. "AddTime" datetime null,
  310. "AddUserID" int null)  
  311. go
  312. alter table "PactInfo"
  313. add constraint "PactInfo_PK" primary key ("ID")   
  314. go
  315. /* 创建新表 "PactTempletInfo"。                                                                    */
  316. /* "PactTempletInfo" : Table of 合同模板信息表                                                       */
  317. /*  "ID" : ID 标识 合同模板信息表                                                                      */
  318. /*  "TempletName" : 模版名称 属于 合同模板信息表                                                           */
  319. /*  "TempletContent" : 模板内容 属于 合同模板信息表                                                        */
  320. /*  "BuildTime" : 建立时间 属于 合同模板信息表                                                             */
  321. /*  "BuildUserID" : 建立用户ID 属于 合同模板信息表                                                         */
  322. /*  "PactType" : 合同类型 属于 合同模板信息表                                                              */  
  323. create table "PactTempletInfo" ( 
  324. "ID" int identity not null,
  325. "TempletName" varchar(60) null,
  326. "TempletContent" text null,
  327. "BuildTime" datetime null,
  328. "BuildUserID" int null,
  329. "PactType" int null)  
  330. go
  331. alter table "PactTempletInfo"
  332. add constraint "PactTempletInfo_PK" primary key ("ID")   
  333. go
  334. /* 创建新表 "CahierInfo"。                                                                         */
  335. /* "CahierInfo" : Table of 会议记录信息表                                                            */
  336. /*  "ID" : ID 标识 会议记录信息表                                                                      */
  337. /*  "BoardroomApplyID" : 会议申请ID 属于 会议记录信息表                                                    */
  338. /*  "MeetingNumber" : 会议编号 属于 会议记录信息表                                                         */
  339. /*  "MeetingName" : 会议名称 属于 会议记录信息表                                                           */
  340. /*  "StartTime" : 开始时间 属于 会议记录信息表                                                             */
  341. /*  "EndTime" : 结束时间 属于 会议记录信息表                                                               */
  342. /*  "Compere" : 主持人 属于 会议记录信息表                                                                */
  343. /*  "MeetingContent" : 会议说明 属于 会议记录信息表                                                        */
  344. /*  "BoardroomID" : 会议室ID 属于 会议记录信息表                                                          */
  345. /*  "ConfereePersonnel" : 参会人员 属于 会议记录信息表                                                     */
  346. /*  "NoteUserID" : 笔记用户ID 属于 会议记录信息表                                                          */
  347. /*  "SummaryTitle" : 纪要主题 属于 会议记录信息表                                                          */
  348. /*  "SummaryContent" : 会议纪要内容 属于 会议记录信息表                                                      */
  349. /*  "AllowableUserIDs" : 允许察看的用户ID 属于 会议记录信息表                                                 */
  350. /*  "AllowableDepartIDs" : 允许察看的部门 属于 会议记录信息表                                                 */  
  351. create table "CahierInfo" ( 
  352. "ID" int identity not null,
  353. "BoardroomApplyID" int null,
  354. "MeetingNumber" varchar(60) null,
  355. "MeetingName" varchar(60) null,
  356. "StartTime" datetime null,
  357. "EndTime" datetime null,
  358. "Compere" varchar(60) null,
  359. "MeetingContent" varchar(200) null,
  360. "BoardroomID" int null,
  361. "ConfereePersonnel" varchar(300) null,
  362. "NoteUserID" int null,
  363. "SummaryTitle" varchar(60) null,
  364. "SummaryContent" text null,
  365. "AllowableUserIDs" varchar(300) null,
  366. "AllowableDepartIDs" varchar(200) null)  
  367. go
  368. alter table "CahierInfo"
  369. add constraint "CahierInfo_PK" primary key ("ID")   
  370. go
  371. /* 创建新表 "BoardroomApplyInfo"。                                                                 */
  372. /* "BoardroomApplyInfo" : Table of 会议室申请信息表                                                   */
  373. /*  "ID" : ID 标识 会议室申请信息表                                                                     */
  374. /*  "Title" : 会议主题 属于 会议室申请信息表                                                                */
  375. /*  "PlanStartTime" : 预计开始时间 属于 会议室申请信息表                                                      */
  376. /*  "PlanEndTime" : 预计结束时间 属于 会议室申请信息表                                                        */
  377. /*  "ApplyUserID" : 申请用户ID 属于 会议室申请信息表                                                        */
  378. /*  "ApplyTime" : 申请时间 属于 会议室申请信息表                                                            */
  379. /*  "IsConfirmed" : 是否批准 属于 会议室申请信息表                                                          */
  380. /*  "ConfirmUserID" : 批准用户ID 属于 会议室申请信息表                                                      */
  381. /*  "ConfirmTime" : 批准时间 属于 会议室申请信息表                                                          */
  382. /*  "ConfirmInfo" : 批准信息 属于 会议室申请信息表                                                          */
  383. /*  "BoardroomID" : 会议室ID 属于 会议室申请信息表                                                         */
  384. /*  "PersonnelAmount" : 参会人数 属于 会议室申请信息表                                                      */  
  385. create table "BoardroomApplyInfo" ( 
  386. "ID" int identity not null,
  387. "Title" varchar(200) null,
  388. "PlanStartTime" datetime null,
  389. "PlanEndTime" datetime null,
  390. "ApplyUserID" int null,
  391. "ApplyTime" datetime null,
  392. "IsConfirmed" bit null,
  393. "ConfirmUserID" int null,
  394. "ConfirmTime" datetime null,
  395. "ConfirmInfo" varchar(200) null,
  396. "BoardroomID" int null,
  397. "PersonnelAmount" int null)  
  398. go
  399. alter table "BoardroomApplyInfo"
  400. add constraint "BoardroomApplyInfo_PK" primary key ("ID")   
  401. go
  402. /* 创建新表 "BoardroomInfo"。                                                                      */
  403. /* "BoardroomInfo" : Table of 会议室信息表                                                          */
  404. /*  "ID" : ID 标识 会议室信息表                                                                       */
  405. /*  "BoardroomName" : 会议室名称 属于 会议室信息表                                                         */
  406. /*  "BoardroomNumber" : 会议室编号 属于 会议室信息表                                                       */
  407. /*  "Address" : 会议室地址 属于 会议室信息表                                                               */
  408. /*  "PersonnelAmount" : 容纳人数 属于 会议室信息表                                                        */
  409. /*  "IsUseful" : 是否可用 属于 会议室信息表                                                               */
  410. /*  "State" : 状态 属于 会议室信息表                                                                    */  
  411. create table "BoardroomInfo" ( 
  412. "ID" int identity not null,
  413. "BoardroomName" varchar(60) null,
  414. "BoardroomNumber" varchar(60) null,
  415. "Address" varchar(60) null,
  416. "PersonnelAmount" int null,
  417. "IsUseful" bit null,
  418. "State" varchar(60) null)  
  419. go
  420. alter table "BoardroomInfo"
  421. add constraint "BoardroomInfo_PK" primary key ("ID")   
  422. go
  423. /* 创建新表 "ApproveRecord"。                                                                      */
  424. /* "ApproveRecord" : Table of 批准记录表                                                           */
  425. /*  "ID" : ID 标识 批准记录表                                                                        */
  426. /*  "RecordID" : 记录ID 属于 批准记录表                                                                */
  427. /*  "ApproveType" : 批准类型 属于 批准记录表                                                             */
  428. /*  "ApproveUserID" : 审批用户ID 属于 批准记录表                                                         */
  429. /*  "IsAgreed" : 是否同意 属于 批准记录表                                                                */
  430. /*  "Content" : 审批说明 属于 批准记录表                                                                 */
  431. /*  "ApproveTime" : 审批时间 属于 批准记录表                                                             */
  432. /*  "ApproveLevel" : 审批级别 属于 批准记录表                                                            */  
  433. create table "ApproveRecord" ( 
  434. "ID" int identity not null,
  435. "RecordID" int null,
  436. "ApproveType" varchar(60) null,
  437. "ApproveUserID" int null,
  438. "IsAgreed" bit null,
  439. "Content" varchar(255) null,
  440. "ApproveTime" datetime null,
  441. "ApproveLevel" int null)  
  442. go
  443. alter table "ApproveRecord"
  444. add constraint "ApproveRecord_PK" primary key ("ID")   
  445. go
  446. /* 创建新表 "StyleInfo"。                                                                          */
  447. /* "StyleInfo" : Table of 风格信息表                                                               */
  448. /*  "ID" : ID 标识 风格信息表                                                                        */
  449. /*  "Name" : 风格名称 属于 风格信息表                                                                    */
  450. /*  "ExamplePicURL" : 示例图片URL 属于 风格信息表                                                        */
  451. /*  "LogoPicURL" : 徽标图片URL 属于 风格信息表                                                           */
  452. /*  "BannerPicURL" : 横幅图片URL 属于 风格信息表                                                         */
  453. /*  "TopBackGroundURL" : 顶部背景图片URL 属于 风格信息表                                                   */
  454. /*  "TopBackColor" : 顶部背景颜色 属于 风格信息表                                                          */
  455. /*  "BackColor" : 背景颜色 属于 风格信息表                                                               */
  456. /*  "TitleColor" : 标题颜色 属于 风格信息表                                                              */
  457. /*  "SingleColor" : 单行颜色 属于 风格信息表                                                             */
  458. /*  "DoubleColor" : 双行颜色 属于 风格信息表                                                             */  
  459. create table "StyleInfo" ( 
  460. "ID" int identity not null,
  461. "Name" varchar(60) null,
  462. "ExamplePicURL" varchar(200) null,
  463. "LogoPicURL" varchar(200) null,
  464. "BannerPicURL" varchar(200) null,
  465. "TopBackGroundURL" varchar(200) null,
  466. "TopBackColor" varchar(60) null,
  467. "BackColor" varchar(60) null,
  468. "TitleColor" varchar(60) null,
  469. "SingleColor" varchar(60) null,
  470. "DoubleColor" varchar(60) null)  
  471. go
  472. alter table "StyleInfo"
  473. add constraint "StyleInfo_PK" primary key ("ID")   
  474. go
  475. /* 创建新表 "PayInfo"。                                                                            */
  476. /* "PayInfo" : Table of 工资信息表                                                                 */
  477. /*  "ID" : ID 标识 工资信息表                                                                        */
  478. /*  "PersonnelID" : 员工ID 属于 工资信息表                                                             */
  479. /*  "PayTypeID" : 工资条目ID 属于 工资信息表                                                             */
  480. /*  "Pay" : 工资金额 属于 工资信息表                                                                     */
  481. /*  "PayYear" : 工资年份 属于 工资信息表                                                                 */
  482. /*  "PayMonth" : 工资月份 属于 工资信息表                                                                */
  483. /*  "IsConfirmed" : 是否已确认 属于 工资信息表                                                            */
  484. /*  "ConfirmInfo" : 确认信息 属于 工资信息表                                                             */  
  485. create table "PayInfo" ( 
  486. "ID" int identity not null,
  487. "PersonnelID" int null,
  488. "PayTypeID" int null,
  489. "Pay" money null,
  490. "PayYear" int null,
  491. "PayMonth" int null,
  492. "IsConfirmed" bit null,
  493. "ConfirmInfo" varchar(60) null)  
  494. go
  495. alter table "PayInfo"
  496. add constraint "PayInfo_PK" primary key ("ID")   
  497. go
  498. /* 创建新表 "BasePayInfo"。                                                                        */
  499. /* "BasePayInfo" : Table of 基本工资信息表                                                           */
  500. /*  "ID" : ID 标识 基本工资信息表                                                                      */
  501. /*  "PersonnelID" : 员工ID 属于 基本工资信息表                                                           */
  502. /*  "PayTypeID" : 工资条目ID 属于 基本工资信息表                                                           */
  503. /*  "Pay" : 工资金额 属于 基本工资信息表                                                                   */  
  504. create table "BasePayInfo" ( 
  505. "ID" int identity not null,
  506. "PersonnelID" int null,
  507. "PayTypeID" int null,
  508. "Pay" money null)  
  509. go
  510. alter table "BasePayInfo"
  511. add constraint "BasePayInfo_PK" primary key ("ID")   
  512. go
  513. /* 创建新表 "PayTypeInfo"。                                                                        */
  514. /* "PayTypeInfo" : Table of 工资条目信息表                                                           */
  515. /*  "ID" : ID 标识 工资条目信息表                                                                      */
  516. /*  "TypeName" : 条目名称 属于 工资条目信息表                                                              */
  517. /*  "OrderNumber" : 排序编号 属于 工资条目信息表                                                           */  
  518. create table "PayTypeInfo" ( 
  519. "ID" int identity not null,
  520. "TypeName" varchar(60) null,
  521. "OrderNumber" int null)  
  522. go
  523. alter table "PayTypeInfo"
  524. add constraint "PayTypeInfo_PK" primary key ("ID")   
  525. go
  526. /* 创建新表 "SignTypeInfo"。                                                                       */
  527. /* "SignTypeInfo" : Table of 签到类型信息表                                                          */
  528. /*  "ID" : ID 标识 签到类型信息表                                                                      */
  529. /*  "TypeName" : 类型名称 属于 签到类型信息表                                                              */
  530. /*  "StartTime" : 签到开始时间 属于 签到类型信息表                                                           */
  531. /*  "EndTime" : 签到结束时间 属于 签到类型信息表                                                             */
  532. /*  "BeforeBeign" : 早签到描述 属于 签到类型信息表                                                          */
  533. /*  "AfterEnd" : 晚签到描述 属于 签到类型信息表                                                             */
  534. /*  "Remark" : 备注 属于 签到类型信息表                                                                  */
  535. /*  "WorkDay" : 签到工作日 属于 签到类型信息表                                                              */
  536. /*  "NoSignUserIDs" : 不用签到用户ID 属于 签到类型信息表                                                     */  
  537. create table "SignTypeInfo" ( 
  538. "ID" int identity not null,
  539. "TypeName" varchar(100) null,
  540. "StartTime" varchar(50) null,
  541. "EndTime" varchar(50) null,
  542. "BeforeBeign" varchar(200) null,
  543. "AfterEnd" varchar(200) null,
  544. "Remark" varchar(250) null,
  545. "WorkDay" varchar(60) null,
  546. "NoSignUserIDs" varchar(250) null)  
  547. go
  548. alter table "SignTypeInfo"
  549. add constraint "SignTypeInfo_PK" primary key ("ID")   
  550. go
  551. /* 创建新表 "SignInfo"。                                                                           */
  552. /* "SignInfo" : Table of 签到信息表                                                                */
  553. /*  "ID" : ID 标识 签到信息表                                                                        */
  554. /*  "UserID" : 用户ID 属于 签到信息表                                                                  */
  555. /*  "SignTypeID" : 签到类型ID 属于 签到信息表                                                            */
  556. /*  "SignTime" : 签到时间 属于 签到信息表                                                                */
  557. /*  "SignIP" : 签到IP地址 属于 签到信息表                                                                */
  558. /*  "IsNormal" : 是否正常 属于 签到信息表                                                                */
  559. /*  "Remark" : 备注 属于 签到信息表                                                                    */
  560. /*  "EditUserID" : 修改记录用户ID 属于 签到信息表                                                          */
  561. /*  "EditIP" : 修改记录IP 属于 签到信息表                                                                */  
  562. create table "SignInfo" ( 
  563. "ID" int identity not null,
  564. "UserID" int null,
  565. "SignTypeID" int null,
  566. "SignTime" datetime null,
  567. "SignIP" varchar(100) null,
  568. "IsNormal" bit null,
  569. "Remark" varchar(200) null,
  570. "EditUserID" int null,
  571. "EditIP" varchar(100) null)  
  572. go
  573. alter table "SignInfo"
  574. add constraint "SignInfo_PK" primary key ("ID")   
  575. go
  576. /* 创建新表 "RoleModuleRight"。                                                                    */
  577. /* "RoleModuleRight" : Table of 角色功能模块权限表                                                     */
  578. /*  "ID" : ID 标识 角色功能模块权限表                                                                    */
  579. /*  "ModuleID" : 功能模块ID 属于 角色功能模块权限表                                                          */
  580. /*  "RoleID" : 角色ID 属于 角色功能模块权限表                                                              */  
  581. create table "RoleModuleRight" ( 
  582. "ID" int identity not null,
  583. "ModuleID" int null,
  584. "RoleID" int null)  
  585. go
  586. alter table "RoleModuleRight"
  587. add constraint "RoleModuleRight_PK" primary key ("ID")   
  588. go
  589. /* 创建新表 "ModuleInfo"。                                                                         */
  590. /* "ModuleInfo" : Table of 功能模块信息表                                                            */
  591. /*  "ID" : ID 标识 功能模块信息表                                                                      */
  592. /*  "ModuleName" : Mo 属于 功能模块信息表                                                              */  
  593. create table "ModuleInfo" ( 
  594. "ID" int identity not null,
  595. "ModuleName" varchar(60) null)  
  596. go
  597. alter table "ModuleInfo"
  598. add constraint "ModuleInfo_PK" primary key ("ID")   
  599. go
  600. /* 创建新表 "PublicResShare"。                                                                     */
  601. /* "PublicResShare" : Table of 公物共享                                                           */
  602. /*  "ID" : ID 标识 公物共享                                                                         */
  603. /*  "AssetID" : 资产ID 属于 公物共享                                                                  */
  604. /*  "StartTime" : 计划开始时间 属于 公物共享                                                              */
  605. /*  "EndTime" : 计划结束时间 属于 公物共享                                                                */
  606. /*  "Purpose" : 用途 属于 公物共享                                                                    */
  607. /*  "UserID" : 申请用户ID 属于 公物共享                                                                 */
  608. /*  "IsPlan" : 是否计划 属于 公物共享                                                                   */  
  609. create table "PublicResShare" ( 
  610. "ID" int identity not null,
  611. "AssetID" int null,
  612. "StartTime" datetime null,
  613. "EndTime" datetime null,
  614. "Purpose" varchar(60) null,
  615. "UserID" int null,
  616. "IsPlan" bit null) ON 'PRIMARY'  
  617. go
  618. alter table "PublicResShare"
  619. add constraint "PublicResShare_PK" primary key clustered ("ID")   
  620. go
  621. /* 创建新表 "PageRights"。                                                                         */
  622. /* "PageRights" : Table of 页面访问权限表                                                            */
  623. /*  "ID" : ID 标识 页面访问权限表                                                                      */
  624. /*  "PageURL" : 页面地址 属于 页面访问权限表                                                               */
  625. /*  "ModuleID" : 功能模块ID 属于 页面访问权限表                                                            */  
  626. create table "PageRights" ( 
  627. "ID" int identity not null,
  628. "PageURL" varchar(100) null,
  629. "ModuleID" int null) ON 'PRIMARY'  
  630. go
  631. alter table "PageRights"
  632. add constraint "PageRights_PK" primary key clustered ("ID")   
  633. go
  634. /* 创建新表 "OnlineMessage"。                                                                      */
  635. /* "OnlineMessage" : Table of 在线消息表                                                           */
  636. /*  "ID" : ID 标识 在线消息表                                                                        */
  637. /*  "Title" : 标题 属于 在线消息表                                                                     */
  638. /*  "SendTime" : 发送时间 属于 在线消息表                                                                */
  639. /*  "Content" : 信息内容 属于 在线消息表                                                                 */
  640. /*  "SendUserID" : 发送用户ID 属于 在线消息表                                                            */
  641. /*  "RecieveUserID" : 接收用户ID 属于 在线消息表                                                         */
  642. /*  "IsReaded" : 是否已读 属于 在线消息表                                                                */
  643. /*  "IsSenderDel" : 是否已被发送者删除 属于 在线消息表                                                        */
  644. /*  "IsRecieverDel" : 是否已被接收者删除 属于 在线消息表                                                      */
  645. /*  "IsSecret" : 是否密送 属于 在线消息表                                                                */
  646. /*  "IsPigeonhole" : 是否已经归档 属于 在线消息表                                                          */
  647. /*  "MessageID" : 信息标识 属于 在线消息表                                                               */
  648. /*  "IsReminded" : 是否已经提醒 属于 在线消息表                                                            */  
  649. create table "OnlineMessage" ( 
  650. "ID" int identity not null,
  651. "Title" varchar(60) null,
  652. "SendTime" datetime null,
  653. "Content" text null,
  654. "SendUserID" int null,
  655. "RecieveUserID" int null,
  656. "IsReaded" bit null,
  657. "IsSenderDel" bit null,
  658. "IsRecieverDel" bit null,
  659. "IsSecret" bit null,
  660. "IsPigeonhole" bit null,
  661. "MessageID" int null,
  662. "IsReminded" bit null) ON 'PRIMARY' TEXTIMAGE_ON 'PRIMARY'  
  663. go
  664. alter table "OnlineMessage"
  665. add constraint "OnlineMessage_PK" primary key clustered ("ID")   
  666. go
  667. /* 创建新表 "MailServerInfo"。                                                                     */
  668. /* "MailServerInfo" : Table of 邮件服务器信息表                                                       */
  669. /*  "ID" : 邮件邮件ID 标识 邮件服务器信息表                                                                 */
  670. /*  "ServerName" : 服务器名称 属于 邮件服务器信息表                                                          */
  671. /*  "POP3" : POP3服务器地址 属于 邮件服务器信息表                                                            */
  672. /*  "POP3User" : POP3用户名 属于 邮件服务器信息表                                                          */
  673. /*  "POP3Password" : POP3密码 属于 邮件服务器信息表                                                       */
  674. /*  "POP3Port" : POP3端口 属于 邮件服务器信息表                                                           */
  675. /*  "SMTPServer" : SMTP服务器 属于 邮件服务器信息表                                                        */
  676. /*  "SMTPUser" : SMTP用户名 属于 邮件服务器信息表                                                          */
  677. /*  "SMTPPassword" : SMTP密码 属于 邮件服务器信息表                                                       */
  678. /*  "LastTime" : 最后使用时间 属于 邮件服务器信息表                                                           */
  679. /*  "UserID" : 用户ID 属于 邮件服务器信息表                                                               */  
  680. create table "MailServerInfo" ( 
  681. "ID" int identity not null,
  682. "ServerName" varchar(60) null,
  683. "POP3" varchar(60) null,
  684. "POP3User" varchar(60) null,
  685. "POP3Password" varchar(60) null,
  686. "POP3Port" int null,
  687. "SMTPServer" varchar(60) null,
  688. "SMTPUser" varchar(60) null,
  689. "SMTPPassword" varchar(60) null,
  690. "LastTime" datetime null,
  691. "UserID" int null) ON 'PRIMARY'  
  692. go
  693. alter table "MailServerInfo"
  694. add constraint "MailServerInfo_PK" primary key clustered ("ID")   
  695. go
  696. /* 创建新表 "Favorites"。                                                                          */
  697. /* "Favorites" : Table of 收藏夹信息表                                                              */
  698. /*  "ID" : ID 标识 收藏夹信息表                                                                       */
  699. /*  "Name" : 收藏名称 属于 收藏夹信息表                                                                   */
  700. /*  "URL" : 网址 属于 收藏夹信息表                                                                      */
  701. /*  "LastViewTime" : 最后浏览时间 属于 收藏夹信息表                                                         */
  702. /*  "ViewTimes" : 浏览次数 属于 收藏夹信息表                                                              */
  703. /*  "KindsID" : 分类ID 属于 收藏夹信息表                                                                */
  704. /*  "IsOpen" : 是否公开 属于 收藏夹信息表                                                                 */  
  705. create table "Favorites" ( 
  706. "ID" int identity not null,
  707. "Name" varchar(60) null,
  708. "URL" varchar(100) null,
  709. "LastViewTime" datetime null,
  710. "ViewTimes" int null,
  711. "KindsID" int null,
  712. "IsOpen" bit null) ON 'PRIMARY'  
  713. go
  714. alter table "Favorites"
  715. add constraint "Favorites_PK" primary key clustered ("ID")   
  716. go
  717. /* 创建新表 "FavoritesKindInfo"。                                                                  */
  718. /* "FavoritesKindInfo" : Table of 收藏夹分类信息表                                                    */
  719. /*  "ID" : ID 标识 收藏夹分类信息表                                                                     */
  720. /*  "KindName" : 分类名称 属于 收藏夹分类信息表                                                             */
  721. /*  "UserID" : 用户ID 属于 收藏夹分类信息表                                                               */  
  722. create table "FavoritesKindInfo" ( 
  723. "ID" int identity not null,
  724. "KindName" varchar(60) null,
  725. "UserID" int null) ON 'PRIMARY'  
  726. go
  727. alter table "FavoritesKindInfo"
  728. add constraint "FavoritesKindInfo_PK" primary key clustered ("ID")   
  729. go
  730. /* 创建新表 "AssetInOutInfo"。                                                                     */
  731. /* "AssetInOutInfo" : Table of 设备入库出库记录                                                       */
  732. /*  "ID" : ID 标识 设备入库出库记录                                                                     */
  733. /*  "Operation" : 操作类型 属于 设备入库出库记录                                                            */
  734. /*  "StartTime" : 开始时间 属于 设备入库出库记录                                                            */
  735. /*  "EndTime" : 结束时间 属于 设备入库出库记录                                                              */
  736. /*  "OperateUserID" : 操作用户ID 属于 设备入库出库记录                                                      */
  737. /*  "Remark" : 备注 属于 设备入库出库记录                                                                 */
  738. /*  "OperateTime" : 操作时间 属于 设备入库出库记录                                                          */
  739. /*  "AssetID" : 资产ID 属于 设备入库出库记录                                                              */
  740. /*  "Amount" : 数量 属于 设备入库出库记录                                                                 */  
  741. create table "AssetInOutInfo" ( 
  742. "ID" int identity not null,
  743. "Operation" varchar(50) null,
  744. "StartTime" datetime null,
  745. "EndTime" datetime null,
  746. "OperateUserID" int null,
  747. "Remark" text null,
  748. "OperateTime" datetime null,
  749. "AssetID" int null,
  750. "Amount" float null) ON 'PRIMARY' TEXTIMAGE_ON 'PRIMARY'  
  751. go
  752. alter table "AssetInOutInfo"
  753. add constraint "AssetInOutInfo_PK" primary key clustered ("ID")   
  754. go
  755. /* 创建新表 "ErrandApplyAndRecord"。                                                               */
  756. /* "ErrandApplyAndRecord" : Table of 出差申请与记录                                                  */
  757. /*  "ID" : ID 标识 出差申请与记录                                                                      */
  758. /*  "PlanStartTime" : 计划开始时间 属于 出差申请与记录                                                       */
  759. /*  "PlanEndTime" : 计划结束时间 属于 出差申请与记录                                                         */
  760. /*  "RealStartTime" : 实际开始时间 属于 出差申请与记录                                                       */
  761. /*  "RealEndTime" : 实际结束时间 属于 出差申请与记录                                                         */
  762. /*  "CompanyTo" : 目的公司名称 属于 出差申请与记录                                                           */
  763. /*  "CityTo" : 目的城市 属于 出差申请与记录                                                                */
  764. /*  "ErrandTitle" : 出差事由 属于 出差申请与记录                                                           */
  765. /*  "ErrandContent" : 出差事由描述 属于 出差申请与记录                                                       */
  766. /*  "Personnels" : 出差人员 属于 出差申请与记录                                                            */
  767. /*  "Remark" : 备注 属于 出差申请与记录                                                                  */
  768. /*  "ApplyUserID" : 申请用户ID 属于 出差申请与记录                                                         */
  769. /*  "ApplyTime" : 申请时间 属于 出差申请与记录                                                             */
  770. /*  "ConfirmUserID" : 批准用户ID 属于 出差申请与记录                                                       */
  771. /*  "SysDirID" : 系统目录ID 属于 出差申请与记录                                                            */  
  772. create table "ErrandApplyAndRecord" ( 
  773. "ID" int identity not null,
  774. "PlanStartTime" datetime null,
  775. "PlanEndTime" datetime null,
  776. "RealStartTime" datetime null,
  777. "RealEndTime" datetime null,
  778. "CompanyTo" varchar(150) null,
  779. "CityTo" varchar(60) null,
  780. "ErrandTitle" varchar(150) null,
  781. "ErrandContent" text null,
  782. "Personnels" varchar(200) null,
  783. "Remark" text null,
  784. "ApplyUserID" int null,
  785. "ApplyTime" datetime null,
  786. "ConfirmUserID" int null,
  787. "SysDirID" int null) ON 'PRIMARY' TEXTIMAGE_ON 'PRIMARY'  
  788. go
  789. alter table "ErrandApplyAndRecord"
  790. add constraint "ErrandApplyAndRecord_PK" primary key clustered ("ID")   
  791. go
  792. /* 创建新表 "CalendarPlans"。                                                                      */
  793. /* "CalendarPlans" : Table of 日程计划                                                            */
  794. /*  "ID" : ID 标识 日程计划                                                                         */
  795. /*  "UserID" : 用户ID 属于 日程计划                                                                   */
  796. /*  "PlanTitle" : 计划主题 属于 日程计划                                                                */
  797. /*  "PlanContent" : 计划内容 属于 日程计划                                                              */
  798. /*  "AddTime" : 增加时间 属于 日程计划                                                                  */
  799. /*  "PlanBeginDate" : 计划开始时间 属于 日程计划                                                          */
  800. /*  "PlanEndDate" : 计划结束时间 属于 日程计划                                                            */
  801. /*  "RealBeginDate" : 实际开始时间 属于 日程计划                                                          */
  802. /*  "RealEndDate" : 实际结束时间 属于 日程计划                                                            */
  803. /*  "ImportLevel" : 重要等级 属于 日程计划                                                              */
  804. /*  "RemindInterval" : 提醒时间间隔 属于 日程计划                                                         */
  805. /*  "IsFinished" : 是否已经完成 属于 日程计划                                                             */
  806. /*  "Remark" : 备注 属于 日程计划                                                                     */  
  807. create table "CalendarPlans" ( 
  808. "ID" int identity not null,
  809. "UserID" int null,
  810. "PlanTitle" varchar(60) null,
  811. "PlanContent" text null,
  812. "AddTime" datetime null,
  813. "PlanBeginDate" datetime null,
  814. "PlanEndDate" datetime null,
  815. "RealBeginDate" datetime null,
  816. "RealEndDate" datetime null,
  817. "ImportLevel" int null,
  818. "RemindInterval" int null,
  819. "IsFinished" bit null,
  820. "Remark" text null) ON 'PRIMARY' TEXTIMAGE_ON 'PRIMARY'  
  821. go
  822. alter table "CalendarPlans"
  823. add constraint "CalendarPlans_PK" primary key clustered ("ID")   
  824. go
  825. /* 创建新表 "FieldsValue"。                                                                        */
  826. /* "FieldsValue" : Table of 文档字段值存放表                                                          */
  827. /*  "ID" : ID 标识 文档字段值存放表                                                                     */
  828. /*  "DocumentID" : 文档ID 属于 文档字段值存放表                                                           */
  829. /*  "FieldID" : 字段ID 属于 文档字段值存放表                                                              */
  830. /*  "FieldValue" : 字段值 属于 文档字段值存放表                                                            */  
  831. create table "FieldsValue" ( 
  832. "ID" int identity not null,
  833. "DocumentID" int null,
  834. "FieldID" int null,
  835. "FieldValue" text null) ON 'PRIMARY' TEXTIMAGE_ON 'PRIMARY'  
  836. go
  837. alter table "FieldsValue"
  838. add constraint "FieldsValue_PK" primary key clustered ("ID")   
  839. go
  840. /* 创建新表 "DocFieldsName"。                                                                      */
  841. /* "DocFieldsName" : Table of 文档字段名称表                                                         */
  842. /*  "ID" : ID 标识 文档字段名称表                                                                      */
  843. /*  "FieldsName" : 字段名称 属于 文档字段名称表                                                            */
  844. /*  "OrderBy" : 排序编号 属于 文档字段名称表                                                               */
  845. /*  "FieldType" : 字段类型 属于 文档字段名称表                                                             */
  846. /*  "DocumentTypeID" : 文档类型ID 属于 文档字段名称表                                                      */  
  847. create table "DocFieldsName" ( 
  848. "ID" int identity not null,
  849. "FieldsName" varchar(60) null,
  850. "OrderBy" int null,
  851. "FieldType" varchar(60) null,
  852. "DocumentTypeID" int null) ON 'PRIMARY'  
  853. go
  854. alter table "DocFieldsName"
  855. add constraint "DocFieldsName_PK" primary key clustered ("ID")   
  856. go
  857. /* 创建新表 "DocumentTypeInfo"。                                                                   */
  858. /* "DocumentTypeInfo" : Table of 文档类型信息表                                                      */
  859. /*  "ID" : ID 标识 文档类型信息表                                                                      */
  860. /*  "TypeName" : 类型名称 属于 文档类型信息表                                                              */
  861. /*  "SysDirID" : 系统目录ID 属于 文档类型信息表                                                            */  
  862. create table "DocumentTypeInfo" ( 
  863. "ID" int identity not null,
  864. "TypeName" varchar(60) null,
  865. "SysDirID" int null) ON 'PRIMARY'  
  866. go
  867. alter table "DocumentTypeInfo"
  868. add constraint "DocumentTypeInfo_PK" primary key clustered ("ID")   
  869. go
  870. /* 创建新表 "DocumentInfo"。                                                                       */
  871. /* "DocumentInfo" : Table of 公文信息表                                                            */
  872. /*  "ID" : ID 标识 公文信息表                                                                        */
  873. /*  "DocumentName" : 公文名称 属于 公文信息表                                                            */
  874. /*  "Content" : 公文内容 属于 公文信息表                                                                 */
  875. /*  "PublishUserID" : 发布用户ID 属于 公文信息表                                                         */
  876. /*  "PublishTime" : 发布时间 属于 公文信息表                                                             */
  877. /*  "DocumentTypeID" : 文档类型ID 属于 公文信息表                                                        */
  878. /*  "ReadUserIDs" : 阅读用户ID 属于 公文信息表                                                           */
  879. /*  "EditUserIDs" : 修改用户ID 属于 公文信息表                                                           */  
  880. create table "DocumentInfo" ( 
  881. "ID" int identity not null,
  882. "DocumentName" varchar(150) null,
  883. "Content" text null,
  884. "PublishUserID" int null,
  885. "PublishTime" datetime null,
  886. "DocumentTypeID" int null,
  887. "ReadUserIDs" varchar(300) null,
  888. "EditUserIDs" varchar(300) null) ON 'PRIMARY' TEXTIMAGE_ON 'PRIMARY'  
  889. go
  890. alter table "DocumentInfo"
  891. add constraint "DocumentInfo_PK" primary key clustered ("ID")   
  892. go
  893. /* 创建新表 "VoteOptionsInfo"。                                                                    */
  894. /* "VoteOptionsInfo" : Table of 投票选项信息表                                                       */
  895. /*  "ID" : ID 标识 投票选项信息表                                                                      */
  896. /*  "VoteID" : 投票ID 属于 投票选项信息表                                                                */
  897. /*  "OptionContent" : 选项内容 属于 投票选项信息表                                                         */
  898. /*  "Times" : 获得票数 属于 投票选项信息表                                                                 */  
  899. create table "VoteOptionsInfo" ( 
  900. "ID" int identity not null,
  901. "VoteID" int null,
  902. "OptionContent" varchar(255) null,
  903. "Times" int null) ON 'PRIMARY'  
  904. go
  905. alter table "VoteOptionsInfo"
  906. add constraint "VoteOptionsInfo_PK" primary key clustered ("ID")   
  907. go
  908. /* 创建新表 "VoteInfo"。                                                                           */
  909. /* "VoteInfo" : Table of 在线投票信息表                                                              */
  910. /*  "ID" : ID 标识 在线投票信息表                                                                      */
  911. /*  "VoteName" : 投票名称 属于 在线投票信息表                                                              */
  912. /*  "StartTime" : 开始时间 属于 在线投票信息表                                                             */
  913. /*  "EndTime" : 结束时间 属于 在线投票信息表                                                               */
  914. /*  "IsRadio" : 是否单选 属于 在线投票信息表                                                               */
  915. /*  "SysDirID" : 系统目录ID 属于 在线投票信息表                                                            */
  916. /*  "VoteTimes" : 投票次数 属于 在线投票信息表                                                             */
  917. /*  "PublishTime" : 发布时间 属于 在线投票信息表                                                           */
  918. /*  "PublishUserID" : 发布用户ID 属于 在线投票信息表                                                       */  
  919. create table "VoteInfo" ( 
  920. "ID" int identity not null,
  921. "VoteName" varchar(60) null,
  922. "StartTime" datetime null,
  923. "EndTime" datetime null,
  924. "IsRadio" bit null,
  925. "SysDirID" int null,
  926. "VoteTimes" int null,
  927. "PublishTime" datetime null,
  928. "PublishUserID" int null) ON 'PRIMARY'  
  929. go
  930. alter table "VoteInfo"
  931. add constraint "VoteInfo_PK" primary key clustered ("ID")   
  932. go
  933. /* 创建新表 "BBSInfo"。                                                                            */
  934. /* "BBSInfo" : Table of 在线论坛信息表                                                               */
  935. /*  "ID" : ID 标识 在线论坛信息表                                                                      */
  936. /*  "Title" : 标题 属于 在线论坛信息表                                                                   */
  937. /*  "PublishTime" : 发布时间 属于 在线论坛信息表                                                           */
  938. /*  "PublishUserID" : 发布用户ID 属于 在线论坛信息表                                                       */
  939. /*  "FaceID" : 表情ID 属于 在线论坛信息表                                                                */
  940. /*  "Content" : 内容 属于 在线论坛信息表                                                                 */
  941. /*  "Station" : 帖子位置 属于 在线论坛信息表                                                               */
  942. /*  "SysDirID" : 系统目录ID 属于 在线论坛信息表                                                            */
  943. /*  "ViewTimes" : 浏览次数 属于 在线论坛信息表                                                             */  
  944. create table "BBSInfo" ( 
  945. "ID" int identity not null,
  946. "Title" varchar(60) null,
  947. "PublishTime" datetime null,
  948. "PublishUserID" int null,
  949. "FaceID" int null,
  950. "Content" text null,
  951. "Station" varchar(250) null,
  952. "SysDirID" int null,
  953. "ViewTimes" int null) ON 'PRIMARY' TEXTIMAGE_ON 'PRIMARY'  
  954. go
  955. alter table "BBSInfo"
  956. add constraint "BBSInfo_PK" primary key clustered ("ID")   
  957. go
  958. /* 创建新表 "ArticleAttInfo"。                                                                     */
  959. /* "ArticleAttInfo" : 文章相关附件信息表                                                               */
  960. /*  "ID" : ID 标识 文章相关附件信息表                                                                    */
  961. /*  "AttName" : 附件名称                                                                          */
  962. /*  "AttURL" : 附件连接地址                                                                         */
  963. /*  "FartherID" : 父级ID 属于 文章相关附件信息表                                                           */
  964. /*  "FartherTable" : 父级表名称 属于 文章相关附件信息表                                                       */  
  965. create table "ArticleAttInfo" ( 
  966. "ID" int identity not null,
  967. "AttName" varchar(150) null,
  968. "AttURL" varchar(250) null,
  969. "FartherID" int null,
  970. "FartherTable" varchar(60) null) ON 'PRIMARY'  
  971. go
  972. alter table "ArticleAttInfo"
  973. add constraint "ArticleAttInfo_PK" primary key clustered ("ID")   
  974. go
  975. /* 创建新表 "ArticleInfo"。                                                                        */
  976. /* "ArticleInfo" : 新闻文章信息表                                                                    */
  977. /*  "ID" : ID 标识 新闻文章信息表                                                                      */
  978. /*  "Title" : 标题                                                                              */
  979. /*  "Author" : 作者                                                                             */
  980. /*  "Publisher" : 出版社                                                                         */
  981. /*  "FromURL" : 来源网址                                                                          */
  982. /*  "PublishDate" : 发表时间                                                                      */
  983. /*  "Content" : 内容                                                                            */
  984. /*  "ViewTimes" : 浏览次数                                                                        */
  985. /*  "IsHot" : 是否热点文章                                                                          */
  986. /*  "ThemeImage" : 主题图片 属于 新闻文章信息表                                                            */
  987. /*  "KeyWords" : 关键字 属于 新闻文章信息表                                                               */
  988. /*  "SysDirID" : 系统目录ID 属于 新闻文章信息表                                                            */
  989. /*  "PublishUserID" : 发布用户ID 属于 新闻文章信息表                                                       */  
  990. create table "ArticleInfo" ( 
  991. "ID" int identity not null,
  992. "Title" varchar(100) null,
  993. "Author" varchar(50) null,
  994. "Publisher" varchar(100) null,
  995. "FromURL" varchar(150) null,
  996. "PublishDate" datetime null,
  997. "Content" text null,
  998. "ViewTimes" int null,
  999. "IsHot" bit null,
  1000. "ThemeImage" varchar(100) null,
  1001. "KeyWords" varchar(100) null,
  1002. "SysDirID" int null,
  1003. "PublishUserID" int null) ON 'PRIMARY' TEXTIMAGE_ON 'PRIMARY'  
  1004. go
  1005. alter table "ArticleInfo"
  1006. add constraint "ArticleInfo_PK" primary key clustered ("ID")   
  1007. go
  1008. /* 创建新表 "FamilyMember"。                                                                       */
  1009. /* "FamilyMember" : 家庭成员信息表                                                                   */
  1010. /*  "ID" : ID 标识 家庭成员信息表                                                                      */
  1011. /*  "Name" : 姓名                                                                               */
  1012. /*  "BirthDate" : 出生日期                                                                        */
  1013. /*  "Relation" : 关系                                                                           */
  1014. /*  "Place" : 职位                                                                              */
  1015. /*  "Commpany" : 工作单位                                                                         */
  1016. /*  "PersannelID" : 员工ID 属于 家庭成员信息表                                                           */  
  1017. create table "FamilyMember" ( 
  1018. "ID" int identity not null,
  1019. "Name" varchar(50) null,
  1020. "BirthDate" datetime null,
  1021. "Relation" varchar(50) null,
  1022. "Place" varchar(50) null,
  1023. "Commpany" varchar(50) null,
  1024. "PersannelID" int null) ON 'PRIMARY'  
  1025. go
  1026. alter table "FamilyMember"
  1027. add constraint "FamilyMember_PK" primary key clustered ("ID")   
  1028. go
  1029. /* 创建新表 "PlaceInfo"。                                                                          */
  1030. /* "PlaceInfo" : 职位信息表                                                                        */
  1031. /*  "ID" : ID 标识 职位信息表                                                                        */
  1032. /*  "PlaceName" : 职位名称                                                                        */
  1033. /*  "DepartmentID" : 所属部门ID 属于 职位信息表                                                          */  
  1034. create table "PlaceInfo" ( 
  1035. "ID" int identity not null,
  1036. "PlaceName" varchar(50) null,
  1037. "DepartmentID" int null) ON 'PRIMARY'  
  1038. go
  1039. alter table "PlaceInfo"
  1040. add constraint "PlaceInfo_PK" primary key clustered ("ID")   
  1041. go
  1042. /* 创建新表 "MarriageState"。                                                                      */
  1043. /* "MarriageState" : 婚姻状况分类信息表                                                                */
  1044. /*  "ID" : ID 标识 婚姻状况分类信息表                                                                    */
  1045. /*  "MarriageState" : 婚姻状况                                                                    */
  1046. /*  "OrderNumber" : 排序                                                                        */  
  1047. create table "MarriageState" ( 
  1048. "ID" int identity not null,
  1049. "MarriageState" varchar(50) null,
  1050. "OrderNumber" int null) ON 'PRIMARY'  
  1051. go
  1052. alter table "MarriageState"
  1053. add constraint "MarriageState_PK" primary key clustered ("ID")   
  1054. go
  1055. /* 创建新表 "EducationInfo"。                                                                      */
  1056. /* "EducationInfo" : 教育程度分类信息表                                                                */
  1057. /*  "ID" : ID 标识 教育程度分类信息表                                                                    */
  1058. /*  "Education" : 教育程度                                                                        */
  1059. /*  "OrderNumber" : 排序编号                                                                      */  
  1060. create table "EducationInfo" ( 
  1061. "ID" int identity not null,
  1062. "Education" varchar(50) null,
  1063. "OrderNumber" int null) ON 'PRIMARY'  
  1064. go
  1065. alter table "EducationInfo"
  1066. add constraint "EducationInfo_PK" primary key clustered ("ID")   
  1067. go
  1068. /* 创建新表 "PersonnelInfo"。                                                                      */
  1069. /* "PersonnelInfo" : 员工信息表                                                                    */
  1070. /*  "ID" : ID 标识 员工信息表                                                                        */
  1071. /*  "Name" : 员工姓名                                                                             */
  1072. /*  "Sex" : 性别                                                                                */
  1073. /*  "BirthDate" : 出生日期                                                                        */
  1074. /*  "Number" : 员工编号                                                                           */
  1075. /*  "OfficeTel" : 办公室电话                                                                       */
  1076. /*  "HomeTel" : 家庭电话或者手机号码                                                                    */
  1077. /*  "IDCard" : 身份证号码                                                                          */
  1078. /*  "HomeAddress" : 家庭住址                                                                      */
  1079. /*  "EMail" : E-mail                                                                          */
  1080. /*  "Resume" : 个人简历                                                                           */
  1081. /*  "Remark" : 备注                                                                             */
  1082. /*  "Remark1" : 备用字段1                                                                         */
  1083. /*  "DepartmentID" : 所属部门ID 属于 员工信息表                                                          */
  1084. /*  "EducationID" : 教育程度ID 属于 员工信息表                                                           */
  1085. /*  "MarriageID" : 婚姻状况ID 属于 员工信息表                                                            */
  1086. /*  "PlaceID" : 职位ID 属于 员工信息表                                                                 */
  1087. /*  "TechnicalPostID" : 职称ID 属于 员工信息表                                                         */
  1088. /*  "Photo" : 像片 属于 员工信息表                                                                     */  
  1089. create table "PersonnelInfo" ( 
  1090. "ID" int identity not null,
  1091. "Name" varchar(50) null,
  1092. "Sex" varchar(10) null,
  1093. "BirthDate" datetime null,
  1094. "Number" varchar(50) null,
  1095. "OfficeTel" varchar(60) null,
  1096. "HomeTel" varchar(60) null,
  1097. "IDCard" varchar(60) null,
  1098. "HomeAddress" varchar(100) null,
  1099. "EMail" varchar(60) null,
  1100. "Resume" varchar(10) null,
  1101. "Remark" varchar(10) null,
  1102. "Remark1" varchar(10) null,
  1103. "DepartmentID" int null,
  1104. "EducationID" int null,
  1105. "MarriageID" int null,
  1106. "PlaceID" int null,
  1107. "TechnicalPostID" int null,
  1108. "Photo" varchar(150) null) ON 'PRIMARY'  
  1109. go
  1110. alter table "PersonnelInfo"
  1111. add constraint "PersonelInfo_PK" primary key clustered ("ID")   
  1112. go
  1113. /* 创建新表 "DepartmentInfo"。                                                                     */
  1114. /* "DepartmentInfo" : 部门信息表                                                                   */
  1115. /*  "ID" : ID 在于 部门信息表                                                                        */
  1116. /*  "Name" : 名称                                                                               */
  1117. /*  "Station" : 所在位置                                                                          */
  1118. /*  "LevelNumber" : 级别                                                                        */
  1119. /*  "ChildrenAcount" : 子级目录个数 属于 部门信息表                                                        */
  1120. /*  "OrderNumber" : 顺序                                                                        */
  1121. /*  "OpenedICO" : 打开图标                                                                        */
  1122. /*  "CloseedICO" : 关闭图标                                                                       */
  1123. /*  "LinkUrl" : 连接地址                                                                          */
  1124. /*  "Target" : 打开连接的目标框架                                                                      */
  1125. /*  "IsLink" : 是否连接                                                                           */
  1126. /*  "Content" : 内容简介                                                                          */
  1127. /*  "IsShow" : 是否显示                                                                           */  
  1128. create table "DepartmentInfo" ( 
  1129. "ID" int identity not null,
  1130. "Name" varchar(50) null,
  1131. "Station" varchar(250) null,
  1132. "LevelNumber" int null,
  1133. "ChildrenAcount" int null,
  1134. "OrderNumber" int null,
  1135. "OpenedICO" varchar(150) null,
  1136. "CloseedICO" varchar(150) null,
  1137. "LinkUrl" varchar(150) null,
  1138. "Target" varchar(50) null,
  1139. "IsLink" bit null,
  1140. "Content" varchar(1000) null,
  1141. "IsShow" bit null) ON 'PRIMARY'  
  1142. go
  1143. alter table "DepartmentInfo"
  1144. add constraint "DepartmentInfo_PK" primary key clustered ("ID")   
  1145. go
  1146. /* 创建新表 "RoleInfo"。                                                                           */
  1147. /* "RoleInfo" : 用户角色信息表                                                                       */
  1148. /*  "ID" : ID 标识 用户角色信息表                                                                      */
  1149. /*  "RoleName" : 角色名称                                                                         */  
  1150. create table "RoleInfo" ( 
  1151. "ID" int identity not null,
  1152. "RoleName" varchar(50) null) ON 'PRIMARY'  
  1153. go
  1154. alter table "RoleInfo"
  1155. add constraint "RoleInfo_PK" primary key clustered ("ID")   
  1156. go
  1157. /* 创建新表 "UserInfo"。                                                                           */
  1158. /* "UserInfo" : 用户信息表                                                                         */
  1159. /*  "ID" : ID 部分标识 用户信息表                                                                      */
  1160. /*  "UserName" : 用户名称                                                                         */
  1161. /*  "Password" : 用户密码                                                                         */
  1162. /*  "PersonnelID" : 真实姓名                                                                      */
  1163. /*  "RoleID" : 角色ID 属于 用户信息表                                                                  */
  1164. /*  "FTPUserName" : FTP用户名 属于 用户信息表                                                           */
  1165. /*  "FTPPassword" : FTP密码 属于 用户信息表                                                            */
  1166. /*  "StyleID" : 用户风格ID 属于 用户信息表                                                               */  
  1167. create table "UserInfo" ( 
  1168. "ID" int identity not null,
  1169. "UserName" varchar(50) null,
  1170. "Password" varchar(50) null,
  1171. "PersonnelID" int null,
  1172. "RoleID" int null,
  1173. "FTPUserName" varchar(60) null,
  1174. "FTPPassword" varchar(60) null,
  1175. "StyleID" int null) ON 'PRIMARY'  
  1176. go
  1177. alter table "UserInfo"
  1178. add constraint "UserInfo_PK" primary key clustered ("ID")   
  1179. go
  1180. /* 创建新表 "TechnicalPostInfo"。                                                                  */
  1181. /* "TechnicalPostInfo" : 职称分类信息表                                                              */
  1182. /*  "ID" : ID 标识 职称分类信息表                                                                      */
  1183. /*  "TechnicalPost" : 职称名称                                                                    */
  1184. /*  "OrderNumber" : 排序                                                                        */  
  1185. create table "TechnicalPostInfo" ( 
  1186. "ID" int identity not null,
  1187. "TechnicalPost" varchar(50) null,
  1188. "OrderNumber" int null) ON 'PRIMARY'  
  1189. go
  1190. alter table "TechnicalPostInfo"
  1191. add constraint "TechnicalPostInfo_PK" primary key clustered ("ID")   
  1192. go
  1193. /* 创建新表 "SystemDirectory"。                                                                    */
  1194. /* "SystemDirectory" : 系统目录信息表                                                                */
  1195. /*  "ID" : ID 标识 属于 系统目录信息表                                                                   */
  1196. /*  "Name" : 名称                                                                               */
  1197. /*  "Station" : 所在位置                                                                          */
  1198. /*  "LevelNumber" : 级别                                                                        */
  1199. /*  "ChildrenAcount" : 子级目录个数 属于 系统目录信息表                                                      */
  1200. /*  "OrderNumber" : 顺序                                                                        */
  1201. /*  "OpenedICO" : 打开图标                                                                        */
  1202. /*  "CloseedICO" : 关闭图标                                                                       */
  1203. /*  "LinkUrl" : 连接地址                                                                          */
  1204. /*  "Target" : 打开连接的目标框架                                                                      */
  1205. /*  "IsLink" : 是否连接                                                                           */
  1206. /*  "Content" : 内容简介                                                                          */
  1207. /*  "IsShow" : 是否显示                                                                           */  
  1208. create table "SystemDirectory" ( 
  1209. "ID" int identity not null,
  1210. "Name" varchar(50) null,
  1211. "Station" varchar(250) null,
  1212. "LevelNumber" int null,
  1213. "ChildrenAcount" int null,
  1214. "OrderNumber" int null,
  1215. "OpenedICO" varchar(150) null,
  1216. "CloseedICO" varchar(150) null,
  1217. "LinkUrl" varchar(150) null,
  1218. "Target" varchar(50) null,
  1219. "IsLink" bit null,
  1220. "Content" varchar(1000) null,
  1221. "IsShow" bit null) ON 'PRIMARY'  
  1222. go
  1223. alter table "SystemDirectory"
  1224. add constraint "SystemDirectory_PK" primary key clustered ("ID")   
  1225. go
  1226. /* 创建新表 "AssetInfo"。                                                                          */
  1227. /* "AssetInfo" : 资产信息表                                                                        */
  1228. /*  "ID" : ID 标识 资产信息表                                                                        */
  1229. /*  "AssetName" : 资产名称 属于 资产信息表                                                               */
  1230. /*  "AssetNumber" : 资产编号 属于 资产信息表                                                             */
  1231. /*  "AddUserID" : 添加设备用户ID 属于 资产信息表                                                           */
  1232. /*  "AddTime" : 添加时间 属于 资产信息表                                                                 */
  1233. /*  "AssetTypeID" : 资产类型ID 属于 资产信息表                                                           */  
  1234. create table "AssetInfo" ( 
  1235. "ID" int identity not null,
  1236. "AssetName" varchar(150) null,
  1237. "AssetNumber" varchar(50) null,
  1238. "AddUserID" int null,
  1239. "AddTime" datetime null,
  1240. "AssetTypeID" int null) ON 'PRIMARY'  
  1241. go
  1242. alter table "AssetInfo"
  1243. add constraint "AssetInfo_PK" primary key clustered ("ID")   
  1244. go
  1245. /* 创建新表 "AssetTypeInfo"。                                                                      */
  1246. /* "AssetTypeInfo" : Table of 资产类型信息表                                                         */
  1247. /*  "ID" : ID 标识 资产类型信息表                                                                      */
  1248. /*  "TypeName" : 类型名称 属于 资产类型信息表                                                              */
  1249. /*  "SysDirID" : 系统目录ID 属于 资产类型信息表                                                            */  
  1250. create table "AssetTypeInfo" ( 
  1251. "ID" int identity not null,
  1252. "TypeName" varchar(60) null,
  1253. "SysDirID" int null) ON 'PRIMARY'  
  1254. go
  1255. alter table "AssetTypeInfo"
  1256. add constraint "AssetTypeInfo_PK" primary key clustered ("ID")   
  1257. go
  1258. /* 创建新表 "AssetFieldsName"。                                                                    */
  1259. /* "AssetFieldsName" : Table of 资产字段名称表                                                       */
  1260. /*  "ID" : ID 标识 资产字段名称表                                                                      */
  1261. /*  "FieldsName" : 字段名称 属于 资产字段名称表                                                            */
  1262. /*  "OrderBy" : 排序编号 属于 资产字段名称表                                                               */
  1263. /*  "FieldType" : 字段类型 属于 资产字段名称表                                                             */
  1264. /*  "AssetTypeID" : 资产类型ID 属于 资产字段名称表                                                         */  
  1265. create table "AssetFieldsName" ( 
  1266. "ID" int identity not null,
  1267. "FieldsName" varchar(60) null,
  1268. "OrderBy" int null,
  1269. "FieldType" varchar(60) null,
  1270. "AssetTypeID" int null) ON 'PRIMARY'  
  1271. go
  1272. alter table "AssetFieldsName"
  1273. add constraint "AssetFieldsName_PK" primary key clustered ("ID")   
  1274. go
  1275. /* 创建新表 "AssetFieldsValue"。                                                                   */
  1276. /* "AssetFieldsValue" : Table of 资产字段值存放表                                                     */
  1277. /*  "ID" : ID 标识 资产字段值存放表                                                                     */
  1278. /*  "AssetID" : 资产ID 属于 资产字段值存放表                                                              */
  1279. /*  "FieldID" : 字段ID 属于 资产字段值存放表                                                              */
  1280. /*  "FieldValue" : 字段值 属于 资产字段值存放表                                                            */  
  1281. create table "AssetFieldsValue" ( 
  1282. "ID" int identity not null,
  1283. "AssetID" int null,
  1284. "FieldID" int null,
  1285. "FieldValue" text null) ON 'PRIMARY' TEXTIMAGE_ON 'PRIMARY'  
  1286. go
  1287. alter table "AssetFieldsValue"
  1288. add constraint "AssetFieldsValue_PK" primary key clustered ("ID")   
  1289. go
  1290. /* 创建新表 "AddressKindInfo"。                                                                    */
  1291. /* "AddressKindInfo" : Table of 通讯录分类信息表                                                      */
  1292. /*  "ID" : ID 标识 通讯录分类信息表                                                                     */
  1293. /*  "KindName" : 分类名称 属于 通讯录分类信息表                                                             */
  1294. /*  "UserID" : 用户ID 属于 通讯录分类信息表                                                               */  
  1295. create table "AddressKindInfo" ( 
  1296. "ID" int identity not null,
  1297. "KindName" varchar(60) null,
  1298. "UserID" int null) ON 'PRIMARY'  
  1299. go
  1300. alter table "AddressKindInfo"
  1301. add constraint "AddressKindInfo_PK" primary key clustered ("ID")   
  1302. go
  1303. /* 创建新表 "AddressList"。                                                                        */
  1304. /* "AddressList" : Table of 通讯录信息表                                                            */
  1305. /*  "ID" : ID 标识 通讯录信息表                                                                       */
  1306. /*  "Name" : 姓名 属于 通讯录信息表                                                                     */
  1307. /*  "Sex" : 性别 属于 通讯录信息表                                                                      */
  1308. /*  "BirthDate" : 出生日期 属于 通讯录信息表                                                              */
  1309. /*  "Company" : 单位名称 属于 通讯录信息表                                                                */
  1310. /*  "KindsID" : 分类ID 属于 通讯录信息表                                                                */
  1311. /*  "IsOpen" : 是否公开 属于 通讯录信息表                                                                 */
  1312. /*  "Place" : 职位 属于 通讯录信息表                                                                    */
  1313. /*  "HomeTel" : 家庭电话 属于 通讯录信息表                                                                */
  1314. /*  "OfficeTel" : 公司电话 属于 通讯录信息表                                                              */
  1315. /*  "MobileNum" : 手机号码 属于 通讯录信息表                                                              */  
  1316. create table "AddressList" ( 
  1317. "ID" int identity not null,
  1318. "Name" varchar(60) null,
  1319. "Sex" varchar(20) null,
  1320. "BirthDate" datetime null,
  1321. "Company" varchar(60) null,
  1322. "KindsID" int null,
  1323. "IsOpen" bit null,
  1324. "Place" varchar(60) null,
  1325. "HomeTel" varchar(60) null,
  1326. "OfficeTel" varchar(60) null,
  1327. "MobileNum" varchar(60) null) ON 'PRIMARY'  
  1328. go
  1329. alter table "AddressList"
  1330. add constraint "AddressList_PK" primary key clustered ("ID")   
  1331. go
  1332. /* 在表 "ApproveRecordInfo" 中添加外键约束。                                                            */
  1333. alter table "ApproveRecordInfo"
  1334. add constraint "FlowTacheInfo_ApproveRecordInfo_FK1" foreign key (
  1335. "FlowTacheID")
  1336.  references "FlowTacheInfo" (
  1337. "ID")  
  1338. go
  1339. alter table "ApproveRecordInfo"
  1340. add constraint "UserInfo_ApproveRecordInfo_FK1" foreign key (
  1341. "ApproveUserID")
  1342.  references "UserInfo" (
  1343. "ID")  
  1344. go
  1345. /* 在表 "DocFieldsValue" 中添加外键约束。                                                               */
  1346. alter table "DocFieldsValue"
  1347. add constraint "Document_DocFieldsValue_FK1" foreign key (
  1348. "DocTempletFieldsID")
  1349.  references "Document" (
  1350. "ID")  
  1351. go
  1352. alter table "DocFieldsValue"
  1353. add constraint "ApproveRecordInfo_DocFieldsValue_FK1" foreign key (
  1354. "ApproveFlowID")
  1355.  references "ApproveRecordInfo" (
  1356. "ID")  
  1357. go
  1358. /* 在表 "Document" 中添加外键约束。                                                                     */
  1359. alter table "Document"
  1360. add constraint "UserInfo_Document_FK1" foreign key (
  1361. "BuildUserID")
  1362.  references "UserInfo" (
  1363. "ID")  
  1364. go
  1365. alter table "Document"
  1366. add constraint "UserInfo_Document_FK2" foreign key (
  1367. "FillUserID")
  1368.  references "UserInfo" (
  1369. "ID")  
  1370. go
  1371. alter table "Document"
  1372. add constraint "DocTempletMoveFlow_Document_FK1" foreign key (
  1373. "DocFlowTempletID")
  1374.  references "DocTempletMoveFlow" (
  1375. "ID")  
  1376. go
  1377. /* 在表 "DocTempletMoveFlow" 中添加外键约束。                                                           */
  1378. alter table "DocTempletMoveFlow"
  1379. add constraint "DocumentTemplet_DocTempletMoveFlow_FK1" foreign key (
  1380. "DocTempletID")
  1381.  references "DocumentTemplet" (
  1382. "ID")  
  1383. go
  1384. alter table "DocTempletMoveFlow"
  1385. add constraint "MoveFlowInfo_DocTempletMoveFlow_FK1" foreign key (
  1386. "MoveFlowID")
  1387.  references "MoveFlowInfo" (
  1388. "ID")  
  1389. go
  1390. /* 在表 "FlowTacheInfo" 中添加外键约束。                                                                */
  1391. alter table "FlowTacheInfo"
  1392. add constraint "MoveFlowInfo_FlowTacheInfo_FK1" foreign key (
  1393. "FlowID")
  1394.  references "MoveFlowInfo" (
  1395. "ID")  
  1396. go
  1397. alter table "FlowTacheInfo"
  1398. add constraint "UserInfo_FlowTacheInfo_FK1" foreign key (
  1399. "UpdateUserID")
  1400.  references "UserInfo" (
  1401. "ID")  
  1402. go
  1403. /* 在表 "MoveFlowInfo" 中添加外键约束。                                                                 */
  1404. alter table "MoveFlowInfo"
  1405. add constraint "UserInfo_MoveFlowInfo_FK1" foreign key (
  1406. "BuildUserID")
  1407.  references "UserInfo" (
  1408. "ID")  
  1409. go
  1410. /* 在表 "DocTempletFields" 中添加外键约束。                                                             */
  1411. alter table "DocTempletFields"
  1412. add constraint "DocumentTemplet_DocTempletFields_FK1" foreign key (
  1413. "TempletID")
  1414.  references "DocumentTemplet" (
  1415. "ID")  
  1416. go
  1417. /* 在表 "DocumentTemplet" 中添加外键约束。                                                              */
  1418. alter table "DocumentTemplet"
  1419. add constraint "UserInfo_DocumentTemplet_FK1" foreign key (
  1420. "BuildUserID")
  1421.  references "UserInfo" (
  1422. "ID")  
  1423. go
  1424. alter table "DocumentTemplet"
  1425. add constraint "SystemDirectory_DocumentTemplet_FK1" foreign key (
  1426. "SysDirID")
  1427.  references "SystemDirectory" (
  1428. "ID")  
  1429. go
  1430. /* 在表 "PactInfo" 中添加外键约束。                                                                     */
  1431. alter table "PactInfo"
  1432. add constraint "UserInfo_PactInfo_FK1" foreign key (
  1433. "AddUserID")
  1434.  references "UserInfo" (
  1435. "ID")  
  1436. go
  1437. /* 在表 "PactTempletInfo" 中添加外键约束。                                                              */
  1438. alter table "PactTempletInfo"
  1439. add constraint "UserInfo_PactTempletInfo_FK1" foreign key (
  1440. "BuildUserID")
  1441.  references "UserInfo" (
  1442. "ID")  
  1443. go
  1444. /* 在表 "CahierInfo" 中添加外键约束。                                                                   */
  1445. alter table "CahierInfo"
  1446. add constraint "BoardroomApplyInfo_CahierInfo_FK1" foreign key (
  1447. "BoardroomApplyID")
  1448.  references "BoardroomApplyInfo" (
  1449. "ID")  
  1450. go
  1451. alter table "CahierInfo"
  1452. add constraint "BoardroomInfo_CahierInfo_FK1" foreign key (
  1453. "BoardroomID")
  1454.  references "BoardroomInfo" (
  1455. "ID")  
  1456. go
  1457. alter table "CahierInfo"
  1458. add constraint "UserInfo_CahierInfo_FK1" foreign key (
  1459. "NoteUserID")
  1460.  references "UserInfo" (
  1461. "ID")  
  1462. go
  1463. /* 在表 "BoardroomApplyInfo" 中添加外键约束。                                                           */
  1464. alter table "BoardroomApplyInfo"
  1465. add constraint "BoardroomInfo_BoardroomApplyInfo_FK1" foreign key (
  1466. "BoardroomID")
  1467.  references "BoardroomInfo" (
  1468. "ID")  
  1469. go
  1470. alter table "BoardroomApplyInfo"
  1471. add constraint "UserInfo_BoardroomApplyInfo_FK1" foreign key (
  1472. "ApplyUserID")
  1473.  references "UserInfo" (
  1474. "ID")  
  1475. go
  1476. /* 在表 "ApproveRecord" 中添加外键约束。                                                                */
  1477. alter table "ApproveRecord"
  1478. add constraint "UserInfo_ApproveRecord_FK1" foreign key (
  1479. "ApproveUserID")
  1480.  references "UserInfo" (
  1481. "ID")  
  1482. go
  1483. /* 在表 "PayInfo" 中添加外键约束。                                                                      */
  1484. alter table "PayInfo"
  1485. add constraint "PayTypeInfo_PayInfo_FK1" foreign key (
  1486. "PayTypeID")
  1487.  references "PayTypeInfo" (
  1488. "ID")  
  1489. go
  1490. alter table "PayInfo"
  1491. add constraint "PersonnelInfo_PayInfo_FK1" foreign key (
  1492. "PersonnelID")
  1493.  references "PersonnelInfo" (
  1494. "ID")  
  1495. go
  1496. /* 在表 "BasePayInfo" 中添加外键约束。                                                                  */
  1497. alter table "BasePayInfo"
  1498. add constraint "PayTypeInfo_BasePayInfo_FK1" foreign key (
  1499. "PayTypeID")
  1500.  references "PayTypeInfo" (
  1501. "ID")  
  1502. go
  1503. alter table "BasePayInfo"
  1504. add constraint "PersonnelInfo_BasePayInfo_FK1" foreign key (
  1505. "PersonnelID")
  1506.  references "PersonnelInfo" (
  1507. "ID")  
  1508. go
  1509. /* 在表 "SignInfo" 中添加外键约束。                                                                     */
  1510. alter table "SignInfo"
  1511. add constraint "SignTypeInfo_SignInfo_FK1" foreign key (
  1512. "SignTypeID")
  1513.  references "SignTypeInfo" (
  1514. "ID")  
  1515. go
  1516. alter table "SignInfo"
  1517. add constraint "UserInfo_SignInfo_FK1" foreign key (
  1518. "UserID")
  1519.  references "UserInfo" (
  1520. "ID")  
  1521. go
  1522. alter table "SignInfo"
  1523. add constraint "UserInfo_SignInfo_FK2" foreign key (
  1524. "EditUserID")
  1525.  references "UserInfo" (
  1526. "ID")  
  1527. go
  1528. /* 在表 "RoleModuleRight" 中添加外键约束。                                                              */
  1529. alter table "RoleModuleRight"
  1530. add constraint "RoleInfo_RoleModuleRight_FK1" foreign key (
  1531. "RoleID")
  1532.  references "RoleInfo" (
  1533. "ID")  
  1534. go
  1535. alter table "RoleModuleRight"
  1536. add constraint "ModuleInfo_RoleModuleRight_FK1" foreign key (
  1537. "ModuleID")
  1538.  references "ModuleInfo" (
  1539. "ID")  
  1540. go
  1541. /* 在表 "PublicResShare" 中添加外键约束。                                                               */
  1542. alter table "PublicResShare"
  1543. add constraint "AssetInfo_PublicResShare_FK1" foreign key (
  1544. "AssetID")
  1545.  references "AssetInfo" (
  1546. "ID")  
  1547. go
  1548. alter table "PublicResShare"
  1549. add constraint "UserInfo_PublicResShare_FK1" foreign key (
  1550. "UserID")
  1551.  references "UserInfo" (
  1552. "ID")  
  1553. go
  1554. /* 在表 "PageRights" 中添加外键约束。                                                                   */
  1555. alter table "PageRights"
  1556. add constraint "ModuleInfo_PageRights_FK1" foreign key (
  1557. "ModuleID")
  1558.  references "ModuleInfo" (
  1559. "ID")  
  1560. go
  1561. /* 在表 "OnlineMessage" 中添加外键约束。                                                                */
  1562. alter table "OnlineMessage"
  1563. add constraint "UserInfo_OnlineMessage_FK1" foreign key (
  1564. "SendUserID")
  1565.  references "UserInfo" (
  1566. "ID")  
  1567. go
  1568. alter table "OnlineMessage"
  1569. add constraint "UserInfo_OnlineMessage_FK2" foreign key (
  1570. "RecieveUserID")
  1571.  references "UserInfo" (
  1572. "ID")  
  1573. go
  1574. /* 在表 "MailServerInfo" 中添加外键约束。                                                               */
  1575. alter table "MailServerInfo"
  1576. add constraint "UserInfo_MailServerInfo_FK1" foreign key (
  1577. "UserID")
  1578.  references "UserInfo" (
  1579. "ID")  
  1580. go
  1581. /* 在表 "Favorites" 中添加外键约束。                                                                    */
  1582. alter table "Favorites"
  1583. add constraint "FavoritesKindInfo_Favorites_FK1" foreign key (
  1584. "KindsID")
  1585.  references "FavoritesKindInfo" (
  1586. "ID")  
  1587. go
  1588. /* 在表 "FavoritesKindInfo" 中添加外键约束。                                                            */
  1589. alter table "FavoritesKindInfo"
  1590. add constraint "UserInfo_FavoritesKindInfo_FK1" foreign key (
  1591. "UserID")
  1592.  references "UserInfo" (
  1593. "ID")  
  1594. go
  1595. /* 在表 "AssetInOutInfo" 中添加外键约束。                                                               */
  1596. alter table "AssetInOutInfo"
  1597. add constraint "AssetInfo_AssetInOutInfo_FK1" foreign key (
  1598. "AssetID")
  1599.  references "AssetInfo" (
  1600. "ID")  
  1601. go
  1602. alter table "AssetInOutInfo"
  1603. add constraint "UserInfo_AssetInOutInfo_FK1" foreign key (
  1604. "OperateUserID")
  1605.  references "UserInfo" (
  1606. "ID")  
  1607. go
  1608. /* 在表 "ErrandApplyAndRecord" 中添加外键约束。                                                         */
  1609. alter table "ErrandApplyAndRecord"
  1610. add constraint "UserInfo_ErrandApplyAndRecord_FK1" foreign key (
  1611. "ApplyUserID")
  1612.  references "UserInfo" (
  1613. "ID")  
  1614. go
  1615. alter table "ErrandApplyAndRecord"
  1616. add constraint "UserInfo_ErrandApplyAndRecord_FK2" foreign key (
  1617. "ConfirmUserID")
  1618.  references "UserInfo" (
  1619. "ID")  
  1620. go
  1621. alter table "ErrandApplyAndRecord"
  1622. add constraint "SystemDirectory_ErrandApplyAndRecord_FK1" foreign key (
  1623. "SysDirID")
  1624.  references "SystemDirectory" (
  1625. "ID")  
  1626. go
  1627. /* 在表 "CalendarPlans" 中添加外键约束。                                                                */
  1628. alter table "CalendarPlans"
  1629. add constraint "UserInfo_CalendarPlans_FK1" foreign key (
  1630. "UserID")
  1631.  references "UserInfo" (
  1632. "ID")  
  1633. go
  1634. /* 在表 "FieldsValue" 中添加外键约束。                                                                  */
  1635. alter table "FieldsValue"
  1636. add constraint "DocumentInfo_FieldsValue_FK1" foreign key (
  1637. "DocumentID")
  1638.  references "DocumentInfo" (
  1639. "ID")  
  1640. go
  1641. alter table "FieldsValue"
  1642. add constraint "DocFieldsName_FieldsValue_FK1" foreign key (
  1643. "FieldID")
  1644.  references "DocFieldsName" (
  1645. "ID")  
  1646. go
  1647. /* 在表 "DocFieldsName" 中添加外键约束。                                                                */
  1648. alter table "DocFieldsName"
  1649. add constraint "DocumentTypeInfo_DocFieldsName_FK1" foreign key (
  1650. "DocumentTypeID")
  1651.  references "DocumentTypeInfo" (
  1652. "ID")  
  1653. go
  1654. /* 在表 "DocumentTypeInfo" 中添加外键约束。                                                             */
  1655. alter table "DocumentTypeInfo"
  1656. add constraint "SystemDirectory_DocumentTypeInfo_FK1" foreign key (
  1657. "SysDirID")
  1658.  references "SystemDirectory" (
  1659. "ID")  
  1660. go
  1661. /* 在表 "DocumentInfo" 中添加外键约束。                                                                 */
  1662. alter table "DocumentInfo"
  1663. add constraint "UserInfo_DocumentInfo_FK1" foreign key (
  1664. "PublishUserID")
  1665.  references "UserInfo" (
  1666. "ID")  
  1667. go
  1668. alter table "DocumentInfo"
  1669. add constraint "DocumentTypeInfo_DocumentInfo_FK1" foreign key (
  1670. "DocumentTypeID")
  1671.  references "DocumentTypeInfo" (
  1672. "ID")  
  1673. go
  1674. /* 在表 "VoteOptionsInfo" 中添加外键约束。                                                              */
  1675. alter table "VoteOptionsInfo"
  1676. add constraint "VoteInfo_VoteOptionsInfo_FK1" foreign key (
  1677. "VoteID")
  1678.  references "VoteInfo" (
  1679. "ID")  
  1680. go
  1681. /* 在表 "VoteInfo" 中添加外键约束。                                                                     */
  1682. alter table "VoteInfo"
  1683. add constraint "SystemDirectory_VoteInfo_FK1" foreign key (
  1684. "SysDirID")
  1685.  references "SystemDirectory" (
  1686. "ID")  
  1687. go
  1688. alter table "VoteInfo"
  1689. add constraint "UserInfo_VoteInfo_FK1" foreign key (
  1690. "PublishUserID")
  1691.  references "UserInfo" (
  1692. "ID")  
  1693. go
  1694. /* 在表 "BBSInfo" 中添加外键约束。                                                                      */
  1695. alter table "BBSInfo"
  1696. add constraint "SystemDirectory_BBSInfo_FK1" foreign key (
  1697. "SysDirID")
  1698.  references "SystemDirectory" (
  1699. "ID")  
  1700. go
  1701. alter table "BBSInfo"
  1702. add constraint "UserInfo_BBSInfo_FK1" foreign key (
  1703. "PublishUserID")
  1704.  references "UserInfo" (
  1705. "ID")  
  1706. go
  1707. /* 在表 "ArticleInfo" 中添加外键约束。                                                                  */
  1708. alter table "ArticleInfo"
  1709. add constraint "SystemDirectory_ArticleInfo_FK1" foreign key (
  1710. "SysDirID")
  1711.  references "SystemDirectory" (
  1712. "ID")  
  1713. go
  1714. alter table "ArticleInfo"
  1715. add constraint "UserInfo_ArticleInfo_FK1" foreign key (
  1716. "PublishUserID")
  1717.  references "UserInfo" (
  1718. "ID")  
  1719. go
  1720. /* 在表 "FamilyMember" 中添加外键约束。                                                                 */
  1721. alter table "FamilyMember"
  1722. add constraint "PersonelInfo_FamilyMember_FK1" foreign key (
  1723. "PersannelID")
  1724.  references "PersonnelInfo" (
  1725. "ID")  
  1726. go
  1727. /* 在表 "PersonnelInfo" 中添加外键约束。                                                                */
  1728. alter table "PersonnelInfo"
  1729. add constraint "MarriageState_PersonelInfo_FK1" foreign key (
  1730. "MarriageID")
  1731.  references "MarriageState" (
  1732. "ID")  
  1733. go
  1734. alter table "PersonnelInfo"
  1735. add constraint "PlaceInfo_PersonelInfo_FK1" foreign key (
  1736. "PlaceID")
  1737.  references "PlaceInfo" (
  1738. "ID")  
  1739. go
  1740. alter table "PersonnelInfo"
  1741. add constraint "EducationInfo_PersonelInfo_FK1" foreign key (
  1742. "EducationID")
  1743.  references "EducationInfo" (
  1744. "ID")  
  1745. go
  1746. alter table "PersonnelInfo"
  1747. add constraint "TechnicalPostInfo_PersonelInfo_FK1" foreign key (
  1748. "TechnicalPostID")
  1749.  references "TechnicalPostInfo" (
  1750. "ID")  
  1751. go
  1752. /* 在表 "UserInfo" 中添加外键约束。                                                                     */
  1753. alter table "UserInfo"
  1754. add constraint "RoleInfo_UserInfo_FK1" foreign key (
  1755. "RoleID")
  1756.  references "RoleInfo" (
  1757. "ID")  
  1758. go
  1759. alter table "UserInfo"
  1760. add constraint "PersonelInfo_UserInfo_FK1" foreign key (
  1761. "PersonnelID")
  1762.  references "PersonnelInfo" (
  1763. "ID")  
  1764. go
  1765. alter table "UserInfo"
  1766. add constraint "StyleInfo_UserInfo_FK1" foreign key (
  1767. "StyleID")
  1768.  references "StyleInfo" (
  1769. "ID")  
  1770. go
  1771. /* 在表 "AssetInfo" 中添加外键约束。                                                                    */
  1772. alter table "AssetInfo"
  1773. add constraint "AssetTypeInfo_AssetInfo_FK1" foreign key (
  1774. "AssetTypeID")
  1775.  references "AssetTypeInfo" (
  1776. "ID")  
  1777. go
  1778. alter table "AssetInfo"
  1779. add constraint "UserInfo_AssetInfo_FK1" foreign key (
  1780. "AddUserID")
  1781.  references "UserInfo" (
  1782. "ID")  
  1783. go
  1784. /* 在表 "AssetTypeInfo" 中添加外键约束。                                                                */
  1785. alter table "AssetTypeInfo"
  1786. add constraint "SystemDirectory_AssetTypeInfo_FK1" foreign key (
  1787. "SysDirID")
  1788.  references "SystemDirectory" (
  1789. "ID")  
  1790. go
  1791. /* 在表 "AssetFieldsName" 中添加外键约束。                                                              */
  1792. alter table "AssetFieldsName"
  1793. add constraint "AssetTypeInfo_AssetFieldsName_FK1" foreign key (
  1794. "AssetTypeID")
  1795.  references "AssetTypeInfo" (
  1796. "ID")  
  1797. go
  1798. /* 在表 "AssetFieldsValue" 中添加外键约束。                                                             */
  1799. alter table "AssetFieldsValue"
  1800. add constraint "AssetInfo_AssetFieldsValue_FK1" foreign key (
  1801. "AssetID")
  1802.  references "AssetInfo" (
  1803. "ID")  
  1804. go
  1805. alter table "AssetFieldsValue"
  1806. add constraint "AssetFieldsName_AssetFieldsValue_FK1" foreign key (
  1807. "FieldID")
  1808.  references "AssetFieldsName" (
  1809. "ID")  
  1810. go
  1811. /* 在表 "AddressKindInfo" 中添加外键约束。                                                              */
  1812. alter table "AddressKindInfo"
  1813. add constraint "UserInfo_AddressKindInfo_FK1" foreign key (
  1814. "UserID")
  1815.  references "UserInfo" (
  1816. "ID")  
  1817. go
  1818. /* 在表 "AddressList" 中添加外键约束。                                                                  */
  1819. alter table "AddressList"
  1820. add constraint "AddressKindInfo_AddressList_FK1" foreign key (
  1821. "KindsID")
  1822.  references "AddressKindInfo" (
  1823. "ID")  
  1824. go
  1825. /* 这是 Microsoft Visual Studio 生成的 SQL DDL 脚本的末尾。                                              */