ddpf13_alpha.sql 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519
  1. /*
  2. Navicat MySQL Data Transfer
  3. Source Server : local
  4. Source Server Version : 50622
  5. Source Host : localhost:3306
  6. Source Database : ddpf13_alpha_7-3-3
  7. Target Server Type : MYSQL
  8. Target Server Version : 50622
  9. File Encoding : 65001
  10. Date: 2016-07-03 22:51:15
  11. */
  12. SET FOREIGN_KEY_CHECKS=0;
  13. -- ----------------------------
  14. -- Table structure for dd_accident
  15. -- ----------------------------
  16. DROP TABLE IF EXISTS `dd_accident`;
  17. CREATE TABLE `dd_accident` (
  18. `accidentID` int(20) NOT NULL AUTO_INCREMENT COMMENT '事故id',
  19. `accidentYear` smallint(6) NOT NULL COMMENT '学年',
  20. `accidentTerm` tinyint(4) NOT NULL COMMENT '学期',
  21. `userId` int(20) NOT NULL,
  22. `accidentContent` varchar(127) NOT NULL COMMENT '事故内容',
  23. `ctime` datetime DEFAULT NULL,
  24. `mtime` datetime DEFAULT NULL,
  25. `deleted` tinyint(4) DEFAULT '0',
  26. PRIMARY KEY (`accidentID`),
  27. KEY `FK_Reference_37` (`userId`),
  28. CONSTRAINT `FK_Reference_37` FOREIGN KEY (`userId`) REFERENCES `dd_user` (`userId`) ON DELETE NO ACTION ON UPDATE NO ACTION
  29. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='事故表';
  30. -- ----------------------------
  31. -- Table structure for dd_apply_listened
  32. -- ----------------------------
  33. DROP TABLE IF EXISTS `dd_apply_listened`;
  34. CREATE TABLE `dd_apply_listened` (
  35. `applyId` int(20) NOT NULL AUTO_INCREMENT COMMENT '听课申请id',
  36. `applyYear` smallint(6) NOT NULL COMMENT '学年',
  37. `userId` int(20) NOT NULL,
  38. `courseTerm` char(20) NOT NULL COMMENT '是否开课 开学的学期',
  39. `applyType` tinyint(4) NOT NULL COMMENT '申请课程类型//theory; experiment; theory,experiment;',
  40. `applyTheoryTypeId` int(20) DEFAULT NULL COMMENT '理论课听课类型id',
  41. `applyExperimentTypeId` int(20) DEFAULT NULL COMMENT '实验课听课类型id',
  42. `applyTheoryJobTitleId` int(20) DEFAULT NULL COMMENT '理论课申报职称id',
  43. `applyExperimentJobTitleId` int(20) DEFAULT NULL COMMENT '实验课申报职称id',
  44. `applyStatus` tinyint(4) NOT NULL DEFAULT '0' COMMENT '申请状态',
  45. `ctime` datetime DEFAULT NULL,
  46. `mtime` datetime DEFAULT NULL,
  47. `deleted` tinyint(4) DEFAULT '0',
  48. PRIMARY KEY (`applyId`),
  49. KEY `FK_Reference_33` (`applyExperimentJobTitleId`),
  50. KEY `FK_Reference_34` (`applyTheoryTypeId`),
  51. KEY `FK_Reference_35` (`applyExperimentTypeId`),
  52. KEY `FK_Reference_36` (`applyTheoryJobTitleId`),
  53. KEY `FK_Reference_38` (`userId`),
  54. CONSTRAINT `FK_Reference_33` FOREIGN KEY (`applyExperimentJobTitleId`) REFERENCES `dd_system_conf` (`confId`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  55. CONSTRAINT `FK_Reference_34` FOREIGN KEY (`applyTheoryTypeId`) REFERENCES `dd_system_conf` (`confId`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  56. CONSTRAINT `FK_Reference_35` FOREIGN KEY (`applyExperimentTypeId`) REFERENCES `dd_system_conf` (`confId`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  57. CONSTRAINT `FK_Reference_36` FOREIGN KEY (`applyTheoryJobTitleId`) REFERENCES `dd_system_conf` (`confId`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  58. CONSTRAINT `FK_Reference_38` FOREIGN KEY (`userId`) REFERENCES `dd_user` (`userId`) ON DELETE NO ACTION ON UPDATE NO ACTION
  59. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='听课申请表 ';
  60. -- ----------------------------
  61. -- Table structure for dd_appraiser_group
  62. -- ----------------------------
  63. DROP TABLE IF EXISTS `dd_appraiser_group`;
  64. CREATE TABLE `dd_appraiser_group` (
  65. `appraiserGroupId` int(20) NOT NULL AUTO_INCREMENT COMMENT '督导组id',
  66. `appraiserGroupName` varchar(255) NOT NULL COMMENT '督导组名称',
  67. `leaderId` int(20) DEFAULT NULL COMMENT '督导组组长id',
  68. `ctime` datetime DEFAULT NULL,
  69. `mtime` datetime DEFAULT NULL,
  70. `deleted` tinyint(4) DEFAULT NULL,
  71. PRIMARY KEY (`appraiserGroupId`),
  72. KEY `FK_Reference_24` (`leaderId`),
  73. CONSTRAINT `FK_Reference_24` FOREIGN KEY (`leaderId`) REFERENCES `dd_user` (`userId`) ON DELETE NO ACTION ON UPDATE NO ACTION
  74. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='督导组分组表 ';
  75. -- ----------------------------
  76. -- Table structure for dd_audit_superiority
  77. -- ----------------------------
  78. DROP TABLE IF EXISTS `dd_audit_superiority`;
  79. CREATE TABLE `dd_audit_superiority` (
  80. `auditId` int(20) NOT NULL AUTO_INCREMENT COMMENT '审核id',
  81. `auditYear` smallint(6) NOT NULL COMMENT '学年',
  82. `userId` int(20) NOT NULL,
  83. `applyGrade` char(20) NOT NULL DEFAULT '' COMMENT '申报等级',
  84. `appraiserEvalScore` int(11) NOT NULL DEFAULT '0' COMMENT '督导评分',
  85. `stuEvalScore` int(11) NOT NULL DEFAULT '0' COMMENT '学生评分',
  86. `courseCountOwn` smallint(6) NOT NULL DEFAULT '0' COMMENT '独立承担课程门次',
  87. `planPeriod` smallint(6) NOT NULL DEFAULT '0' COMMENT '累计计划学时',
  88. `undergraduateWorkload` smallint(6) NOT NULL DEFAULT '0' COMMENT '本科基本教学工作量',
  89. `PostgraduateWorkload` smallint(6) NOT NULL DEFAULT '0' COMMENT '研究生基本教学工作量',
  90. `auditStatus` tinyint(4) NOT NULL DEFAULT '0' COMMENT '审核状态',
  91. `ctime` datetime DEFAULT NULL,
  92. `mtime` datetime DEFAULT NULL,
  93. `deleted` tinyint(4) DEFAULT NULL,
  94. PRIMARY KEY (`auditId`),
  95. KEY `FK_Reference_39` (`userId`),
  96. CONSTRAINT `FK_Reference_39` FOREIGN KEY (`userId`) REFERENCES `dd_user` (`userId`) ON DELETE NO ACTION ON UPDATE NO ACTION
  97. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='推优审核表';
  98. -- ----------------------------
  99. -- Table structure for dd_briefing
  100. -- ----------------------------
  101. DROP TABLE IF EXISTS `dd_briefing`;
  102. CREATE TABLE `dd_briefing` (
  103. `briefingId` int(20) NOT NULL AUTO_INCREMENT COMMENT '简报id',
  104. `briefingYear` smallint(6) NOT NULL COMMENT '学年',
  105. `briefingTerm` tinyint(4) NOT NULL COMMENT '期数',
  106. `uploadId` int(20) NOT NULL COMMENT '上传id',
  107. `ctime` datetime DEFAULT NULL,
  108. `mtime` datetime DEFAULT NULL,
  109. `deleted` tinyint(4) DEFAULT NULL,
  110. PRIMARY KEY (`briefingId`),
  111. KEY `FK_Reference_21` (`uploadId`),
  112. CONSTRAINT `FK_Reference_21` FOREIGN KEY (`uploadId`) REFERENCES `dd_upload` (`uploadId`) ON DELETE NO ACTION ON UPDATE NO ACTION
  113. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='简报表';
  114. -- ----------------------------
  115. -- Table structure for dd_briefing_competence
  116. -- ----------------------------
  117. DROP TABLE IF EXISTS `dd_briefing_competence`;
  118. CREATE TABLE `dd_briefing_competence` (
  119. `briefingCompetenceId` int(20) NOT NULL AUTO_INCREMENT COMMENT '权限id',
  120. `userId` int(20) NOT NULL COMMENT '教师id',
  121. `ctime` datetime DEFAULT NULL,
  122. `mtime` datetime DEFAULT NULL,
  123. `deleted` tinyint(4) DEFAULT '0',
  124. PRIMARY KEY (`briefingCompetenceId`),
  125. KEY `FK_Reference_49` (`userId`),
  126. CONSTRAINT `FK_Reference_49` FOREIGN KEY (`userId`) REFERENCES `dd_user` (`userId`) ON DELETE NO ACTION ON UPDATE NO ACTION
  127. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='督导简报权限表';
  128. -- ----------------------------
  129. -- Table structure for dd_course_experiment
  130. -- ----------------------------
  131. DROP TABLE IF EXISTS `dd_course_experiment`;
  132. CREATE TABLE `dd_course_experiment` (
  133. `courseId` int(20) NOT NULL AUTO_INCREMENT COMMENT '课程id',
  134. `courseYear` smallint(6) NOT NULL COMMENT '学年',
  135. `courseTerm` tinyint(4) NOT NULL COMMENT '学期',
  136. `courseName` varchar(255) NOT NULL COMMENT '课程名称',
  137. `userId` int(20) NOT NULL,
  138. `courseJoined` int(11) DEFAULT NULL COMMENT '上课人数',
  139. `courseClass` varchar(40) DEFAULT '' COMMENT '上课班级',
  140. `courseSite` varchar(40) DEFAULT '' COMMENT '上课地点',
  141. `courseSession` varchar(40) DEFAULT '' COMMENT '上课时间 周二第1,2节',
  142. `courseType` varchar(40) DEFAULT '' COMMENT '课程类型',
  143. `courseDepartmentId` int(20) DEFAULT NULL COMMENT '开课实验室所属部门',
  144. `experimentName` varchar(255) DEFAULT '' COMMENT '实验项目名称',
  145. `experimentPeriod` smallint(6) DEFAULT NULL COMMENT '实验项目学时',
  146. `experimentType` varchar(40) DEFAULT '' COMMENT '实验项目类型',
  147. `experimentLab` varchar(40) DEFAULT '' COMMENT '开课实验室',
  148. `ctime` datetime DEFAULT NULL,
  149. `mtime` datetime DEFAULT NULL,
  150. `deleted` tinyint(4) DEFAULT '0',
  151. PRIMARY KEY (`courseId`),
  152. KEY `FK_Reference_40` (`userId`),
  153. KEY `FK_Reference_8` (`courseDepartmentId`),
  154. CONSTRAINT `FK_Reference_40` FOREIGN KEY (`userId`) REFERENCES `dd_user` (`userId`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  155. CONSTRAINT `FK_Reference_8` FOREIGN KEY (`courseDepartmentId`) REFERENCES `dd_department` (`departmentId`) ON DELETE NO ACTION ON UPDATE NO ACTION
  156. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='在导入课表时,要更新<记录在>部门表中没有的课程的开课实验室所属部门(开课实验室不做筛选,不更新)';
  157. -- ----------------------------
  158. -- Table structure for dd_course_theory
  159. -- ----------------------------
  160. DROP TABLE IF EXISTS `dd_course_theory`;
  161. CREATE TABLE `dd_course_theory` (
  162. `courseId` int(20) NOT NULL AUTO_INCREMENT COMMENT '课程id',
  163. `courseYear` smallint(6) NOT NULL COMMENT '学年',
  164. `courseTerm` tinyint(4) NOT NULL COMMENT '学期',
  165. `courseName` varchar(255) NOT NULL COMMENT '课程名称',
  166. `userId` int(20) NOT NULL,
  167. `courseJoined` int(11) DEFAULT NULL COMMENT '上课人数',
  168. `courseClass` varchar(40) DEFAULT '' COMMENT '上课班级',
  169. `courseSite` varchar(40) DEFAULT '' COMMENT '上课地点',
  170. `courseSession` varchar(40) DEFAULT '' COMMENT '上课时间 周二第1,2节',
  171. `courseType` varchar(40) DEFAULT '' COMMENT '课程类型',
  172. `courseDepartmentId` int(20) DEFAULT NULL COMMENT '开课学院',
  173. `coursePeriod` smallint(6) DEFAULT NULL COMMENT '课程学时',
  174. `courseStartWeek` tinyint(4) DEFAULT NULL COMMENT '开始周',
  175. `courseEndWeek` tinyint(4) DEFAULT NULL COMMENT '结束周',
  176. `courseCampus` varchar(40) DEFAULT '' COMMENT '校区名',
  177. `ctime` datetime DEFAULT NULL,
  178. `mtime` datetime DEFAULT NULL,
  179. `deleted` tinyint(4) DEFAULT '0',
  180. PRIMARY KEY (`courseId`),
  181. KEY `FK_Reference_41` (`userId`),
  182. KEY `FK_Reference_6` (`courseDepartmentId`),
  183. CONSTRAINT `FK_Reference_41` FOREIGN KEY (`userId`) REFERENCES `dd_user` (`userId`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  184. CONSTRAINT `FK_Reference_6` FOREIGN KEY (`courseDepartmentId`) REFERENCES `dd_department` (`departmentId`) ON DELETE NO ACTION ON UPDATE NO ACTION
  185. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='课表(理论课) 在导入课表时,要更新部门表中没有的课程所属部门';
  186. -- ----------------------------
  187. -- Table structure for dd_database
  188. -- ----------------------------
  189. DROP TABLE IF EXISTS `dd_database`;
  190. CREATE TABLE `dd_database` (
  191. `databaseNum` varchar(255) DEFAULT NULL COMMENT '0.0.1',
  192. `databaseInfo` varchar(255) DEFAULT NULL,
  193. `ctime` datetime DEFAULT NULL,
  194. `mtime` datetime DEFAULT NULL,
  195. `deleted` tinyint(4) DEFAULT '0'
  196. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='督导数据库信息表 ';
  197. -- ----------------------------
  198. -- Table structure for dd_department
  199. -- ----------------------------
  200. DROP TABLE IF EXISTS `dd_department`;
  201. CREATE TABLE `dd_department` (
  202. `departmentId` int(20) NOT NULL AUTO_INCREMENT COMMENT '部门id',
  203. `departmentName` varchar(60) NOT NULL COMMENT '部门名称',
  204. `departmentPeopleNum` int(11) NOT NULL DEFAULT '0' COMMENT '部门人数',
  205. `departmentGroupId` int(20) DEFAULT NULL COMMENT '部门所属督导组',
  206. `departmentStatus` tinyint(4) NOT NULL DEFAULT '0' COMMENT '部门状态',
  207. `ctime` datetime DEFAULT NULL,
  208. `mtime` datetime DEFAULT NULL,
  209. `deleted` tinyint(4) DEFAULT '0',
  210. PRIMARY KEY (`departmentId`)
  211. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='记录部门(导入课表时要更新没有的部门) 学院人数管理';
  212. -- ----------------------------
  213. -- Table structure for dd_evaluate_experiment
  214. -- ----------------------------
  215. DROP TABLE IF EXISTS `dd_evaluate_experiment`;
  216. CREATE TABLE `dd_evaluate_experiment` (
  217. `evalId` int(20) NOT NULL AUTO_INCREMENT COMMENT '评分id',
  218. `evalYear` smallint(6) NOT NULL COMMENT '学年',
  219. `evalTerm` tinyint(4) NOT NULL COMMENT '学期',
  220. `courseId` int(20) NOT NULL COMMENT '课程id',
  221. `teacherId` int(20) NOT NULL,
  222. `evalStatus` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态',
  223. `appraiserId` int(20) NOT NULL,
  224. `evaluationId` int(20) DEFAULT NULL COMMENT '教学质量评价表id',
  225. `ctime` datetime NOT NULL,
  226. `mtime` datetime DEFAULT NULL,
  227. `deleted` tinyint(4) DEFAULT '0',
  228. PRIMARY KEY (`evalId`),
  229. KEY `FK_Reference_16` (`courseId`),
  230. KEY `FK_Reference_20` (`evaluationId`),
  231. KEY `FK_Reference_42` (`teacherId`),
  232. KEY `FK_Reference_43` (`appraiserId`),
  233. CONSTRAINT `FK_Reference_16` FOREIGN KEY (`courseId`) REFERENCES `dd_course_experiment` (`courseId`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  234. CONSTRAINT `FK_Reference_20` FOREIGN KEY (`evaluationId`) REFERENCES `dd_evaluation_experiment` (`evaluationId`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  235. CONSTRAINT `FK_Reference_42` FOREIGN KEY (`teacherId`) REFERENCES `dd_user` (`userId`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  236. CONSTRAINT `FK_Reference_43` FOREIGN KEY (`appraiserId`) REFERENCES `dd_user` (`userId`) ON DELETE NO ACTION ON UPDATE NO ACTION
  237. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='督导评分表-实验课 dd_evaluate_experiment';
  238. -- ----------------------------
  239. -- Table structure for dd_evaluate_theory
  240. -- ----------------------------
  241. DROP TABLE IF EXISTS `dd_evaluate_theory`;
  242. CREATE TABLE `dd_evaluate_theory` (
  243. `evalId` int(20) NOT NULL AUTO_INCREMENT COMMENT '评分id',
  244. `evalYear` smallint(6) NOT NULL COMMENT '学年',
  245. `evalTerm` tinyint(4) NOT NULL COMMENT '学期',
  246. `courseId` int(20) NOT NULL COMMENT '课程id',
  247. `teacherId` int(20) NOT NULL,
  248. `evalStatus` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态',
  249. `appraiserId` int(20) NOT NULL,
  250. `evaluationId` int(20) NOT NULL COMMENT '教学质量评价表id',
  251. `ctime` datetime NOT NULL,
  252. `mtime` datetime DEFAULT NULL,
  253. `deleted` tinyint(4) DEFAULT '0',
  254. PRIMARY KEY (`evalId`),
  255. KEY `FK_Reference_15` (`courseId`),
  256. KEY `FK_Reference_19` (`evaluationId`),
  257. KEY `FK_Reference_44` (`teacherId`),
  258. KEY `FK_Reference_45` (`appraiserId`),
  259. CONSTRAINT `FK_Reference_15` FOREIGN KEY (`courseId`) REFERENCES `dd_course_theory` (`courseId`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  260. CONSTRAINT `FK_Reference_19` FOREIGN KEY (`evaluationId`) REFERENCES `dd_evaluation_theory` (`evaluationId`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  261. CONSTRAINT `FK_Reference_44` FOREIGN KEY (`teacherId`) REFERENCES `dd_user` (`userId`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  262. CONSTRAINT `FK_Reference_45` FOREIGN KEY (`appraiserId`) REFERENCES `dd_user` (`userId`) ON DELETE NO ACTION ON UPDATE NO ACTION
  263. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='督导评分表(理论课)';
  264. -- ----------------------------
  265. -- Table structure for dd_evaluation_experiment
  266. -- ----------------------------
  267. DROP TABLE IF EXISTS `dd_evaluation_experiment`;
  268. CREATE TABLE `dd_evaluation_experiment` (
  269. `evaluationId` int(20) NOT NULL AUTO_INCREMENT COMMENT '评价表id',
  270. `evaluationData` varchar(255) DEFAULT NULL COMMENT '各种数据',
  271. `ctime` datetime DEFAULT NULL,
  272. `mtime` datetime DEFAULT NULL,
  273. `deleted` tinyint(4) DEFAULT '0',
  274. PRIMARY KEY (`evaluationId`)
  275. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='教学质量评价表(实验课) 具体要保存什么字段自行添加';
  276. -- ----------------------------
  277. -- Table structure for dd_evaluation_theory
  278. -- ----------------------------
  279. DROP TABLE IF EXISTS `dd_evaluation_theory`;
  280. CREATE TABLE `dd_evaluation_theory` (
  281. `evaluationId` int(20) NOT NULL AUTO_INCREMENT COMMENT '评价表id',
  282. `evaluationData` varchar(255) DEFAULT NULL COMMENT '各种数据',
  283. `ctime` datetime DEFAULT NULL,
  284. `mtime` datetime DEFAULT NULL,
  285. `deleted` tinyint(4) DEFAULT '0',
  286. PRIMARY KEY (`evaluationId`)
  287. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='教学质量评价表(理论课) 具体要保存什么字段自行添加';
  288. -- ----------------------------
  289. -- Table structure for dd_role
  290. -- ----------------------------
  291. DROP TABLE IF EXISTS `dd_role`;
  292. CREATE TABLE `dd_role` (
  293. `roleId` int(20) NOT NULL AUTO_INCREMENT,
  294. `userId` int(20) NOT NULL COMMENT '用户id',
  295. `roleTypeId` int(20) NOT NULL COMMENT '用户角色类型id',
  296. `ctime` datetime DEFAULT NULL,
  297. `mtime` datetime DEFAULT NULL,
  298. `deleted` tinyint(4) DEFAULT '0',
  299. PRIMARY KEY (`roleId`),
  300. KEY `FK_Reference_25` (`roleTypeId`),
  301. CONSTRAINT `FK_Reference_25` FOREIGN KEY (`roleTypeId`) REFERENCES `dd_system_conf` (`confId`) ON DELETE NO ACTION ON UPDATE NO ACTION
  302. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户角色关系表';
  303. -- ----------------------------
  304. -- Table structure for dd_schedule_experiment
  305. -- ----------------------------
  306. DROP TABLE IF EXISTS `dd_schedule_experiment`;
  307. CREATE TABLE `dd_schedule_experiment` (
  308. `scheduleId` int(20) NOT NULL AUTO_INCREMENT COMMENT '安排id',
  309. `scheduleYear` smallint(6) NOT NULL COMMENT '学年',
  310. `scheduleTerm` tinyint(4) NOT NULL COMMENT '学期',
  311. `userId` int(20) NOT NULL,
  312. `courseId` int(20) NOT NULL COMMENT '所听课程id',
  313. `scheduleStatus` tinyint(4) NOT NULL DEFAULT '0' COMMENT '分配状态',
  314. `ctime` datetime DEFAULT NULL,
  315. `mtime` datetime DEFAULT NULL,
  316. `deleted` tinyint(4) DEFAULT '0',
  317. PRIMARY KEY (`scheduleId`),
  318. KEY `FK_Reference_10` (`courseId`),
  319. KEY `FK_Reference_46` (`userId`),
  320. CONSTRAINT `FK_Reference_10` FOREIGN KEY (`courseId`) REFERENCES `dd_course_experiment` (`courseId`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  321. CONSTRAINT `FK_Reference_46` FOREIGN KEY (`userId`) REFERENCES `dd_user` (`userId`) ON DELETE NO ACTION ON UPDATE NO ACTION
  322. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='听课安排表(实验课)';
  323. -- ----------------------------
  324. -- Table structure for dd_schedule_theory
  325. -- ----------------------------
  326. DROP TABLE IF EXISTS `dd_schedule_theory`;
  327. CREATE TABLE `dd_schedule_theory` (
  328. `scheduleId` int(20) NOT NULL AUTO_INCREMENT COMMENT '安排id',
  329. `scheduleYear` smallint(6) NOT NULL COMMENT '学年',
  330. `scheduleTerm` tinyint(4) NOT NULL COMMENT '学期',
  331. `userId` int(20) NOT NULL,
  332. `courseId` int(20) NOT NULL COMMENT '所听课程id',
  333. `scheduleStatus` tinyint(4) NOT NULL COMMENT '分配状态',
  334. `ctime` datetime DEFAULT NULL,
  335. `mtime` datetime DEFAULT NULL,
  336. `deleted` tinyint(4) DEFAULT '0',
  337. PRIMARY KEY (`scheduleId`),
  338. KEY `FK_Reference_47` (`userId`),
  339. KEY `FK_Reference_9` (`courseId`),
  340. CONSTRAINT `FK_Reference_47` FOREIGN KEY (`userId`) REFERENCES `dd_user` (`userId`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  341. CONSTRAINT `FK_Reference_9` FOREIGN KEY (`courseId`) REFERENCES `dd_course_theory` (`courseId`) ON DELETE NO ACTION ON UPDATE NO ACTION
  342. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='听课安排表(理论课)';
  343. -- ----------------------------
  344. -- Table structure for dd_student_evaluation
  345. -- ----------------------------
  346. DROP TABLE IF EXISTS `dd_student_evaluation`;
  347. CREATE TABLE `dd_student_evaluation` (
  348. `stuEvalId` int(20) NOT NULL AUTO_INCREMENT COMMENT '网评id',
  349. `userId` int(20) NOT NULL,
  350. `stuEvalData` varchar(255) DEFAULT NULL COMMENT '各种数据',
  351. `ctime` datetime DEFAULT NULL,
  352. `mtime` datetime DEFAULT NULL,
  353. `deleted` tinyint(4) DEFAULT '0',
  354. PRIMARY KEY (`stuEvalId`),
  355. KEY `FK_Reference_50` (`userId`),
  356. CONSTRAINT `FK_Reference_50` FOREIGN KEY (`userId`) REFERENCES `dd_user` (`userId`) ON DELETE NO ACTION ON UPDATE NO ACTION
  357. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='学生网评表 具体数据自行添加';
  358. -- ----------------------------
  359. -- Table structure for dd_summary
  360. -- ----------------------------
  361. DROP TABLE IF EXISTS `dd_summary`;
  362. CREATE TABLE `dd_summary` (
  363. `summaryId` int(20) NOT NULL AUTO_INCREMENT COMMENT '总结id',
  364. `summaryYear` smallint(6) NOT NULL COMMENT '学年',
  365. `summaryNO` tinyint(4) NOT NULL COMMENT '期数',
  366. `appraiserGroupId` int(20) DEFAULT NULL COMMENT '总结所属督导组id',
  367. `summaryStatus` tinyint(4) DEFAULT '0' COMMENT '总结状态',
  368. `uploadId` int(20) DEFAULT NULL COMMENT '上传id',
  369. `ctime` datetime DEFAULT NULL,
  370. `mtime` datetime DEFAULT NULL,
  371. `deleted` tinyint(4) DEFAULT '0',
  372. PRIMARY KEY (`summaryId`),
  373. KEY `FK_Reference_23` (`uploadId`),
  374. KEY `FK_Reference_51` (`appraiserGroupId`),
  375. CONSTRAINT `FK_Reference_23` FOREIGN KEY (`uploadId`) REFERENCES `dd_upload` (`uploadId`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  376. CONSTRAINT `FK_Reference_51` FOREIGN KEY (`appraiserGroupId`) REFERENCES `dd_appraiser_group` (`appraiserGroupId`) ON DELETE NO ACTION ON UPDATE NO ACTION
  377. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='总结表';
  378. -- ----------------------------
  379. -- Table structure for dd_system_conf
  380. -- ----------------------------
  381. DROP TABLE IF EXISTS `dd_system_conf`;
  382. CREATE TABLE `dd_system_conf` (
  383. `confId` int(20) NOT NULL AUTO_INCREMENT,
  384. `pid` int(20) NOT NULL,
  385. `k` varchar(255) NOT NULL DEFAULT '',
  386. `value` varchar(255) NOT NULL DEFAULT '',
  387. `extra` varchar(255) DEFAULT '' COMMENT '额外,自行解析',
  388. `status` tinyint(4) DEFAULT '0' COMMENT '状态',
  389. `ctime` datetime DEFAULT NULL,
  390. `mtime` datetime DEFAULT NULL,
  391. `deleted` tinyint(4) DEFAULT '0',
  392. PRIMARY KEY (`confId`)
  393. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='系统配置表, 用于存放一些配置信息';
  394. -- ----------------------------
  395. -- Table structure for dd_upload
  396. -- ----------------------------
  397. DROP TABLE IF EXISTS `dd_upload`;
  398. CREATE TABLE `dd_upload` (
  399. `uploadId` int(20) NOT NULL AUTO_INCREMENT COMMENT '上传id',
  400. `uploadName` varchar(255) NOT NULL COMMENT '文件名',
  401. `uploadTime` datetime NOT NULL COMMENT '上传时间',
  402. `uploadPath` varchar(511) NOT NULL COMMENT '文件路径',
  403. `userId` int(20) DEFAULT NULL COMMENT '上传者id',
  404. `ctime` datetime DEFAULT NULL,
  405. `mtime` datetime DEFAULT NULL,
  406. `deleted` tinyint(4) DEFAULT '0',
  407. PRIMARY KEY (`uploadId`),
  408. KEY `FK_Reference_22` (`userId`),
  409. CONSTRAINT `FK_Reference_22` FOREIGN KEY (`userId`) REFERENCES `dd_user` (`userId`) ON DELETE NO ACTION ON UPDATE NO ACTION
  410. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='上传文件表';
  411. -- ----------------------------
  412. -- Table structure for dd_user
  413. -- ----------------------------
  414. DROP TABLE IF EXISTS `dd_user`;
  415. CREATE TABLE `dd_user` (
  416. `userId` int(20) NOT NULL AUTO_INCREMENT COMMENT '用户id',
  417. `userAccount` char(20) NOT NULL COMMENT '账号',
  418. `userPassword` char(40) NOT NULL COMMENT '用户密码',
  419. `userName` varchar(64) NOT NULL COMMENT '用户姓名',
  420. `departmentId` int(20) DEFAULT NULL COMMENT '用户所属部门id',
  421. `establishmentId` int(20) DEFAULT NULL COMMENT '用户编制id',
  422. `dutiesId` int(20) DEFAULT NULL COMMENT '用户行政职务id',
  423. `jobTitleId` int(20) DEFAULT NULL COMMENT '用户行政职称id',
  424. `ctime` datetime DEFAULT NULL,
  425. `mtime` datetime DEFAULT NULL,
  426. `deleted` tinyint(4) DEFAULT '0',
  427. PRIMARY KEY (`userId`),
  428. KEY `FK_Reference_1` (`departmentId`),
  429. KEY `FK_Reference_2` (`establishmentId`),
  430. KEY `FK_Reference_3` (`dutiesId`),
  431. KEY `FK_Reference_4` (`jobTitleId`),
  432. CONSTRAINT `FK_Reference_1` FOREIGN KEY (`departmentId`) REFERENCES `dd_system_conf` (`confId`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  433. CONSTRAINT `FK_Reference_2` FOREIGN KEY (`establishmentId`) REFERENCES `dd_system_conf` (`confId`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  434. CONSTRAINT `FK_Reference_3` FOREIGN KEY (`dutiesId`) REFERENCES `dd_system_conf` (`confId`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  435. CONSTRAINT `FK_Reference_4` FOREIGN KEY (`jobTitleId`) REFERENCES `dd_system_conf` (`confId`) ON DELETE NO ACTION ON UPDATE NO ACTION
  436. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户表';
  437. -- ----------------------------
  438. -- Table structure for dd_user_listened
  439. -- ----------------------------
  440. DROP TABLE IF EXISTS `dd_user_listened`;
  441. CREATE TABLE `dd_user_listened` (
  442. `listenedId` int(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
  443. `listenedYear` smallint(6) NOT NULL COMMENT '学年',
  444. `listenedTerm` tinyint(4) NOT NULL COMMENT '学期',
  445. `userId` int(20) NOT NULL,
  446. `theoryListened` int(11) DEFAULT '0' COMMENT '理论课已听次数',
  447. `theoryMaxListened` int(11) DEFAULT '0' COMMENT '理论课最大听课次数',
  448. `experimentListened` int(11) DEFAULT '0' COMMENT '实验课已听次数',
  449. `experimentMaxListened` int(11) DEFAULT '0' COMMENT '实验课最大听课次数',
  450. `ctime` datetime DEFAULT NULL,
  451. `mtime` datetime DEFAULT NULL,
  452. `deleted` tinyint(4) DEFAULT '0',
  453. PRIMARY KEY (`listenedId`),
  454. KEY `FK_Reference_48` (`userId`),
  455. CONSTRAINT `FK_Reference_48` FOREIGN KEY (`userId`) REFERENCES `dd_user` (`userId`) ON DELETE NO ACTION ON UPDATE NO ACTION
  456. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='教师的最大听课次数被更改过 记录在这里;若没有,使用当年学期的默认配置<配置表>';
  457. -- ----------------------------
  458. -- View structure for dd_view_apply_job_title
  459. -- ----------------------------
  460. DROP VIEW IF EXISTS `dd_view_apply_job_title`;
  461. CREATE VIEW `dd_view_apply_job_title` AS select `dd_system_conf`.`confId` AS `applyJobTitleId`,`dd_system_conf`.`value` AS `applyJobTitleName`,`dd_system_conf`.`pid` AS `pid`,`dd_system_conf`.`k` AS `k`,`dd_system_conf`.`extra` AS `extra`,`dd_system_conf`.`status` AS `status` from `dd_system_conf` where `dd_system_conf`.`pid` in (select `dd_system_conf`.`confId` from `dd_system_conf` where ((`dd_system_conf`.`k` = 'root') and (`dd_system_conf`.`value` = 'view_apply_job_title'))) ;
  462. -- ----------------------------
  463. -- View structure for dd_view_duties
  464. -- ----------------------------
  465. DROP VIEW IF EXISTS `dd_view_duties`;
  466. CREATE VIEW `dd_view_duties` AS select `dd_system_conf`.`confId` AS `dutiesId`,`dd_system_conf`.`value` AS `dutiesName`,`dd_system_conf`.`pid` AS `pid`,`dd_system_conf`.`k` AS `k`,`dd_system_conf`.`extra` AS `extra`,`dd_system_conf`.`status` AS `status` from `dd_system_conf` where `dd_system_conf`.`pid` in (select `dd_system_conf`.`confId` from `dd_system_conf` where ((`dd_system_conf`.`k` = 'root') and (`dd_system_conf`.`value` = 'view_duties'))) ;
  467. -- ----------------------------
  468. -- View structure for dd_view_establishmentid
  469. -- ----------------------------
  470. DROP VIEW IF EXISTS `dd_view_establishmentid`;
  471. CREATE VIEW `dd_view_establishmentid` AS select `dd_system_conf`.`confId` AS `establishmentId`,`dd_system_conf`.`value` AS `establishmentName`,`dd_system_conf`.`pid` AS `pid`,`dd_system_conf`.`k` AS `k`,`dd_system_conf`.`extra` AS `extra`,`dd_system_conf`.`status` AS `status` from `dd_system_conf` where `dd_system_conf`.`pid` in (select `dd_system_conf`.`confId` from `dd_system_conf` where ((`dd_system_conf`.`k` = 'root') and (`dd_system_conf`.`value` = 'view_establishment'))) ;
  472. -- ----------------------------
  473. -- View structure for dd_view_job_title
  474. -- ----------------------------
  475. DROP VIEW IF EXISTS `dd_view_job_title`;
  476. CREATE VIEW `dd_view_job_title` AS select `dd_system_conf`.`confId` AS `jobTitleId`,`dd_system_conf`.`value` AS `jobTitleName`,`dd_system_conf`.`pid` AS `pid`,`dd_system_conf`.`k` AS `k`,`dd_system_conf`.`extra` AS `extra`,`dd_system_conf`.`status` AS `status` from `dd_system_conf` where `dd_system_conf`.`pid` in (select `dd_system_conf`.`confId` from `dd_system_conf` where ((`dd_system_conf`.`k` = 'root') and (`dd_system_conf`.`value` = 'view_job_title'))) ;
  477. -- ----------------------------
  478. -- View structure for dd_view_listened_type
  479. -- ----------------------------
  480. DROP VIEW IF EXISTS `dd_view_listened_type`;
  481. CREATE VIEW `dd_view_listened_type` AS select `dd_system_conf`.`confId` AS `listenedId`,`dd_system_conf`.`value` AS `listenedName`,`dd_system_conf`.`pid` AS `pid`,`dd_system_conf`.`k` AS `k`,`dd_system_conf`.`extra` AS `extra`,`dd_system_conf`.`status` AS `status` from `dd_system_conf` where `dd_system_conf`.`pid` in (select `dd_system_conf`.`confId` from `dd_system_conf` where ((`dd_system_conf`.`k` = 'root') and (`dd_system_conf`.`value` = 'view_listened_type'))) ;
  482. -- ----------------------------
  483. -- View structure for dd_view_roletype
  484. -- ----------------------------
  485. DROP VIEW IF EXISTS `dd_view_roletype`;
  486. CREATE VIEW `dd_view_roletype` AS select `dd_system_conf`.`confId` AS `roleId`,`dd_system_conf`.`value` AS `roleName`,`dd_system_conf`.`pid` AS `pid`,`dd_system_conf`.`k` AS `k`,`dd_system_conf`.`extra` AS `extra`,`dd_system_conf`.`status` AS `status` from `dd_system_conf` where `dd_system_conf`.`pid` in (select `dd_system_conf`.`confId` from `dd_system_conf` where ((`dd_system_conf`.`k` = 'root') and (`dd_system_conf`.`value` = 'view_roleType'))) ;