From bd979192560d6ef83999930193e4d249458087f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?O=E6=98=B5=E7=A7=B0=E9=87=8D=E8=A6=81=E5=90=97O?= Date: Sat, 14 Mar 2026 13:02:51 +0800 Subject: [PATCH] =?UTF-8?q?feat(entities):=20=E9=9B=86=E6=88=90=20MikroORM?= =?UTF-8?q?=20=E5=B9=B6=E9=85=8D=E7=BD=AE=E5=AE=9E=E4=BD=93=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加 MikroORM CLI 和实体生成器依赖包 - 配置 ESLint 规则以适配 MikroORM 生成的实体文件 - 添加 mikro-orm 和 generate-entities 命令脚本 - 更新 pnpm 锁定文件包含新依赖项 - 移除手动创建的 meeting-user 实体文件,改用 ORM 自动生成 --- node_api/eslint.config.js | 14 ++- node_api/package.json | 6 +- node_api/pnpm-lock.yaml | 88 +++++++++++++++++++ node_api/src/entities/IcrBookarticle.ts | 40 +++++++++ node_api/src/entities/IcrBookassigntask.ts | 38 ++++++++ node_api/src/entities/IcrBookcatalog.ts | 37 ++++++++ node_api/src/entities/IcrBookcategory.ts | 31 +++++++ node_api/src/entities/IcrBookpage.ts | 46 ++++++++++ node_api/src/entities/IcrBookpagearea.ts | 36 ++++++++ node_api/src/entities/IcrBookpagequestion.ts | 76 ++++++++++++++++ node_api/src/entities/IcrBooks.ts | 62 +++++++++++++ node_api/src/entities/IcrClasscourse.ts | 38 ++++++++ node_api/src/entities/IcrClassdatacollect.ts | 41 +++++++++ .../src/entities/IcrClassrelationtemplate.ts | 38 ++++++++ .../IcrClassrelationtemplatedetail.ts | 36 ++++++++ .../entities/IcrClassroomansweringresult.ts | 70 +++++++++++++++ node_api/src/entities/IcrClassroomcourse.ts | 58 ++++++++++++ .../src/entities/IcrClassroomcourseplan.ts | 46 ++++++++++ .../entities/IcrClassroomcoursequestion.ts | 34 +++++++ node_api/src/entities/IcrClassroomquestion.ts | 54 ++++++++++++ .../entities/IcrClassroomquestionpackage.ts | 34 +++++++ .../IcrClassroomquestionpackageitem.ts | 44 ++++++++++ node_api/src/entities/IcrClassservermap.ts | 34 +++++++ .../src/entities/IcrClassservermapCopy1.ts | 34 +++++++ node_api/src/entities/IcrDotfile.ts | 43 +++++++++ node_api/src/entities/IcrDotfiledetail.ts | 33 +++++++ node_api/src/entities/IcrDotmatrixnotebook.ts | 58 ++++++++++++ node_api/src/entities/IcrDotmatrixpage.ts | 52 +++++++++++ .../entities/IcrDotmatrixpagecollectrecord.ts | 34 +++++++ node_api/src/entities/IcrDotmatrixpen.ts | 40 +++++++++ node_api/src/entities/IcrDotmatrixtemplate.ts | 44 ++++++++++ .../src/entities/IcrDotmatrixtermianltask.ts | 44 ++++++++++ node_api/src/entities/IcrFeedback.ts | 38 ++++++++ node_api/src/entities/IcrFeedbackresult.ts | 40 +++++++++ node_api/src/entities/IcrHomework.ts | 60 +++++++++++++ node_api/src/entities/IcrHomeworkanswer.ts | 76 ++++++++++++++++ .../entities/IcrHomeworkanswercoordinate.ts | 24 +++++ .../IcrHomeworkanswerdraftcoordinate.ts | 24 +++++ .../src/entities/IcrHomeworkanswerexplain.ts | 46 ++++++++++ .../src/entities/IcrHomeworkanswerpage.ts | 42 +++++++++ .../entities/IcrHomeworkanswersnapshoot.ts | 76 ++++++++++++++++ .../entities/IcrHomeworkarticlesnapshoot.ts | 44 ++++++++++ .../src/entities/IcrHomeworkevaluation.ts | 43 +++++++++ .../entities/IcrHomeworkextracurricular.ts | 40 +++++++++ .../IcrHomeworkextracurricularanswer.ts | 48 ++++++++++ node_api/src/entities/IcrHomeworkmeeting.ts | 34 +++++++ node_api/src/entities/IcrHomeworkperusal.ts | 45 ++++++++++ .../src/entities/IcrHomeworkprocessingtask.ts | 41 +++++++++ node_api/src/entities/IcrHomeworkquestion.ts | 40 +++++++++ node_api/src/entities/IcrHomeworkstudent.ts | 40 +++++++++ node_api/src/entities/IcrKnowledgepoint.ts | 42 +++++++++ node_api/src/entities/IcrLearnreport.ts | 44 ++++++++++ node_api/src/entities/IcrQuestionbank.ts | 56 ++++++++++++ node_api/src/entities/IcrServer.ts | 38 ++++++++ node_api/src/entities/IcrServerconfig.ts | 30 +++++++ node_api/src/entities/IcrService.ts | 38 ++++++++ .../entities/IcrTeacherclassroomscheduling.ts | 38 ++++++++ node_api/src/entities/IcrTerminalmessage.ts | 36 ++++++++ node_api/src/entities/IcrTerminalmonitor.ts | 32 +++++++ .../entities/IcrTerminalsubscribedclass.ts | 32 +++++++ node_api/src/entities/IcrTutorroom.ts | 36 ++++++++ node_api/src/entities/IcrUserdotmatrixpen.ts | 38 ++++++++ node_api/src/entities/IcrUserservermap.ts | 38 ++++++++ node_api/src/entities/IcrWords.ts | 39 ++++++++ node_api/src/entities/IcrWordscategory.ts | 37 ++++++++ node_api/src/entities/MeetingUser.ts | 17 ++++ node_api/src/entities/Meetinglog.ts | 32 +++++++ node_api/src/entities/OssResource.ts | 36 ++++++++ node_api/src/entities/PrismaMigrations.ts | 27 ++++++ node_api/src/entities/ScsAppupdate.ts | 37 ++++++++ node_api/src/entities/ScsCarousel.ts | 38 ++++++++ node_api/src/entities/ScsClass.ts | 44 ++++++++++ node_api/src/entities/ScsClasssubject.ts | 36 ++++++++ node_api/src/entities/ScsCourse.ts | 58 ++++++++++++ node_api/src/entities/ScsCoursepoint.ts | 32 +++++++ node_api/src/entities/ScsCourseschedule.ts | 40 +++++++++ node_api/src/entities/ScsCoursesource.ts | 40 +++++++++ .../src/entities/ScsCoursesourceconvert.ts | 38 ++++++++ node_api/src/entities/ScsDictionary.ts | 40 +++++++++ .../src/entities/ScsDictionarycategory.ts | 36 ++++++++ node_api/src/entities/ScsFeature.ts | 40 +++++++++ node_api/src/entities/ScsGrade.ts | 36 ++++++++ node_api/src/entities/ScsManager.ts | 42 +++++++++ node_api/src/entities/ScsManagerrole.ts | 30 +++++++ node_api/src/entities/ScsNetdisk.ts | 44 ++++++++++ node_api/src/entities/ScsPermissions.ts | 49 +++++++++++ node_api/src/entities/ScsResourceconvert.ts | 42 +++++++++ node_api/src/entities/ScsRole.ts | 38 ++++++++ node_api/src/entities/ScsRolepermissions.ts | 30 +++++++ node_api/src/entities/ScsSchool.ts | 32 +++++++ node_api/src/entities/ScsSitemessage.ts | 38 ++++++++ node_api/src/entities/ScsSource.ts | 44 ++++++++++ node_api/src/entities/ScsSourcefile.ts | 48 ++++++++++ node_api/src/entities/ScsStudentclass.ts | 36 ++++++++ node_api/src/entities/ScsStudenterrorbank.ts | 35 ++++++++ node_api/src/entities/ScsStudentgroup.ts | 36 ++++++++ .../src/entities/ScsStudentgroupdetail.ts | 30 +++++++ node_api/src/entities/ScsStudentparent.ts | 31 +++++++ node_api/src/entities/ScsSubject.ts | 34 +++++++ node_api/src/entities/ScsTeacherclass.ts | 36 ++++++++ node_api/src/entities/ScsTeacherinfo.ts | 36 ++++++++ .../src/entities/ScsTeacherstudentinfo.ts | 30 +++++++ node_api/src/entities/ScsUser.ts | 57 ++++++++++++ node_api/src/entities/ScsUsercenter.ts | 38 ++++++++ node_api/src/entities/ScsUsercollect.ts | 32 +++++++ node_api/src/entities/ScsUsercourserecord.ts | 34 +++++++ node_api/src/entities/ScsUsermessage.ts | 36 ++++++++ node_api/src/entities/ScsUsernopool.ts | 28 ++++++ node_api/src/entities/ScsUserwechat.ts | 34 +++++++ node_api/src/entities/mikro-orm.config.ts | 19 ++++ .../meeting/entities/meeting-user.entity.ts | 14 --- 111 files changed, 4402 insertions(+), 16 deletions(-) create mode 100644 node_api/src/entities/IcrBookarticle.ts create mode 100644 node_api/src/entities/IcrBookassigntask.ts create mode 100644 node_api/src/entities/IcrBookcatalog.ts create mode 100644 node_api/src/entities/IcrBookcategory.ts create mode 100644 node_api/src/entities/IcrBookpage.ts create mode 100644 node_api/src/entities/IcrBookpagearea.ts create mode 100644 node_api/src/entities/IcrBookpagequestion.ts create mode 100644 node_api/src/entities/IcrBooks.ts create mode 100644 node_api/src/entities/IcrClasscourse.ts create mode 100644 node_api/src/entities/IcrClassdatacollect.ts create mode 100644 node_api/src/entities/IcrClassrelationtemplate.ts create mode 100644 node_api/src/entities/IcrClassrelationtemplatedetail.ts create mode 100644 node_api/src/entities/IcrClassroomansweringresult.ts create mode 100644 node_api/src/entities/IcrClassroomcourse.ts create mode 100644 node_api/src/entities/IcrClassroomcourseplan.ts create mode 100644 node_api/src/entities/IcrClassroomcoursequestion.ts create mode 100644 node_api/src/entities/IcrClassroomquestion.ts create mode 100644 node_api/src/entities/IcrClassroomquestionpackage.ts create mode 100644 node_api/src/entities/IcrClassroomquestionpackageitem.ts create mode 100644 node_api/src/entities/IcrClassservermap.ts create mode 100644 node_api/src/entities/IcrClassservermapCopy1.ts create mode 100644 node_api/src/entities/IcrDotfile.ts create mode 100644 node_api/src/entities/IcrDotfiledetail.ts create mode 100644 node_api/src/entities/IcrDotmatrixnotebook.ts create mode 100644 node_api/src/entities/IcrDotmatrixpage.ts create mode 100644 node_api/src/entities/IcrDotmatrixpagecollectrecord.ts create mode 100644 node_api/src/entities/IcrDotmatrixpen.ts create mode 100644 node_api/src/entities/IcrDotmatrixtemplate.ts create mode 100644 node_api/src/entities/IcrDotmatrixtermianltask.ts create mode 100644 node_api/src/entities/IcrFeedback.ts create mode 100644 node_api/src/entities/IcrFeedbackresult.ts create mode 100644 node_api/src/entities/IcrHomework.ts create mode 100644 node_api/src/entities/IcrHomeworkanswer.ts create mode 100644 node_api/src/entities/IcrHomeworkanswercoordinate.ts create mode 100644 node_api/src/entities/IcrHomeworkanswerdraftcoordinate.ts create mode 100644 node_api/src/entities/IcrHomeworkanswerexplain.ts create mode 100644 node_api/src/entities/IcrHomeworkanswerpage.ts create mode 100644 node_api/src/entities/IcrHomeworkanswersnapshoot.ts create mode 100644 node_api/src/entities/IcrHomeworkarticlesnapshoot.ts create mode 100644 node_api/src/entities/IcrHomeworkevaluation.ts create mode 100644 node_api/src/entities/IcrHomeworkextracurricular.ts create mode 100644 node_api/src/entities/IcrHomeworkextracurricularanswer.ts create mode 100644 node_api/src/entities/IcrHomeworkmeeting.ts create mode 100644 node_api/src/entities/IcrHomeworkperusal.ts create mode 100644 node_api/src/entities/IcrHomeworkprocessingtask.ts create mode 100644 node_api/src/entities/IcrHomeworkquestion.ts create mode 100644 node_api/src/entities/IcrHomeworkstudent.ts create mode 100644 node_api/src/entities/IcrKnowledgepoint.ts create mode 100644 node_api/src/entities/IcrLearnreport.ts create mode 100644 node_api/src/entities/IcrQuestionbank.ts create mode 100644 node_api/src/entities/IcrServer.ts create mode 100644 node_api/src/entities/IcrServerconfig.ts create mode 100644 node_api/src/entities/IcrService.ts create mode 100644 node_api/src/entities/IcrTeacherclassroomscheduling.ts create mode 100644 node_api/src/entities/IcrTerminalmessage.ts create mode 100644 node_api/src/entities/IcrTerminalmonitor.ts create mode 100644 node_api/src/entities/IcrTerminalsubscribedclass.ts create mode 100644 node_api/src/entities/IcrTutorroom.ts create mode 100644 node_api/src/entities/IcrUserdotmatrixpen.ts create mode 100644 node_api/src/entities/IcrUserservermap.ts create mode 100644 node_api/src/entities/IcrWords.ts create mode 100644 node_api/src/entities/IcrWordscategory.ts create mode 100644 node_api/src/entities/MeetingUser.ts create mode 100644 node_api/src/entities/Meetinglog.ts create mode 100644 node_api/src/entities/OssResource.ts create mode 100644 node_api/src/entities/PrismaMigrations.ts create mode 100644 node_api/src/entities/ScsAppupdate.ts create mode 100644 node_api/src/entities/ScsCarousel.ts create mode 100644 node_api/src/entities/ScsClass.ts create mode 100644 node_api/src/entities/ScsClasssubject.ts create mode 100644 node_api/src/entities/ScsCourse.ts create mode 100644 node_api/src/entities/ScsCoursepoint.ts create mode 100644 node_api/src/entities/ScsCourseschedule.ts create mode 100644 node_api/src/entities/ScsCoursesource.ts create mode 100644 node_api/src/entities/ScsCoursesourceconvert.ts create mode 100644 node_api/src/entities/ScsDictionary.ts create mode 100644 node_api/src/entities/ScsDictionarycategory.ts create mode 100644 node_api/src/entities/ScsFeature.ts create mode 100644 node_api/src/entities/ScsGrade.ts create mode 100644 node_api/src/entities/ScsManager.ts create mode 100644 node_api/src/entities/ScsManagerrole.ts create mode 100644 node_api/src/entities/ScsNetdisk.ts create mode 100644 node_api/src/entities/ScsPermissions.ts create mode 100644 node_api/src/entities/ScsResourceconvert.ts create mode 100644 node_api/src/entities/ScsRole.ts create mode 100644 node_api/src/entities/ScsRolepermissions.ts create mode 100644 node_api/src/entities/ScsSchool.ts create mode 100644 node_api/src/entities/ScsSitemessage.ts create mode 100644 node_api/src/entities/ScsSource.ts create mode 100644 node_api/src/entities/ScsSourcefile.ts create mode 100644 node_api/src/entities/ScsStudentclass.ts create mode 100644 node_api/src/entities/ScsStudenterrorbank.ts create mode 100644 node_api/src/entities/ScsStudentgroup.ts create mode 100644 node_api/src/entities/ScsStudentgroupdetail.ts create mode 100644 node_api/src/entities/ScsStudentparent.ts create mode 100644 node_api/src/entities/ScsSubject.ts create mode 100644 node_api/src/entities/ScsTeacherclass.ts create mode 100644 node_api/src/entities/ScsTeacherinfo.ts create mode 100644 node_api/src/entities/ScsTeacherstudentinfo.ts create mode 100644 node_api/src/entities/ScsUser.ts create mode 100644 node_api/src/entities/ScsUsercenter.ts create mode 100644 node_api/src/entities/ScsUsercollect.ts create mode 100644 node_api/src/entities/ScsUsercourserecord.ts create mode 100644 node_api/src/entities/ScsUsermessage.ts create mode 100644 node_api/src/entities/ScsUsernopool.ts create mode 100644 node_api/src/entities/ScsUserwechat.ts create mode 100644 node_api/src/entities/mikro-orm.config.ts delete mode 100644 node_api/src/modules/meeting/entities/meeting-user.entity.ts diff --git a/node_api/eslint.config.js b/node_api/eslint.config.js index 5e191ac..10b1a6b 100644 --- a/node_api/eslint.config.js +++ b/node_api/eslint.config.js @@ -54,7 +54,7 @@ export default defineConfig( { files: ['src/**/*.controller.ts', 'src/**/*.service.ts', 'src/**/*.module.ts', 'src/**/*.dto.ts'], rules: { - // NestJS 装饰器需要关闭这些规则 + // NestJS 装饰器要关闭这些规则 '@typescript-eslint/explicit-member-accessibility': 'off', '@typescript-eslint/consistent-type-imports': 'off', '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }], @@ -62,6 +62,18 @@ export default defineConfig( '@typescript-eslint/no-useless-constructor': 'off', }, }, + // MikroORM 生成的实体文件配置 + { + files: ['src/entities/*.ts'], + rules: { + // MikroORM v7 生成的实体不需要访问修饰符 + '@typescript-eslint/explicit-member-accessibility': 'off', + // 允许导入类型而不使用 type 导入 + '@typescript-eslint/consistent-type-imports': 'off', + // 允许未使用的变量 (MikroORM 的特殊属性) + '@typescript-eslint/no-unused-vars': 'off', + }, + }, { files: ['**/*.js', '**/*.cjs', '**/*.mjs', '**/*.cjsx', '**/*.mjsx', '**/*.jsx'], rules: { diff --git a/node_api/package.json b/node_api/package.json index d10ab50..6991654 100644 --- a/node_api/package.json +++ b/node_api/package.json @@ -10,7 +10,9 @@ "start:debug": "nest start --debug --watch", "start:prod": "node dist/main", "build:swc": "nest build --builder swc", - "migrate": "node -e \"console.error('\\n[禁止] 数据库表结构由 DBA 统一管理,请勿执行 migrate 命令\\n'); process.exit(1)\"", + "migrate": "node -e \"console.error('\\n[禁止] 数据库表结构由 DBA 统一管理,请勿执行 migrate 命令\\n'); process.exit(1);\"", + "mikro-orm": "mikro-orm --config ./src/entities/mikro-orm.config.ts", + "generate-entities": "mikro-orm generate-entities -s -p ./src/entities", "lint:ts": "tsc --noEmit --skipLibCheck", "lint:prettier": "prettier --write \"src/**/*.{js,json,ts,tsx,cjs,mjs,cts,mts,css,scss}\"", "lint:eslint": "eslint \"src/**/*.{js,ts,tsx}\" --fix", @@ -54,6 +56,8 @@ }, "devDependencies": { "@eslint/js": "^10.0.1", + "@mikro-orm/cli": "^7.0.1", + "@mikro-orm/entity-generator": "^7.0.1", "@nestjs/cli": "^11.0.16", "@swc/core": "^1.15.18", "@types/cuint": "^0.2.4", diff --git a/node_api/pnpm-lock.yaml b/node_api/pnpm-lock.yaml index 3ac6ab8..7993a52 100644 --- a/node_api/pnpm-lock.yaml +++ b/node_api/pnpm-lock.yaml @@ -99,6 +99,12 @@ importers: '@eslint/js': specifier: ^10.0.1 version: 10.0.1(eslint@10.0.3) + '@mikro-orm/cli': + specifier: ^7.0.1 + version: 7.0.1 + '@mikro-orm/entity-generator': + specifier: ^7.0.1 + version: 7.0.1(@mikro-orm/core@7.0.1) '@nestjs/cli': specifier: ^11.0.16 version: 11.0.16(@swc/core@1.15.18)(@types/node@25.5.0)(webpack-cli@7.0.0) @@ -634,6 +640,11 @@ packages: '@microsoft/tsdoc@0.16.0': resolution: {integrity: sha512-xgAyonlVVS+q7Vc7qLW0UrJU7rSFcETRWsqdXZtjzRU8dF+6CkozTK4V4y1LwOX7j8r/vHphjDeMeGI4tNGeGA==} + '@mikro-orm/cli@7.0.1': + resolution: {integrity: sha512-RtPMubFs9KN5eKL0S8m4vGDeqcfXl3U3UF+Dl51vm5PovjdVojNM8r+l0aMNTgcJa/eeyjPVav+8knuYY+9PWA==} + engines: {node: '>= 22.17.0'} + hasBin: true + '@mikro-orm/core@7.0.1': resolution: {integrity: sha512-m6Q0xzZij4nR3vbEVwxRXE25L0YuDN4z2+NkqjqPKs+N1A09HfZPadBqgr0Wj9YYxEh/CBf9RGFsRCLFdlRNQA==} engines: {node: '>= 22.17.0'} @@ -653,6 +664,12 @@ packages: reflect-metadata: optional: true + '@mikro-orm/entity-generator@7.0.1': + resolution: {integrity: sha512-pI0TbrtbFWeAZgcMY4218lHoE6usfI1zbGS7pRXJQnI01w541yoMaMUoG47PuhrB6fkSjzlAKXlxS1QGc/Xmfw==} + engines: {node: '>= 22.17.0'} + peerDependencies: + '@mikro-orm/core': 7.0.1 + '@mikro-orm/mysql@7.0.1': resolution: {integrity: sha512-S7yDDvqFkwDT0fZACPukVWAKncuIAFaXUNDhzcHA80Ku6mrus6av8bjgk3sBNWQP9oRCCmIRm2OQbIqXDOZQVw==} engines: {node: '>= 22.17.0'} @@ -1273,6 +1290,10 @@ packages: resolution: {integrity: sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==} engines: {node: '>= 12'} + cliui@8.0.1: + resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} + engines: {node: '>=12'} + clone-deep@4.0.1: resolution: {integrity: sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==} engines: {node: '>=6'} @@ -1747,6 +1768,10 @@ packages: generate-function@2.3.1: resolution: {integrity: sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==} + get-caller-file@2.0.5: + resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} + engines: {node: 6.* || 8.* || >= 10.*} + get-intrinsic@1.3.0: resolution: {integrity: sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==} engines: {node: '>= 0.4'} @@ -2076,6 +2101,10 @@ packages: resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} engines: {node: '>=8.6'} + mikro-orm@7.0.1: + resolution: {integrity: sha512-/y1ZyIXmdX/PQLHCDMyjWdDiqq9eiEdFxpNZiKdghODl2jStZZT7myEnwRYCp2+4QlIToDAsumJfh6o/J2z3Bg==} + engines: {node: '>= 22.17.0'} + mime-db@1.52.0: resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} engines: {node: '>= 0.6'} @@ -2393,6 +2422,10 @@ packages: reflect-metadata@0.2.2: resolution: {integrity: sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q==} + require-directory@2.1.1: + resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} + engines: {node: '>=0.10.0'} + require-from-string@2.0.2: resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} engines: {node: '>=0.10.0'} @@ -2877,6 +2910,10 @@ packages: resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} engines: {node: '>=8'} + wrap-ansi@7.0.0: + resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} + engines: {node: '>=10'} + wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} @@ -2892,10 +2929,18 @@ packages: utf-8-validate: optional: true + y18n@5.0.8: + resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} + engines: {node: '>=10'} + yargs-parser@21.1.1: resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} engines: {node: '>=12'} + yargs@17.7.2: + resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} + engines: {node: '>=12'} + yocto-queue@0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} @@ -3327,6 +3372,14 @@ snapshots: '@microsoft/tsdoc@0.16.0': {} + '@mikro-orm/cli@7.0.1': + dependencies: + '@mikro-orm/core': 7.0.1 + mikro-orm: 7.0.1 + yargs: 17.7.2 + transitivePeerDependencies: + - dataloader + '@mikro-orm/core@7.0.1': {} '@mikro-orm/decorators@7.0.1(@mikro-orm/core@7.0.1)(reflect-metadata@0.2.2)': @@ -3335,6 +3388,11 @@ snapshots: optionalDependencies: reflect-metadata: 0.2.2 + '@mikro-orm/entity-generator@7.0.1(@mikro-orm/core@7.0.1)': + dependencies: + '@mikro-orm/core': 7.0.1 + '@mikro-orm/sql': 7.0.1(@mikro-orm/core@7.0.1) + '@mikro-orm/mysql@7.0.1(@mikro-orm/core@7.0.1)(@types/node@25.5.0)': dependencies: '@mikro-orm/core': 7.0.1 @@ -4001,6 +4059,12 @@ snapshots: cli-width@4.1.0: {} + cliui@8.0.1: + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 7.0.0 + clone-deep@4.0.1: dependencies: is-plain-object: 2.0.4 @@ -4529,6 +4593,8 @@ snapshots: dependencies: is-property: 1.0.2 + get-caller-file@2.0.5: {} + get-intrinsic@1.3.0: dependencies: call-bind-apply-helpers: 1.0.2 @@ -4828,6 +4894,8 @@ snapshots: braces: 3.0.3 picomatch: 2.3.1 + mikro-orm@7.0.1: {} + mime-db@1.52.0: {} mime-types@2.1.35: @@ -5157,6 +5225,8 @@ snapshots: reflect-metadata@0.2.2: {} + require-directory@2.1.1: {} + require-from-string@2.0.2: {} reserved-identifiers@1.2.0: {} @@ -5696,12 +5766,30 @@ snapshots: string-width: 4.2.3 strip-ansi: 6.0.1 + wrap-ansi@7.0.0: + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrappy@1.0.2: {} ws@8.18.3: {} + y18n@5.0.8: {} + yargs-parser@21.1.1: {} + yargs@17.7.2: + dependencies: + cliui: 8.0.1 + escalade: 3.2.0 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + string-width: 4.2.3 + y18n: 5.0.8 + yargs-parser: 21.1.1 + yocto-queue@0.1.0: {} yoctocolors-cjs@2.1.3: {} diff --git a/node_api/src/entities/IcrBookarticle.ts b/node_api/src/entities/IcrBookarticle.ts new file mode 100644 index 0000000..a3e3d4b --- /dev/null +++ b/node_api/src/entities/IcrBookarticle.ts @@ -0,0 +1,40 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrBookarticle { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + BookId!: bigint; + Name?: string; + Type!: number; + WordCount!: number; + Conclusion?: any; + Guide?: string; + Tutelage?: string; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const IcrBookarticleSchema = defineEntity({ + class: IcrBookarticle, + comment: '书籍文章', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + BookId: p.bigint().name('BookId').comment('书Id'), + Name: p.string().name('Name').nullable().comment('文章名称'), + Type: p.integer().name('Type').comment('文章类型'), + WordCount: p.integer().name('WordCount').comment('字数'), + Conclusion: p.json().name('Conclusion').nullable().comment('结论Json'), + Guide: p.string().name('Guide').nullable().comment('导读'), + Tutelage: p.string().name('Tutelage').nullable().comment('指导'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/IcrBookassigntask.ts b/node_api/src/entities/IcrBookassigntask.ts new file mode 100644 index 0000000..c5a2766 --- /dev/null +++ b/node_api/src/entities/IcrBookassigntask.ts @@ -0,0 +1,38 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrBookassigntask { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + BookId!: bigint; + BookPageId!: bigint; + BookPageQuestionId!: bigint; + OperatorId?: bigint; + OperatorType!: number; + Status!: number; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const IcrBookassigntaskSchema = defineEntity({ + class: IcrBookassigntask, + comment: '录入/审查', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + BookId: p.bigint().name('BookId').comment('书Id'), + BookPageId: p.bigint().name('BookPageId').comment('书页id'), + BookPageQuestionId: p.bigint().name('BookPageQuestionId').comment('书页id'), + OperatorId: p.bigint().name('OperatorId').nullable().comment('操作人Id'), + OperatorType: p.integer().name('OperatorType').comment('操作人类型(1-录入 2-审核 3-补充)'), + Status: p.integer().name('Status').comment('状态(0-未完成 1完成)'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/IcrBookcatalog.ts b/node_api/src/entities/IcrBookcatalog.ts new file mode 100644 index 0000000..26799ed --- /dev/null +++ b/node_api/src/entities/IcrBookcatalog.ts @@ -0,0 +1,37 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrBookcatalog { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + BookId!: bigint; + Name?: string; + Type!: number; + ParentId!: bigint; + Level!: number; + Sort!: number; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const IcrBookcatalogSchema = defineEntity({ + class: IcrBookcatalog, + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + BookId: p.bigint().name('BookId').comment('书Id').index('idx_ICR_BookCatalog_01'), + Name: p.string().name('Name').nullable().comment('目录名称'), + Type: p.integer().name('Type').comment('类别:0-单元 1-页'), + ParentId: p.bigint().name('ParentId').comment('父Id;无限级别'), + Level: p.integer().name('Level').comment('等级'), + Sort: p.integer().name('Sort').comment('排序'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/IcrBookcategory.ts b/node_api/src/entities/IcrBookcategory.ts new file mode 100644 index 0000000..7c6aba3 --- /dev/null +++ b/node_api/src/entities/IcrBookcategory.ts @@ -0,0 +1,31 @@ +import { type Opt, PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrBookcategory { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + Name?: string; + Enable!: unknown; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; + Count: number & Opt = 0; +} + +export const IcrBookcategorySchema = defineEntity({ + class: IcrBookcategory, + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + Name: p.string().name('Name').nullable().comment('类别名称'), + Enable: p.array().name('Enable').comment('启用'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + Count: p.integer().name('Count').comment('数量'), + }, +}); diff --git a/node_api/src/entities/IcrBookpage.ts b/node_api/src/entities/IcrBookpage.ts new file mode 100644 index 0000000..f1b85ef --- /dev/null +++ b/node_api/src/entities/IcrBookpage.ts @@ -0,0 +1,46 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrBookpage { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + BookId!: bigint; + BookCatalogId!: bigint; + DotMatrixPageId!: bigint; + PageNo?: string; + Layout?: string; + PageNum!: number; + Status!: number; + Url?: string; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; + Sort!: number; + BookArticleId?: bigint; +} + +export const IcrBookpageSchema = defineEntity({ + class: IcrBookpage, + comment: '书页;', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + BookId: p.bigint().name('BookId').comment('书Id').index('idx_ICR_BookPage_01'), + BookCatalogId: p.bigint().name('BookCatalogId').comment('书目录id').index('idx_ICR_BookPage_02'), + DotMatrixPageId: p.bigint().name('DotMatrixPageId').comment('点阵页id'), + PageNo: p.string().name('PageNo').nullable().comment('点阵码'), + Layout: p.text().name('Layout').length(65535).nullable().comment('页布局(预留字段)'), + PageNum: p.integer().name('PageNum').comment('页码'), + Status: p.integer().name('Status').comment('校验状态(0-未校验 1校验成功 -1校验失败)'), + Url: p.string().name('Url').nullable().comment('页图片'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + Sort: p.integer().name('Sort').comment('排序'), + BookArticleId: p.bigint().name('BookArticleId').nullable().comment('书文章Id').index('idx_ICR_BookPage_03'), + }, +}); diff --git a/node_api/src/entities/IcrBookpagearea.ts b/node_api/src/entities/IcrBookpagearea.ts new file mode 100644 index 0000000..0e7d04e --- /dev/null +++ b/node_api/src/entities/IcrBookpagearea.ts @@ -0,0 +1,36 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrBookpagearea { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + BookId!: bigint; + BookPageId!: bigint; + No?: string; + Type!: number; + GroupId!: bigint; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const IcrBookpageareaSchema = defineEntity({ + class: IcrBookpagearea, + comment: '书页问题;', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + BookId: p.bigint().name('BookId').comment('书Id').index('idx_ICR_BookPageArea_01'), + BookPageId: p.bigint().name('BookPageId').comment('书页id').index('idx_ICR_BookPageArea_02'), + No: p.string().name('No').nullable().comment('题号'), + Type: p.integer().name('Type').comment('题型'), + GroupId: p.bigint().name('GroupId').comment('分组'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/IcrBookpagequestion.ts b/node_api/src/entities/IcrBookpagequestion.ts new file mode 100644 index 0000000..a327535 --- /dev/null +++ b/node_api/src/entities/IcrBookpagequestion.ts @@ -0,0 +1,76 @@ +import { type Opt, PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrBookpagequestion { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + BookId!: bigint; + BookPageId!: bigint; + No?: string; + Type!: number; + SubjectId!: bigint; + Question?: string; + Options?: string; + Answer?: string; + Analysis?: string; + AnalysisUrl?: string; + Score!: number; + AnswerTime!: number; + Status!: number; + ImageUrl?: string; + VideoUrl?: string; + GroupId!: bigint; + AudioStartTime!: bigint; + AudioEndTime!: bigint; + AudioUrl?: string; + PointsUrl?: string; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; + KnowledgepointIds?: unknown; + QuestionUrl?: string; + Case: number & Opt = 0; + AnswerUrl?: string; + KeywordAnalysis?: string; +} + +export const IcrBookpagequestionSchema = defineEntity({ + class: IcrBookpagequestion, + comment: '书页问题;', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + BookId: p.bigint().name('BookId').comment('书Id').index('idx_ICR_BookPageQuestion_01'), + BookPageId: p.bigint().name('BookPageId').comment('书页id').index('idx_ICR_BookPageQuestion_02'), + No: p.string().name('No').nullable().comment('题号'), + Type: p.integer().name('Type').comment('题型'), + SubjectId: p.bigint().name('SubjectId').comment('学科id'), + Question: p.text().name('Question').length(65535).nullable().comment('问题'), + Options: p.string().name('Options').nullable().comment('选项'), + Answer: p.text().name('Answer').length(65535).nullable().comment('答案'), + Analysis: p.text().name('Analysis').length(65535).nullable().comment('解析'), + AnalysisUrl: p.string().name('AnalysisUrl').nullable().comment('解析图片地址'), + Score: p.float().name('Score').comment('问题分数'), + AnswerTime: p.integer().name('AnswerTime').comment('回答时间(秒)'), + Status: p.integer().name('Status').comment('校验状态(0-未校验 1校验成功 -1校验失败)'), + ImageUrl: p.string().name('ImageUrl').nullable().comment('图片地址'), + VideoUrl: p.string().name('VideoUrl').nullable().comment('视频地址'), + GroupId: p.bigint().name('GroupId').comment('分组'), + AudioStartTime: p.bigint().name('AudioStartTime').comment('音频开始时间'), + AudioEndTime: p.bigint().name('AudioEndTime').comment('音频结束时间'), + AudioUrl: p.string().name('AudioUrl').nullable().comment('音频地址'), + PointsUrl: p.string().name('PointsUrl').nullable().comment('点位数据地址'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + KnowledgepointIds: p.array().name('KnowledgepointIds').length(4294967295).nullable().comment('关联的知识点ids'), + QuestionUrl: p.string().name('QuestionUrl').nullable().comment('问题图片地址'), + Case: p.integer().name('Case').comment('1-原问题图片 2-回答图片'), + AnswerUrl: p.string().name('AnswerUrl').nullable().comment('答案图片地址'), + KeywordAnalysis: p.string().name('KeywordAnalysis').nullable().comment('关键解析json'), + }, +}); diff --git a/node_api/src/entities/IcrBooks.ts b/node_api/src/entities/IcrBooks.ts new file mode 100644 index 0000000..05496c6 --- /dev/null +++ b/node_api/src/entities/IcrBooks.ts @@ -0,0 +1,62 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrBooks { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + Name?: string; + BookCategoryId!: bigint; + GradeLevel!: number; + GradeNum!: number; + SubjectId!: bigint; + TotalPage!: number; + VerifyPage!: number; + Status!: number; + PdfUrl?: string; + Width!: number; + Height!: number; + BookType!: number; + Type!: number; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; + Result!: number; + Cover?: string; + BackCover?: string; + PdfPreviewUrl?: string; + Conclusion?: any; +} + +export const IcrBooksSchema = defineEntity({ + class: IcrBooks, + comment: '书籍', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + Name: p.string().name('Name').nullable().comment('书籍名称'), + BookCategoryId: p.bigint().name('BookCategoryId').comment('类别Id').index('idx_ICR_Books_01'), + GradeLevel: p.integer().name('GradeLevel').comment('适用年级(小 初 高)'), + GradeNum: p.integer().name('GradeNum').comment('适用年级'), + SubjectId: p.bigint().name('SubjectId').comment('适用学科(和类别相关)'), + TotalPage: p.integer().name('TotalPage').comment('总页数'), + VerifyPage: p.integer().name('VerifyPage').comment('校验页数'), + Status: p.integer().name('Status').comment('状态'), + PdfUrl: p.string().name('PdfUrl').nullable().comment('pdf地址'), + Width: p.float().name('Width').comment('宽度'), + Height: p.float().name('Height').comment('高度'), + BookType: p.integer().name('BookType').comment('1书籍/2卷子'), + Type: p.integer().name('Type').comment('默认/作业'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + Result: p.integer().name('Result').comment('审查结果(默认0 1通过 -1驳回)'), + Cover: p.string().name('Cover').nullable().comment('封面'), + BackCover: p.string().name('BackCover').nullable().comment('封底'), + PdfPreviewUrl: p.string().name('PdfPreviewUrl').nullable().comment('pdf预览地址'), + Conclusion: p.json().name('Conclusion').nullable().comment('结论Json'), + }, +}); diff --git a/node_api/src/entities/IcrClasscourse.ts b/node_api/src/entities/IcrClasscourse.ts new file mode 100644 index 0000000..ea42dae --- /dev/null +++ b/node_api/src/entities/IcrClasscourse.ts @@ -0,0 +1,38 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrClasscourse { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + ClassRoomCourseId!: bigint; + SchoolId?: bigint; + GradeId?: bigint; + ClassId!: bigint; + Type!: number; + Remark?: string; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const IcrClasscourseSchema = defineEntity({ + class: IcrClasscourse, + comment: '课程班级关系(云班)', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + ClassRoomCourseId: p.bigint().name('ClassRoomCourseId').comment('课程课程Id').index('idx_ICR_ClassCourse_01'), + SchoolId: p.bigint().name('SchoolId').nullable().comment('授课学校id'), + GradeId: p.bigint().name('GradeId').nullable().comment('授课年级id'), + ClassId: p.bigint().name('ClassId').comment('班级'), + Type: p.integer().name('Type').comment('班级类型;1 本班 2 云班'), + Remark: p.string().name('Remark').nullable().comment('备注'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/IcrClassdatacollect.ts b/node_api/src/entities/IcrClassdatacollect.ts new file mode 100644 index 0000000..c6899b3 --- /dev/null +++ b/node_api/src/entities/IcrClassdatacollect.ts @@ -0,0 +1,41 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrClassdatacollect { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + SchoolId!: bigint; + GradeId!: bigint; + ClassId!: bigint; + ObjectivenNum!: number; + SubjectiveNum!: number; + YesNoNum!: number; + PKNum!: number; + CollectNum!: number; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const IcrClassdatacollectSchema = defineEntity({ + class: IcrClassdatacollect, + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + SchoolId: p.bigint().name('SchoolId').comment('学校id'), + GradeId: p.bigint().name('GradeId').comment('年级id'), + ClassId: p.bigint().name('ClassId').comment('班级id'), + ObjectivenNum: p.integer().name('ObjectivenNum').comment('客观题互动次数'), + SubjectiveNum: p.integer().name('SubjectiveNum').comment('主观题互动次数'), + YesNoNum: p.integer().name('YesNoNum').comment('Y/N互动次数'), + PKNum: p.integer().name('PKNum').comment('PK互动次数'), + CollectNum: p.integer().name('CollectNum').comment('采集次数'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/IcrClassrelationtemplate.ts b/node_api/src/entities/IcrClassrelationtemplate.ts new file mode 100644 index 0000000..0b923f6 --- /dev/null +++ b/node_api/src/entities/IcrClassrelationtemplate.ts @@ -0,0 +1,38 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrClassrelationtemplate { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + Name?: string; + SchoolId!: bigint; + GradeId!: bigint; + ClassId!: bigint; + TeacherId?: bigint; + SubjectId?: bigint; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const IcrClassrelationtemplateSchema = defineEntity({ + class: IcrClassrelationtemplate, + comment: '班级关联模板', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + Name: p.string().name('Name').nullable().comment('模板名称'), + SchoolId: p.bigint().name('SchoolId').comment('学校Id'), + GradeId: p.bigint().name('GradeId').comment('年级Id'), + ClassId: p.bigint().name('ClassId').comment('班级id'), + TeacherId: p.bigint().name('TeacherId').nullable().comment('教师Id'), + SubjectId: p.bigint().name('SubjectId').nullable().comment('学科Id'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/IcrClassrelationtemplatedetail.ts b/node_api/src/entities/IcrClassrelationtemplatedetail.ts new file mode 100644 index 0000000..8b26dee --- /dev/null +++ b/node_api/src/entities/IcrClassrelationtemplatedetail.ts @@ -0,0 +1,36 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrClassrelationtemplatedetail { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + ClassRelationTemplateId!: bigint; + SchoolId!: bigint; + GradeId!: bigint; + ClassId!: bigint; + CloudClassId!: bigint; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const IcrClassrelationtemplatedetailSchema = defineEntity({ + class: IcrClassrelationtemplatedetail, + comment: '班级关联关系绑定', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + ClassRelationTemplateId: p.bigint().name('ClassRelationTemplateId').comment('模板id'), + SchoolId: p.bigint().name('SchoolId').comment('学校Id'), + GradeId: p.bigint().name('GradeId').comment('年级Id'), + ClassId: p.bigint().name('ClassId').comment('班级Id'), + CloudClassId: p.bigint().name('CloudClassId').comment('云班ID'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/IcrClassroomansweringresult.ts b/node_api/src/entities/IcrClassroomansweringresult.ts new file mode 100644 index 0000000..f10fe61 --- /dev/null +++ b/node_api/src/entities/IcrClassroomansweringresult.ts @@ -0,0 +1,70 @@ +import { type Opt, PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrClassroomansweringresult { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + ClassId!: bigint; + ClassType!: number; + ClassRoomCourseId!: bigint; + ClassRoomQuestionId!: bigint; + StudentId!: bigint; + PenIds?: string; + AnsweringResultTraceId?: string; + Results?: string; + Status!: number; + Judgment!: number; + AnsweringStartTime?: Date; + AnsweringEndTime?: Date; + AnsweringSeconds?: number; + ThumbnaiImageWidth?: number; + ThumbnaiImageHeight?: number; + ThumbnaiImagePath?: string; + HighdefinitionImagePath?: string; + PenTraceId?: bigint; + DotMatrixNotebookId?: bigint; + DotMatrixPageId?: bigint; + Remark?: string; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; + SchoolId!: bigint & Opt; +} + +export const IcrClassroomansweringresultSchema = defineEntity({ + class: IcrClassroomansweringresult, + comment: '课堂问题答题结果', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + ClassId: p.bigint().name('ClassId').comment('班级编号'), + ClassType: p.integer().name('ClassType').comment('班级类型'), + ClassRoomCourseId: p.bigint().name('ClassRoomCourseId').comment('课堂课程Id'), + ClassRoomQuestionId: p.bigint().name('ClassRoomQuestionId').comment('课堂问题Id'), + StudentId: p.bigint().name('StudentId').comment('学生Id'), + PenIds: p.string().name('PenIds').nullable().comment('笔Id(逗号分割)'), + AnsweringResultTraceId: p.string().name('AnsweringResultTraceId').nullable().comment('回答笔迹Id'), + Results: p.string().name('Results').nullable().comment('答题结果内容;["",""]'), + Status: p.integer().name('Status').comment('答题结果状态'), + Judgment: p.integer().name('Judgment').comment('答题结果状态判定'), + AnsweringStartTime: p.datetime().name('AnsweringStartTime').length(3).nullable().comment('答题开始时间'), + AnsweringEndTime: p.datetime().name('AnsweringEndTime').length(3).nullable().comment('答题结束时间'), + AnsweringSeconds: p.integer().name('AnsweringSeconds').nullable().comment('答题耗时'), + ThumbnaiImageWidth: p.float().name('ThumbnaiImageWidth').nullable().comment('缩略图图像宽度(毫米)'), + ThumbnaiImageHeight: p.float().name('ThumbnaiImageHeight').nullable().comment('缩略图图像高度(毫米)'), + ThumbnaiImagePath: p.string().name('ThumbnaiImagePath').nullable().comment('缩略图图像路径;答题过程中不断生成新的缩略图,但是地址不变'), + HighdefinitionImagePath: p.string().name('HighdefinitionImagePath').nullable().comment('高清图图像路径;只有图片完成后才有高清图路径'), + PenTraceId: p.bigint().name('PenTraceId').nullable().comment('笔轨迹Id;此Id关联时序数据库'), + DotMatrixNotebookId: p.bigint().name('DotMatrixNotebookId').nullable().comment('答题的点阵本Id'), + DotMatrixPageId: p.bigint().name('DotMatrixPageId').nullable().comment('答题的点阵页Id'), + Remark: p.string().name('Remark').nullable().comment('备注'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + SchoolId: p.bigint().name('SchoolId').comment('学校Id').defaultRaw(`0`), + }, +}); diff --git a/node_api/src/entities/IcrClassroomcourse.ts b/node_api/src/entities/IcrClassroomcourse.ts new file mode 100644 index 0000000..0e4b9df --- /dev/null +++ b/node_api/src/entities/IcrClassroomcourse.ts @@ -0,0 +1,58 @@ +import { type Opt, PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrClassroomcourse { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + SchoolId?: bigint; + GradeId?: bigint; + ClassId!: bigint; + TeacherId!: bigint; + SubjectId!: bigint; + Title?: string; + ActiveDate!: Date; + ActiveWeekNum!: number; + ActiveTimeStart?: Date; + ActiveTimeEnd?: Date; + Status!: number; + HandsUpStatus!: number; + BulletScreenStatus!: number; + StartPointTimes?: unknown; + Remark?: string; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; + HomeworkId!: bigint & Opt; +} + +export const IcrClassroomcourseSchema = defineEntity({ + class: IcrClassroomcourse, + comment: '课堂课程(本班)', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + SchoolId: p.bigint().name('SchoolId').nullable().comment('授课学校id'), + GradeId: p.bigint().name('GradeId').nullable().comment('授课年级id'), + ClassId: p.bigint().name('ClassId').comment('授课本班编号'), + TeacherId: p.bigint().name('TeacherId').comment('教师编号'), + SubjectId: p.bigint().name('SubjectId').comment('学科编号'), + Title: p.string().name('Title').nullable().comment('课程标题(可选)'), + ActiveDate: p.datetime().name('ActiveDate').length(3).comment('授课时间(天)'), + ActiveWeekNum: p.integer().name('ActiveWeekNum').comment('周几'), + ActiveTimeStart: p.datetime().name('ActiveTimeStart').length(3).nullable().comment('授课开始时间'), + ActiveTimeEnd: p.datetime().name('ActiveTimeEnd').length(3).nullable().comment('授课结束时间;若为主动结束课程,系统自动处理'), + Status: p.integer().name('Status').comment('授课状态;0 未开始 1 已开始 200 授课正常结束 201 系统关闭课程'), + HandsUpStatus: p.integer().name('HandsUpStatus').comment('举手状态'), + BulletScreenStatus: p.integer().name('BulletScreenStatus').comment('弹幕状态'), + StartPointTimes: p.array().name('StartPointTimes').length(16777215).nullable().comment('开始点'), + Remark: p.string().name('Remark').nullable().comment('备注'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + HomeworkId: p.bigint().name('HomeworkId').comment('作业Id').defaultRaw(`0`), + }, +}); diff --git a/node_api/src/entities/IcrClassroomcourseplan.ts b/node_api/src/entities/IcrClassroomcourseplan.ts new file mode 100644 index 0000000..e100f51 --- /dev/null +++ b/node_api/src/entities/IcrClassroomcourseplan.ts @@ -0,0 +1,46 @@ +import { type Opt, PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrClassroomcourseplan { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + ClassRelationTemplateId!: bigint; + SchoolId!: bigint; + GradeId!: bigint; + ClassId!: bigint; + TeacherId!: bigint; + SubjectId!: bigint; + Name?: string; + ClassRoomCourseId?: bigint; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; + ExecutionTime!: Date & Opt; + ExpireTime!: Date & Opt; +} + +export const IcrClassroomcourseplanSchema = defineEntity({ + class: IcrClassroomcourseplan, + comment: '课程计划;', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + ClassRelationTemplateId: p.bigint().name('ClassRelationTemplateId').comment('引用的模板Id'), + SchoolId: p.bigint().name('SchoolId').comment('学校Id'), + GradeId: p.bigint().name('GradeId').comment('年级Id'), + ClassId: p.bigint().name('ClassId').comment('班级id'), + TeacherId: p.bigint().name('TeacherId').comment('教师Id'), + SubjectId: p.bigint().name('SubjectId').comment('关联学科'), + Name: p.string().name('Name').nullable().comment('名课程称'), + ClassRoomCourseId: p.bigint().name('ClassRoomCourseId').nullable().comment('课程id'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + ExecutionTime: p.datetime().name('ExecutionTime').length(3).comment('执行时间').defaultRaw(`2025-12-11 14:18:48.727`), + ExpireTime: p.datetime().name('ExpireTime').length(3).comment('过期时间').defaultRaw(`0001-01-01 00:00:00.000`), + }, +}); diff --git a/node_api/src/entities/IcrClassroomcoursequestion.ts b/node_api/src/entities/IcrClassroomcoursequestion.ts new file mode 100644 index 0000000..9382078 --- /dev/null +++ b/node_api/src/entities/IcrClassroomcoursequestion.ts @@ -0,0 +1,34 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrClassroomcoursequestion { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + ClassRoomCourseId!: bigint; + Name?: string; + KnowledgepointIds?: any; + Use!: number; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const IcrClassroomcoursequestionSchema = defineEntity({ + class: IcrClassroomcoursequestion, + comment: '课堂问题', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + ClassRoomCourseId: p.bigint().name('ClassRoomCourseId').comment('课堂课程Id'), + Name: p.string().name('Name').nullable().comment('课堂课程问题名称'), + KnowledgepointIds: p.json().name('KnowledgepointIds').nullable().comment('关联的知识点ids'), + Use: p.integer().name('Use').comment('0-未使用 1-使用'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/IcrClassroomquestion.ts b/node_api/src/entities/IcrClassroomquestion.ts new file mode 100644 index 0000000..ad23aeb --- /dev/null +++ b/node_api/src/entities/IcrClassroomquestion.ts @@ -0,0 +1,54 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrClassroomquestion { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + ClassRoomCourseId!: bigint; + ClassId!: bigint; + Type!: number; + UseType!: number; + OptionalItems?: string; + RightOptions?: string; + StartTime?: Date; + EndTime?: Date; + Status!: number; + Remark?: string; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; + QuestionPackageId?: bigint; + QuestionPackageItemId?: bigint; + QuestionPackageNo?: bigint; + QuestionPackageSort?: number; +} + +export const IcrClassroomquestionSchema = defineEntity({ + class: IcrClassroomquestion, + comment: '课堂问题', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + ClassRoomCourseId: p.bigint().name('ClassRoomCourseId').comment('课堂课程Id'), + ClassId: p.bigint().name('ClassId').comment('问题属于的本班Id'), + Type: p.integer().name('Type').comment('试题类型;1 单选题 2 多选题 3 主观题 4 问题包)'), + UseType: p.integer().name('UseType').comment('使用类型0-普通题 1实时主观题 2.竞赛主观题 3.自定义竞赛题'), + OptionalItems: p.string().name('OptionalItems').nullable().comment('可选项;'), + RightOptions: p.string().name('RightOptions').nullable().comment('正确选项;'), + StartTime: p.datetime().name('StartTime').length(3).nullable().comment('试题开始时间'), + EndTime: p.datetime().name('EndTime').length(3).nullable().comment('试题结束时间'), + Status: p.integer().name('Status').comment('状态;1. 答题开始 2 答题结束 255 已废弃'), + Remark: p.string().name('Remark').nullable().comment('备注'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + QuestionPackageId: p.bigint().name('QuestionPackageId').nullable().comment('问题包Id'), + QuestionPackageItemId: p.bigint().name('QuestionPackageItemId').nullable().comment('问题包项Id'), + QuestionPackageNo: p.bigint().name('QuestionPackageNo').nullable().comment('问题包序号'), + QuestionPackageSort: p.integer().name('QuestionPackageSort').nullable().comment('问题包排序序号'), + }, +}); diff --git a/node_api/src/entities/IcrClassroomquestionpackage.ts b/node_api/src/entities/IcrClassroomquestionpackage.ts new file mode 100644 index 0000000..a32ba9f --- /dev/null +++ b/node_api/src/entities/IcrClassroomquestionpackage.ts @@ -0,0 +1,34 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrClassroomquestionpackage { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + Name?: string; + BookId!: bigint; + ClassRoomCourseId!: bigint; + Type!: number; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const IcrClassroomquestionpackageSchema = defineEntity({ + class: IcrClassroomquestionpackage, + comment: '课堂问题包', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + Name: p.string().name('Name').nullable().comment('问题包名称'), + BookId: p.bigint().name('BookId').comment('书籍Id'), + ClassRoomCourseId: p.bigint().name('ClassRoomCourseId').comment('课程Id'), + Type: p.integer().name('Type').comment('问题包类型'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/IcrClassroomquestionpackageitem.ts b/node_api/src/entities/IcrClassroomquestionpackageitem.ts new file mode 100644 index 0000000..dc1f350 --- /dev/null +++ b/node_api/src/entities/IcrClassroomquestionpackageitem.ts @@ -0,0 +1,44 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrClassroomquestionpackageitem { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + ClassRoomQuestionPackageId!: bigint; + BookId!: bigint; + ClassRoomCourseId!: bigint; + Type!: number; + BookPageId?: bigint; + BookQuestionId?: bigint; + QestionUrl?: string; + RightOptions?: string; + Sort!: number; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const IcrClassroomquestionpackageitemSchema = defineEntity({ + class: IcrClassroomquestionpackageitem, + comment: '课堂问题项', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + ClassRoomQuestionPackageId: p.bigint().name('ClassRoomQuestionPackageId').comment('问题包Id'), + BookId: p.bigint().name('BookId').comment('书籍Id'), + ClassRoomCourseId: p.bigint().name('ClassRoomCourseId').comment('课程Id'), + Type: p.integer().name('Type').comment('问题包类型'), + BookPageId: p.bigint().name('BookPageId').nullable().comment('书籍页Id'), + BookQuestionId: p.bigint().name('BookQuestionId').nullable().comment('书籍问题Id'), + QestionUrl: p.string().name('QestionUrl').nullable().comment('问题路径'), + RightOptions: p.string().name('RightOptions').nullable().comment('正确选项'), + Sort: p.integer().name('Sort').comment('排序字段'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/IcrClassservermap.ts b/node_api/src/entities/IcrClassservermap.ts new file mode 100644 index 0000000..c2a766b --- /dev/null +++ b/node_api/src/entities/IcrClassservermap.ts @@ -0,0 +1,34 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrClassservermap { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + ClassId!: bigint; + ServerId!: bigint; + ExpireDate?: Date; + Status!: number; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const IcrClassservermapSchema = defineEntity({ + class: IcrClassservermap, + comment: '班级和服务器的关系', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + ClassId: p.bigint().name('ClassId').comment('班级id'), + ServerId: p.bigint().name('ServerId').comment('服务器id'), + ExpireDate: p.datetime().name('ExpireDate').length(3).nullable().comment('过期时间(天)'), + Status: p.integer().name('Status').comment('状态'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/IcrClassservermapCopy1.ts b/node_api/src/entities/IcrClassservermapCopy1.ts new file mode 100644 index 0000000..bc67970 --- /dev/null +++ b/node_api/src/entities/IcrClassservermapCopy1.ts @@ -0,0 +1,34 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrClassservermapCopy1 { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + ClassId!: bigint; + ServerId!: bigint; + ExpireDate?: Date; + Status!: number; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const IcrClassservermapCopy1Schema = defineEntity({ + class: IcrClassservermapCopy1, + comment: '班级和服务器的关系', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + ClassId: p.bigint().name('ClassId').comment('班级id'), + ServerId: p.bigint().name('ServerId').comment('服务器id'), + ExpireDate: p.datetime().name('ExpireDate').length(3).nullable().comment('过期时间(天)'), + Status: p.integer().name('Status').comment('状态'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/IcrDotfile.ts b/node_api/src/entities/IcrDotfile.ts new file mode 100644 index 0000000..44eee1b --- /dev/null +++ b/node_api/src/entities/IcrDotfile.ts @@ -0,0 +1,43 @@ +import { type Opt, PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrDotfile { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + Name?: string; + FileName?: string; + FileAddress?: string; + PageStart?: string; + PageEnd?: string; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; + Width: number & Opt = 0; + Hight: number & Opt = 0; + Total: number & Opt = 0; + TotalUse: number & Opt = 0; +} + +export const IcrDotfileSchema = defineEntity({ + class: IcrDotfile, + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + Name: p.string().name('Name').nullable().comment('名称'), + FileName: p.string().name('FileName').nullable().comment('文件名称'), + FileAddress: p.string().name('FileAddress').nullable().comment('文件网络地址'), + PageStart: p.string().name('PageStart').nullable().comment('开始页码'), + PageEnd: p.string().name('PageEnd').nullable().comment('结束页码'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + Width: p.float().name('Width').comment('宽毫米'), + Hight: p.float().name('Hight').comment('高毫米'), + Total: p.integer().name('Total').comment('总数量'), + TotalUse: p.integer().name('TotalUse').comment('已使用数量'), + }, +}); diff --git a/node_api/src/entities/IcrDotfiledetail.ts b/node_api/src/entities/IcrDotfiledetail.ts new file mode 100644 index 0000000..03c7fa8 --- /dev/null +++ b/node_api/src/entities/IcrDotfiledetail.ts @@ -0,0 +1,33 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrDotfiledetail { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + DotId!: bigint; + PageName?: string; + PageUseName?: string; + IsUse!: unknown; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const IcrDotfiledetailSchema = defineEntity({ + class: IcrDotfiledetail, + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + DotId: p.bigint().name('DotId').comment('主表id').index('idx_ICR_DotFileDetail_01'), + PageName: p.string().name('PageName').nullable().comment('页名').index('idx_ICR_DotFileDetail_02'), + PageUseName: p.string().name('PageUseName').nullable().comment('使用名'), + IsUse: p.array().name('IsUse').comment('是否使用'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/IcrDotmatrixnotebook.ts b/node_api/src/entities/IcrDotmatrixnotebook.ts new file mode 100644 index 0000000..960f760 --- /dev/null +++ b/node_api/src/entities/IcrDotmatrixnotebook.ts @@ -0,0 +1,58 @@ +import { type Opt, PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrDotmatrixnotebook { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + Name?: string; + Type!: number; + WidthDotMatrix!: number; + HightDotMatrix!: number; + WidthMillimeter!: number; + HightMillimeter!: number; + PreviewUrl?: string; + Remark?: string; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; + PdfUrl?: string; + Cover?: string; + BackCover?: string; + BackgroundImage?: string; + TotalPage: number & Opt = 0; + Status: number & Opt = 0; + Extend?: string; + DotMatrixPdfUrl?: string; +} + +export const IcrDotmatrixnotebookSchema = defineEntity({ + class: IcrDotmatrixnotebook, + comment: '点阵本', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + Name: p.string().name('Name').nullable().comment('名称'), + Type: p.integer().name('Type').comment('类型;1 课堂答题卡 2 课堂答题本 3. 作业 4. 书籍 5.学生名单卡 6.草稿'), + WidthDotMatrix: p.integer().name('WidthDotMatrix').comment('点阵宽'), + HightDotMatrix: p.integer().name('HightDotMatrix').comment('点阵高'), + WidthMillimeter: p.float().name('WidthMillimeter').comment('宽毫米'), + HightMillimeter: p.float().name('HightMillimeter').comment('高毫米'), + PreviewUrl: p.string().name('PreviewUrl').nullable().comment('预览地址'), + Remark: p.string().name('Remark').nullable().comment('备注'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + PdfUrl: p.string().name('PdfUrl').nullable().comment('原始pdf地址'), + Cover: p.string().name('Cover').nullable().comment('封面'), + BackCover: p.string().name('BackCover').nullable().comment('封底'), + BackgroundImage: p.string().name('BackgroundImage').nullable().comment('背景图'), + TotalPage: p.integer().name('TotalPage').comment('总页数'), + Status: p.integer().name('Status').comment('状态(0-草稿 1-生成中 2生成成功 -1生成失败 9-归档)'), + Extend: p.text().name('Extend').length(65535).nullable().comment('扩展字段'), + DotMatrixPdfUrl: p.string().name('DotMatrixPdfUrl').nullable().comment('点阵pdf地址'), + }, +}); diff --git a/node_api/src/entities/IcrDotmatrixpage.ts b/node_api/src/entities/IcrDotmatrixpage.ts new file mode 100644 index 0000000..10837d2 --- /dev/null +++ b/node_api/src/entities/IcrDotmatrixpage.ts @@ -0,0 +1,52 @@ +import { type Opt, PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrDotmatrixpage { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + PageNo?: string; + DotMatrixNotebookId!: bigint; + AreaPoints?: string; + WidthDotMatrix!: number; + HightDotMatrix!: number; + WidthMillimeter!: number; + HightMillimeter!: number; + PreviewUrl?: string; + AbsoluteLocation?: string; + Remark?: string; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; + Area?: string; + DotId?: bigint; + PageNum: number & Opt = 0; +} + +export const IcrDotmatrixpageSchema = defineEntity({ + class: IcrDotmatrixpage, + comment: '点阵页', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + PageNo: p.string().name('PageNo').nullable().comment('页点阵码'), + DotMatrixNotebookId: p.bigint().name('DotMatrixNotebookId').comment('点阵本Id'), + AreaPoints: p.text().name('AreaPoints').length(65535).nullable().comment('答题区域(文本Json)'), + WidthDotMatrix: p.integer().name('WidthDotMatrix').comment('点阵宽'), + HightDotMatrix: p.integer().name('HightDotMatrix').comment('点阵高'), + WidthMillimeter: p.float().name('WidthMillimeter').comment('宽毫米'), + HightMillimeter: p.float().name('HightMillimeter').comment('高毫米'), + PreviewUrl: p.string().name('PreviewUrl').nullable().comment('预览地址(页背景图)'), + AbsoluteLocation: p.string().name('AbsoluteLocation').nullable().comment('点阵区域在当前页的绝对坐标'), + Remark: p.string().name('Remark').nullable().comment('备注'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + Area: p.text().name('Area').length(65535).nullable().comment('区域'), + DotId: p.bigint().name('DotId').nullable().comment('点阵id').defaultRaw(`0`), + PageNum: p.integer().name('PageNum').comment('点阵页页码'), + }, +}); diff --git a/node_api/src/entities/IcrDotmatrixpagecollectrecord.ts b/node_api/src/entities/IcrDotmatrixpagecollectrecord.ts new file mode 100644 index 0000000..16f3829 --- /dev/null +++ b/node_api/src/entities/IcrDotmatrixpagecollectrecord.ts @@ -0,0 +1,34 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrDotmatrixpagecollectrecord { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + UserId!: bigint; + PageNo?: string; + LastCollectTime!: Date; + TriggerTime?: Date; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const IcrDotmatrixpagecollectrecordSchema = defineEntity({ + class: IcrDotmatrixpagecollectrecord, + comment: '点阵页采集记录', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + UserId: p.bigint().name('UserId').comment('用户编号'), + PageNo: p.string().name('PageNo').nullable().comment('点阵页码'), + LastCollectTime: p.datetime().name('LastCollectTime').length(3).comment('上次采集时间'), + TriggerTime: p.datetime().name('TriggerTime').length(3).nullable().comment('触发时间'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/IcrDotmatrixpen.ts b/node_api/src/entities/IcrDotmatrixpen.ts new file mode 100644 index 0000000..65fb905 --- /dev/null +++ b/node_api/src/entities/IcrDotmatrixpen.ts @@ -0,0 +1,40 @@ +import { type Opt, PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrDotmatrixpen { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + SerialNo?: string; + Status!: number; + Remark?: string; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; + ClassId!: bigint & Opt; + Power: number & Opt = 0; + OnlineStatus!: unknown & Opt; + OnlineTime!: Date & Opt; +} + +export const IcrDotmatrixpenSchema = defineEntity({ + class: IcrDotmatrixpen, + comment: '笔', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + SerialNo: p.string().name('SerialNo').nullable().comment('唯一序列号').unique('idx_ICR_DotMatrixPen_01'), + Status: p.integer().name('Status').comment('状态;1 启用 0 禁用'), + Remark: p.string().name('Remark').nullable().comment('备注'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + ClassId: p.bigint().name('ClassId').comment('班级Id').defaultRaw(`0`).index('idx_ICR_DotMatrixPen_02'), + Power: p.integer().name('Power').comment('电量'), + OnlineStatus: p.array().name('OnlineStatus').comment('在线状态').defaultRaw(`b'0'`), + OnlineTime: p.datetime().name('OnlineTime').length(3).comment('在线时间').defaultRaw(`0001-01-01 00:00:00.000`), + }, +}); diff --git a/node_api/src/entities/IcrDotmatrixtemplate.ts b/node_api/src/entities/IcrDotmatrixtemplate.ts new file mode 100644 index 0000000..1bd8dda --- /dev/null +++ b/node_api/src/entities/IcrDotmatrixtemplate.ts @@ -0,0 +1,44 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrDotmatrixtemplate { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + Name?: string; + Width!: number; + Height!: number; + DesignWidth!: number; + DesignHeight!: number; + OriginalImageUrl?: string; + Elements?: any; + Type!: number; + Status!: number; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const IcrDotmatrixtemplateSchema = defineEntity({ + class: IcrDotmatrixtemplate, + comment: '点阵模板', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + Name: p.string().name('Name').length(30).nullable().comment('答题板名称'), + Width: p.float().name('Width').comment('宽毫米'), + Height: p.float().name('Height').comment('高毫米'), + DesignWidth: p.float().name('DesignWidth').comment('设计宽px'), + DesignHeight: p.float().name('DesignHeight').comment('设计高px'), + OriginalImageUrl: p.string().name('OriginalImageUrl').nullable().comment('原图(画板背景)'), + Elements: p.json().name('Elements').nullable().comment('答题板元素'), + Type: p.integer().name('Type').comment('类型'), + Status: p.integer().name('Status').comment('状态'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/IcrDotmatrixtermianltask.ts b/node_api/src/entities/IcrDotmatrixtermianltask.ts new file mode 100644 index 0000000..4c7e817 --- /dev/null +++ b/node_api/src/entities/IcrDotmatrixtermianltask.ts @@ -0,0 +1,44 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrDotmatrixtermianltask { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + UserId!: bigint; + PageNo?: string; + StartTime?: Date; + EndTime?: Date; + QuestionTaskId!: bigint; + TaskType!: number; + Status!: number; + TerminalId?: string; + Content?: string; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const IcrDotmatrixtermianltaskSchema = defineEntity({ + class: IcrDotmatrixtermianltask, + comment: '点阵页任务', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + UserId: p.bigint().name('UserId').comment('用户编号'), + PageNo: p.string().name('PageNo').nullable().comment('点阵页码'), + StartTime: p.datetime().name('StartTime').length(3).nullable().comment('任务采集开始时间'), + EndTime: p.datetime().name('EndTime').length(3).nullable().comment('任务采集结束时间'), + QuestionTaskId: p.bigint().name('QuestionTaskId').comment('问题任务编号'), + TaskType: p.integer().name('TaskType').comment('任务类型'), + Status: p.integer().name('Status').comment('状态'), + TerminalId: p.string().name('TerminalId').nullable().comment('终端编号'), + Content: p.string().name('Content').length(4000).nullable().comment('内容'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/IcrFeedback.ts b/node_api/src/entities/IcrFeedback.ts new file mode 100644 index 0000000..487cd71 --- /dev/null +++ b/node_api/src/entities/IcrFeedback.ts @@ -0,0 +1,38 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrFeedback { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + ClassRoomCourseId!: bigint; + ClassId!: bigint; + IsAnonymity!: unknown; + Status!: number; + EndTime?: Date; + Remark?: string; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const IcrFeedbackSchema = defineEntity({ + class: IcrFeedback, + comment: '反馈', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + ClassRoomCourseId: p.bigint().name('ClassRoomCourseId').comment('课堂课程Id'), + ClassId: p.bigint().name('ClassId').comment('问题属于的本班Id'), + IsAnonymity: p.array().name('IsAnonymity').comment('是否匿名'), + Status: p.integer().name('Status').comment('状态;1. 答题开始 2 答题结束 255 已废弃'), + EndTime: p.datetime().name('EndTime').length(3).nullable().comment('结束时间'), + Remark: p.string().name('Remark').nullable().comment('备注'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/IcrFeedbackresult.ts b/node_api/src/entities/IcrFeedbackresult.ts new file mode 100644 index 0000000..eb2be8a --- /dev/null +++ b/node_api/src/entities/IcrFeedbackresult.ts @@ -0,0 +1,40 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrFeedbackresult { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + FeedBackId!: bigint; + ClassId!: bigint; + ClassRoomCourseId!: bigint; + StudentId!: bigint; + SelectedOptions?: string; + Status!: number; + Remark?: string; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const IcrFeedbackresultSchema = defineEntity({ + class: IcrFeedbackresult, + comment: '反馈结果', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + FeedBackId: p.bigint().name('FeedBackId').comment('反馈Id'), + ClassId: p.bigint().name('ClassId').comment('班级编号'), + ClassRoomCourseId: p.bigint().name('ClassRoomCourseId').comment('课堂课程Id'), + StudentId: p.bigint().name('StudentId').comment('学生Id'), + SelectedOptions: p.string().name('SelectedOptions').nullable().comment('选中的选项'), + Status: p.integer().name('Status').comment('状态(0-未选择 1-已选择)'), + Remark: p.string().name('Remark').nullable().comment('备注'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/IcrHomework.ts b/node_api/src/entities/IcrHomework.ts new file mode 100644 index 0000000..5d398a9 --- /dev/null +++ b/node_api/src/entities/IcrHomework.ts @@ -0,0 +1,60 @@ +import { type Opt, PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrHomework { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + Name?: string; + SubjectIds?: unknown; + BookId!: bigint; + StudentGroupId!: bigint; + StartTime!: Date; + EndTime!: Date; + Status!: number; + Type!: number; + PdfUrl?: string; + TriggerTime?: Date; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; + ReviewIds?: unknown; + DraftTemplateId?: bigint; + ExamRoomId!: bigint & Opt; + TutorRoomId?: bigint; + MeetingStatus: number & Opt = 0; + ReviewTime?: Date; + ClassRoomCourseId?: bigint; +} + +export const IcrHomeworkSchema = defineEntity({ + class: IcrHomework, + comment: '作业', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + Name: p.string().name('Name').nullable().comment('名称'), + SubjectIds: p.array().name('SubjectIds').length(4294967295).nullable().comment('学科Ids'), + BookId: p.bigint().name('BookId').comment('引用书籍Id').index('idx_ICR_Homework_01'), + StudentGroupId: p.bigint().name('StudentGroupId').comment('引用学生模板Id').index('idx_ICR_Homework_02'), + StartTime: p.datetime().name('StartTime').length(3).comment('发布时间'), + EndTime: p.datetime().name('EndTime').length(3).comment('结束时间'), + Status: p.integer().name('Status').comment('状态'), + Type: p.integer().name('Type').comment('作业类型'), + PdfUrl: p.string().name('PdfUrl').nullable().comment('pdf预览地址'), + TriggerTime: p.datetime().name('TriggerTime').length(3).nullable().comment('触发时间'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + ReviewIds: p.array().name('ReviewIds').length(4294967295).nullable().comment('批阅人ids'), + DraftTemplateId: p.bigint().name('DraftTemplateId').nullable().comment('草稿纸模板id'), + ExamRoomId: p.bigint().name('ExamRoomId').comment('考场Id').defaultRaw(`0`), + TutorRoomId: p.bigint().name('TutorRoomId').nullable().comment('辅导室Id'), + MeetingStatus: p.integer().name('MeetingStatus').comment('会议状态(0-待开课 1-上课中 -1-结束)'), + ReviewTime: p.datetime().name('ReviewTime').length(3).nullable().comment('批阅时间'), + ClassRoomCourseId: p.bigint().name('ClassRoomCourseId').nullable().comment('互动课程Id'), + }, +}); diff --git a/node_api/src/entities/IcrHomeworkanswer.ts b/node_api/src/entities/IcrHomeworkanswer.ts new file mode 100644 index 0000000..6fd47f5 --- /dev/null +++ b/node_api/src/entities/IcrHomeworkanswer.ts @@ -0,0 +1,76 @@ +import { type Opt, PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrHomeworkanswer { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + HomeworkId!: bigint; + BooksPageQuestionId!: bigint; + BooksPageQuestionGroupId!: bigint; + StudentId!: bigint; + Result?: string; + Score!: number; + QuestioAnswerUrl?: string; + AnswerUrl?: string; + PageAnswerUrl?: string; + ReviewId?: bigint; + ReviewUrl?: string; + PointsUrl?: string; + AnswerStatus!: number; + Status!: number; + AsnwerStartTime?: Date; + AsnwerEndTime?: Date; + AnswerSeconds!: number; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; + BookPageId!: bigint & Opt; + BookPageNum: number & Opt = 0; + ReviewPageUrl?: string; + ImageRecognition: number & Opt = 0; + Modify: number & Opt = 0; + LastTag!: bigint & Opt; + DotPageNo?: string; + PageAnswerDotUrl?: string; +} + +export const IcrHomeworkanswerSchema = defineEntity({ + class: IcrHomeworkanswer, + comment: '作业回答', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + HomeworkId: p.bigint().name('HomeworkId').comment('作业id').index('idx_ICR_HomeworkAnswer_01'), + BooksPageQuestionId: p.bigint().name('BooksPageQuestionId').comment('作业问题id').index('idx_ICR_HomeworkAnswer_03'), + BooksPageQuestionGroupId: p.bigint().name('BooksPageQuestionGroupId').comment('作业问题grouipId').index('idx_ICR_HomeworkAnswer_04'), + StudentId: p.bigint().name('StudentId').comment('答题人id').index('idx_ICR_HomeworkAnswer_05'), + Result: p.string().name('Result').nullable().comment('答题结果'), + Score: p.integer().name('Score').comment('答题得分'), + QuestioAnswerUrl: p.string().name('QuestioAnswerUrl').nullable().comment('答题结果图片地址(包含答题内容)'), + AnswerUrl: p.string().name('AnswerUrl').nullable().comment('答题结果图片地址(只包含答题内容框)'), + PageAnswerUrl: p.string().name('PageAnswerUrl').nullable().comment('答题结果图片地址'), + ReviewId: p.bigint().name('ReviewId').nullable().comment('批阅人id'), + ReviewUrl: p.string().name('ReviewUrl').nullable().comment('批阅人图片地址(问题)'), + PointsUrl: p.string().name('PointsUrl').nullable().comment('点位数据地址'), + AnswerStatus: p.integer().name('AnswerStatus').comment('答题状态'), + Status: p.integer().name('Status').comment('批阅状态 0-未批阅 1-已批阅'), + AsnwerStartTime: p.datetime().name('AsnwerStartTime').length(3).nullable().comment('开始答题时间'), + AsnwerEndTime: p.datetime().name('AsnwerEndTime').length(3).nullable().comment('开始结束时间'), + AnswerSeconds: p.integer().name('AnswerSeconds').comment('答题时间(秒)'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + BookPageId: p.bigint().name('BookPageId').comment('作业页id').defaultRaw(`0`).index('idx_ICR_HomeworkAnswer_02'), + BookPageNum: p.integer().name('BookPageNum').comment('作业页页码'), + ReviewPageUrl: p.string().name('ReviewPageUrl').nullable().comment('批阅人图片地址(整页)'), + ImageRecognition: p.integer().name('ImageRecognition').comment('识别状态'), + Modify: p.integer().name('Modify').comment('修改次数累加'), + LastTag: p.bigint().name('LastTag').comment('最后修改标记').defaultRaw(`0`), + DotPageNo: p.string().name('DotPageNo').nullable().comment('点阵页码'), + PageAnswerDotUrl: p.string().name('PageAnswerDotUrl').nullable().comment('答题结果点阵图片地址'), + }, +}); diff --git a/node_api/src/entities/IcrHomeworkanswercoordinate.ts b/node_api/src/entities/IcrHomeworkanswercoordinate.ts new file mode 100644 index 0000000..de58f18 --- /dev/null +++ b/node_api/src/entities/IcrHomeworkanswercoordinate.ts @@ -0,0 +1,24 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrHomeworkanswercoordinate { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + HomeworkAnswerId!: bigint; + Content?: unknown; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; +} + +export const IcrHomeworkanswercoordinateSchema = defineEntity({ + class: IcrHomeworkanswercoordinate, + comment: '作业回答', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + HomeworkAnswerId: p.bigint().name('HomeworkAnswerId'), + Content: p.array().name('Content').length(4294967295).nullable(), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + }, +}); diff --git a/node_api/src/entities/IcrHomeworkanswerdraftcoordinate.ts b/node_api/src/entities/IcrHomeworkanswerdraftcoordinate.ts new file mode 100644 index 0000000..4351bc3 --- /dev/null +++ b/node_api/src/entities/IcrHomeworkanswerdraftcoordinate.ts @@ -0,0 +1,24 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrHomeworkanswerdraftcoordinate { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + HomeworkAnswerDraftId!: bigint; + Content?: unknown; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; +} + +export const IcrHomeworkanswerdraftcoordinateSchema = defineEntity({ + class: IcrHomeworkanswerdraftcoordinate, + comment: '作业草稿纸', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + HomeworkAnswerDraftId: p.bigint().name('HomeworkAnswerDraftId'), + Content: p.array().name('Content').length(4294967295).nullable(), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + }, +}); diff --git a/node_api/src/entities/IcrHomeworkanswerexplain.ts b/node_api/src/entities/IcrHomeworkanswerexplain.ts new file mode 100644 index 0000000..d685e05 --- /dev/null +++ b/node_api/src/entities/IcrHomeworkanswerexplain.ts @@ -0,0 +1,46 @@ +import { type Opt, PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrHomeworkanswerexplain { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + HomeworkId!: bigint; + StudentId!: bigint; + QuestionId!: bigint; + AudioStartTime!: bigint; + AudioEndTime!: bigint; + AudioUrl?: string; + PointsUrl?: string; + OperatorId!: bigint; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; + Case: number & Opt = 0; + Status: number & Opt = 0; +} + +export const IcrHomeworkanswerexplainSchema = defineEntity({ + class: IcrHomeworkanswerexplain, + comment: '书页问题;', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + HomeworkId: p.bigint().name('HomeworkId').comment('作业Id'), + StudentId: p.bigint().name('StudentId').comment('学生Id'), + QuestionId: p.bigint().name('QuestionId').comment('问题Id'), + AudioStartTime: p.bigint().name('AudioStartTime').comment('音频开始时间'), + AudioEndTime: p.bigint().name('AudioEndTime').comment('音频结束时间'), + AudioUrl: p.string().name('AudioUrl').nullable().comment('音频地址'), + PointsUrl: p.string().name('PointsUrl').nullable().comment('点位数据地址'), + OperatorId: p.bigint().name('OperatorId').comment('操作人Id'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + Case: p.integer().name('Case').comment('0-无图 1-原问题图片 2-回答图片'), + Status: p.integer().name('Status').comment('0-正常 1-过时(之前的)'), + }, +}); diff --git a/node_api/src/entities/IcrHomeworkanswerpage.ts b/node_api/src/entities/IcrHomeworkanswerpage.ts new file mode 100644 index 0000000..d57497c --- /dev/null +++ b/node_api/src/entities/IcrHomeworkanswerpage.ts @@ -0,0 +1,42 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrHomeworkanswerpage { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + HomeworkId!: bigint; + StudentId!: bigint; + PageId!: bigint; + DotPageNum!: number; + PageResultUrl?: string; + Type!: number; + LastTag!: bigint; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; + PageDotResultUrl?: string; +} + +export const IcrHomeworkanswerpageSchema = defineEntity({ + class: IcrHomeworkanswerpage, + comment: '作业回答', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + HomeworkId: p.bigint().name('HomeworkId').comment('作业id').index('idx_ICR_HomeworkAnswerPage_01'), + StudentId: p.bigint().name('StudentId').comment('答题人id').index('idx_ICR_HomeworkAnswerPage_02'), + PageId: p.bigint().name('PageId').comment('页Id和联动'), + DotPageNum: p.integer().name('DotPageNum').comment('点阵页序号'), + PageResultUrl: p.string().name('PageResultUrl').nullable().comment('页结果图片地址'), + Type: p.integer().name('Type').comment('1:回答 2:草稿'), + LastTag: p.bigint().name('LastTag').comment('最后修改标记'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + PageDotResultUrl: p.string().name('PageDotResultUrl').nullable().comment('页结果点阵图片地址'), + }, +}); diff --git a/node_api/src/entities/IcrHomeworkanswersnapshoot.ts b/node_api/src/entities/IcrHomeworkanswersnapshoot.ts new file mode 100644 index 0000000..325cae8 --- /dev/null +++ b/node_api/src/entities/IcrHomeworkanswersnapshoot.ts @@ -0,0 +1,76 @@ +import { type Opt, PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrHomeworkanswersnapshoot { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + HomeworkId!: bigint; + BookPageId!: bigint; + BookPageNum!: number; + BooksPageQuestionId!: bigint; + BooksPageQuestionGroupId!: bigint; + StudentId!: bigint; + Result?: string; + Score!: number; + QuestioAnswerUrl?: string; + AnswerUrl?: string; + PageAnswerUrl?: string; + ReviewId!: bigint; + ReviewUrl?: string; + AudioStartTime!: bigint; + AudioEndTime!: bigint; + AudioUrl?: string; + PointsUrl?: string; + AnswerStatus!: number; + Status!: number; + Date!: bigint; + AsnwerStartTime?: Date; + AsnwerEndTime?: Date; + AnswerSeconds!: number; + ImageRecognition!: number; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; + HomeworkAnswerId!: bigint & Opt; +} + +export const IcrHomeworkanswersnapshootSchema = defineEntity({ + class: IcrHomeworkanswersnapshoot, + comment: '作业回答', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + HomeworkId: p.bigint().name('HomeworkId').comment('作业id'), + BookPageId: p.bigint().name('BookPageId').comment('作业页id'), + BookPageNum: p.integer().name('BookPageNum').comment('作业页页码'), + BooksPageQuestionId: p.bigint().name('BooksPageQuestionId').comment('作业问题id').index('idx_ICR_HomeworkAnswerSnapshoot_01'), + BooksPageQuestionGroupId: p.bigint().name('BooksPageQuestionGroupId').comment('作业问题grouipId'), + StudentId: p.bigint().name('StudentId').comment('答题人id'), + Result: p.string().name('Result').nullable().comment('答题结果'), + Score: p.integer().name('Score').comment('答题得分'), + QuestioAnswerUrl: p.string().name('QuestioAnswerUrl').nullable().comment('答题结果图片地址(包含答题内容)'), + AnswerUrl: p.string().name('AnswerUrl').nullable().comment('答题结果图片地址(只包含答题内容框)'), + PageAnswerUrl: p.string().name('PageAnswerUrl').nullable().comment('答题结果图片地址'), + ReviewId: p.bigint().name('ReviewId').comment('批阅人id'), + ReviewUrl: p.string().name('ReviewUrl').nullable().comment('批阅人url'), + AudioStartTime: p.bigint().name('AudioStartTime').comment('音频开始时间'), + AudioEndTime: p.bigint().name('AudioEndTime').comment('音频结束时间'), + AudioUrl: p.string().name('AudioUrl').nullable().comment('音频地址'), + PointsUrl: p.string().name('PointsUrl').nullable().comment('点位数据地址'), + AnswerStatus: p.integer().name('AnswerStatus').comment('答题状态'), + Status: p.integer().name('Status').comment('批阅状态 0-未批阅 1-已批阅'), + Date: p.bigint().name('Date').comment('日期 yyyyMMdd'), + AsnwerStartTime: p.datetime().name('AsnwerStartTime').length(3).nullable().comment('开始答题时间'), + AsnwerEndTime: p.datetime().name('AsnwerEndTime').length(3).nullable().comment('开始结束时间'), + AnswerSeconds: p.integer().name('AnswerSeconds').comment('答题时间(秒)'), + ImageRecognition: p.integer().name('ImageRecognition').comment('识别状态'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + HomeworkAnswerId: p.bigint().name('HomeworkAnswerId').comment('回答id').defaultRaw(`0`), + }, +}); diff --git a/node_api/src/entities/IcrHomeworkarticlesnapshoot.ts b/node_api/src/entities/IcrHomeworkarticlesnapshoot.ts new file mode 100644 index 0000000..e428460 --- /dev/null +++ b/node_api/src/entities/IcrHomeworkarticlesnapshoot.ts @@ -0,0 +1,44 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrHomeworkarticlesnapshoot { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + HomeworkId!: bigint; + BookId!: bigint; + StudentId!: bigint; + BookArticleId!: bigint; + ReadingTime!: bigint; + WordCount!: number; + Content?: unknown; + AnswerPage?: unknown; + Date!: string; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const IcrHomeworkarticlesnapshootSchema = defineEntity({ + class: IcrHomeworkarticlesnapshoot, + comment: '作业回答', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + HomeworkId: p.bigint().name('HomeworkId').comment('作业id').index('idx_ICR_HomeworkArticleSnapshoot_01'), + BookId: p.bigint().name('BookId').comment('书id'), + StudentId: p.bigint().name('StudentId').comment('答题人id').index('idx_ICR_HomeworkArticleSnapshoot_02'), + BookArticleId: p.bigint().name('BookArticleId').comment('文章Id').index('idx_ICR_HomeworkArticleSnapshoot_03'), + ReadingTime: p.bigint().name('ReadingTime').comment('阅读时间(秒)'), + WordCount: p.integer().name('WordCount').comment('字数'), + Content: p.array().name('Content').length(4294967295).nullable().comment('内容(json)'), + AnswerPage: p.array().name('AnswerPage').length(4294967295).nullable().comment('文章下所有回答页'), + Date: p.date().name('Date').comment('日期'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/IcrHomeworkevaluation.ts b/node_api/src/entities/IcrHomeworkevaluation.ts new file mode 100644 index 0000000..21ba1f2 --- /dev/null +++ b/node_api/src/entities/IcrHomeworkevaluation.ts @@ -0,0 +1,43 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrHomeworkevaluation { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + Name?: string; + StudentId!: bigint; + HomeworkId!: bigint; + BookId!: bigint; + ArticleCount!: number; + AccuracyRate!: number; + AnswerTime!: bigint; + Detail?: unknown; + AiInterpret?: string; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const IcrHomeworkevaluationSchema = defineEntity({ + class: IcrHomeworkevaluation, + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + Name: p.string().name('Name').nullable().comment('名称'), + StudentId: p.bigint().name('StudentId').comment('学生Id').index('idx_ICR_HomeworkEvaluation_01'), + HomeworkId: p.bigint().name('HomeworkId').comment('作业Id').index('idx_ICR_HomeworkEvaluation_02'), + BookId: p.bigint().name('BookId').comment('书Id').index('idx_ICR_HomeworkEvaluation_03'), + ArticleCount: p.integer().name('ArticleCount').comment('文章数量'), + AccuracyRate: p.float().name('AccuracyRate').comment('正确率'), + AnswerTime: p.bigint().name('AnswerTime').comment('作答时间'), + Detail: p.array().name('Detail').length(4294967295).nullable().comment('详情'), + AiInterpret: p.string().name('AiInterpret').nullable().comment('AI解读'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/IcrHomeworkextracurricular.ts b/node_api/src/entities/IcrHomeworkextracurricular.ts new file mode 100644 index 0000000..b5c1abd --- /dev/null +++ b/node_api/src/entities/IcrHomeworkextracurricular.ts @@ -0,0 +1,40 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrHomeworkextracurricular { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + Name?: string; + Content?: string; + StartTime!: Date; + EndTime!: Date; + StudentTemplateId!: bigint; + Status!: number; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; + ReviewIds?: string; +} + +export const IcrHomeworkextracurricularSchema = defineEntity({ + class: IcrHomeworkextracurricular, + comment: '课外作业', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + Name: p.string().name('Name').nullable().comment('活动名称'), + Content: p.string().name('Content').nullable().comment('活动内容'), + StartTime: p.datetime().name('StartTime').length(3).comment('发布时间'), + EndTime: p.datetime().name('EndTime').length(3).comment('结束时间'), + StudentTemplateId: p.bigint().name('StudentTemplateId').comment('引用学生模板Id'), + Status: p.integer().name('Status').comment('状态'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + ReviewIds: p.string().name('ReviewIds').length(5000).nullable().comment('批阅人ids'), + }, +}); diff --git a/node_api/src/entities/IcrHomeworkextracurricularanswer.ts b/node_api/src/entities/IcrHomeworkextracurricularanswer.ts new file mode 100644 index 0000000..af23e2e --- /dev/null +++ b/node_api/src/entities/IcrHomeworkextracurricularanswer.ts @@ -0,0 +1,48 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrHomeworkextracurricularanswer { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + HomeworkExtracurricularId!: bigint; + Name?: string; + Time!: Date; + Place?: string; + Participant?: string; + Thoughts?: string; + Images?: unknown; + VideoUrl?: string; + StudentId!: bigint; + Score!: number; + Status!: number; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const IcrHomeworkextracurricularanswerSchema = defineEntity({ + class: IcrHomeworkextracurricularanswer, + comment: '课外作业-学生表', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + HomeworkExtracurricularId: p.bigint().name('HomeworkExtracurricularId').comment('课外活动Id'), + Name: p.string().name('Name').nullable().comment('活动名称'), + Time: p.datetime().name('Time').length(3).comment('活动时间'), + Place: p.string().name('Place').nullable().comment('活动地点'), + Participant: p.string().name('Participant').nullable().comment('活动人员'), + Thoughts: p.string().name('Thoughts').nullable().comment('活动感想'), + Images: p.array().name('Images').length(4294967295).nullable().comment('活动图片'), + VideoUrl: p.string().name('VideoUrl').nullable().comment('视频地址'), + StudentId: p.bigint().name('StudentId').comment('回答学生'), + Score: p.integer().name('Score').comment('活动评价'), + Status: p.integer().name('Status').comment('状态'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/IcrHomeworkmeeting.ts b/node_api/src/entities/IcrHomeworkmeeting.ts new file mode 100644 index 0000000..195146f --- /dev/null +++ b/node_api/src/entities/IcrHomeworkmeeting.ts @@ -0,0 +1,34 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrHomeworkmeeting { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + HomeworkId!: bigint; + MeetingStatus!: number; + StartTime?: Date; + EndTime?: Date; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const IcrHomeworkmeetingSchema = defineEntity({ + class: IcrHomeworkmeeting, + comment: '作业', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + HomeworkId: p.bigint().name('HomeworkId').comment('作业Id').index('idx_ICR_HomeworkMeeting_01'), + MeetingStatus: p.integer().name('MeetingStatus').comment('会议状态(0-待开课 1-上课中 -1-结束)'), + StartTime: p.datetime().name('StartTime').length(3).nullable().comment('开始时间'), + EndTime: p.datetime().name('EndTime').length(3).nullable().comment('结束时间'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/IcrHomeworkperusal.ts b/node_api/src/entities/IcrHomeworkperusal.ts new file mode 100644 index 0000000..562ed4c --- /dev/null +++ b/node_api/src/entities/IcrHomeworkperusal.ts @@ -0,0 +1,45 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrHomeworkperusal { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + StudentId!: bigint; + StartDate!: string; + EndDate!: string; + BookCount!: number; + ArticleCount!: number; + ReadingTime!: bigint; + WordCount!: number; + Detail?: any; + AiInterpret?: string; + Type!: number; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const IcrHomeworkperusalSchema = defineEntity({ + class: IcrHomeworkperusal, + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + StudentId: p.bigint().name('StudentId').comment('学生Id').index('idx_ICR_HomeworkPerusal_03'), + StartDate: p.date().name('StartDate').comment('开始日期').index('idx_ICR_HomeworkPerusal_01'), + EndDate: p.date().name('EndDate').comment('结束日期').index('idx_ICR_HomeworkPerusal_02'), + BookCount: p.integer().name('BookCount').comment('书数量'), + ArticleCount: p.integer().name('ArticleCount').comment('文章数量'), + ReadingTime: p.bigint().name('ReadingTime').comment('阅读时间'), + WordCount: p.integer().name('WordCount').comment('阅读字数'), + Detail: p.json().name('Detail').nullable().comment('详情'), + AiInterpret: p.string().name('AiInterpret').nullable().comment('AI解读'), + Type: p.integer().name('Type').comment('类型(1-周报,2-周报 3-月报 4-期报)'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/IcrHomeworkprocessingtask.ts b/node_api/src/entities/IcrHomeworkprocessingtask.ts new file mode 100644 index 0000000..47438df --- /dev/null +++ b/node_api/src/entities/IcrHomeworkprocessingtask.ts @@ -0,0 +1,41 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrHomeworkprocessingtask { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + StudentId!: bigint; + HomeworkId!: bigint; + TaskType!: number; + Status!: number; + Priority!: bigint; + Error?: string; + LastScanTime!: bigint; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; + Date?: Date; +} + +export const IcrHomeworkprocessingtaskSchema = defineEntity({ + class: IcrHomeworkprocessingtask, + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + StudentId: p.bigint().name('StudentId').comment('学生编号'), + HomeworkId: p.bigint().name('HomeworkId').comment('作业Id'), + TaskType: p.integer().name('TaskType'), + Status: p.integer().name('Status').comment('状态'), + Priority: p.bigint().name('Priority').comment('优先级'), + Error: p.string().name('Error').nullable().comment('异常信息'), + LastScanTime: p.bigint().name('LastScanTime').comment('上次扫描时间'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + Date: p.datetime().name('Date').length(3).nullable().comment('时间'), + }, +}); diff --git a/node_api/src/entities/IcrHomeworkquestion.ts b/node_api/src/entities/IcrHomeworkquestion.ts new file mode 100644 index 0000000..ce90927 --- /dev/null +++ b/node_api/src/entities/IcrHomeworkquestion.ts @@ -0,0 +1,40 @@ +import { type Opt, PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrHomeworkquestion { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + HomeworkId!: bigint; + BookId!: bigint; + PageId!: bigint; + QuestionId!: bigint; + QuestionNo?: string; + Score!: number; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; + QuestionGroupId!: bigint & Opt; +} + +export const IcrHomeworkquestionSchema = defineEntity({ + class: IcrHomeworkquestion, + comment: '作业', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + HomeworkId: p.bigint().name('HomeworkId').comment('作业Id').index('idx_ICR_HomeworkQuestion_01'), + BookId: p.bigint().name('BookId').comment('书Id').index('idx_ICR_HomeworkQuestion_02'), + PageId: p.bigint().name('PageId').comment('页Id').index('idx_ICR_HomeworkQuestion_03'), + QuestionId: p.bigint().name('QuestionId').comment('问题Id').index('idx_ICR_HomeworkQuestion_04'), + QuestionNo: p.string().name('QuestionNo').nullable().comment('题号'), + Score: p.float().name('Score').comment('问题分数'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + QuestionGroupId: p.bigint().name('QuestionGroupId').comment('问题组Id').defaultRaw(`0`), + }, +}); diff --git a/node_api/src/entities/IcrHomeworkstudent.ts b/node_api/src/entities/IcrHomeworkstudent.ts new file mode 100644 index 0000000..e9ce708 --- /dev/null +++ b/node_api/src/entities/IcrHomeworkstudent.ts @@ -0,0 +1,40 @@ +import { type Opt, PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrHomeworkstudent { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + HomeworkId!: bigint; + StudentId!: bigint; + ReviewId!: bigint; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; + PenId?: bigint; + MapStudentId?: bigint; + ReadingDurationSeconds?: bigint; + Status: number & Opt = 0; +} + +export const IcrHomeworkstudentSchema = defineEntity({ + class: IcrHomeworkstudent, + comment: '学生作业', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + HomeworkId: p.bigint().name('HomeworkId').comment('作业id').index('idx_ICR_HomeworkStudent_01'), + StudentId: p.bigint().name('StudentId').comment('学生Id').index('idx_ICR_HomeworkStudent_02'), + ReviewId: p.bigint().name('ReviewId').comment('批阅人Id'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + PenId: p.bigint().name('PenId').nullable().comment('笔Id'), + MapStudentId: p.bigint().name('MapStudentId').nullable().comment('映射学生Id'), + ReadingDurationSeconds: p.bigint().name('ReadingDurationSeconds').nullable().comment('阅读时间'), + Status: p.integer().name('Status').comment('状态(0:默认 1:已校验)'), + }, +}); diff --git a/node_api/src/entities/IcrKnowledgepoint.ts b/node_api/src/entities/IcrKnowledgepoint.ts new file mode 100644 index 0000000..d6a39a6 --- /dev/null +++ b/node_api/src/entities/IcrKnowledgepoint.ts @@ -0,0 +1,42 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrKnowledgepoint { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + GradeLevel!: bigint; + SubjectId!: bigint; + Name?: string; + Color?: string; + ParentId!: bigint; + Level!: number; + Sort!: number; + Type!: number; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const IcrKnowledgepointSchema = defineEntity({ + class: IcrKnowledgepoint, + comment: '知识点;', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + GradeLevel: p.bigint().name('GradeLevel').comment('年级'), + SubjectId: p.bigint().name('SubjectId').comment('学科Id').index('idx_ICR_KnowledgePoint_01'), + Name: p.string().name('Name').nullable().comment('名称').index('idx_ICR_KnowledgePoint_03'), + Color: p.string().name('Color').nullable().comment('颜色'), + ParentId: p.bigint().name('ParentId').comment('父Id').index('idx_ICR_KnowledgePoint_02'), + Level: p.integer().name('Level').comment('级别'), + Sort: p.integer().name('Sort').comment('排序'), + Type: p.integer().name('Type').comment('分类(1-知识点 2-方法)'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/IcrLearnreport.ts b/node_api/src/entities/IcrLearnreport.ts new file mode 100644 index 0000000..9a9ecda --- /dev/null +++ b/node_api/src/entities/IcrLearnreport.ts @@ -0,0 +1,44 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrLearnreport { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + StudentId!: bigint; + StartDate!: string; + EndDate!: string; + HomeworkIds?: unknown; + PreLearnTimeRate!: number; + PreAccuracyRate!: number; + AccuracyRate!: number; + Type!: number; + Detail?: any; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const IcrLearnreportSchema = defineEntity({ + class: IcrLearnreport, + comment: '学情报告', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + StudentId: p.bigint().name('StudentId').comment('学生Id'), + StartDate: p.date().name('StartDate').comment('开始时间'), + EndDate: p.date().name('EndDate').comment('结束时间'), + HomeworkIds: p.array().name('HomeworkIds').length(4294967295).nullable().comment('作业Ids'), + PreLearnTimeRate: p.float().name('PreLearnTimeRate').comment('作答时长率(较上次百分比 -为降低)'), + PreAccuracyRate: p.float().name('PreAccuracyRate').comment('正确率(较上次百分比 -为降低)'), + AccuracyRate: p.float().name('AccuracyRate').comment('正确率(较上次 -为降低)'), + Type: p.integer().name('Type').comment('类型 1:天 2:周'), + Detail: p.json().name('Detail').nullable().comment('详情'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/IcrQuestionbank.ts b/node_api/src/entities/IcrQuestionbank.ts new file mode 100644 index 0000000..f72d5c6 --- /dev/null +++ b/node_api/src/entities/IcrQuestionbank.ts @@ -0,0 +1,56 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrQuestionbank { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + SubjectId!: bigint; + Type!: number; + Source!: number; + Difficulty!: number; + GradeLevel!: number; + GradeNum!: number; + Image?: string; + Question?: string; + Answer?: string; + Analysis?: string; + VideoUrl?: string; + KnowledgepointIds?: unknown; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; + QuestionUrl?: string; + Options?: unknown; + AnalysisUrl?: string; +} + +export const IcrQuestionbankSchema = defineEntity({ + class: IcrQuestionbank, + comment: '题库', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + SubjectId: p.bigint().name('SubjectId').comment('学科'), + Type: p.integer().name('Type').comment('题型'), + Source: p.integer().name('Source').comment('来源'), + Difficulty: p.integer().name('Difficulty').comment('难度'), + GradeLevel: p.integer().name('GradeLevel').comment('学级(0-小 1-初 2-高)'), + GradeNum: p.integer().name('GradeNum').comment('年级'), + Image: p.string().name('Image').nullable().comment('原图'), + Question: p.text().name('Question').length(65535).nullable().comment('问题'), + Answer: p.string().name('Answer').nullable().comment('答案'), + Analysis: p.text().name('Analysis').length(65535).nullable().comment('解析'), + VideoUrl: p.string().name('VideoUrl').nullable().comment('视频讲解地址'), + KnowledgepointIds: p.array().name('KnowledgepointIds').length(4294967295).nullable().comment('关联的知识点ids'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + QuestionUrl: p.string().name('QuestionUrl').nullable().comment('问题图'), + Options: p.array().name('Options').length(4294967295).nullable().comment('选项'), + AnalysisUrl: p.string().name('AnalysisUrl').nullable().comment('解析图片'), + }, +}); diff --git a/node_api/src/entities/IcrServer.ts b/node_api/src/entities/IcrServer.ts new file mode 100644 index 0000000..cc3d638 --- /dev/null +++ b/node_api/src/entities/IcrServer.ts @@ -0,0 +1,38 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrServer { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + Name?: string; + Address?: string; + Port!: number; + Size!: number; + Status!: number; + ExpireDate?: Date; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const IcrServerSchema = defineEntity({ + class: IcrServer, + comment: '服务器', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + Name: p.string().name('Name').nullable().comment('姓名'), + Address: p.string().name('Address').nullable().comment('地址'), + Port: p.integer().name('Port').comment('端口'), + Size: p.integer().name('Size').comment('容量'), + Status: p.integer().name('Status').comment('状态'), + ExpireDate: p.datetime().name('ExpireDate').length(3).nullable().comment('过期时间(天)'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/IcrServerconfig.ts b/node_api/src/entities/IcrServerconfig.ts new file mode 100644 index 0000000..2be44b0 --- /dev/null +++ b/node_api/src/entities/IcrServerconfig.ts @@ -0,0 +1,30 @@ +import { defineEntity, p } from '@mikro-orm/core'; + +export class IcrServerconfig { + Id!: bigint; + Name?: string; + Hour!: number; + Status!: number; + Revision!: number; + CreatedBy?: bigint; + CreatedTime?: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted?: unknown; +} + +export const IcrServerconfigSchema = defineEntity({ + class: IcrServerconfig, + properties: { + Id: p.bigint().name('Id'), + Name: p.string().name('Name').nullable(), + Hour: p.integer().name('Hour'), + Status: p.integer().name('Status'), + Revision: p.integer().name('Revision'), + CreatedBy: p.bigint().name('CreatedBy').nullable(), + CreatedTime: p.datetime().name('CreatedTime').length(3).nullable(), + UpdatedBy: p.bigint().name('UpdatedBy').nullable(), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable(), + IsDeleted: p.array().name('IsDeleted').nullable(), + }, +}); diff --git a/node_api/src/entities/IcrService.ts b/node_api/src/entities/IcrService.ts new file mode 100644 index 0000000..2c79143 --- /dev/null +++ b/node_api/src/entities/IcrService.ts @@ -0,0 +1,38 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrService { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + Name?: string; + ServerId!: bigint; + Address?: string; + Port!: number; + Domain?: string; + Status!: number; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const IcrServiceSchema = defineEntity({ + class: IcrService, + comment: '服务', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + Name: p.string().name('Name').nullable().comment('姓名'), + ServerId: p.bigint().name('ServerId').comment('服务器id'), + Address: p.string().name('Address').nullable().comment('地址'), + Port: p.integer().name('Port').comment('端口'), + Domain: p.string().name('Domain').nullable().comment('域名'), + Status: p.integer().name('Status').comment('状态'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/IcrTeacherclassroomscheduling.ts b/node_api/src/entities/IcrTeacherclassroomscheduling.ts new file mode 100644 index 0000000..65a01bf --- /dev/null +++ b/node_api/src/entities/IcrTeacherclassroomscheduling.ts @@ -0,0 +1,38 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrTeacherclassroomscheduling { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + TeacherId!: bigint; + ClassId!: bigint; + WeekNum!: number; + SubjectId!: bigint; + Remark?: string; + NextTriggerTime?: Date; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const IcrTeacherclassroomschedulingSchema = defineEntity({ + class: IcrTeacherclassroomscheduling, + comment: '教师课堂排班', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + TeacherId: p.bigint().name('TeacherId').comment('教师Id'), + ClassId: p.bigint().name('ClassId').comment('班级Id'), + WeekNum: p.integer().name('WeekNum').comment('周几'), + SubjectId: p.bigint().name('SubjectId').comment('科目'), + Remark: p.string().name('Remark').nullable().comment('备注'), + NextTriggerTime: p.datetime().name('NextTriggerTime').length(3).nullable().comment('下次的触发时间'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/IcrTerminalmessage.ts b/node_api/src/entities/IcrTerminalmessage.ts new file mode 100644 index 0000000..5553285 --- /dev/null +++ b/node_api/src/entities/IcrTerminalmessage.ts @@ -0,0 +1,36 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrTerminalmessage { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + TerminalId!: bigint; + TerminalCode?: string; + MessageType!: number; + Status!: number; + Content?: unknown; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const IcrTerminalmessageSchema = defineEntity({ + class: IcrTerminalmessage, + comment: '终端消息', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + TerminalId: p.bigint().name('TerminalId').comment('终端编号'), + TerminalCode: p.string().name('TerminalCode').nullable().comment('终端编码'), + MessageType: p.integer().name('MessageType').comment('消息内容'), + Status: p.integer().name('Status').comment('终端消息状态'), + Content: p.array().name('Content').length(16777215).nullable().comment('消息内容'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/IcrTerminalmonitor.ts b/node_api/src/entities/IcrTerminalmonitor.ts new file mode 100644 index 0000000..8e4fe76 --- /dev/null +++ b/node_api/src/entities/IcrTerminalmonitor.ts @@ -0,0 +1,32 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrTerminalmonitor { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + TerminalCode?: string; + TerminalName?: string; + Status!: number; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const IcrTerminalmonitorSchema = defineEntity({ + class: IcrTerminalmonitor, + comment: '终端监控', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + TerminalCode: p.string().name('TerminalCode').nullable().comment('终端编码'), + TerminalName: p.string().name('TerminalName').nullable().comment('终端名称'), + Status: p.integer().name('Status').comment('终端状态'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/IcrTerminalsubscribedclass.ts b/node_api/src/entities/IcrTerminalsubscribedclass.ts new file mode 100644 index 0000000..1c8ec28 --- /dev/null +++ b/node_api/src/entities/IcrTerminalsubscribedclass.ts @@ -0,0 +1,32 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrTerminalsubscribedclass { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + TerminalId!: bigint; + TerminalCode?: string; + ClassId!: bigint; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const IcrTerminalsubscribedclassSchema = defineEntity({ + class: IcrTerminalsubscribedclass, + comment: '终端订阅的班级', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + TerminalId: p.bigint().name('TerminalId').comment('终端Id'), + TerminalCode: p.string().name('TerminalCode').nullable().comment('终端Id'), + ClassId: p.bigint().name('ClassId').comment('班级Id'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/IcrTutorroom.ts b/node_api/src/entities/IcrTutorroom.ts new file mode 100644 index 0000000..c76efeb --- /dev/null +++ b/node_api/src/entities/IcrTutorroom.ts @@ -0,0 +1,36 @@ +import { type Opt, PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrTutorroom { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + Name?: string; + TotalPen!: number; + Enabled!: unknown; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; + TeacherId!: bigint & Opt; + TotalStudent: number & Opt = 0; +} + +export const IcrTutorroomSchema = defineEntity({ + class: IcrTutorroom, + comment: '辅导班', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + Name: p.string().name('Name').nullable().comment('考场名称'), + TotalPen: p.integer().name('TotalPen').comment('笔的数量'), + Enabled: p.array().name('Enabled').comment('启用'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + TeacherId: p.bigint().name('TeacherId').comment('管理教师').defaultRaw(`0`), + TotalStudent: p.integer().name('TotalStudent').comment('学生的数量'), + }, +}); diff --git a/node_api/src/entities/IcrUserdotmatrixpen.ts b/node_api/src/entities/IcrUserdotmatrixpen.ts new file mode 100644 index 0000000..d162801 --- /dev/null +++ b/node_api/src/entities/IcrUserdotmatrixpen.ts @@ -0,0 +1,38 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrUserdotmatrixpen { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + UserId!: bigint; + PenId!: bigint; + PenSerialNo?: string; + PenType!: number; + UserType!: number; + Remark?: string; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const IcrUserdotmatrixpenSchema = defineEntity({ + class: IcrUserdotmatrixpen, + comment: '学生和点阵笔的关系', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + UserId: p.bigint().name('UserId').comment('用户Id'), + PenId: p.bigint().name('PenId').comment('笔Id'), + PenSerialNo: p.string().name('PenSerialNo').nullable().comment('笔序列号'), + PenType: p.integer().name('PenType').comment('笔用途类型;1. 写 2. 修改'), + UserType: p.integer().name('UserType').comment('用户类型;1 学生 2 教师'), + Remark: p.string().name('Remark').nullable().comment('备注'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/IcrUserservermap.ts b/node_api/src/entities/IcrUserservermap.ts new file mode 100644 index 0000000..425c192 --- /dev/null +++ b/node_api/src/entities/IcrUserservermap.ts @@ -0,0 +1,38 @@ +import { type Opt, PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrUserservermap { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + UserName?: string; + UserId!: bigint; + ServerId!: bigint; + ExpireDate?: Date; + Status!: number; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; + ClassId!: bigint & Opt; +} + +export const IcrUserservermapSchema = defineEntity({ + class: IcrUserservermap, + comment: '学生和服务器的关系', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + UserName: p.string().name('UserName').nullable().comment('姓名'), + UserId: p.bigint().name('UserId').comment('用户id'), + ServerId: p.bigint().name('ServerId').comment('服务器id'), + ExpireDate: p.datetime().name('ExpireDate').length(3).nullable().comment('过期时间(天)'), + Status: p.integer().name('Status').comment('状态'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + ClassId: p.bigint().name('ClassId').comment('班级id').defaultRaw(`0`), + }, +}); diff --git a/node_api/src/entities/IcrWords.ts b/node_api/src/entities/IcrWords.ts new file mode 100644 index 0000000..bd1a629 --- /dev/null +++ b/node_api/src/entities/IcrWords.ts @@ -0,0 +1,39 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrWords { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + StudentId!: bigint; + CategoryId!: bigint; + BookId!: bigint; + ArticleId!: bigint; + Content?: string; + RecordTime!: Date; + Type!: number; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const IcrWordsSchema = defineEntity({ + class: IcrWords, + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + StudentId: p.bigint().name('StudentId').comment('学生Id'), + CategoryId: p.bigint().name('CategoryId').comment('分类ID'), + BookId: p.bigint().name('BookId').comment('书籍Id'), + ArticleId: p.bigint().name('ArticleId').comment('文章Id'), + Content: p.string().name('Content').nullable().comment('内容'), + RecordTime: p.datetime().name('RecordTime').length(3).comment('记录时间'), + Type: p.integer().name('Type').comment('类型(1-批注 2-积累)'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/IcrWordscategory.ts b/node_api/src/entities/IcrWordscategory.ts new file mode 100644 index 0000000..02c800a --- /dev/null +++ b/node_api/src/entities/IcrWordscategory.ts @@ -0,0 +1,37 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class IcrWordscategory { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + StudentId!: bigint; + Name?: string; + ParentId?: bigint; + Path?: string; + Level!: number; + Type!: number; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const IcrWordscategorySchema = defineEntity({ + class: IcrWordscategory, + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + StudentId: p.bigint().name('StudentId').comment('学生Id'), + Name: p.string().name('Name').nullable().comment('名称'), + ParentId: p.bigint().name('ParentId').nullable().comment('父分类ID(用于构建无限层级结构,根分类的ParentId为null)'), + Path: p.string().name('Path').nullable().comment('分类层级路径,使用分隔符分隔的ID路径,如 "1/5/23",便于快速查询和排序'), + Level: p.integer().name('Level').comment('分类层级深度'), + Type: p.integer().name('Type').comment('类型(0:默认 1:普通)'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/MeetingUser.ts b/node_api/src/entities/MeetingUser.ts new file mode 100644 index 0000000..d171e60 --- /dev/null +++ b/node_api/src/entities/MeetingUser.ts @@ -0,0 +1,17 @@ +import { defineEntity, p } from '@mikro-orm/core'; + +export class MeetingUser { + id!: bigint; + longUserId!: bigint; + createdAt?: Date; +} + +export const MeetingUserSchema = defineEntity({ + class: MeetingUser, + uniques: [{ name: 'idx_hostUserId', properties: ['longUserId'] }], + properties: { + id: p.bigint().primary().unsigned(false).comment('短id'), + longUserId: p.bigint().name('long_user_Id').comment('用户的uid').unique('hostUserId'), + createdAt: p.datetime().length(3).nullable().comment('创建时间').defaultRaw(`current_timestamp(3)`), + }, +}); diff --git a/node_api/src/entities/Meetinglog.ts b/node_api/src/entities/Meetinglog.ts new file mode 100644 index 0000000..7c47983 --- /dev/null +++ b/node_api/src/entities/Meetinglog.ts @@ -0,0 +1,32 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class Meetinglog { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + MeetingId!: bigint; + Speaker?: string; + Content?: string; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const MeetinglogSchema = defineEntity({ + class: Meetinglog, + comment: '会议记录', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + MeetingId: p.bigint().name('MeetingId').comment('会议Id'), + Speaker: p.string().name('Speaker').nullable().comment('说话人名称'), + Content: p.string().name('Content').length(1000).nullable().comment('内容'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/OssResource.ts b/node_api/src/entities/OssResource.ts new file mode 100644 index 0000000..0936879 --- /dev/null +++ b/node_api/src/entities/OssResource.ts @@ -0,0 +1,36 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class OssResource { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + MainId?: bigint; + SoucePath?: string; + Path?: string; + Status!: number; + Type!: number; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const OssResourceSchema = defineEntity({ + class: OssResource, + comment: 'OSS资源表', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + MainId: p.bigint().name('MainId').nullable().comment('主id'), + SoucePath: p.string().name('SoucePath').length(3000).nullable().comment('原路径'), + Path: p.string().name('Path').length(5000).nullable().comment('路径'), + Status: p.integer().name('Status').comment('状态:0默认 1有效 -1失效'), + Type: p.integer().name('Type').comment('共用桶情况类型(0-测试资源 1-正式资源)'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/PrismaMigrations.ts b/node_api/src/entities/PrismaMigrations.ts new file mode 100644 index 0000000..1968a5a --- /dev/null +++ b/node_api/src/entities/PrismaMigrations.ts @@ -0,0 +1,27 @@ +import { type Opt, defineEntity, p } from '@mikro-orm/core'; + +export class PrismaMigrations { + id!: string; + checksum!: string; + finishedAt?: Date; + migrationName!: string; + logs?: string; + rolledBackAt?: Date; + startedAt!: Date & Opt; + appliedStepsCount: number & Opt = 0; +} + +export const PrismaMigrationsSchema = defineEntity({ + class: PrismaMigrations, + tableName: '_prisma_migrations', + properties: { + id: p.string().primary().length(36), + checksum: p.string().length(64), + finishedAt: p.datetime().length(3).nullable(), + migrationName: p.string(), + logs: p.text().length(65535).nullable(), + rolledBackAt: p.datetime().length(3).nullable(), + startedAt: p.datetime().length(3).defaultRaw(`current_timestamp(3)`), + appliedStepsCount: p.integer().unsigned(), + }, +}); diff --git a/node_api/src/entities/ScsAppupdate.ts b/node_api/src/entities/ScsAppupdate.ts new file mode 100644 index 0000000..3b8b858 --- /dev/null +++ b/node_api/src/entities/ScsAppupdate.ts @@ -0,0 +1,37 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class ScsAppupdate { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + Version?: string; + BuildId!: number; + DownloadUrl?: string; + IsMandatory!: unknown; + Description?: string; + Platform!: number; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const ScsAppupdateSchema = defineEntity({ + class: ScsAppupdate, + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + Version: p.string().name('Version').nullable().comment('版本号'), + BuildId: p.integer().name('BuildId').comment('打包号'), + DownloadUrl: p.string().name('DownloadUrl').nullable().comment('下载链接'), + IsMandatory: p.array().name('IsMandatory').comment('强制更新'), + Description: p.string().name('Description').nullable().comment('更新描述'), + Platform: p.integer().name('Platform').comment('平台信息 1-iOS 2-Android'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/ScsCarousel.ts b/node_api/src/entities/ScsCarousel.ts new file mode 100644 index 0000000..cebb36b --- /dev/null +++ b/node_api/src/entities/ScsCarousel.ts @@ -0,0 +1,38 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class ScsCarousel { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + Url?: string; + JumpId?: bigint; + JumpType?: number; + Platform!: number; + Type!: number; + Enabled!: unknown; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const ScsCarouselSchema = defineEntity({ + class: ScsCarousel, + comment: '轮播图', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + Url: p.string().name('Url').length(200).nullable().comment('图片地址'), + JumpId: p.bigint().name('JumpId').nullable().comment('关联id'), + JumpType: p.integer().name('JumpType').nullable().comment('跳转类型(0-消息 1课程 2资源)'), + Platform: p.integer().name('Platform').comment('平台类型(0-手机端 1-PC端)'), + Type: p.integer().name('Type').comment('类型(0-轮播图 1-中间轮播图)'), + Enabled: p.array().name('Enabled').comment('启用'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/ScsClass.ts b/node_api/src/entities/ScsClass.ts new file mode 100644 index 0000000..ccf2ff3 --- /dev/null +++ b/node_api/src/entities/ScsClass.ts @@ -0,0 +1,44 @@ +import { type Opt, PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class ScsClass { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + SchoolId!: bigint; + GradeId!: bigint; + TeacherId!: bigint; + Name?: string; + Grid?: string; + Camera?: string; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; + Description?: string; + Code?: string; + Type: number & Opt = 0; +} + +export const ScsClassSchema = defineEntity({ + class: ScsClass, + comment: '班级表', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + SchoolId: p.bigint().name('SchoolId').comment('届id'), + GradeId: p.bigint().name('GradeId').comment('届id'), + TeacherId: p.bigint().name('TeacherId').comment('班主任id'), + Name: p.string().name('Name').length(10).nullable().comment('班级名称'), + Grid: p.string().name('Grid').length(10).nullable().comment('班级座次网格'), + Camera: p.string().name('Camera').nullable().comment('摄像头参数'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + Description: p.string().name('Description').nullable().comment('描述'), + Code: p.string().name('Code').nullable().comment('班级编码(两位01-99)').unique('idx_SCS_Class_01'), + Type: p.integer().name('Type').comment('0-普通教室 1-辅导教室'), + }, +}); diff --git a/node_api/src/entities/ScsClasssubject.ts b/node_api/src/entities/ScsClasssubject.ts new file mode 100644 index 0000000..9181295 --- /dev/null +++ b/node_api/src/entities/ScsClasssubject.ts @@ -0,0 +1,36 @@ +import { type Opt, PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class ScsClasssubject { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + GradeId!: bigint; + ClassId!: bigint; + SubjectId!: bigint; + SubjectName?: string; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; + SchoolId!: bigint & Opt; +} + +export const ScsClasssubjectSchema = defineEntity({ + class: ScsClasssubject, + comment: '班-学科关联表', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + GradeId: p.bigint().name('GradeId').comment('届'), + ClassId: p.bigint().name('ClassId').comment('班级id'), + SubjectId: p.bigint().name('SubjectId').comment('科目id'), + SubjectName: p.string().name('SubjectName').nullable().comment('科目名称'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + SchoolId: p.bigint().name('SchoolId').comment('学校id').defaultRaw(`0`), + }, +}); diff --git a/node_api/src/entities/ScsCourse.ts b/node_api/src/entities/ScsCourse.ts new file mode 100644 index 0000000..898b577 --- /dev/null +++ b/node_api/src/entities/ScsCourse.ts @@ -0,0 +1,58 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class ScsCourse { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + SchoolId!: bigint; + SubjectId!: bigint; + GradeId!: bigint; + GradeLevel!: number; + CourseStatus!: number; + GradeLevelNum!: number; + Cover?: string; + Name?: string; + TeacherId!: bigint; + WeekNum!: number; + WeekDay!: number; + CoursewareCount!: number; + KnowledgeCount!: number; + OtherCount!: number; + ViewCount!: number; + DurationSeconds!: number; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const ScsCourseSchema = defineEntity({ + class: ScsCourse, + comment: '课程', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + SchoolId: p.bigint().name('SchoolId').comment('学校id'), + SubjectId: p.bigint().name('SubjectId').comment('学科id'), + GradeId: p.bigint().name('GradeId').comment('届id'), + GradeLevel: p.integer().name('GradeLevel').comment('届比如高(冗余字段)'), + CourseStatus: p.integer().name('CourseStatus').comment('课程状态'), + GradeLevelNum: p.integer().name('GradeLevelNum').comment('届级别编号(高1的1)(冗余字段)'), + Cover: p.string().name('Cover').length(1000).nullable().comment('封面'), + Name: p.string().name('Name').nullable().comment('课程名称'), + TeacherId: p.bigint().name('TeacherId').comment('讲师id'), + WeekNum: p.integer().name('WeekNum').comment('学习周'), + WeekDay: p.integer().name('WeekDay').comment('星期(星期一)'), + CoursewareCount: p.integer().name('CoursewareCount').comment('课件数量'), + KnowledgeCount: p.integer().name('KnowledgeCount').comment('知识点数量'), + OtherCount: p.integer().name('OtherCount').comment('其他数量'), + ViewCount: p.integer().name('ViewCount').comment('查看量'), + DurationSeconds: p.integer().name('DurationSeconds').comment('课程时长秒'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/ScsCoursepoint.ts b/node_api/src/entities/ScsCoursepoint.ts new file mode 100644 index 0000000..e5b96c8 --- /dev/null +++ b/node_api/src/entities/ScsCoursepoint.ts @@ -0,0 +1,32 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class ScsCoursepoint { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + CourseId!: bigint; + Content?: string; + TimePoint!: number; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const ScsCoursepointSchema = defineEntity({ + class: ScsCoursepoint, + comment: '课程知识点', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + CourseId: p.bigint().name('CourseId').comment('课程id'), + Content: p.string().name('Content').length(500).nullable().comment('内容'), + TimePoint: p.integer().name('TimePoint').comment('时间点'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/ScsCourseschedule.ts b/node_api/src/entities/ScsCourseschedule.ts new file mode 100644 index 0000000..072ebb0 --- /dev/null +++ b/node_api/src/entities/ScsCourseschedule.ts @@ -0,0 +1,40 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class ScsCourseschedule { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + AreaName?: string; + GradeName?: string; + ClassGroup?: string; + TimeStart!: string; + TimeEnd!: string; + WeekDay!: number; + SubjectName?: string; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const ScsCoursescheduleSchema = defineEntity({ + class: ScsCourseschedule, + comment: '课表', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + AreaName: p.string().name('AreaName').nullable().comment('区域名称'), + GradeName: p.string().name('GradeName').nullable().comment('届'), + ClassGroup: p.string().name('ClassGroup').nullable().comment('班级分组'), + TimeStart: p.time().name('TimeStart').comment('开始时间'), + TimeEnd: p.time().name('TimeEnd').comment('结束时间'), + WeekDay: p.integer().name('WeekDay').comment('周几'), + SubjectName: p.string().name('SubjectName').nullable().comment('学科'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/ScsCoursesource.ts b/node_api/src/entities/ScsCoursesource.ts new file mode 100644 index 0000000..f2d1d68 --- /dev/null +++ b/node_api/src/entities/ScsCoursesource.ts @@ -0,0 +1,40 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class ScsCoursesource { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + CourseId!: bigint; + Name?: string; + Type!: number; + Extension?: string; + Url?: string; + ExpireTime?: Date; + VideoId?: string; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const ScsCoursesourceSchema = defineEntity({ + class: ScsCoursesource, + comment: '课程资源', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + CourseId: p.bigint().name('CourseId').comment('课程id'), + Name: p.string().name('Name').nullable().comment('名称'), + Type: p.integer().name('Type').comment('类型'), + Extension: p.string().name('Extension').nullable().comment('文件扩展名称'), + Url: p.string().name('Url').length(1000).nullable().comment('文件地址'), + ExpireTime: p.datetime().name('ExpireTime').length(3).nullable().comment('失效时间'), + VideoId: p.string().name('VideoId').nullable().comment('视频Id'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/ScsCoursesourceconvert.ts b/node_api/src/entities/ScsCoursesourceconvert.ts new file mode 100644 index 0000000..4b71dd2 --- /dev/null +++ b/node_api/src/entities/ScsCoursesourceconvert.ts @@ -0,0 +1,38 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class ScsCoursesourceconvert { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + CourseId!: bigint; + CourseSouceId!: bigint; + FileType!: number; + Order!: number; + Extension?: string; + Urls?: string; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const ScsCoursesourceconvertSchema = defineEntity({ + class: ScsCoursesourceconvert, + comment: '课程资源', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + CourseId: p.bigint().name('CourseId').comment('课程id'), + CourseSouceId: p.bigint().name('CourseSouceId').comment('课程资源id'), + FileType: p.integer().name('FileType').comment('文件类型'), + Order: p.integer().name('Order').comment('排序'), + Extension: p.string().name('Extension').nullable().comment('文件扩展名'), + Urls: p.string().name('Urls').length(6000).nullable().comment('文件地址列表'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/ScsDictionary.ts b/node_api/src/entities/ScsDictionary.ts new file mode 100644 index 0000000..8fa2785 --- /dev/null +++ b/node_api/src/entities/ScsDictionary.ts @@ -0,0 +1,40 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class ScsDictionary { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + CategoryId!: bigint; + Code?: string; + Name?: string; + Value?: string; + Description?: string; + Enabled!: unknown; + Sort!: number; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const ScsDictionarySchema = defineEntity({ + class: ScsDictionary, + comment: '数据字典', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + CategoryId: p.bigint().name('CategoryId').comment('分类id'), + Code: p.string().name('Code').length(20).nullable().comment('编码'), + Name: p.string().name('Name').length(20).nullable().comment('名称'), + Value: p.string().name('Value').nullable().comment('值'), + Description: p.string().name('Description').length(100).nullable().comment('说明'), + Enabled: p.array().name('Enabled').comment('启用'), + Sort: p.integer().name('Sort').comment('排序'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/ScsDictionarycategory.ts b/node_api/src/entities/ScsDictionarycategory.ts new file mode 100644 index 0000000..fdbcff0 --- /dev/null +++ b/node_api/src/entities/ScsDictionarycategory.ts @@ -0,0 +1,36 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class ScsDictionarycategory { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + Name?: string; + Code?: string; + Description?: string; + Enabled!: unknown; + Sort!: number; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const ScsDictionarycategorySchema = defineEntity({ + class: ScsDictionarycategory, + comment: '数据字典分类', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + Name: p.string().name('Name').length(20).nullable().comment('名称'), + Code: p.string().name('Code').length(20).nullable().comment('编码'), + Description: p.string().name('Description').length(100).nullable().comment('描述'), + Enabled: p.array().name('Enabled').comment('启用'), + Sort: p.integer().name('Sort').comment('排序'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/ScsFeature.ts b/node_api/src/entities/ScsFeature.ts new file mode 100644 index 0000000..a49dba2 --- /dev/null +++ b/node_api/src/entities/ScsFeature.ts @@ -0,0 +1,40 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class ScsFeature { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + Title?: string; + Subtitle?: string; + Icon?: string; + Sort!: number; + Enable!: unknown; + Type!: number; + MessageId?: bigint; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const ScsFeatureSchema = defineEntity({ + class: ScsFeature, + comment: '云校特色', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + Title: p.string().name('Title').nullable().comment('标题'), + Subtitle: p.string().name('Subtitle').nullable().comment('副标题'), + Icon: p.string().name('Icon').nullable().comment('图标'), + Sort: p.integer().name('Sort').comment('序号'), + Enable: p.array().name('Enable').comment('启用'), + Type: p.integer().name('Type').comment('类型(0-特色 1-纯图片 2-板块)'), + MessageId: p.bigint().name('MessageId').nullable().comment('消息Id'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/ScsGrade.ts b/node_api/src/entities/ScsGrade.ts new file mode 100644 index 0000000..816bdb3 --- /dev/null +++ b/node_api/src/entities/ScsGrade.ts @@ -0,0 +1,36 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class ScsGrade { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + SchoolId!: bigint; + Year!: number; + Name?: string; + Level!: number; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; + Code?: string; +} + +export const ScsGradeSchema = defineEntity({ + class: ScsGrade, + comment: '届表', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + SchoolId: p.bigint().name('SchoolId').comment('学校id'), + Year: p.integer().name('Year').comment('届'), + Name: p.string().name('Name').length(20).nullable().comment('届名称'), + Level: p.integer().name('Level').comment('届级别'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + Code: p.string().name('Code').nullable().comment('届编码(01-99)'), + }, +}); diff --git a/node_api/src/entities/ScsManager.ts b/node_api/src/entities/ScsManager.ts new file mode 100644 index 0000000..550eb2d --- /dev/null +++ b/node_api/src/entities/ScsManager.ts @@ -0,0 +1,42 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class ScsManager { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + Account?: string; + Name?: string; + Pwd?: string; + Phone?: string; + Enabled!: unknown; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; + UnionId?: string; + MpOpenId?: string; + ServiceOpenId?: string; +} + +export const ScsManagerSchema = defineEntity({ + class: ScsManager, + comment: '管理员表', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + Account: p.string().name('Account').length(30).nullable().comment('编号'), + Name: p.string().name('Name').length(30).nullable().comment('用户名'), + Pwd: p.string().name('Pwd').length(20).nullable().comment('用户密码'), + Phone: p.string().name('Phone').length(20).nullable().comment('用户电话'), + Enabled: p.array().name('Enabled').comment('启用'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + UnionId: p.string().name('UnionId').length(100).nullable().comment('UnionId'), + MpOpenId: p.string().name('MpOpenId').length(100).nullable().comment('小程序OpenId'), + ServiceOpenId: p.string().name('ServiceOpenId').length(100).nullable().comment('服务号OpenId'), + }, +}); diff --git a/node_api/src/entities/ScsManagerrole.ts b/node_api/src/entities/ScsManagerrole.ts new file mode 100644 index 0000000..7a31f9e --- /dev/null +++ b/node_api/src/entities/ScsManagerrole.ts @@ -0,0 +1,30 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class ScsManagerrole { + [PrimaryKeyProp]?: ['Id', 'ManagerId', 'RoleId']; + Id!: bigint; + ManagerId!: bigint; + RoleId!: bigint; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const ScsManagerroleSchema = defineEntity({ + class: ScsManagerrole, + comment: '管理角色表', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).comment('主键Id'), + ManagerId: p.bigint().primary().name('ManagerId').unsigned(false).comment('管理员id'), + RoleId: p.bigint().primary().name('RoleId').unsigned(false).comment('角色id'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/ScsNetdisk.ts b/node_api/src/entities/ScsNetdisk.ts new file mode 100644 index 0000000..f44a5bf --- /dev/null +++ b/node_api/src/entities/ScsNetdisk.ts @@ -0,0 +1,44 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class ScsNetdisk { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + ParentId!: bigint; + UserId!: bigint; + Name?: string; + Size!: bigint; + Type?: string; + Hash?: string; + Folder!: unknown; + Path?: string; + Sort!: number; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const ScsNetdiskSchema = defineEntity({ + class: ScsNetdisk, + comment: '文件收藏', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + ParentId: p.bigint().name('ParentId').comment('父ID').index('idx_SCS_NetDisk_01'), + UserId: p.bigint().name('UserId').comment('用户id').index('idx_SCS_NetDisk_02'), + Name: p.string().name('Name').nullable().comment('文件/文件夹名称').index('idx_SCS_NetDisk_03'), + Size: p.bigint().name('Size').comment('文件/文件夹大小'), + Type: p.string().name('Type').nullable().comment('文件类型'), + Hash: p.string().name('Hash').nullable().comment('文件哈希值'), + Folder: p.array().name('Folder').comment('是否文件夹'), + Path: p.string().name('Path').nullable().comment('路径'), + Sort: p.integer().name('Sort').comment('排序'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/ScsPermissions.ts b/node_api/src/entities/ScsPermissions.ts new file mode 100644 index 0000000..0297fff --- /dev/null +++ b/node_api/src/entities/ScsPermissions.ts @@ -0,0 +1,49 @@ +import { type Opt, defineEntity, p } from '@mikro-orm/core'; + +export class ScsPermissions { + id!: bigint; + parentid!: bigint; + name?: string; + label?: string; + code?: string; + Path?: string; + identification?: string; + icon?: string; + sort!: number; + description?: string; + enabled!: unknown; + revision!: number; + createdby?: bigint; + createdtime!: Date; + updatedby?: bigint; + updatedtime?: Date; + isdeleted!: unknown; + Type!: number; + Hide!: unknown & Opt; +} + +export const ScsPermissionsSchema = defineEntity({ + class: ScsPermissions, + comment: '权限表', + properties: { + id: p.bigint().primary().unsigned(false).autoincrement(false).comment('主键Id'), + parentid: p.bigint().comment('父id').index('idx_SCS_Permissions_03'), + name: p.string().length(20).nullable().comment('菜单名称'), + label: p.string().length(50).nullable().comment('路由名称').index('idx_SCS_Permissions_01'), + code: p.string().length(50).nullable().comment('路由路径').index('idx_SCS_Permissions_02'), + Path: p.string().name('Path').length(100).nullable().comment('组件路径'), + identification: p.string().length(20).nullable().comment('权限标识'), + icon: p.string().nullable().comment('图标'), + sort: p.integer().comment('排序'), + description: p.string().nullable().comment('描述'), + enabled: p.array().comment('启用'), + revision: p.integer().comment('乐观锁'), + createdby: p.bigint().nullable().comment('创建者用户Id'), + createdtime: p.datetime().length(3).comment('创建时间'), + updatedby: p.bigint().nullable().comment('修改者用户Id'), + updatedtime: p.datetime().length(3).nullable().comment('修改时间'), + isdeleted: p.array().comment('是否删除'), + Type: p.integer().name('Type').comment('类型'), + Hide: p.array().name('Hide').comment('隐藏').defaultRaw(`b'0'`), + }, +}); diff --git a/node_api/src/entities/ScsResourceconvert.ts b/node_api/src/entities/ScsResourceconvert.ts new file mode 100644 index 0000000..b1397bf --- /dev/null +++ b/node_api/src/entities/ScsResourceconvert.ts @@ -0,0 +1,42 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class ScsResourceconvert { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + SourceResourceId!: bigint; + ResourcePath?: string; + ConvertStatus!: number; + ResourceType!: number; + TargetType!: number; + ConvertedResourcePathPrefix?: string; + Number!: number; + FailMessage?: string; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const ScsResourceconvertSchema = defineEntity({ + class: ScsResourceconvert, + comment: '资源转换', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + SourceResourceId: p.bigint().name('SourceResourceId').comment('原资源id'), + ResourcePath: p.string().name('ResourcePath').length(1000).nullable().comment('资源路径'), + ConvertStatus: p.integer().name('ConvertStatus').comment('转换状态;1默认 2转换任务成功 -2转换任务失败 3转换成功 -3转换失败'), + ResourceType: p.integer().name('ResourceType').comment('资源类型'), + TargetType: p.integer().name('TargetType').comment('目标类型;目前是1-png'), + ConvertedResourcePathPrefix: p.string().name('ConvertedResourcePathPrefix').nullable().comment('转换后的路径前缀,假设是目录 尾缀带有/'), + Number: p.integer().name('Number').comment('转换之后文件夹文件数量'), + FailMessage: p.string().name('FailMessage').nullable().comment('转换失败信息'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/ScsRole.ts b/node_api/src/entities/ScsRole.ts new file mode 100644 index 0000000..e599365 --- /dev/null +++ b/node_api/src/entities/ScsRole.ts @@ -0,0 +1,38 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class ScsRole { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + Code?: string; + Name?: string; + Description?: string; + Nick?: string; + Sort!: number; + Enabled!: unknown; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const ScsRoleSchema = defineEntity({ + class: ScsRole, + comment: '角色表', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + Code: p.string().name('Code').length(20).nullable().comment('角色编码').index('idx_SCS_Role_01'), + Name: p.string().name('Name').length(20).nullable().comment('角色名称').index('idx_SCS_Role_02'), + Description: p.string().name('Description').nullable().comment('注释'), + Nick: p.string().name('Nick').nullable().comment('角色别称'), + Sort: p.integer().name('Sort').comment('排序'), + Enabled: p.array().name('Enabled').comment('启用'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/ScsRolepermissions.ts b/node_api/src/entities/ScsRolepermissions.ts new file mode 100644 index 0000000..4ec3064 --- /dev/null +++ b/node_api/src/entities/ScsRolepermissions.ts @@ -0,0 +1,30 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class ScsRolepermissions { + [PrimaryKeyProp]?: ['id', 'roleid', 'permissionsid']; + id!: bigint; + roleid!: bigint; + permissionsid!: bigint; + revision!: number; + createdby?: bigint; + createdtime!: Date; + updatedby?: bigint; + updatedtime?: Date; + isdeleted!: unknown; +} + +export const ScsRolepermissionsSchema = defineEntity({ + class: ScsRolepermissions, + comment: '角色权限表', + properties: { + id: p.bigint().primary().unsigned(false).comment('主键Id'), + roleid: p.bigint().primary().unsigned(false).comment('角色id'), + permissionsid: p.bigint().primary().unsigned(false).comment('权限id'), + revision: p.integer().comment('乐观锁'), + createdby: p.bigint().nullable().comment('创建者用户Id'), + createdtime: p.datetime().length(3).comment('创建时间'), + updatedby: p.bigint().nullable().comment('修改者用户Id'), + updatedtime: p.datetime().length(3).nullable().comment('修改时间'), + isdeleted: p.array().comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/ScsSchool.ts b/node_api/src/entities/ScsSchool.ts new file mode 100644 index 0000000..bd2d1a7 --- /dev/null +++ b/node_api/src/entities/ScsSchool.ts @@ -0,0 +1,32 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class ScsSchool { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + Name?: string; + Code?: string; + ShortName?: string; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const ScsSchoolSchema = defineEntity({ + class: ScsSchool, + comment: '学校表', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + Name: p.string().name('Name').length(50).nullable().comment('学校名称'), + Code: p.string().name('Code').nullable().comment('学校编码(01-99)').unique('idx_SCS_School_01'), + ShortName: p.string().name('ShortName').length(20).nullable().comment('学校简称'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/ScsSitemessage.ts b/node_api/src/entities/ScsSitemessage.ts new file mode 100644 index 0000000..d31d639 --- /dev/null +++ b/node_api/src/entities/ScsSitemessage.ts @@ -0,0 +1,38 @@ +import { type Opt, PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class ScsSitemessage { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + Title?: string; + Description?: string; + Content?: string; + IsImportant!: unknown; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; + Status: number & Opt = 0; + Type: number & Opt = 0; +} + +export const ScsSitemessageSchema = defineEntity({ + class: ScsSitemessage, + comment: '系统消息', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + Title: p.string().name('Title').length(100).nullable().comment('消息标题'), + Description: p.string().name('Description').length(500).nullable().comment('描述'), + Content: p.string().name('Content').length(20000).nullable().comment('消息内容'), + IsImportant: p.array().name('IsImportant').comment('是否重要'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + Status: p.integer().name('Status').comment('发布状态(0未发布 1已发布 -1已撤回)'), + Type: p.integer().name('Type').comment('类型0-富文本消息 1-url消息'), + }, +}); diff --git a/node_api/src/entities/ScsSource.ts b/node_api/src/entities/ScsSource.ts new file mode 100644 index 0000000..0ce20bd --- /dev/null +++ b/node_api/src/entities/ScsSource.ts @@ -0,0 +1,44 @@ +import { type Opt, PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class ScsSource { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + No!: bigint; + PublisherId!: bigint; + GradeId!: bigint; + SubjectId!: bigint; + Name?: string; + Status!: number; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; + SchoolId!: bigint; + ViewNum: number & Opt = 0; + DownNum: number & Opt = 0; +} + +export const ScsSourceSchema = defineEntity({ + class: ScsSource, + comment: '资源包', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + No: p.bigint().name('No').comment('作品id'), + PublisherId: p.bigint().name('PublisherId').comment('上传用户id'), + GradeId: p.bigint().name('GradeId').comment('届id'), + SubjectId: p.bigint().name('SubjectId').comment('学科id'), + Name: p.string().name('Name').nullable().comment('文件包名称').index('idx_SCS_Source_01'), + Status: p.integer().name('Status').comment('状态'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + SchoolId: p.bigint().name('SchoolId').comment('学校id(如果学校id)'), + ViewNum: p.integer().name('ViewNum').comment('浏览量'), + DownNum: p.integer().name('DownNum').comment('下载量'), + }, +}); diff --git a/node_api/src/entities/ScsSourcefile.ts b/node_api/src/entities/ScsSourcefile.ts new file mode 100644 index 0000000..eb2fb3d --- /dev/null +++ b/node_api/src/entities/ScsSourcefile.ts @@ -0,0 +1,48 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class ScsSourcefile { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + PublisherId!: bigint; + SourceId!: bigint; + Name?: string; + DocType?: string; + SourceType!: number; + SubType!: number; + Status!: number; + Url?: string; + ViewNum!: number; + DownNum!: number; + QuestionNum!: number; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const ScsSourcefileSchema = defineEntity({ + class: ScsSourcefile, + comment: '资源文件', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + PublisherId: p.bigint().name('PublisherId').comment('上传用户id'), + SourceId: p.bigint().name('SourceId').comment('文件包id'), + Name: p.string().name('Name').nullable().comment('文件名称').index('idx_SCS_SourceFile_01'), + DocType: p.string().name('DocType').nullable().comment('文件类型()'), + SourceType: p.integer().name('SourceType').comment('资源类型(试卷 课件 作业)'), + SubType: p.integer().name('SubType').comment('按不同的SourceType类型对应'), + Status: p.integer().name('Status').comment('状态'), + Url: p.string().name('Url').length(1000).nullable().comment('资源地址'), + ViewNum: p.integer().name('ViewNum').comment('浏览量'), + DownNum: p.integer().name('DownNum').comment('下载量'), + QuestionNum: p.integer().name('QuestionNum').comment('题量'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/ScsStudentclass.ts b/node_api/src/entities/ScsStudentclass.ts new file mode 100644 index 0000000..8d7349d --- /dev/null +++ b/node_api/src/entities/ScsStudentclass.ts @@ -0,0 +1,36 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class ScsStudentclass { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + ClassId!: bigint; + SchoolId!: bigint; + GradeId!: bigint; + StudentId!: bigint; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; + SubjectIds?: unknown; +} + +export const ScsStudentclassSchema = defineEntity({ + class: ScsStudentclass, + comment: '学生班级关系', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + ClassId: p.bigint().name('ClassId').comment('班级id'), + SchoolId: p.bigint().name('SchoolId').comment('学校id'), + GradeId: p.bigint().name('GradeId').comment('届id'), + StudentId: p.bigint().name('StudentId').comment('学生id'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + SubjectIds: p.array().name('SubjectIds').length(4294967295).nullable().comment('学科ids'), + }, +}); diff --git a/node_api/src/entities/ScsStudenterrorbank.ts b/node_api/src/entities/ScsStudenterrorbank.ts new file mode 100644 index 0000000..b647d8f --- /dev/null +++ b/node_api/src/entities/ScsStudenterrorbank.ts @@ -0,0 +1,35 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class ScsStudenterrorbank { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + StudentId!: bigint; + QuestionId!: bigint; + AnswerUrl?: string; + Type!: number; + Status!: number; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const ScsStudenterrorbankSchema = defineEntity({ + class: ScsStudenterrorbank, + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + StudentId: p.bigint().name('StudentId').comment('学生id'), + QuestionId: p.bigint().name('QuestionId').comment('问题id'), + AnswerUrl: p.string().name('AnswerUrl').nullable().comment('回答图片地址'), + Type: p.integer().name('Type').comment('问题来源(1-互动课堂 2-作业)'), + Status: p.integer().name('Status').comment('状态 0:未学会 1:已学会'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/ScsStudentgroup.ts b/node_api/src/entities/ScsStudentgroup.ts new file mode 100644 index 0000000..7bb0fef --- /dev/null +++ b/node_api/src/entities/ScsStudentgroup.ts @@ -0,0 +1,36 @@ +import { type Opt, PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class ScsStudentgroup { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + Name?: string; + TotalStudent!: number; + Enabled!: unknown; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; + TeacherId!: bigint & Opt; + Type: number & Opt = 0; +} + +export const ScsStudentgroupSchema = defineEntity({ + class: ScsStudentgroup, + comment: '学生分组', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + Name: p.string().name('Name').nullable().comment('模板名称'), + TotalStudent: p.integer().name('TotalStudent').comment('学生人数'), + Enabled: p.array().name('Enabled').comment('启用'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + TeacherId: p.bigint().name('TeacherId').comment('管理教师Id').defaultRaw(`0`).index('idx_SCS_StudentGroup_01'), + Type: p.integer().name('Type').comment('0:普通分组 1:辅导班分组'), + }, +}); diff --git a/node_api/src/entities/ScsStudentgroupdetail.ts b/node_api/src/entities/ScsStudentgroupdetail.ts new file mode 100644 index 0000000..118f3e7 --- /dev/null +++ b/node_api/src/entities/ScsStudentgroupdetail.ts @@ -0,0 +1,30 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class ScsStudentgroupdetail { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + StudentGroupId!: bigint; + StudentId!: bigint; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const ScsStudentgroupdetailSchema = defineEntity({ + class: ScsStudentgroupdetail, + comment: '学生分组详情', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + StudentGroupId: p.bigint().name('StudentGroupId').comment('模板id').index('idx_SCS_StudentGroupDetail_01'), + StudentId: p.bigint().name('StudentId').comment('学生Id'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/ScsStudentparent.ts b/node_api/src/entities/ScsStudentparent.ts new file mode 100644 index 0000000..c7cf318 --- /dev/null +++ b/node_api/src/entities/ScsStudentparent.ts @@ -0,0 +1,31 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class ScsStudentparent { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + ParentId!: bigint; + StudentId!: bigint; + Default!: unknown; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const ScsStudentparentSchema = defineEntity({ + class: ScsStudentparent, + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + ParentId: p.bigint().name('ParentId').comment('家长id'), + StudentId: p.bigint().name('StudentId').comment('学生id'), + Default: p.array().name('Default').comment('默认'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/ScsSubject.ts b/node_api/src/entities/ScsSubject.ts new file mode 100644 index 0000000..619a727 --- /dev/null +++ b/node_api/src/entities/ScsSubject.ts @@ -0,0 +1,34 @@ +import { type Opt, PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class ScsSubject { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + Code?: string; + Name?: string; + ShortName?: string; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; + Type: number & Opt = 1; +} + +export const ScsSubjectSchema = defineEntity({ + class: ScsSubject, + comment: '学科', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + Code: p.string().name('Code').nullable().comment('学科编码'), + Name: p.string().name('Name').nullable().comment('学科名称(来源字典)'), + ShortName: p.string().name('ShortName').nullable().comment('学科简称(来源字典)'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + Type: p.integer().name('Type').comment('学科类型'), + }, +}); diff --git a/node_api/src/entities/ScsTeacherclass.ts b/node_api/src/entities/ScsTeacherclass.ts new file mode 100644 index 0000000..b861fa9 --- /dev/null +++ b/node_api/src/entities/ScsTeacherclass.ts @@ -0,0 +1,36 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class ScsTeacherclass { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + ClassId!: bigint; + SchoolId!: bigint; + GradeId!: bigint; + SubjectId!: bigint; + TeacherId!: bigint; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const ScsTeacherclassSchema = defineEntity({ + class: ScsTeacherclass, + comment: '教师班级关系', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + ClassId: p.bigint().name('ClassId').comment('班级id'), + SchoolId: p.bigint().name('SchoolId').comment('学校id'), + GradeId: p.bigint().name('GradeId').comment('届id'), + SubjectId: p.bigint().name('SubjectId').comment('科目id'), + TeacherId: p.bigint().name('TeacherId').comment('教师id'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/ScsTeacherinfo.ts b/node_api/src/entities/ScsTeacherinfo.ts new file mode 100644 index 0000000..56d783c --- /dev/null +++ b/node_api/src/entities/ScsTeacherinfo.ts @@ -0,0 +1,36 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class ScsTeacherinfo { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + TeacherId!: bigint; + TeacherName?: string; + TeacherLevel!: number; + Tag?: string; + Profile?: unknown; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const ScsTeacherinfoSchema = defineEntity({ + class: ScsTeacherinfo, + comment: '教师信息', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + TeacherId: p.bigint().name('TeacherId').comment('教师id').unique('idx_SCS_TeacherInfo_01'), + TeacherName: p.string().name('TeacherName').nullable().comment('教师姓名'), + TeacherLevel: p.integer().name('TeacherLevel').comment('名师级别'), + Tag: p.string().name('Tag').nullable().comment('教师标签'), + Profile: p.array().name('Profile').length(16777215).nullable().comment('教师简介'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/ScsTeacherstudentinfo.ts b/node_api/src/entities/ScsTeacherstudentinfo.ts new file mode 100644 index 0000000..1cdaa91 --- /dev/null +++ b/node_api/src/entities/ScsTeacherstudentinfo.ts @@ -0,0 +1,30 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class ScsTeacherstudentinfo { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + TeacherId!: bigint; + StudentId!: bigint; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const ScsTeacherstudentinfoSchema = defineEntity({ + class: ScsTeacherstudentinfo, + comment: '师生关系表', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + TeacherId: p.bigint().name('TeacherId').comment('教师id'), + StudentId: p.bigint().name('StudentId').comment('学生id'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/ScsUser.ts b/node_api/src/entities/ScsUser.ts new file mode 100644 index 0000000..ef9d58b --- /dev/null +++ b/node_api/src/entities/ScsUser.ts @@ -0,0 +1,57 @@ +import { type Opt, PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class ScsUser { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + RoleType!: number; + No?: string; + SchoolUserNo?: string; + Name?: string; + Pwd?: string; + Avatar?: string; + Sex!: number; + Phone?: string; + Photo?: string; + Motto?: string; + Remark?: string; + Enabled!: unknown; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; + DotMatrixOnlineStatus: number & Opt = 0; + DotMatrixOnlineTime?: Date; + LastLoginTime?: Date; + ExpireTime!: Date & Opt; +} + +export const ScsUserSchema = defineEntity({ + class: ScsUser, + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + RoleType: p.integer().name('RoleType').comment('角色(学生 普通教师 名师)'), + No: p.string().name('No').length(30).nullable().comment('编号').unique('idx_SCS_User_02'), + SchoolUserNo: p.string().name('SchoolUserNo').nullable().comment('学校内的的工号(学号)'), + Name: p.string().name('Name').length(30).nullable().comment('用户名').index('idx_SCS_User_03'), + Pwd: p.string().name('Pwd').length(20).nullable().comment('用户密码'), + Avatar: p.string().name('Avatar').length(500).nullable().comment('头像'), + Sex: p.integer().name('Sex').comment('性别'), + Phone: p.string().name('Phone').length(20).nullable().comment('电话').index('idx_SCS_User_01'), + Photo: p.string().name('Photo').nullable().comment('照片'), + Motto: p.string().name('Motto').length(100).nullable().comment('座右铭'), + Remark: p.string().name('Remark').length(2000).nullable().comment('备注'), + Enabled: p.array().name('Enabled').comment('启用'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + DotMatrixOnlineStatus: p.integer().name('DotMatrixOnlineStatus').comment('点阵在线状态'), + DotMatrixOnlineTime: p.datetime().name('DotMatrixOnlineTime').length(3).nullable().comment('点阵在线时间'), + LastLoginTime: p.datetime().name('LastLoginTime').length(3).nullable().comment('最后登录时间'), + ExpireTime: p.datetime().name('ExpireTime').length(3).comment('账号过期时间').defaultRaw(`9999-12-31 23:59:59.999`), + }, +}); diff --git a/node_api/src/entities/ScsUsercenter.ts b/node_api/src/entities/ScsUsercenter.ts new file mode 100644 index 0000000..dccc4ce --- /dev/null +++ b/node_api/src/entities/ScsUsercenter.ts @@ -0,0 +1,38 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class ScsUsercenter { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + UserId!: bigint; + DownCount!: number; + ContributionCount!: number; + UploadCount!: number; + PassCount!: number; + FailCount!: number; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const ScsUsercenterSchema = defineEntity({ + class: ScsUsercenter, + comment: '个人中心', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + UserId: p.bigint().name('UserId').comment('用户id'), + DownCount: p.integer().name('DownCount').comment('下载量'), + ContributionCount: p.integer().name('ContributionCount').comment('贡献值'), + UploadCount: p.integer().name('UploadCount').comment('上传量'), + PassCount: p.integer().name('PassCount').comment('通过量'), + FailCount: p.integer().name('FailCount').comment('驳回量'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/ScsUsercollect.ts b/node_api/src/entities/ScsUsercollect.ts new file mode 100644 index 0000000..a660b52 --- /dev/null +++ b/node_api/src/entities/ScsUsercollect.ts @@ -0,0 +1,32 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class ScsUsercollect { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + UserId!: bigint; + CollectType!: number; + FCId!: bigint; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const ScsUsercollectSchema = defineEntity({ + class: ScsUsercollect, + comment: '用户收藏', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + UserId: p.bigint().name('UserId').comment('用户id'), + CollectType: p.integer().name('CollectType').comment('收藏类型'), + FCId: p.bigint().name('FCId').comment('文件或课程id'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/ScsUsercourserecord.ts b/node_api/src/entities/ScsUsercourserecord.ts new file mode 100644 index 0000000..8d77d12 --- /dev/null +++ b/node_api/src/entities/ScsUsercourserecord.ts @@ -0,0 +1,34 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class ScsUsercourserecord { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + UserId!: bigint; + CourseId!: bigint; + ViewTime!: number; + ViewTotal!: number; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const ScsUsercourserecordSchema = defineEntity({ + class: ScsUsercourserecord, + comment: '课程观看记录', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + UserId: p.bigint().name('UserId').comment('用户id'), + CourseId: p.bigint().name('CourseId').comment('课程id'), + ViewTime: p.integer().name('ViewTime').comment('观看时间'), + ViewTotal: p.integer().name('ViewTotal').comment('观看次数'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/ScsUsermessage.ts b/node_api/src/entities/ScsUsermessage.ts new file mode 100644 index 0000000..8b80a70 --- /dev/null +++ b/node_api/src/entities/ScsUsermessage.ts @@ -0,0 +1,36 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class ScsUsermessage { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + UserId!: bigint; + Title?: string; + IsRead!: number; + ReadTime!: Date; + IsImportant!: number; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const ScsUsermessageSchema = defineEntity({ + class: ScsUsermessage, + comment: '用户消息表', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + UserId: p.bigint().name('UserId').comment('用户id'), + Title: p.string().name('Title').nullable().comment('消息'), + IsRead: p.integer().name('IsRead').comment('是否已读'), + ReadTime: p.datetime().name('ReadTime').length(3).comment('已读时间'), + IsImportant: p.integer().name('IsImportant').comment('是否重要'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/ScsUsernopool.ts b/node_api/src/entities/ScsUsernopool.ts new file mode 100644 index 0000000..d182a4c --- /dev/null +++ b/node_api/src/entities/ScsUsernopool.ts @@ -0,0 +1,28 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class ScsUsernopool { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + CurrentNumber!: number; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const ScsUsernopoolSchema = defineEntity({ + class: ScsUsernopool, + comment: '用户编码池', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + CurrentNumber: p.integer().name('CurrentNumber').comment('当前数字'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/ScsUserwechat.ts b/node_api/src/entities/ScsUserwechat.ts new file mode 100644 index 0000000..184729d --- /dev/null +++ b/node_api/src/entities/ScsUserwechat.ts @@ -0,0 +1,34 @@ +import { PrimaryKeyProp, defineEntity, p } from '@mikro-orm/core'; + +export class ScsUserwechat { + [PrimaryKeyProp]?: 'Id'; + Id!: bigint; + UserId?: bigint; + UnionId?: string; + MpOpenId?: string; + ServiceOpenId?: string; + Revision!: number; + CreatedBy?: bigint; + CreatedTime!: Date; + UpdatedBy?: bigint; + UpdatedTime?: Date; + IsDeleted!: unknown; +} + +export const ScsUserwechatSchema = defineEntity({ + class: ScsUserwechat, + comment: '用户微信信息表', + properties: { + Id: p.bigint().primary().name('Id').unsigned(false).autoincrement(false).comment('主键Id'), + UserId: p.bigint().name('UserId').nullable().comment('用Id'), + UnionId: p.string().name('UnionId').nullable().comment('UnionId'), + MpOpenId: p.string().name('MpOpenId').nullable().comment('小程序OpenId'), + ServiceOpenId: p.string().name('ServiceOpenId').nullable().comment('服务号OpenId'), + Revision: p.integer().name('Revision').comment('乐观锁'), + CreatedBy: p.bigint().name('CreatedBy').nullable().comment('创建者用户Id'), + CreatedTime: p.datetime().name('CreatedTime').length(3).comment('创建时间'), + UpdatedBy: p.bigint().name('UpdatedBy').nullable().comment('修改者用户Id'), + UpdatedTime: p.datetime().name('UpdatedTime').length(3).nullable().comment('修改时间'), + IsDeleted: p.array().name('IsDeleted').comment('是否删除'), + }, +}); diff --git a/node_api/src/entities/mikro-orm.config.ts b/node_api/src/entities/mikro-orm.config.ts new file mode 100644 index 0000000..aa67510 --- /dev/null +++ b/node_api/src/entities/mikro-orm.config.ts @@ -0,0 +1,19 @@ +import { defineConfig } from '@mikro-orm/mysql'; +import { EntityGenerator } from '@mikro-orm/entity-generator'; +import dotenv from 'dotenv'; + +dotenv.config(); + +export default defineConfig({ + dbName: process.env.DB_NAME || 'scs', + user: process.env.DB_USER || 'user', + password: process.env.DB_PASSWORD || '', + host: process.env.DB_HOST || 'localhost', + port: Number(process.env.DB_PORT) || 3306, + charset: 'utf8mb4', + multipleStatements: true, + // 生成实体时使用 + entities: ['dist/**/*.entity.js'], + entitiesTs: ['src/**/*.entity.ts'], + extensions: [EntityGenerator], +}); diff --git a/node_api/src/modules/meeting/entities/meeting-user.entity.ts b/node_api/src/modules/meeting/entities/meeting-user.entity.ts deleted file mode 100644 index 4a99a56..0000000 --- a/node_api/src/modules/meeting/entities/meeting-user.entity.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Entity, PrimaryKey, Property, Unique } from '@mikro-orm/decorators/legacy'; - -@Entity({ tableName: 'meeting_user' }) -export class MeetingUser { - @PrimaryKey({ type: 'number' }) - public id!: number; - - @Unique() - @Property({ type: 'bigint', fieldName: 'long_user_Id' }) - public longUserId!: number; - - @Property({ type: 'date' }) - public createdAt: Date = new Date(); -}