20231120_sql.sql 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. -- ------------------------------------------------------------------奖学金管理--------------------------------------------------------------------
  2. -- ----------------------------
  3. -- 奖学金类别
  4. -- ----------------------------
  5. DROP TABLE IF EXISTS base_student_scholarship_category;
  6. CREATE TABLE base_student_scholarship_category
  7. (
  8. id BIGINT NOT NULL COMMENT '主键编号',
  9. `create_user_id` BIGINT NULL DEFAULT NULL COMMENT '创建人',
  10. `create_date` datetime NULL DEFAULT NULL COMMENT '创建时间',
  11. `modify_user_id` BIGINT NULL DEFAULT NULL COMMENT '修改人',
  12. `modify_date` datetime NULL DEFAULT NULL COMMENT '修改时间',
  13. `delete_mark` INT NOT NULL COMMENT '删除标记',
  14. `enabled_mark` INT NOT NULL COMMENT '有效标志',
  15. `sort_code` INT NULL DEFAULT NULL COMMENT '序号',
  16. `name` VARCHAR(200) NOT NULL COMMENT '名称',
  17. `scholarship_source` varchar(20) NOT NULL DEFAULT 0 COMMENT '奖学金来源(xjr_dictionary_item[scholarship_source])',
  18. `base_semester_id` bigint NULL DEFAULT NULL COMMENT '学期ID(base_semester)',
  19. `total_amount` double NOT NULL DEFAULT 0 COMMENT '总金额',
  20. `scholarship_level` int NOT NULL DEFAULT 0 COMMENT '奖学金等级 0=无等级',
  21. `remark` VARCHAR(1000) COMMENT '备注',
  22. PRIMARY KEY (`id`)
  23. ) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT '奖学金类别';
  24. -- ----------------------------
  25. -- 奖学金级别
  26. -- ----------------------------
  27. DROP TABLE IF EXISTS base_student_scholarship_level;
  28. CREATE TABLE base_student_scholarship_level
  29. (
  30. id BIGINT NOT NULL COMMENT '主键编号',
  31. `create_user_id` BIGINT NULL DEFAULT NULL COMMENT '创建人',
  32. `create_date` datetime NULL DEFAULT NULL COMMENT '创建时间',
  33. `modify_user_id` BIGINT NULL DEFAULT NULL COMMENT '修改人',
  34. `modify_date` datetime NULL DEFAULT NULL COMMENT '修改时间',
  35. `delete_mark` INT NOT NULL COMMENT '删除标记',
  36. `enabled_mark` INT NOT NULL COMMENT '有效标志',
  37. `sort_code` INT NULL DEFAULT NULL COMMENT '序号',
  38. `base_student_scholarship_category_id` bigint NULL DEFAULT NULL COMMENT '奖学金类别ID(base_student_scholarship_category)',
  39. `level` int NOT NULL DEFAULT 0 COMMENT '奖学金等级 0=无等级',
  40. `amount` double NOT NULL DEFAULT 0 COMMENT '金额',
  41. PRIMARY KEY (`id`)
  42. ) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT '奖学金级别';
  43. -- ----------------------------
  44. -- 奖学金申请
  45. -- ----------------------------
  46. DROP TABLE IF EXISTS base_student_scholarship_applicant;
  47. CREATE TABLE base_student_scholarship_applicant
  48. (
  49. id BIGINT NOT NULL COMMENT '主键编号',
  50. `create_user_id` BIGINT NULL DEFAULT NULL COMMENT '创建人',
  51. `create_date` datetime NULL DEFAULT NULL COMMENT '创建时间',
  52. `modify_user_id` BIGINT NULL DEFAULT NULL COMMENT '修改人',
  53. `modify_date` datetime NULL DEFAULT NULL COMMENT '修改时间',
  54. `delete_mark` INT NOT NULL COMMENT '删除标记',
  55. `enabled_mark` INT NOT NULL COMMENT '有效标志',
  56. `sort_code` INT NULL DEFAULT NULL COMMENT '序号',
  57. `base_student_scholarship_category_id` bigint NULL DEFAULT NULL COMMENT '奖学金类别ID(base_student_scholarship_category)',
  58. `scholarship_level` int NOT NULL DEFAULT 0 COMMENT '奖学金等级 0=无等级',
  59. `amount` double NOT NULL DEFAULT 0 COMMENT '金额',
  60. `applicant_user_id` BIGINT NULL DEFAULT NULL COMMENT '申请人',
  61. `base_semester_id` bigint NULL DEFAULT NULL COMMENT '学期ID(base_semester)',
  62. `grade_name` VARCHAR(200) NULL DEFAULT NULL COMMENT '年级名称',
  63. `class_name` VARCHAR(200) NULL DEFAULT NULL COMMENT '班级名称',
  64. `name` VARCHAR(200) NULL DEFAULT NULL COMMENT '姓名',
  65. `student_id` VARCHAR(200) NULL DEFAULT NULL COMMENT '学号',
  66. `gender_name` VARCHAR(200) NULL DEFAULT NULL COMMENT '性别',
  67. `enroll_type_cn` VARCHAR(200) NULL DEFAULT NULL COMMENT '招生类型名称',
  68. `major_name` VARCHAR(200) NULL DEFAULT NULL COMMENT '在读专业',
  69. `award_date` date NULL DEFAULT NULL COMMENT '获奖日期',
  70. `bank_type` VARCHAR(20) NULL DEFAULT NULL COMMENT '收款银行(xjr_dictionary_item[bank_type])',
  71. `bank_no` VARCHAR(200) NULL DEFAULT NULL COMMENT '银行卡号',
  72. `file_id` bigint NULL DEFAULT NULL COMMENT '文件ID(xjr_file)',
  73. `status` INT NOT NULL default 0 COMMENT '状态(1:结束 0:未结束)',
  74. `release_status` INT NOT NULL default 0 COMMENT '发放状态(1:已发放 0:未发放)',
  75. PRIMARY KEY (`id`)
  76. ) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT '奖学金申请';
  77. -- ------------------------------------------------------------------奖学金管理--------------------------------------------------------------------
  78. -- ------------------------------------------------------------------用户--------------------------------------------------------------------
  79. ALTER TABLE xjr_user ADD COLUMN `is_change_password` INT NOT NULL default 0 DEFAULT 1 COMMENT '是否需要修改密码(1:需要 0:不需要)' AFTER credential_type;
  80. -- ------------------------------------------------------------------用户--------------------------------------------------------------------
  81. -- ------------------------------------------------------------------助学金管理--------------------------------------------------------------------
  82. -- ----------------------------
  83. -- 助学金项目
  84. -- ----------------------------
  85. DROP TABLE IF EXISTS base_student_bursaries_project;
  86. CREATE TABLE base_student_bursaries_project
  87. (
  88. id BIGINT NOT NULL COMMENT '主键编号',
  89. `create_user_id` BIGINT NULL DEFAULT NULL COMMENT '创建人',
  90. `create_date` datetime NULL DEFAULT NULL COMMENT '创建时间',
  91. `modify_user_id` BIGINT NULL DEFAULT NULL COMMENT '修改人',
  92. `modify_date` datetime NULL DEFAULT NULL COMMENT '修改时间',
  93. `delete_mark` INT NOT NULL COMMENT '删除标记',
  94. `enabled_mark` INT NOT NULL COMMENT '有效标志',
  95. `sort_code` INT NULL DEFAULT NULL COMMENT '序号',
  96. `name` VARCHAR(200) NOT NULL COMMENT '名称',
  97. `bursaries_type` varchar(20) NOT NULL DEFAULT 0 COMMENT '助学金类型(xjr_dictionary_item[bursaries_type])',
  98. `base_semester_id` bigint NULL DEFAULT NULL COMMENT '学期ID(base_semester)',
  99. `total_amount` double NOT NULL DEFAULT 0 COMMENT '总金额',
  100. `start_time` date NULL DEFAULT NULL COMMENT '开始时间',
  101. `end_time` date NULL DEFAULT NULL COMMENT '结束时间',
  102. `remark` VARCHAR(1000) NULL DEFAULT NULL COMMENT '备注',
  103. PRIMARY KEY (`id`)
  104. ) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT '助学金项目';
  105. -- ----------------------------
  106. -- 助学金申请
  107. -- ----------------------------
  108. DROP TABLE IF EXISTS base_student_bursaries_applicant;
  109. CREATE TABLE base_student_bursaries_applicant
  110. (
  111. id BIGINT NOT NULL COMMENT '主键编号',
  112. `create_user_id` bigint NULL DEFAULT NULL COMMENT '创建人',
  113. `create_date` datetime NULL DEFAULT NULL COMMENT '创建时间',
  114. `modify_user_id` bigint NULL DEFAULT NULL COMMENT '修改人',
  115. `modify_date` datetime NULL DEFAULT NULL COMMENT '修改时间',
  116. `delete_mark` INT NOT NULL COMMENT '删除标记',
  117. `enabled_mark` INT NOT NULL COMMENT '有效标志',
  118. `sort_code` INT NULL DEFAULT NULL COMMENT '序号',
  119. `base_student_bursaries_project_id` bigint NULL DEFAULT NULL COMMENT '助学金项目ID(base_student_bursaries_project)',
  120. `applicant_user_id` bigint NULL DEFAULT NULL COMMENT '申请人',
  121. `base_semester_id` bigint NULL DEFAULT NULL COMMENT '学期ID(base_semester)',
  122. `class_id` bigint NULL DEFAULT NULL COMMENT '班级编号',
  123. `file_id` bigint NULL DEFAULT NULL COMMENT '文件ID(xjr_file)',
  124. `status` INT NOT NULL default 0 COMMENT '状态(1:结束 0:未结束)',
  125. PRIMARY KEY (`id`)
  126. ) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT '助学金申请';
  127. -- ----------------------------
  128. -- 助学金申请学生信息
  129. -- ----------------------------
  130. DROP TABLE IF EXISTS base_student_bursaries_student;
  131. CREATE TABLE base_student_bursaries_student
  132. (
  133. id BIGINT NOT NULL COMMENT '主键编号',
  134. `base_student_bursaries_applicant_id` bigint NULL DEFAULT NULL COMMENT '助学金申请ID(base_student_bursaries_applicant)',
  135. `user_id` BIGINT NULL DEFAULT NULL COMMENT'学生id',
  136. `grade_name` VARCHAR(200) NULL DEFAULT NULL COMMENT '年级名称',
  137. `class_name` VARCHAR(200) NULL DEFAULT NULL COMMENT '班级名称',
  138. `name` VARCHAR(200) NULL DEFAULT NULL COMMENT '姓名',
  139. `student_id` VARCHAR(200) NULL DEFAULT NULL COMMENT '学号',
  140. `gender_name` VARCHAR(200) NULL DEFAULT NULL COMMENT '性别',
  141. `enroll_type_cn` VARCHAR(200) NULL DEFAULT NULL COMMENT '招生类型名称',
  142. `major_name` VARCHAR(200) NULL DEFAULT NULL COMMENT '在读专业',
  143. `bank_type` VARCHAR(20) NULL DEFAULT NULL COMMENT '收款银行(xjr_dictionary_item[bank_type])',
  144. `bank_no` VARCHAR(200) NULL DEFAULT NULL COMMENT '银行卡号',
  145. `applicant_amount` double NOT NULL DEFAULT 0 COMMENT '申请金额',
  146. PRIMARY KEY (`id`)
  147. ) ENGINE=INNODB DEFAULT CHARSET=utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT '助学金申请学生信息';
  148. -- ------------------------------------------------------------------助学金管理--------------------------------------------------------------------