init_sql.sql 69 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092
  1. SET NAMES utf8mb4;
  2. SET FOREIGN_KEY_CHECKS = 0;
  3. -- 用户表添加字段
  4. ALTER TABLE xjr_user ADD COLUMN `credential_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '证件类型(xjr_dictionary_item[credential_type])' AFTER sort_code;
  5. ALTER TABLE xjr_user ADD COLUMN `credential_number` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '证件号码' AFTER sort_code;
  6. -- 新闻添加字段
  7. ALTER TABLE xjr_oa_news ADD COLUMN `emergent` int NULL DEFAULT NULL COMMENT '紧急程度 1=一般 2=紧急';
  8. ALTER TABLE xjr_oa_news ADD COLUMN `send_dept_id` bigint NULL DEFAULT NULL COMMENT '发送部门';
  9. ALTER TABLE xjr_oa_news ADD COLUMN `send_start_date` datetime NULL DEFAULT NULL COMMENT '张贴开起时间';
  10. ALTER TABLE xjr_oa_news ADD COLUMN `send_end_date` datetime NULL DEFAULT NULL COMMENT '张贴结束时间';
  11. ALTER TABLE xjr_oa_news ADD COLUMN `open_reply` int NULL DEFAULT NULL COMMENT '接收人回复要求 1=必须回复 2=不允许回复 3=可以回复 (不强制要求)';
  12. ALTER TABLE xjr_oa_news ADD COLUMN `open_forward` int NULL DEFAULT NULL COMMENT '是否允许接收人转发 0=不能转发 1=允许转发';
  13. ALTER TABLE xjr_oa_news ADD COLUMN `open_view_other` int NULL DEFAULT NULL COMMENT '是否允许接收人查看其他接收人 0=不允许查看 1=允许查看';
  14. ALTER TABLE xjr_oa_news ADD COLUMN `level` int NULL DEFAULT NULL COMMENT '级别 1=校级 2=班级';
  15. ALTER TABLE xjr_oa_news ADD COLUMN `send_range` int NULL DEFAULT NULL COMMENT '发送范围 1=所有人 2=根据权限';
  16. -- 新闻关联
  17. ALTER TABLE xjr_oa_news_relation ADD COLUMN `read_mark` int NULL DEFAULT NULL COMMENT '阅读标记 0=未读 1=已读';
  18. ALTER TABLE xjr_oa_news_relation ADD COLUMN `read_date` datetime NULL DEFAULT NULL COMMENT '阅读时间';
  19. ALTER TABLE xjr_oa_news_relation ADD COLUMN `reply_content` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '回复内容';
  20. -- ----------------------------
  21. -- 新闻附件
  22. -- ----------------------------
  23. DROP TABLE IF EXISTS `xjr_oa_news_appendix`;
  24. CREATE TABLE `xjr_oa_news_appendix` (
  25. `id` bigint NOT NULL COMMENT '主键',
  26. `news_id` bigint NULL DEFAULT NULL COMMENT '新闻ID',
  27. `file_id` bigint NULL DEFAULT NULL COMMENT '文件ID(xjr_file)',
  28. `create_date` date NULL DEFAULT NULL COMMENT '创建时间',
  29. PRIMARY KEY (`id`) USING BTREE
  30. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT '新闻附件'
  31. -- ----------------------------
  32. -- 新闻关联配置
  33. -- ----------------------------
  34. DROP TABLE IF EXISTS `xjr_oa_news_relation_config`;
  35. CREATE TABLE `xjr_oa_news_relation_config` (
  36. `id` bigint NOT NULL COMMENT '主键',
  37. `news_id` bigint NULL DEFAULT NULL COMMENT '新闻ID',
  38. `relation_type` int NULL DEFAULT NULL COMMENT '关系类型 1=部门 2=人员',
  39. `relation_id` bigint NULL DEFAULT NULL COMMENT '关系ID',
  40. `relation_name` varchar(100) NULL DEFAULT NULL COMMENT '关系名称',
  41. PRIMARY KEY (`id`) USING BTREE
  42. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT '新闻关联配置'
  43. -- ----------------------------
  44. -- 接口文件
  45. -- ----------------------------
  46. CREATE TABLE `magic_api_file` (
  47. `file_path` varchar(512) NOT NULL COMMENT '文件地址',
  48. `file_content` mediumtext COMMENT '文件内容',
  49. PRIMARY KEY (`file_path`)
  50. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT '接口文件'
  51. -- ----------------------------
  52. -- 接口文件备份
  53. -- ----------------------------
  54. CREATE TABLE `magic_backup_record` (
  55. `id` varchar(32) NOT NULL COMMENT '原对象ID',
  56. `create_date` bigint(13) NOT NULL COMMENT '备份时间',
  57. `tag` varchar(32) DEFAULT NULL COMMENT '标签',
  58. `type` varchar(32) DEFAULT NULL COMMENT '类型',
  59. `name` varchar(64) DEFAULT NULL COMMENT '原名称',
  60. `content` blob COMMENT '备份内容',
  61. `create_by` varchar(64) DEFAULT NULL COMMENT '操作人',
  62. PRIMARY KEY (`id`,`create_date`)
  63. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT '接口文件备份'
  64. -- ----------------------------
  65. -- 年级表
  66. -- ----------------------------
  67. DROP TABLE IF EXISTS `base_grade`;
  68. CREATE TABLE `base_grade` (
  69. `id` bigint NOT NULL COMMENT '主键',
  70. `create_user_id` bigint NULL DEFAULT NULL COMMENT '创建人',
  71. `create_date` date NULL DEFAULT NULL COMMENT '创建时间',
  72. `modify_user_id` bigint NULL DEFAULT NULL COMMENT '修改人',
  73. `modify_date` date NULL DEFAULT NULL COMMENT '修改时间',
  74. `delete_mark` int NOT NULL COMMENT '删除标记',
  75. `enabled_mark` int NOT NULL COMMENT '有效标志',
  76. `name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '年级名称',
  77. `title` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '年份',
  78. PRIMARY KEY (`id`) USING BTREE
  79. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '年级表' ROW_FORMAT = Dynamic;
  80. -- ----------------------------
  81. -- 专业表
  82. -- ----------------------------
  83. DROP TABLE IF EXISTS `base_major`;
  84. CREATE TABLE `base_major` (
  85. `id` bigint NOT NULL COMMENT '主键',
  86. `create_user_id` bigint NULL DEFAULT NULL COMMENT '创建人',
  87. `create_date` date NULL DEFAULT NULL COMMENT '创建时间',
  88. `modify_user_id` bigint NULL DEFAULT NULL COMMENT '修改人',
  89. `modify_date` date NULL DEFAULT NULL COMMENT '修改时间',
  90. `delete_mark` int NOT NULL COMMENT '删除标记',
  91. `enabled_mark` int NOT NULL COMMENT '有效标志',
  92. `name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '专业名称',
  93. `code` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '专业代码',
  94. `study_year` decimal(6, 1) NOT NULL COMMENT '修业年限(0.5的整数倍)',
  95. `key_major` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '重点专业(xjr_dictionary_item[key_major])',
  96. `feature_major` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '特色专业(xjr_dictionary_item[feature_major])',
  97. `approve_set_date` date NULL DEFAULT NULL COMMENT '批准设置日期',
  98. `first_recruit_student_date` date NULL DEFAULT NULL COMMENT '首次招生日期(年月)',
  99. `status` int NULL DEFAULT NULL COMMENT '专业状态(1:正常、2:停招、3:撤销)',
  100. `leader_name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '专业带头人',
  101. `director_name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '专业负责人',
  102. `office_start_date` date NULL DEFAULT NULL COMMENT '任职日期开始',
  103. `office_end_date` date NULL DEFAULT NULL COMMENT '任职日期结束',
  104. `is_full_time` int NULL DEFAULT NULL COMMENT '是否全日制',
  105. `major_gradation_id` bigint NOT NULL COMMENT '办学层次(base_major_gradation)',
  106. `major_categor_id` bigint NOT NULL COMMENT '专业分类(base_major_categor)',
  107. `department_id` bigint NOT NULL COMMENT '所属机构(xjr_department)',
  108. PRIMARY KEY (`id`) USING BTREE
  109. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '专业表' ROW_FORMAT = Dynamic;
  110. -- ----------------------------
  111. -- 专业分类表
  112. -- ----------------------------
  113. DROP TABLE IF EXISTS `base_major_categor`;
  114. CREATE TABLE `base_major_categor` (
  115. `id` bigint NOT NULL COMMENT '主键',
  116. `create_user_id` bigint NULL DEFAULT NULL COMMENT '创建人',
  117. `create_date` date NULL DEFAULT NULL COMMENT '创建时间',
  118. `modify_user_id` bigint NULL DEFAULT NULL COMMENT '修改人',
  119. `modify_date` date NULL DEFAULT NULL COMMENT '修改时间',
  120. `delete_mark` int NOT NULL COMMENT '删除标记',
  121. `enabled_mark` int NOT NULL COMMENT '有效标志',
  122. `name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '专业分类名称',
  123. `code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '专业分类代码',
  124. `remark` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
  125. `major_gradation_id` bigint NOT NULL COMMENT '办学层次(base_major_gradation)',
  126. PRIMARY KEY (`id`) USING BTREE
  127. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '专业分类表' ROW_FORMAT = Dynamic;
  128. -- ----------------------------
  129. -- 办学层次表
  130. -- ----------------------------
  131. DROP TABLE IF EXISTS `base_major_gradation`;
  132. CREATE TABLE `base_major_gradation` (
  133. `id` bigint NOT NULL COMMENT '主键',
  134. `create_user_id` bigint NULL DEFAULT NULL COMMENT '创建人',
  135. `create_date` date NULL DEFAULT NULL COMMENT '创建时间',
  136. `modify_user_id` bigint NULL DEFAULT NULL COMMENT '修改人',
  137. `modify_date` date NULL DEFAULT NULL COMMENT '修改时间',
  138. `delete_mark` int NOT NULL COMMENT '删除标记',
  139. `enabled_mark` int NOT NULL COMMENT '有效标志',
  140. `name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '层次名称',
  141. `code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '层次代码',
  142. `school_level` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '所属职业教育层次(xjr_dictionary_item[school_level])',
  143. `remark` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
  144. PRIMARY KEY (`id`) USING BTREE
  145. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '办学层次表' ROW_FORMAT = Dynamic;
  146. -- ----------------------------
  147. -- 专业方向表
  148. -- ----------------------------
  149. DROP TABLE IF EXISTS `base_major_set`;
  150. CREATE TABLE `base_major_set` (
  151. `id` bigint NOT NULL COMMENT '主键',
  152. `create_user_id` bigint NULL DEFAULT NULL COMMENT '创建人',
  153. `create_date` date NULL DEFAULT NULL COMMENT '创建时间',
  154. `modify_user_id` bigint NULL DEFAULT NULL COMMENT '修改人',
  155. `modify_date` date NULL DEFAULT NULL COMMENT '修改时间',
  156. `delete_mark` int NOT NULL COMMENT '删除标记',
  157. `enabled_mark` int NOT NULL COMMENT '有效标志',
  158. `name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '专业方向名称',
  159. `code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '专业方向代码',
  160. `short_name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '专业方向简称',
  161. `skill_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '上报专业技能方向名称',
  162. `remark` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '专业方向说明',
  163. `major_gradation_id` bigint NOT NULL COMMENT '办学层次(base_major_gradation)',
  164. `major_categor_id` bigint NOT NULL COMMENT '专业分类(base_major_categor)',
  165. `department_id` bigint NOT NULL COMMENT '所属机构(xjr_department)',
  166. `major_id` bigint NOT NULL COMMENT '专业(base_major)',
  167. `study_year` decimal(6, 1) NOT NULL COMMENT '适用学制(base_major)',
  168. PRIMARY KEY (`id`) USING BTREE
  169. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '专业方向表' ROW_FORMAT = Dynamic;
  170. -- ----------------------------
  171. -- 办学层次表
  172. -- ----------------------------
  173. DROP TABLE IF EXISTS `base_school_level`;
  174. CREATE TABLE `base_school_level` (
  175. `id` bigint NOT NULL COMMENT '主键',
  176. `create_user_id` bigint NULL DEFAULT NULL COMMENT '创建人',
  177. `create_date` date NULL DEFAULT NULL COMMENT '创建时间',
  178. `modify_user_id` bigint NULL DEFAULT NULL COMMENT '修改人',
  179. `modify_date` date NULL DEFAULT NULL COMMENT '修改时间',
  180. `delete_mark` int NOT NULL COMMENT '删除标记',
  181. `enabled_mark` int NOT NULL COMMENT '有效标志',
  182. `name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '层次名称',
  183. PRIMARY KEY (`id`) USING BTREE
  184. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '办学层次表' ROW_FORMAT = Dynamic;
  185. -- ----------------------------
  186. -- 学期表
  187. -- ----------------------------
  188. DROP TABLE IF EXISTS `base_semester`;
  189. CREATE TABLE `base_semester` (
  190. `id` bigint NOT NULL COMMENT '主键',
  191. `create_user_id` bigint NULL DEFAULT NULL COMMENT '创建人',
  192. `create_date` date NULL DEFAULT NULL COMMENT '创建时间',
  193. `modify_user_id` bigint NULL DEFAULT NULL COMMENT '修改人',
  194. `modify_date` date NULL DEFAULT NULL COMMENT '修改时间',
  195. `delete_mark` int NOT NULL COMMENT '删除标记',
  196. `enabled_mark` int NOT NULL COMMENT '有效标志',
  197. `name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '学期名称',
  198. `start_date` date NULL DEFAULT NULL COMMENT '学期开始日期',
  199. `end_date` date NULL DEFAULT NULL COMMENT '学期结束日期',
  200. `teaching_start` date NULL DEFAULT NULL COMMENT '教学开始日期',
  201. `teaching_end` date NULL DEFAULT NULL COMMENT '教学结束日期',
  202. PRIMARY KEY (`id`) USING BTREE
  203. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '学期表' ROW_FORMAT = Dynamic;
  204. -- ----------------------------
  205. -- 课程学科
  206. -- ----------------------------
  207. DROP TABLE IF EXISTS `base_course_subject`;
  208. CREATE TABLE `base_course_subject` (
  209. `id` bigint NOT NULL COMMENT '主键',
  210. `create_user_id` bigint NULL DEFAULT NULL COMMENT '创建人',
  211. `create_date` date NULL DEFAULT NULL COMMENT '创建时间',
  212. `modify_user_id` bigint NULL DEFAULT NULL COMMENT '修改人',
  213. `modify_date` date NULL DEFAULT NULL COMMENT '修改时间',
  214. `delete_mark` int NOT NULL COMMENT '删除标记',
  215. `enabled_mark` int NOT NULL COMMENT '有效标志',
  216. `name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '课程学科名称',
  217. `code` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '课程学科代码',
  218. `remark` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
  219. PRIMARY KEY (`id`) USING BTREE
  220. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '课程学科' ROW_FORMAT = Dynamic;
  221. -- ----------------------------
  222. -- 教职工基本信息表
  223. -- ----------------------------
  224. DROP TABLE IF EXISTS `base_teacher`;
  225. CREATE TABLE `base_teacher` (
  226. `id` bigint NOT NULL COMMENT '主键',
  227. `create_user_id` bigint NULL DEFAULT NULL COMMENT '创建人',
  228. `create_date` date NULL DEFAULT NULL COMMENT '创建时间',
  229. `modify_user_id` bigint NULL DEFAULT NULL COMMENT '修改人',
  230. `modify_date` date NULL DEFAULT NULL COMMENT '修改时间',
  231. `delete_mark` int NOT NULL COMMENT '删除标记',
  232. `enabled_mark` int NOT NULL COMMENT '有效标志',
  233. `user_id` bigint not null COMMENT '用户ID(xjr_user)',
  234. -- `job_number` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '工号',
  235. -- `name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '姓名',
  236. `as_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '别名',
  237. `en_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '英文姓名',
  238. `py_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '姓名拼音',
  239. `former_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '曾用名',
  240. -- `gender` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '性别(xjr_dictionary_item[gender])',
  241. `job_state` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '在职状态(xjr_dictionary_item[job_state])',
  242. `day_of_birth` date NULL DEFAULT NULL COMMENT '出生日期',
  243. `birth_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '生日类型(xjr_dictionary_item[date_type])',
  244. `nation` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '民族(xjr_dictionary_item[nation])',
  245. `blood_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '血型(xjr_dictionary_item[blood_type])',
  246. `health` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '健康状况(xjr_dictionary_item[health])',
  247. `marital_state` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '婚姻状况(xjr_dictionary_item[marital_state])',
  248. `political_state` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '政治面貌(xjr_dictionary_item[political_state])',
  249. `nationality` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '国籍地区(xjr_dictionary_item[nationality])',
  250. `chinese_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '港澳台侨外(xjr_dictionary_item[chinese_type])',
  251. `house_hold_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '户口类别(xjr_dictionary_item[house_hold_type])',
  252. `provinces` bigint NULL DEFAULT NULL COMMENT '省(xjr_area)',
  253. `city` bigint NULL DEFAULT NULL COMMENT '市(xjr_area)',
  254. `district` bigint NULL DEFAULT NULL COMMENT '区/县(xjr_area)',
  255. `house_hold_address` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '户籍地址',
  256. `start_work_time` date NULL DEFAULT NULL COMMENT '参加工作年月',
  257. `join_time` date NULL DEFAULT NULL COMMENT '来校年月',
  258. `is_organized` smallint NULL DEFAULT NULL COMMENT '是否在编',
  259. `employ_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '聘用类型(xjr_dictionary_item[employ_type])',
  260. `employ_way` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '聘用方式(xjr_dictionary_item[employ_type])上级聘用类型',
  261. PRIMARY KEY (`id`) USING BTREE
  262. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '教职工基本信息表' ROW_FORMAT = Dynamic;
  263. -- ----------------------------
  264. -- 教职工聘用信息表 未定
  265. -- ----------------------------
  266. DROP TABLE IF EXISTS `base_teacher_employ`;
  267. CREATE TABLE `base_teacher_employ` (
  268. `id` bigint NOT NULL COMMENT '主键',
  269. `create_user_id` bigint NULL DEFAULT NULL COMMENT '创建人',
  270. `create_date` date NULL DEFAULT NULL COMMENT '创建时间',
  271. `modify_user_id` bigint NULL DEFAULT NULL COMMENT '修改人',
  272. `modify_date` date NULL DEFAULT NULL COMMENT '修改时间',
  273. `delete_mark` int NOT NULL COMMENT '删除标记',
  274. `enabled_mark` int NOT NULL COMMENT '有效标志',
  275. `user_id` bigint not null COMMENT '用户ID(xjr_user)',
  276. `type` int NULL COMMENT '岗位类型 (1:校内主岗 2:校内兼职岗位 3:事业制单位主岗)',
  277. `job_category` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '校内主岗位类别(xjr_dictionary_item[school_job_type])',
  278. `job_post` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '校内主岗位(xjr_dictionary_item[school_job_type])上级校内主岗位类别',
  279. `job_level` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '岗位等级(xjr_dictionary_item[school_job_level])',
  280. `job_level_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '岗位等级类型(xjr_dictionary_item[school_job_level_type])',
  281. PRIMARY KEY (`id`) USING BTREE
  282. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '教职工聘用信息表' ROW_FORMAT = Dynamic;
  283. -- ----------------------------
  284. -- 教职工联系信息表
  285. -- ----------------------------
  286. DROP TABLE IF EXISTS `base_teacher_contact`;
  287. CREATE TABLE `base_teacher_contact` (
  288. `id` bigint NOT NULL COMMENT '主键',
  289. `create_user_id` bigint NULL DEFAULT NULL COMMENT '创建人',
  290. `create_date` date NULL DEFAULT NULL COMMENT '创建时间',
  291. `modify_user_id` bigint NULL DEFAULT NULL COMMENT '修改人',
  292. `modify_date` date NULL DEFAULT NULL COMMENT '修改时间',
  293. `delete_mark` int NOT NULL COMMENT '删除标记',
  294. `enabled_mark` int NOT NULL COMMENT '有效标志',
  295. `user_id` bigint not null COMMENT '用户ID(xjr_user)',
  296. -- `mobile` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '手机号',
  297. `office_tel` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '办公室电话',
  298. `office_address` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '办公室地址',
  299. -- `email` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '邮箱',
  300. `address` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '现住地址',
  301. `qq_msn` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT 'QQ&MSN',
  302. `wechat` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '微信号',
  303. `microblog` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '微博地址',
  304. `zip_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '住址邮编',
  305. PRIMARY KEY (`id`) USING BTREE
  306. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '教职工联系信息表' ROW_FORMAT = Dynamic;
  307. -- ----------------------------
  308. -- 教职工专任信息表
  309. -- ----------------------------
  310. DROP TABLE IF EXISTS `base_teacher_regular`;
  311. CREATE TABLE `base_teacher_regular` (
  312. `id` bigint NOT NULL COMMENT '主键',
  313. `create_user_id` bigint NULL DEFAULT NULL COMMENT '创建人',
  314. `create_date` date NULL DEFAULT NULL COMMENT '创建时间',
  315. `modify_user_id` bigint NULL DEFAULT NULL COMMENT '修改人',
  316. `modify_date` date NULL DEFAULT NULL COMMENT '修改时间',
  317. `delete_mark` int NOT NULL COMMENT '删除标记',
  318. `enabled_mark` int NOT NULL COMMENT '有效标志',
  319. `user_id` bigint not null COMMENT '用户ID(xjr_user)',
  320. `certificate_Type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '教师资格证种类(xjr_dictionary_item[certificate_Type])',
  321. `belong_org` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '所属系统(xjr_dictionary_item[belong_org])',
  322. `mandarin_level` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '普通话等级(xjr_dictionary_item[mandarin_level])',
  323. `start_teach_time` date NULL COMMENT '从教起始年月',
  324. `teaching_status` json NULL DEFAULT NULL COMMENT '任课状况(xjr_dictionary_item[teaching_status])多选',
  325. `major_categor_id` bigint NULL COMMENT '任教学科类别(base_major_categor)',
  326. `is_double_teacher` int NULL COMMENT '是否双师型教师',
  327. `course_subject_id` bigint NULL COMMENT '任教学科(base_course_subject)',
  328. PRIMARY KEY (`id`) USING BTREE
  329. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '教职工专任信息表' ROW_FORMAT = Dynamic;
  330. -- ----------------------------
  331. -- 教职工学历学位表
  332. -- ----------------------------
  333. DROP TABLE IF EXISTS `base_teacher_education`;
  334. CREATE TABLE `base_teacher_education` (
  335. `id` bigint NOT NULL COMMENT '主键',
  336. `create_user_id` bigint NULL DEFAULT NULL COMMENT '创建人',
  337. `create_date` date NULL DEFAULT NULL COMMENT '创建时间',
  338. `modify_user_id` bigint NULL DEFAULT NULL COMMENT '修改人',
  339. `modify_date` date NULL DEFAULT NULL COMMENT '修改时间',
  340. `delete_mark` int NOT NULL COMMENT '删除标记',
  341. `enabled_mark` int NOT NULL COMMENT '有效标志',
  342. `user_id` bigint not null COMMENT '用户ID(xjr_user)',
  343. `specialty` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '所学专业',
  344. `education` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '最高学历(xjr_dictionary_item[education])',
  345. `education_college` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '获得最高学历的院校',
  346. `degree` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '最高学位(xjr_dictionary_item[degree])',
  347. `degree_college` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '获得最高学位的院校',
  348. PRIMARY KEY (`id`) USING BTREE
  349. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '教职工学历学位表' ROW_FORMAT = Dynamic;
  350. -- ----------------------------
  351. -- 教职工家庭基本信息表
  352. -- ----------------------------
  353. DROP TABLE IF EXISTS `base_teacher_family`;
  354. CREATE TABLE `base_teacher_family` (
  355. `id` bigint NOT NULL COMMENT '主键',
  356. `create_user_id` bigint NULL DEFAULT NULL COMMENT '创建人',
  357. `create_date` date NULL DEFAULT NULL COMMENT '创建时间',
  358. `modify_user_id` bigint NULL DEFAULT NULL COMMENT '修改人',
  359. `modify_date` date NULL DEFAULT NULL COMMENT '修改时间',
  360. `delete_mark` int NOT NULL COMMENT '删除标记',
  361. `enabled_mark` int NOT NULL COMMENT '有效标志',
  362. `user_id` bigint not null COMMENT '用户ID(xjr_user)',
  363. `zip_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '家庭邮编',
  364. `telephone` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '家庭电话',
  365. `contact` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '联系人姓名',
  366. `population` int NULL COMMENT '家庭人口',
  367. `address` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '家庭住址',
  368. `finance` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '家庭经济情况',
  369. PRIMARY KEY (`id`) USING BTREE
  370. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '教职工家庭基本信息表' ROW_FORMAT = Dynamic;
  371. -- ----------------------------
  372. -- 教职工家庭成员表
  373. -- ----------------------------
  374. DROP TABLE IF EXISTS `base_teacher_family_member`;
  375. CREATE TABLE `base_teacher_family_member` (
  376. `id` bigint NOT NULL COMMENT '主键',
  377. `create_user_id` bigint NULL DEFAULT NULL COMMENT '创建人',
  378. `create_date` date NULL DEFAULT NULL COMMENT '创建时间',
  379. `modify_user_id` bigint NULL DEFAULT NULL COMMENT '修改人',
  380. `modify_date` date NULL DEFAULT NULL COMMENT '修改时间',
  381. `delete_mark` int NOT NULL COMMENT '删除标记',
  382. `enabled_mark` int NOT NULL COMMENT '有效标志',
  383. `user_id` bigint not null COMMENT '用户ID(xjr_user)',
  384. `relationship` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '与本人关系(xjr_dictionary_item[relationship])',
  385. `name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '姓名',
  386. `gender` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '性别(xjr_dictionary_item[gender])',
  387. `is_guardian` int NULL COMMENT '是否为监护人',
  388. `day_of_birth` date NULL DEFAULT NULL COMMENT '出生日期',
  389. `political_state` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '政治面貌(xjr_dictionary_item[political_state])',
  390. `occupation` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '职业',
  391. `work_unit` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '工作单位',
  392. `mobile` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '联系电话',
  393. PRIMARY KEY (`id`) USING BTREE
  394. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '教职工家庭成员表' ROW_FORMAT = Dynamic;
  395. -- ----------------------------
  396. -- 学生毕业中学表
  397. -- ----------------------------
  398. DROP TABLE IF EXISTS `base_graduate_school`;
  399. CREATE TABLE `base_graduate_school` (
  400. `id` bigint NOT NULL COMMENT '主键',
  401. `create_user_id` bigint NULL DEFAULT NULL COMMENT '创建人',
  402. `create_date` date NULL DEFAULT NULL COMMENT '创建时间',
  403. `modify_user_id` bigint NULL DEFAULT NULL COMMENT '修改人',
  404. `modify_date` date NULL DEFAULT NULL COMMENT '修改时间',
  405. `delete_mark` int NOT NULL COMMENT '删除标记',
  406. `enabled_mark` int NOT NULL COMMENT '有效标志',
  407. `name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '学校名称',
  408. PRIMARY KEY (`id`) USING BTREE
  409. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '学生毕业中学表' ROW_FORMAT = Dynamic;
  410. -- ----------------------------
  411. -- 学生基本信息表
  412. -- ----------------------------
  413. DROP TABLE IF EXISTS `base_student`;
  414. CREATE TABLE `base_student` (
  415. `id` bigint NOT NULL COMMENT '主键',
  416. `create_user_id` bigint NULL DEFAULT NULL COMMENT '创建人',
  417. `create_date` date NULL DEFAULT NULL COMMENT '创建时间',
  418. `modify_user_id` bigint NULL DEFAULT NULL COMMENT '修改人',
  419. `modify_date` date NULL DEFAULT NULL COMMENT '修改时间',
  420. `delete_mark` int NOT NULL COMMENT '删除标记',
  421. `enabled_mark` int NOT NULL COMMENT '有效标志',
  422. `user_id` bigint not null COMMENT '用户(xjr_user)',
  423. `student_id` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '学号',
  424. -- `name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '姓名',
  425. `as_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '别名',
  426. `en_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '英文姓名',
  427. `py_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '姓名拼音',
  428. `former_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '曾用名',
  429. -- `gender` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '性别(xjr_dictionary_item[gender])',
  430. `credential_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '证件类型(xjr_dictionary_item[credential_type])',
  431. `credential_number` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '证件号码',
  432. `day_of_birth` date NULL DEFAULT NULL COMMENT '出生日期',
  433. `birth_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '生日类型(xjr_dictionary_item[date_type])',
  434. `nation` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '民族(xjr_dictionary_item[nation])',
  435. `blood_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '血型(xjr_dictionary_item[blood_type])',
  436. `health` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '健康状况(xjr_dictionary_item[health])',
  437. `marital_state` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '婚姻状况(xjr_dictionary_item[marital_state])',
  438. `political_state` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '政治面貌(xjr_dictionary_item[political_state])',
  439. `religion` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '信仰宗教(xjr_dictionary_item[religion])',
  440. `nationality` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '国籍地区(xjr_dictionary_item[nationality])',
  441. `chinese_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '港澳台侨外(xjr_dictionary_item[chinese_type])',
  442. `provinces` bigint NULL DEFAULT NULL COMMENT '籍贯 省(xjr_area)',
  443. `city` bigint NULL DEFAULT NULL COMMENT '籍贯 市(xjr_area)',
  444. `district` bigint NULL DEFAULT NULL COMMENT '籍贯 区/县(xjr_area)',
  445. `house_hold_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '户口类别(xjr_dictionary_item[house_hold_type])',
  446. `house_provinces` bigint NULL DEFAULT NULL COMMENT '户口所在地 省(xjr_area)',
  447. `house_city` bigint NULL DEFAULT NULL COMMENT '户口所在地 市(xjr_area)',
  448. `house_district` bigint NULL DEFAULT NULL COMMENT '户口所在地 区/县(xjr_area)',
  449. `house_hold_address` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '户口所在详细地址',
  450. `belongs_police` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '所属派出所',
  451. `birth_provinces` bigint NULL DEFAULT NULL COMMENT '出生地 省(xjr_area)',
  452. `birth_city` bigint NULL DEFAULT NULL COMMENT '出生地 市(xjr_area)',
  453. `birth_district` bigint NULL DEFAULT NULL COMMENT '出生地 区/县(xjr_area)',
  454. `graduate_school_id` bigint null COMMENT '生源地(base_graduate_school)',
  455. `residence_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '学生居住地类型(xjr_dictionary_item[residence_type])',
  456. `is_migrate_children` smallint NULL DEFAULT NULL COMMENT '是否随迁子女',
  457. `train_interval` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '乘火车区间',
  458. `is_floating_population` smallint NULL DEFAULT NULL COMMENT '是否流动人口',
  459. `height` decimal(6, 1) NULL DEFAULT NULL COMMENT '身高(cm)',
  460. `weight` decimal(6, 1) NULL DEFAULT NULL COMMENT '体重(kg)',
  461. `vision` decimal(6, 1) NULL DEFAULT NULL COMMENT '视力',
  462. `specialty` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '特长',
  463. PRIMARY KEY (`id`) USING BTREE
  464. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '学生基本信息表' ROW_FORMAT = Dynamic;
  465. -- ----------------------------
  466. -- 学生学籍信息表
  467. -- ----------------------------
  468. DROP TABLE IF EXISTS `base_student_school_roll`;
  469. CREATE TABLE `base_student_school_roll` (
  470. `id` bigint NOT NULL COMMENT '主键',
  471. `create_user_id` bigint NULL DEFAULT NULL COMMENT '创建人',
  472. `create_date` date NULL DEFAULT NULL COMMENT '创建时间',
  473. `modify_user_id` bigint NULL DEFAULT NULL COMMENT '修改人',
  474. `modify_date` date NULL DEFAULT NULL COMMENT '修改时间',
  475. `delete_mark` int NOT NULL COMMENT '删除标记',
  476. `enabled_mark` int NOT NULL COMMENT '有效标志',
  477. `user_id` bigint not null COMMENT '用户ID(xjr_user)',
  478. `roll_number` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '学籍号',
  479. `archives_number` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '学生档案编号',
  480. `enrollment_date` date NULL DEFAULT NULL COMMENT '入学年月',
  481. `enrollment_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '入学方式(xjr_dictionary_item[enrollment_type])',
  482. `grade_id` bigint NOT NULL COMMENT '入学年级(base_grade)',
  483. `enroll_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '入学招生类型(xjr_dictionary_item[enroll_type])',
  484. `major_set_id` bigint NOT NULL COMMENT '在读专业方向(base_major_set)',
  485. `study_year` decimal(6, 1) NOT NULL COMMENT '学制(base_major_set)',
  486. `class_id` bigint NOT NULL COMMENT '班级(base_class)',
  487. `student_source` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '学生来源(xjr_dictionary_item[student_type])',
  488. `student_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '学生类别(xjr_dictionary_item[student_type])',
  489. `archives_status` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '学籍状态(xjr_dictionary_item[archives_status])',
  490. `stduy_status` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '就读方式(xjr_dictionary_item[stduy_status])',
  491. `learn_status` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '学习形式(xjr_dictionary_item[learn_status])',
  492. `choose_status` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '分流状态(xjr_dictionary_item[choose_status])',
  493. `foster_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '分段培养方式(xjr_dictionary_item[foster_type])',
  494. `recruit_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '招生方式(xjr_dictionary_item[recruit_type])',
  495. `recruit_target` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '招生对象(xjr_dictionary_item[recruit_target])',
  496. `highest_education` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '入学前最高学历(xjr_dictionary_item[education])',
  497. `graduated_university` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '毕业学校',
  498. `graduated_score` decimal(6, 1) NULL COMMENT '毕业成绩',
  499. `examinee_number` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '考生号',
  500. `ticket_number` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '准考证号',
  501. `admission_scores` decimal(6, 1) NULL DEFAULT 0 COMMENT '入学总分',
  502. `remark` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
  503. PRIMARY KEY (`id`) USING BTREE
  504. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '学生学籍信息表' ROW_FORMAT = Dynamic;
  505. -- ----------------------------
  506. -- 学生资助信息表
  507. -- ----------------------------
  508. DROP TABLE IF EXISTS `base_student_subsidize`;
  509. CREATE TABLE `base_student_subsidize` (
  510. `id` bigint NOT NULL COMMENT '主键',
  511. `create_user_id` bigint NULL DEFAULT NULL COMMENT '创建人',
  512. `create_date` date NULL DEFAULT NULL COMMENT '创建时间',
  513. `modify_user_id` bigint NULL DEFAULT NULL COMMENT '修改人',
  514. `modify_date` date NULL DEFAULT NULL COMMENT '修改时间',
  515. `delete_mark` int NOT NULL COMMENT '删除标记',
  516. `enabled_mark` int NOT NULL COMMENT '有效标志',
  517. `user_id` bigint not null COMMENT '用户ID(xjr_user)',
  518. `is_indemnify` smallint NULL DEFAULT NULL COMMENT '是否低保',
  519. `is_stipend` smallint NULL DEFAULT NULL COMMENT '是否享受国家助学金',
  520. `stipend_stand` decimal(6, 1) NULL DEFAULT 0 COMMENT '助学金发放标准(元)',
  521. `stipend_number` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '学生资助卡号',
  522. `is_free` smallint NULL DEFAULT NULL COMMENT '是否免学费',
  523. `is_filing_card` smallint NULL DEFAULT NULL COMMENT '是否建档立卡',
  524. PRIMARY KEY (`id`) USING BTREE
  525. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '学生资助信息表' ROW_FORMAT = Dynamic;
  526. -- ----------------------------
  527. -- 学生联系信息表
  528. -- ----------------------------
  529. DROP TABLE IF EXISTS `base_student_contact`;
  530. CREATE TABLE `base_student_contact` (
  531. `id` bigint NOT NULL COMMENT '主键',
  532. `create_user_id` bigint NULL DEFAULT NULL COMMENT '创建人',
  533. `create_date` date NULL DEFAULT NULL COMMENT '创建时间',
  534. `modify_user_id` bigint NULL DEFAULT NULL COMMENT '修改人',
  535. `modify_date` date NULL DEFAULT NULL COMMENT '修改时间',
  536. `delete_mark` int NOT NULL COMMENT '删除标记',
  537. `enabled_mark` int NOT NULL COMMENT '有效标志',
  538. `user_id` bigint not null COMMENT '用户ID(xjr_user)',
  539. -- `mobile` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '手机号',
  540. -- `email` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '邮箱',
  541. `qq_msn` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT 'QQ&MSN',
  542. `wechat` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '微信号',
  543. `user_page` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '个人主页',
  544. PRIMARY KEY (`id`) USING BTREE
  545. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '学生联系信息表' ROW_FORMAT = Dynamic;
  546. -- ----------------------------
  547. -- 学生家庭基本信息表
  548. -- ----------------------------
  549. DROP TABLE IF EXISTS `base_student_family`;
  550. CREATE TABLE `base_student_family` (
  551. `id` bigint NOT NULL COMMENT '主键',
  552. `create_user_id` bigint NULL DEFAULT NULL COMMENT '创建人',
  553. `create_date` date NULL DEFAULT NULL COMMENT '创建时间',
  554. `modify_user_id` bigint NULL DEFAULT NULL COMMENT '修改人',
  555. `modify_date` date NULL DEFAULT NULL COMMENT '修改时间',
  556. `delete_mark` int NOT NULL COMMENT '删除标记',
  557. `enabled_mark` int NOT NULL COMMENT '有效标志',
  558. `user_id` bigint not null COMMENT '用户ID(xjr_user)',
  559. `zip_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '家庭邮编',
  560. `telephone` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '家庭电话',
  561. `contact` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '联系人姓名',
  562. `population` int NULL COMMENT '家庭人口',
  563. `address` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '家庭住址',
  564. `income_source` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '家庭主要收入来源',
  565. `income_number` decimal(6, 1) NULL DEFAULT 0 COMMENT '家庭月收入金额',
  566. `railway_station` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '离家最近火车站',
  567. PRIMARY KEY (`id`) USING BTREE
  568. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '学生家庭基本信息表' ROW_FORMAT = Dynamic;
  569. -- ----------------------------
  570. -- 学生家庭成员表
  571. -- ----------------------------
  572. DROP TABLE IF EXISTS `base_student_family_member`;
  573. CREATE TABLE `base_student_family_member` (
  574. `id` bigint NOT NULL COMMENT '主键',
  575. `create_user_id` bigint NULL DEFAULT NULL COMMENT '创建人',
  576. `create_date` date NULL DEFAULT NULL COMMENT '创建时间',
  577. `modify_user_id` bigint NULL DEFAULT NULL COMMENT '修改人',
  578. `modify_date` date NULL DEFAULT NULL COMMENT '修改时间',
  579. `delete_mark` int NOT NULL COMMENT '删除标记',
  580. `enabled_mark` int NOT NULL COMMENT '有效标志',
  581. `user_id` bigint not null COMMENT '用户ID(xjr_user)',
  582. `relationship` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '与本人关系(xjr_dictionary_item[relationship])',
  583. `name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '姓名',
  584. `gender` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '性别(xjr_dictionary_item[gender])',
  585. `day_of_birth` date NULL DEFAULT NULL COMMENT '出生日期',
  586. `birth_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '生日类型(xjr_dictionary_item[date_type])',
  587. `nation` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '民族(xjr_dictionary_item[nation])',
  588. `work_unit` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '工作单位',
  589. `occupation` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '从事的工作(职业)',
  590. `position` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '职务',
  591. `mobile` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '联系电话',
  592. `is_guardian` smallint NULL COMMENT '是否为监护人',
  593. `credential_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '证件类型(xjr_dictionary_item[credential_type])',
  594. `credential_number` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '证件号码',
  595. `political_state` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '政治面貌(xjr_dictionary_item[political_state])',
  596. `health` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '健康状况(xjr_dictionary_item[health])',
  597. `house_provinces` bigint NULL DEFAULT NULL COMMENT '户口所在地 省(xjr_area)',
  598. `house_city` bigint NULL DEFAULT NULL COMMENT '户口所在地 市(xjr_area)',
  599. `house_district` bigint NULL DEFAULT NULL COMMENT '户口所在地 区/县(xjr_area)',
  600. `email` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '邮箱',
  601. `wechat` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '微信号',
  602. PRIMARY KEY (`id`) USING BTREE
  603. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '学生家庭成员表' ROW_FORMAT = Dynamic;
  604. -- ----------------------------
  605. -- 教学办公楼表
  606. -- ----------------------------
  607. DROP TABLE IF EXISTS `base_office_build`;
  608. CREATE TABLE `base_office_build` (
  609. `id` bigint NOT NULL COMMENT '主键',
  610. `create_user_id` bigint NULL DEFAULT NULL COMMENT '创建人',
  611. `create_date` date NULL DEFAULT NULL COMMENT '创建时间',
  612. `modify_user_id` bigint NULL DEFAULT NULL COMMENT '修改人',
  613. `modify_date` date NULL DEFAULT NULL COMMENT '修改时间',
  614. `delete_mark` int NOT NULL COMMENT '删除标记',
  615. `enabled_mark` int NOT NULL COMMENT '有效标志',
  616. `name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '楼栋名称',
  617. `org_id` bigint NOT NULL COMMENT '所属校区(xjr_department)第一级',
  618. `floor_total` int NOT NULL COMMENT '楼层数',
  619. `build_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '楼栋类型(xjr_dictionary_item[build_type])',
  620. `status` int NOT NULL COMMENT '状态(1:可用 0:停用)',
  621. `address` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '地址',
  622. `remark` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '描述',
  623. PRIMARY KEY (`id`) USING BTREE
  624. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '教学办公楼表' ROW_FORMAT = Dynamic;
  625. -- ----------------------------
  626. -- 教室表
  627. -- ----------------------------
  628. DROP TABLE IF EXISTS `base_classroom`;
  629. CREATE TABLE `base_classroom` (
  630. `id` bigint NOT NULL COMMENT '主键',
  631. `create_user_id` bigint NULL DEFAULT NULL COMMENT '创建人',
  632. `create_date` date NULL DEFAULT NULL COMMENT '创建时间',
  633. `modify_user_id` bigint NULL DEFAULT NULL COMMENT '修改人',
  634. `modify_date` date NULL DEFAULT NULL COMMENT '修改时间',
  635. `delete_mark` int NOT NULL COMMENT '删除标记',
  636. `enabled_mark` int NOT NULL COMMENT '有效标志',
  637. `name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '教室名称',
  638. `office_build_id` bigint NOT NULL COMMENT '楼栋(base_office_build)',
  639. `floor_num` int NOT NULL COMMENT '楼层',
  640. `purpose` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '教室用途(xjr_dictionary_item[purpose])',
  641. `classroom_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '教室类型(xjr_dictionary_item[classroom_type])',
  642. `org_id` bigint NOT NULL COMMENT '组织机构(xjr_department)',
  643. `square` decimal(6, 1) DEFAULT NULL COMMENT '面积(平米)',
  644. `capacity` decimal(6, 1) DEFAULT NULL COMMENT '容量(人数)',
  645. `status` int NOT NULL COMMENT '状态(1:可用 0:停用)',
  646. PRIMARY KEY (`id`) USING BTREE
  647. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '教室表' ROW_FORMAT = Dynamic;
  648. -- ----------------------------
  649. -- 班级表
  650. -- ----------------------------
  651. DROP TABLE IF EXISTS `base_class`;
  652. CREATE TABLE `base_class` (
  653. `id` bigint NOT NULL COMMENT '主键',
  654. `create_user_id` bigint NULL DEFAULT NULL COMMENT '创建人',
  655. `create_date` date NULL DEFAULT NULL COMMENT '创建时间',
  656. `modify_user_id` bigint NULL DEFAULT NULL COMMENT '修改人',
  657. `modify_date` date NULL DEFAULT NULL COMMENT '修改时间',
  658. `delete_mark` int NOT NULL COMMENT '删除标记',
  659. `enabled_mark` int NOT NULL COMMENT '有效标志',
  660. `name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '班级名称',
  661. `code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '班级代码',
  662. `grade_id` bigint NOT NULL COMMENT '所属年级(base_grade)',
  663. `enroll_type` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '招生类型(xjr_dictionary_item[enroll_type])',
  664. `org_id` bigint NOT NULL COMMENT '组织机构(xjr_department)',
  665. `is_order_class` int DEFAULT NULL COMMENT '是否订单班',
  666. `classroom_id` bigint DEFAULT NULL COMMENT '固定教室(base_classroom)',
  667. `teacher_id` bigint DEFAULT NULL COMMENT '班主任(xjr_user)',
  668. `is_graduate` int DEFAULT NULL COMMENT '在读状态(1: 在读 2: 毕业)',
  669. PRIMARY KEY (`id`) USING BTREE
  670. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '班级表' ROW_FORMAT = Dynamic;
  671. -- ----------------------------
  672. -- 班级专业方向表
  673. -- ----------------------------
  674. DROP TABLE IF EXISTS `base_class_major_set`;
  675. CREATE TABLE `base_class_major_set` (
  676. `id` bigint NOT NULL COMMENT '主键',
  677. `create_user_id` bigint NULL DEFAULT NULL COMMENT '创建人',
  678. `create_date` date NULL DEFAULT NULL COMMENT '创建时间',
  679. `modify_user_id` bigint NULL DEFAULT NULL COMMENT '修改人',
  680. `modify_date` date NULL DEFAULT NULL COMMENT '修改时间',
  681. `delete_mark` int NOT NULL COMMENT '删除标记',
  682. `enabled_mark` int NOT NULL COMMENT '有效标志',
  683. `class_id` bigint NOT NULL COMMENT '班级(base_class_major_set)',
  684. `major_set_id` bigint NOT NULL COMMENT '专业方向(base_major_set)',
  685. `plan_total_student` int DEFAULT NULL COMMENT '计划人数',
  686. `total_student` int DEFAULT NULL COMMENT '班级人数',
  687. `boy_num` int DEFAULT NULL COMMENT '男生人数',
  688. `girl_num` int DEFAULT NULL COMMENT '女生人数',
  689. PRIMARY KEY (`id`) USING BTREE
  690. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '班级专业方向表' ROW_FORMAT = Dynamic;
  691. -- ----------------------------
  692. -- 车辆管理
  693. -- ----------------------------
  694. DROP TABLE IF EXISTS `base_car_management`;
  695. CREATE TABLE `base_car_management` (
  696. `id` bigint NOT NULL COMMENT '主键',
  697. `create_user_id` bigint NULL DEFAULT NULL COMMENT '创建人',
  698. `create_date` date NULL DEFAULT NULL COMMENT '创建时间',
  699. `modify_user_id` bigint NULL DEFAULT NULL COMMENT '修改人',
  700. `modify_date` date NULL DEFAULT NULL COMMENT '修改时间',
  701. `delete_mark` int NOT NULL COMMENT '删除标记',
  702. `enabled_mark` int NOT NULL COMMENT '有效标志',
  703. `user_id` bigint COMMENT '用户(xjr_user)',
  704. `car_no` varchar(9) not null COMMENT '车牌号码',
  705. `c_name` varchar(20) COMMENT '姓名',
  706. `c_id` varchar(18) COMMENT '身份证号',
  707. `c_phone` varchar(50) COMMENT '联系电话',
  708. `c_address` varchar(50) COMMENT '住址',
  709. `c_type` int not null default 1 COMMENT '车牌类型 1=民用 2=军队 3=警用 4=武警',
  710. `c_fee_type` int not null default 1 COMMENT '收费类型 1=月卡 2=临时车 3=免费车 4=储值卡',
  711. `sync_status` tinyint(4) unsigned default 1 not null COMMENT '数据同步状态 1=未同步 2=已同步 3=同步失败',
  712. `status` tinyint(4) unsigned default 1 not null COMMENT '状态 1=启用 2=禁用',
  713. `c_sync_id` int default 0 not null COMMENT '数据同步编号',
  714. `c_start_time` datetime not null COMMENT '开始时间',
  715. `c_end_time` datetime not null COMMENT '结束时间',
  716. PRIMARY KEY (`id`) USING BTREE,
  717. unique key `only`(`car_no`)
  718. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '车辆管理' ROW_FORMAT = Dynamic;
  719. -- ----------------------------
  720. -- 车辆进出记录
  721. -- ----------------------------
  722. DROP TABLE IF EXISTS `base_car_park_records`;
  723. CREATE TABLE `base_car_park_records` (
  724. `id` bigint NOT NULL COMMENT '主键',
  725. `create_user_id` bigint NULL DEFAULT NULL COMMENT '创建人',
  726. `create_date` date NULL DEFAULT NULL COMMENT '创建时间',
  727. `modify_user_id` bigint NULL DEFAULT NULL COMMENT '修改人',
  728. `modify_date` date NULL DEFAULT NULL COMMENT '修改时间',
  729. `delete_mark` int NOT NULL COMMENT '删除标记',
  730. `enabled_mark` int NOT NULL COMMENT '有效标志',
  731. `base_car_management_id` bigint COMMENT '车辆编号(base_car_management)',
  732. `car_no` varchar(9) not null COMMENT '车牌号码',
  733. `in_time` datetime not null COMMENT '进场时间',
  734. `out_time` datetime COMMENT '出场时间',
  735. `status` tinyint(4) unsigned default 1 not null COMMENT '状态 1=进 2=出',
  736. `in_passing` tinyint(4) unsigned default 0 not null COMMENT '进类型 0=识别过车 1=手工进免费车 2=手工进临时车 3=匹配进车',
  737. `out_passing` tinyint(4) unsigned default 0 not null COMMENT '出类型 0=识别过车 1=手工出免费车 2=手工进临时车 3=匹配进车',
  738. `remark` varchar(500) COMMENT '备注',
  739. `c_sync_id` int default 0 not null COMMENT '数据同步编号',
  740. PRIMARY KEY (`id`) USING BTREE
  741. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '车辆进出记录' ROW_FORMAT = Dynamic;
  742. -- ----------------------------
  743. -- 人脸管理
  744. -- ----------------------------
  745. DROP TABLE IF EXISTS `base_face_management`;
  746. CREATE TABLE `base_face_management` (
  747. `id` bigint NOT NULL COMMENT '主键',
  748. `create_user_id` bigint NULL DEFAULT NULL COMMENT '创建人',
  749. `create_date` date NULL DEFAULT NULL COMMENT '创建时间',
  750. `modify_user_id` bigint NULL DEFAULT NULL COMMENT '修改人',
  751. `modify_date` date NULL DEFAULT NULL COMMENT '修改时间',
  752. `delete_mark` int NOT NULL COMMENT '删除标记',
  753. `enabled_mark` int NOT NULL COMMENT '有效标志',
  754. `user_id` bigint COMMENT '用户(xjr_user)',
  755. `face_code` varchar(50) not null default '' COMMENT '人脸编码',
  756. `name` varchar(50) not null default '' COMMENT '姓名',
  757. `sex` varchar(10) not null default '' COMMENT '性别 男, 女',
  758. `idno` varchar(20) not null default '' COMMENT '身份证号',
  759. `people_start_date` datetime COMMENT '名单有效期开始时间',
  760. `people_end_date` datetime COMMENT '名单有效期结束时间',
  761. `icno` varchar(20) not null default '' COMMENT ' ic卡号(10位10进制)',
  762. `register_base64` mediumblob COMMENT '图片的base64字符串',
  763. `verify_status` tinyint(4) unsigned default 1 not null COMMENT '验证状态 1=未验证 2=通过 3=失败',
  764. `verify_error_msg` varchar(200) not null default '' COMMENT '验证失败说明',
  765. `sync_status` tinyint(4) unsigned default 1 not null COMMENT '数据同步状态 1=未同步 2=已同步 3=同步失败',
  766. `status` tinyint(4) unsigned default 1 not null COMMENT '状态 1=启用 2=禁用',
  767. PRIMARY KEY (`id`) USING BTREE
  768. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '人脸管理' ROW_FORMAT = Dynamic;
  769. -- ----------------------------
  770. -- 人脸识别记录
  771. -- ----------------------------
  772. DROP TABLE IF EXISTS `base_face_identify_records`;
  773. CREATE TABLE `base_face_identify_records` (
  774. `id` bigint NOT NULL COMMENT '主键',
  775. `mac_addr` varchar(100) COMMENT '设备唯一标识码',
  776. `verify_time` datetime COMMENT '比对时间 yyyy-MM-dd HH:mm:ss',
  777. `device_name` varchar(100) COMMENT '设备名称',
  778. `location` varchar(100) COMMENT '安装位置',
  779. `inout_direction` tinyint(4) unsigned COMMENT '出入 0=出口 1=入口',
  780. `face_code` varchar(50) not null default '' COMMENT '人脸编码',
  781. `name` varchar(50) COMMENT '姓名',
  782. `temperature` varchar(50) COMMENT '体温',
  783. `face_base64` text COMMENT '比对抓拍照片 base64位字符串',
  784. `result_status` tinyint(4) unsigned COMMENT '比对结果 1=比对成功 0=比对失败',
  785. `identify_type` tinyint(4) unsigned COMMENT '识别方式(比对类型):0人脸识别, 1 黑名单识别(预留字段),2人证比对, 3 IC卡识别',
  786. `face_identify_sync_id` int default 0 not null COMMENT '数据同步编号',
  787. PRIMARY KEY (`id`) USING BTREE,
  788. unique index index_no(face_identify_sync_id)
  789. ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '人脸识别记录' ROW_FORMAT = Dynamic;
  790. -- ----------------------------
  791. -- 短信验证码
  792. -- ----------------------------
  793. DROP TABLE IF EXISTS sms_send_record;
  794. create table sms_send_record
  795. (
  796. id bigint not null comment '主键编号' ,
  797. mobile_number varchar(64) not null comment '手机号码',
  798. sms varchar(512) not null default '' comment '短信内容',
  799. `status` tinyint(4) unsigned default 1 not null comment '状态 1=已发送 2=发送失败',
  800. `error_msg` varchar(200) not null default '' COMMENT '验证失败说明',
  801. `create_date` date null default null COMMENT '创建时间',
  802. `modify_date` date null default null COMMENT '修改时间',
  803. primary key (`id`)
  804. ) engine=innodb default charset=utf8mb4 COLLATE = utf8mb4_0900_ai_ci comment '短信发送记录';
  805. -- ----------------------------
  806. -- 家长学生关联表
  807. -- ----------------------------
  808. DROP TABLE IF EXISTS base_user_student;
  809. create table base_user_student
  810. (
  811. `id` bigint NOT NULL COMMENT '主键',
  812. user_id bigint not null comment '家长ID(xjr_user)',
  813. student_id bigint not null comment '学生ID(xjr_user)',
  814. `create_date` date null default null COMMENT '创建时间',
  815. `modify_date` date null default null COMMENT '修改时间',
  816. primary key (`id`)
  817. ) engine=innodb default charset=utf8mb4 COLLATE = utf8mb4_0900_ai_ci comment '家长学生关联表';
  818. -- ----------------------------
  819. -- 上课时间
  820. -- ----------------------------
  821. drop table if exists class_time;
  822. create table class_time
  823. (
  824. id bigint not null comment '主键编号' ,
  825. time_period int default 0 not null comment '时段(1=上午 2=下午 3=晚上)',
  826. number int not null comment '节次',
  827. full_name varchar(200) not null default '' comment '全称',
  828. short_name varchar(100) not null default '' comment '简称',
  829. `summer_start_time` time not null comment '夏天开始时间',
  830. `summer_end_time` time not null comment '夏天结束时间',
  831. `winter_start_time` time not null comment '冬天开始时间',
  832. `winter_end_time` time not null comment '冬天结束时间',
  833. remark varchar(2000) not null default '' comment '备注',
  834. `create_date` date null default null COMMENT '创建时间',
  835. `modify_date` date null default null COMMENT '修改时间',
  836. primary key (`id`),
  837. unique key `only`(`time_period`,`number`)
  838. ) engine=innodb default charset=utf8mb4 COLLATE = utf8mb4_0900_ai_ci comment '上课时间';
  839. -- ----------------------------
  840. -- 课表
  841. -- ----------------------------
  842. drop table if exists course_table;
  843. create table course_table
  844. (
  845. id bigint not null comment '主键编号' ,
  846. `base_semester_id` bigint COMMENT '学期ID(base_semester)',
  847. teacher_id bigint not null default 0 comment '教师编号(用户表)',
  848. teacher_name varchar(50) not null default '' comment '教师名称',
  849. course_id bigint not null default 0 comment '课程编号(course)',
  850. course_name varchar(200) not null default '' comment '课程名称',
  851. class_id bigint not null default 0 comment '班级编号(class)',
  852. class_name varchar(200) not null default '' comment '班级名称',
  853. week int comment '周',
  854. weeks int comment '星期几(1-7)',
  855. weeks_cn varchar(200) comment '星期中文',
  856. time_period int default 0 not null comment '时段(1=上午 2=下午 3=晚上)',
  857. time_number int comment '节次',
  858. site_id int not null default 0 comment '场地编号(site)',
  859. site_name varchar(200) not null default '' comment '场地名称',
  860. status int not null default 1 comment '状态 1=正常 2=错误',
  861. err_msg varchar(200) not null default '' comment '错误信息描述',
  862. `create_date` date null default null COMMENT '创建时间',
  863. `modify_date` date null default null COMMENT '修改时间',
  864. primary key (`id`)
  865. ) engine=innodb default charset=utf8mb4 COLLATE = utf8mb4_0900_ai_ci comment '课表';
  866. -- ----------------------------
  867. -- 三方客户端管理
  868. -- ----------------------------
  869. drop table if exists oauth_client_details;
  870. create table oauth_client_details
  871. (
  872. id bigint not null comment '主键编号' ,
  873. `client_id` varchar(100) not null COMMENT '应用标识',
  874. `client_name` varchar(200) not null COMMENT '应用名称',
  875. `client_secret` varchar(200) not null COMMENT '应用密钥',
  876. `allow_url` varchar(4000) not null default '*' COMMENT '应用允许授权的所有URL, 多个用逗号隔开',
  877. `scope` varchar(200) not null default 'all' COMMENT '应用签约的所有权限, 多个用逗号隔开',
  878. access_token_timeout bigint not null default 3600 comment '令牌时效(s)' ,
  879. refresh_token_validity_seconds bigint not null default 28800 comment '刷新时效(s)' ,
  880. authorized_grant_types varchar(1000) not null default 'authorization_code,password,client_credentials,implicit' COMMENT '授权模式',
  881. status int not null default 1 comment '状态 1=启用 2=禁用',
  882. `create_date` date null default null COMMENT '创建时间',
  883. `modify_date` date null default null COMMENT '修改时间',
  884. `delete_mark` int NOT NULL COMMENT '删除标记',
  885. `enabled_mark` int NOT NULL COMMENT '有效标志',
  886. primary key (`id`)
  887. ) engine=innodb default charset=utf8mb4 COLLATE = utf8mb4_0900_ai_ci comment 'oauth用户列表';
  888. -- ----------------------------
  889. -- 材料提交任务类型
  890. -- ----------------------------
  891. drop table if exists material_type;
  892. create table material_type
  893. (
  894. id bigint not null comment '主键编号' ,
  895. `create_user_id` bigint NULL DEFAULT NULL COMMENT '创建人',
  896. `create_date` date NULL DEFAULT NULL COMMENT '创建时间',
  897. `modify_user_id` bigint NULL DEFAULT NULL COMMENT '修改人',
  898. `modify_date` date NULL DEFAULT NULL COMMENT '修改时间',
  899. `delete_mark` int NOT NULL COMMENT '删除标记',
  900. `enabled_mark` int NOT NULL COMMENT '有效标志',
  901. `name` varchar(100) NULL DEFAULT NULL COMMENT '任务名称',
  902. primary key (`id`)
  903. ) engine=innodb default charset=utf8mb4 COLLATE = utf8mb4_0900_ai_ci comment '材料提交任务类型';
  904. -- ----------------------------
  905. -- 材料提交任务类型分配
  906. -- ----------------------------
  907. drop table if exists material_type_assign;
  908. create table material_type_assign
  909. (
  910. id bigint not null comment '主键编号' ,
  911. `create_user_id` bigint NULL DEFAULT NULL COMMENT '创建人',
  912. `create_date` date NULL DEFAULT NULL COMMENT '创建时间',
  913. `modify_user_id` bigint NULL DEFAULT NULL COMMENT '修改人',
  914. `modify_date` date NULL DEFAULT NULL COMMENT '修改时间',
  915. `delete_mark` int NOT NULL COMMENT '删除标记',
  916. `enabled_mark` int NOT NULL COMMENT '有效标志',
  917. `material_type_id` bigint NULL DEFAULT NULL COMMENT '材料提交任务类型(material_type)',
  918. user_id bigint not null comment '用户(xjr_user)',
  919. user_type int not null comment '用户类型 1=孝职工 2=学生',
  920. `user_number` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '学号/工号',
  921. primary key (`id`)
  922. ) engine=innodb default charset=utf8mb4 COLLATE = utf8mb4_0900_ai_ci comment '材料提交任务类型分配';
  923. -- ----------------------------
  924. -- 材料提交任务
  925. -- ----------------------------
  926. drop table if exists material_task;
  927. create table material_task
  928. (
  929. id bigint not null comment '主键编号' ,
  930. `create_user_id` bigint NULL DEFAULT NULL COMMENT '创建人',
  931. `create_date` date NULL DEFAULT NULL COMMENT '创建时间',
  932. `modify_user_id` bigint NULL DEFAULT NULL COMMENT '修改人',
  933. `modify_date` date NULL DEFAULT NULL COMMENT '修改时间',
  934. `delete_mark` int NOT NULL COMMENT '删除标记',
  935. `enabled_mark` int NOT NULL COMMENT '有效标志',
  936. `material_type_id` bigint NULL DEFAULT NULL COMMENT '材料提交任务类型(material_type)',
  937. `name` varchar(100) NULL DEFAULT NULL COMMENT '任务名称',
  938. status int not null default 1 comment '状态 1=未开始 2=进行中 3=结束',
  939. required_complete_time date null default null COMMENT '要求完成日期',
  940. `requirement` text NULL DEFAULT NULL COMMENT '要求',
  941. assign_person int null default 0 comment '指派给几人',
  942. submited_person int null default 0 comment '已提交人数',
  943. on_time_person int null default 0 comment '按时提交',
  944. time_delay int null default 0 comment '延迟提交',
  945. primary key (`id`)
  946. ) engine=innodb default charset=utf8mb4 COLLATE = utf8mb4_0900_ai_ci comment '材料提交任务';
  947. -- ----------------------------
  948. -- 材料提交任务分配
  949. -- ----------------------------
  950. drop table if exists material_task_assign;
  951. create table material_task_assign
  952. (
  953. id bigint not null comment '主键编号' ,
  954. `create_user_id` bigint NULL DEFAULT NULL COMMENT '创建人',
  955. `create_date` date NULL DEFAULT NULL COMMENT '创建时间',
  956. `modify_user_id` bigint NULL DEFAULT NULL COMMENT '修改人',
  957. `modify_date` date NULL DEFAULT NULL COMMENT '修改时间',
  958. `delete_mark` int NOT NULL COMMENT '删除标记',
  959. `enabled_mark` int NOT NULL COMMENT '有效标志',
  960. `material_task_id` bigint NULL DEFAULT NULL COMMENT '材料提交任务(material_task)',
  961. user_id bigint not null comment '用户(xjr_user)',
  962. user_type int not null comment '用户类型 1=孝职工 2=学生',
  963. `user_number` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '学号/工号',
  964. status int not null default 1 comment '状态 1=未提交 2=待审核 3=通过 4=重做',
  965. executive_status int not null default 1 comment '执行提交 1=未提交 2=按时提交 3=延迟提交',
  966. transfer_material_task_id bigint NULL DEFAULT NULL COMMENT '转办任务分配ID(material_task_assign)',
  967. transfer_assign_person int null default 0 comment '转办给几人',
  968. transfer_submited_person int null default 0 comment '转办已提交人数',
  969. send_message int null default 0 comment '是否发送消息 0=不发 1=发送',
  970. send_message_status int null default 0 comment '发送消息状态 0=未不发 1=已发送',
  971. primary key (`id`)
  972. ) engine=innodb default charset=utf8mb4 COLLATE = utf8mb4_0900_ai_ci comment '材料提交任务分配';
  973. ALTER TABLE material_task_assign ADD COLUMN `opinion` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '审核意见';
  974. -- ----------------------------
  975. -- 材料提交任务附件
  976. -- ----------------------------
  977. drop table if exists material_task_appendix;
  978. create table material_task_appendix
  979. (
  980. id bigint not null comment '主键编号' ,
  981. `create_user_id` bigint NULL DEFAULT NULL COMMENT '创建人',
  982. `create_date` date NULL DEFAULT NULL COMMENT '创建时间',
  983. `modify_user_id` bigint NULL DEFAULT NULL COMMENT '修改人',
  984. `modify_date` date NULL DEFAULT NULL COMMENT '修改时间',
  985. `delete_mark` int NOT NULL COMMENT '删除标记',
  986. `enabled_mark` int NOT NULL COMMENT '有效标志',
  987. `material_task_id` bigint NULL DEFAULT NULL COMMENT '材料提交任务(material_task)',
  988. `file_id` bigint NULL DEFAULT NULL COMMENT '文件ID(xjr_file)',
  989. primary key (`id`)
  990. ) engine=innodb default charset=utf8mb4 COLLATE = utf8mb4_0900_ai_ci comment '材料提交任务附件';
  991. -- ----------------------------
  992. -- 文件接收管理
  993. -- ----------------------------
  994. drop table if exists file_receive;
  995. create table file_receive
  996. (
  997. id bigint not null comment '主键编号',
  998. `receiver_user_id` bigint NULL DEFAULT NULL COMMENT '接收用户编号',
  999. `create_date` date NULL DEFAULT NULL COMMENT '创建时间',
  1000. `data_id` bigint NULL DEFAULT NULL COMMENT '数据编号(根据文件类型判断,数据来源->wf_oa_push,wf_oa_pull)',
  1001. `file_type` int NULL DEFAULT NULL COMMENT '文件类型 1=发文 2=收文',
  1002. primary key (`id`)
  1003. ) engine=innodb default charset=utf8mb4 COLLATE = utf8mb4_0900_ai_ci comment '文件接收管理';
  1004. -- ----------------------------
  1005. -- APP端功能模块管理
  1006. -- ----------------------------
  1007. drop table if exists base_app_function;
  1008. create table base_app_function
  1009. (
  1010. id bigint not null comment '主键编号',
  1011. `create_user_id` bigint NULL DEFAULT NULL COMMENT '创建人',
  1012. `create_date` date NULL DEFAULT NULL COMMENT '创建时间',
  1013. `modify_user_id` bigint NULL DEFAULT NULL COMMENT '修改人',
  1014. `modify_date` date NULL DEFAULT NULL COMMENT '修改时间',
  1015. `delete_mark` int NOT NULL COMMENT '删除标记',
  1016. `enabled_mark` int NOT NULL COMMENT '有效标志',
  1017. `type` varchar(20) NULL DEFAULT NULL COMMENT '功能分类(xjr_dictionary_item[APPFUNC])',
  1018. `name` varchar(100) NULL DEFAULT NULL COMMENT '名称',
  1019. `icon` varchar(100) NULL DEFAULT NULL COMMENT '图标',
  1020. `prefix` varchar(50) NULL DEFAULT NULL COMMENT '图标前缀',
  1021. `color` varchar(10) NULL DEFAULT NULL COMMENT '图标颜色',
  1022. `schema_id` bigint NULL DEFAULT NULL COMMENT '模板ID',
  1023. `sort_code` int NULL DEFAULT NULL COMMENT '排序',
  1024. `is_directory` int NULL DEFAULT NULL COMMENT '菜单类型 0=菜单 1=目录',
  1025. `url` varchar(100) NULL DEFAULT NULL COMMENT '功能地址',
  1026. primary key (`id`)
  1027. ) engine=innodb default charset=utf8mb4 COLLATE = utf8mb4_0900_ai_ci comment 'APP端功能模块管理';
  1028. SET FOREIGN_KEY_CHECKS = 1;