From 84099dfc5866a90e65af7defe7d9aab29a1c1d66 Mon Sep 17 00:00:00 2001 From: 2991692032 Date: Thu, 29 May 2025 11:27:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=96=E9=94=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/sqldialects.xml | 3 + unilife-frontend/package-lock.json | 1585 ++++++++++++++++- unilife-frontend/package.json | 1 + unilife-frontend/src/App.vue | 27 +- unilife-frontend/src/router/index.ts | 6 + unilife-frontend/src/views/HomeView.vue | 33 +- .../src/views/forum/ForumView.vue | 1 + .../src/views/resources/ResourcesView.vue | 113 +- .../src/views/schedule/ScheduleView.vue | 863 +-------- .../src/views/schedule/TaskView.vue | 1192 +++++++++++++ unilife-server/pom.xml | 13 + .../java/com/unilife/config/AiConfig.java | 20 + .../com/unilife/controller/AiController.java | 27 + .../java/com/unilife/mapper/UserMapper.java | 42 + .../unilife/model/dto/CreateScheduleDTO.java | 2 +- .../com/unilife/model/entity/Schedule.java | 2 +- .../java/com/unilife/model/vo/ScheduleVO.java | 2 +- .../java/com/unilife/service/UserService.java | 8 + .../unilife/service/impl/UserServiceImpl.java | 97 +- .../src/main/resources/application.yml | 15 +- unilife-server/src/main/resources/db/init.sql | 31 +- .../main/resources/db/rebuild-database.sql | 386 ++++ .../src/main/resources/db/test-data.sql | 217 ++- .../src/main/resources/mappers/UserMapper.xml | 53 + 问题修复和stagewise集成说明.md | 123 ++ 25 files changed, 3887 insertions(+), 975 deletions(-) create mode 100644 unilife-frontend/src/views/schedule/TaskView.vue create mode 100644 unilife-server/src/main/java/com/unilife/config/AiConfig.java create mode 100644 unilife-server/src/main/java/com/unilife/controller/AiController.java create mode 100644 unilife-server/src/main/resources/db/rebuild-database.sql create mode 100644 问题修复和stagewise集成说明.md diff --git a/.idea/sqldialects.xml b/.idea/sqldialects.xml index a2ea274..d035e16 100644 --- a/.idea/sqldialects.xml +++ b/.idea/sqldialects.xml @@ -1,6 +1,9 @@ + + + \ No newline at end of file diff --git a/unilife-frontend/package-lock.json b/unilife-frontend/package-lock.json index 9d53dfe..79bc1a8 100644 --- a/unilife-frontend/package-lock.json +++ b/unilife-frontend/package-lock.json @@ -17,6 +17,7 @@ "vue-router": "^4.5.1" }, "devDependencies": { + "@stagewise/toolbar-vue": "^0.1.2", "@tsconfig/node22": "^22.0.1", "@types/node": "^22.15.22", "@vitejs/plugin-vue": "^5.2.3", @@ -1181,12 +1182,63 @@ "@floating-ui/utils": "^0.2.9" } }, + "node_modules/@floating-ui/react": { + "version": "0.26.28", + "resolved": "https://registry.npmmirror.com/@floating-ui/react/-/react-0.26.28.tgz", + "integrity": "sha512-yORQuuAtVpiRjpMhdc0wJj06b9JFjrYF4qp96j++v2NBpbi6SEGF7donUJ3TMieerQ6qVkAv1tgr7L4r5roTqw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@floating-ui/react-dom": "^2.1.2", + "@floating-ui/utils": "^0.2.8", + "tabbable": "^6.0.0" + }, + "peerDependencies": { + "react": ">=16.8.0", + "react-dom": ">=16.8.0" + } + }, + "node_modules/@floating-ui/react-dom": { + "version": "2.1.2", + "resolved": "https://registry.npmmirror.com/@floating-ui/react-dom/-/react-dom-2.1.2.tgz", + "integrity": "sha512-06okr5cgPzMNBy+Ycse2A6udMi4bqwW/zgBF/rwjcNqWkyr82Mcg8b0vjX8OJpZFy/FKjJmw6wV7t44kK6kW7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@floating-ui/dom": "^1.0.0" + }, + "peerDependencies": { + "react": ">=16.8.0", + "react-dom": ">=16.8.0" + } + }, "node_modules/@floating-ui/utils": { "version": "0.2.9", "resolved": "https://registry.npmmirror.com/@floating-ui/utils/-/utils-0.2.9.tgz", "integrity": "sha512-MDWhGtE+eHw5JW7lq4qhc5yRLS11ERl1c7Z6Xd0a58DozHES6EnNNwUWbMiG4J9Cgj053Bhk8zvlhFYKVhULwg==", "license": "MIT" }, + "node_modules/@headlessui/react": { + "version": "2.2.2", + "resolved": "https://registry.npmmirror.com/@headlessui/react/-/react-2.2.2.tgz", + "integrity": "sha512-zbniWOYBQ8GHSUIOPY7BbdIn6PzUOq0z41RFrF30HbjsxG6Rrfk+6QulR8Kgf2Vwj2a/rE6i62q5vo+2gI5dJA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@floating-ui/react": "^0.26.16", + "@react-aria/focus": "^3.17.1", + "@react-aria/interactions": "^3.21.3", + "@tanstack/react-virtual": "^3.13.6", + "use-sync-external-store": "^1.5.0" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "react": "^18 || ^19 || ^19.0.0-rc", + "react-dom": "^18 || ^19 || ^19.0.0-rc" + } + }, "node_modules/@humanfs/core": { "version": "0.19.1", "resolved": "https://registry.npmmirror.com/@humanfs/core/-/core-0.19.1.tgz", @@ -1253,6 +1305,24 @@ "url": "https://github.com/sponsors/nzakas" } }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmmirror.com/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.8", "resolved": "https://registry.npmmirror.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz", @@ -1343,6 +1413,17 @@ "node": ">= 8" } }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmmirror.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=14" + } + }, "node_modules/@pkgr/core": { "version": "0.2.4", "resolved": "https://registry.npmmirror.com/@pkgr/core/-/core-0.2.4.tgz", @@ -1374,6 +1455,120 @@ "url": "https://opencollective.com/popperjs" } }, + "node_modules/@preact/compat": { + "version": "18.3.1", + "resolved": "https://registry.npmmirror.com/@preact/compat/-/compat-18.3.1.tgz", + "integrity": "sha512-Kog4PSRxtT4COtOXjsuQPV1vMXpUzREQfv+6Dmcy9/rMk0HOPK0HTE9fspFjAmY8R80T/T8gtgmZ68u5bOSngw==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "preact": "*" + } + }, + "node_modules/@react-aria/focus": { + "version": "3.20.3", + "resolved": "https://registry.npmmirror.com/@react-aria/focus/-/focus-3.20.3.tgz", + "integrity": "sha512-rR5uZUMSY4xLHmpK/I8bP1V6vUNHFo33gTvrvNUsAKKqvMfa7R2nu5A6v97dr5g6tVH6xzpdkPsOJCWh90H2cw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@react-aria/interactions": "^3.25.1", + "@react-aria/utils": "^3.29.0", + "@react-types/shared": "^3.29.1", + "@swc/helpers": "^0.5.0", + "clsx": "^2.0.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1", + "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-aria/interactions": { + "version": "3.25.1", + "resolved": "https://registry.npmmirror.com/@react-aria/interactions/-/interactions-3.25.1.tgz", + "integrity": "sha512-ntLrlgqkmZupbbjekz3fE/n3eQH2vhncx8gUp0+N+GttKWevx7jos11JUBjnJwb1RSOPgRUFcrluOqBp0VgcfQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@react-aria/ssr": "^3.9.8", + "@react-aria/utils": "^3.29.0", + "@react-stately/flags": "^3.1.1", + "@react-types/shared": "^3.29.1", + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1", + "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-aria/ssr": { + "version": "3.9.8", + "resolved": "https://registry.npmmirror.com/@react-aria/ssr/-/ssr-3.9.8.tgz", + "integrity": "sha512-lQDE/c9uTfBSDOjaZUJS8xP2jCKVk4zjQeIlCH90xaLhHDgbpCdns3xvFpJJujfj3nI4Ll9K7A+ONUBDCASOuw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@swc/helpers": "^0.5.0" + }, + "engines": { + "node": ">= 12" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-aria/utils": { + "version": "3.29.0", + "resolved": "https://registry.npmmirror.com/@react-aria/utils/-/utils-3.29.0.tgz", + "integrity": "sha512-jSOrZimCuT1iKNVlhjIxDkAhgF7HSp3pqyT6qjg/ZoA0wfqCi/okmrMPiWSAKBnkgX93N8GYTLT3CIEO6WZe9Q==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@react-aria/ssr": "^3.9.8", + "@react-stately/flags": "^3.1.1", + "@react-stately/utils": "^3.10.6", + "@react-types/shared": "^3.29.1", + "@swc/helpers": "^0.5.0", + "clsx": "^2.0.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1", + "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-stately/flags": { + "version": "3.1.1", + "resolved": "https://registry.npmmirror.com/@react-stately/flags/-/flags-3.1.1.tgz", + "integrity": "sha512-XPR5gi5LfrPdhxZzdIlJDz/B5cBf63l4q6/AzNqVWFKgd0QqY5LvWJftXkklaIUpKSJkIKQb8dphuZXDtkWNqg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@swc/helpers": "^0.5.0" + } + }, + "node_modules/@react-stately/utils": { + "version": "3.10.6", + "resolved": "https://registry.npmmirror.com/@react-stately/utils/-/utils-3.10.6.tgz", + "integrity": "sha512-O76ip4InfTTzAJrg8OaZxKU4vvjMDOpfA/PGNOytiXwBbkct2ZeZwaimJ8Bt9W1bj5VsZ81/o/tW4BacbdDOMA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@swc/helpers": "^0.5.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, + "node_modules/@react-types/shared": { + "version": "3.29.1", + "resolved": "https://registry.npmmirror.com/@react-types/shared/-/shared-3.29.1.tgz", + "integrity": "sha512-KtM+cDf2CXoUX439rfEhbnEdAgFZX20UP2A35ypNIawR7/PFFPjQDWyA2EnClCcW/dLWJDEPX2U8+EJff8xqmQ==", + "dev": true, + "license": "Apache-2.0", + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" + } + }, "node_modules/@rollup/pluginutils": { "version": "5.1.4", "resolved": "https://registry.npmmirror.com/@rollup/pluginutils/-/pluginutils-5.1.4.tgz", @@ -1710,6 +1905,83 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/@stagewise/toolbar": { + "version": "0.2.1", + "resolved": "https://registry.npmmirror.com/@stagewise/toolbar/-/toolbar-0.2.1.tgz", + "integrity": "sha512-ITA68sqtXRklV6TDDyhT+3GDQqdtZFcZY9WBdPv6XUoATBHcOjpblt0yvQoOuMXAohbBGky4qgbDqxYgLsYbGQ==", + "dev": true, + "license": "AGPL-3.0-only", + "dependencies": { + "@headlessui/react": "2.2.2", + "@preact/compat": "18.3.1", + "clsx": "^2.1.1", + "javascript-time-ago": "^2.5.11", + "lucide-react": "^0.503.0", + "postcss-prefix-selector": "^2.1.1", + "preact": "^10.26.6", + "react-remove-scroll": "^2.6.3", + "superjson": "^2.2.2", + "tailwind-merge": "^3.2.0", + "tailwindcss": "^4.1.5", + "tsup": "^8.4.0", + "ua-parser-js": "^2.0.3", + "vite-plugin-css-injected-by-js": "^3.5.2", + "zod": "^3.24.4", + "zustand": "^5.0.4" + } + }, + "node_modules/@stagewise/toolbar-vue": { + "version": "0.1.2", + "resolved": "https://registry.npmmirror.com/@stagewise/toolbar-vue/-/toolbar-vue-0.1.2.tgz", + "integrity": "sha512-2SHaaTUZxZE9HSnzKObNAyJctmbqSjNwh9vls7UIkW2j8ooxnYuOgn/c+SK53eUT8HQYBZNnEoXVjEqmdK5BOg==", + "dev": true, + "license": "AGPL-3.0-only", + "dependencies": { + "@stagewise/toolbar": "0.2.1" + }, + "peerDependencies": { + "vue": ">=3.0.0" + } + }, + "node_modules/@swc/helpers": { + "version": "0.5.17", + "resolved": "https://registry.npmmirror.com/@swc/helpers/-/helpers-0.5.17.tgz", + "integrity": "sha512-5IKx/Y13RsYd+sauPb2x+U/xZikHjolzfuDgTAl/Tdf3Q8rslRvC19NKDLgAJQ6wsqADk10ntlv08nPFw/gO/A==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.8.0" + } + }, + "node_modules/@tanstack/react-virtual": { + "version": "3.13.9", + "resolved": "https://registry.npmmirror.com/@tanstack/react-virtual/-/react-virtual-3.13.9.tgz", + "integrity": "sha512-SPWC8kwG/dWBf7Py7cfheAPOxuvIv4fFQ54PdmYbg7CpXfsKxkucak43Q0qKsxVthhUJQ1A7CIMAIplq4BjVwA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@tanstack/virtual-core": "3.13.9" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" + } + }, + "node_modules/@tanstack/virtual-core": { + "version": "3.13.9", + "resolved": "https://registry.npmmirror.com/@tanstack/virtual-core/-/virtual-core-3.13.9.tgz", + "integrity": "sha512-3jztt0jpaoJO5TARe2WIHC1UQC3VMLAFUW5mmMo0yrkwtDB2AQP0+sh10BVUpWrnvHjSLvzFizydtEGLCJKFoQ==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/tannerlinsley" + } + }, "node_modules/@tsconfig/node22": { "version": "22.0.2", "resolved": "https://registry.npmmirror.com/@tsconfig/node22/-/node22-22.0.2.tgz", @@ -1756,6 +2028,17 @@ "undici-types": "~6.21.0" } }, + "node_modules/@types/node-fetch": { + "version": "2.6.12", + "resolved": "https://registry.npmmirror.com/@types/node-fetch/-/node-fetch-2.6.12.tgz", + "integrity": "sha512-8nneRWKCg3rMtF69nLQJnOYUcbafYeFSjqkw3jCRLsqkWFlHaoQrr5mXmofFGOx3DKn7UfmBMyov8ySvLRVldA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "form-data": "^4.0.0" + } + }, "node_modules/@types/web-bluetooth": { "version": "0.0.16", "resolved": "https://registry.npmmirror.com/@types/web-bluetooth/-/web-bluetooth-0.0.16.tgz", @@ -2500,6 +2783,19 @@ "dev": true, "license": "MIT" }, + "node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, "node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -2516,6 +2812,13 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/any-promise": { + "version": "1.3.0", + "resolved": "https://registry.npmmirror.com/any-promise/-/any-promise-1.3.0.tgz", + "integrity": "sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==", + "dev": true, + "license": "MIT" + }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmmirror.com/argparse/-/argparse-2.0.1.tgz", @@ -2641,6 +2944,32 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/bundle-require": { + "version": "5.1.0", + "resolved": "https://registry.npmmirror.com/bundle-require/-/bundle-require-5.1.0.tgz", + "integrity": "sha512-3WrrOuZiyaaZPWiEt4G3+IffISVC9HYlWueJEBWED4ZH4aIAC2PnkdnuRrR94M+w6yGWn4AglWtJtBI8YqvgoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "load-tsconfig": "^0.2.3" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "peerDependencies": { + "esbuild": ">=0.18" + } + }, + "node_modules/cac": { + "version": "6.7.14", + "resolved": "https://registry.npmmirror.com/cac/-/cac-6.7.14.tgz", + "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/call-bind-apply-helpers": { "version": "1.0.2", "resolved": "https://registry.npmmirror.com/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", @@ -2702,6 +3031,32 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, + "node_modules/chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmmirror.com/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/clsx": { + "version": "2.1.1", + "resolved": "https://registry.npmmirror.com/clsx/-/clsx-2.1.1.tgz", + "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", @@ -2734,6 +3089,16 @@ "node": ">= 0.8" } }, + "node_modules/commander": { + "version": "4.1.1", + "resolved": "https://registry.npmmirror.com/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmmirror.com/concat-map/-/concat-map-0.0.1.tgz", @@ -2741,6 +3106,23 @@ "dev": true, "license": "MIT" }, + "node_modules/confbox": { + "version": "0.1.8", + "resolved": "https://registry.npmmirror.com/confbox/-/confbox-0.1.8.tgz", + "integrity": "sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==", + "dev": true, + "license": "MIT" + }, + "node_modules/consola": { + "version": "3.4.2", + "resolved": "https://registry.npmmirror.com/consola/-/consola-3.4.2.tgz", + "integrity": "sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.18.0 || >=16.10.0" + } + }, "node_modules/convert-source-map": { "version": "2.0.0", "resolved": "https://registry.npmmirror.com/convert-source-map/-/convert-source-map-2.0.0.tgz", @@ -2887,6 +3269,34 @@ "node": ">=0.4.0" } }, + "node_modules/detect-europe-js": { + "version": "0.1.2", + "resolved": "https://registry.npmmirror.com/detect-europe-js/-/detect-europe-js-0.1.2.tgz", + "integrity": "sha512-lgdERlL3u0aUdHocoouzT10d9I89VVhk0qNRmll7mXdGfJT1/wqZ2ZLA4oJAjeACPY5fT1wsbq2AT+GkuInsow==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/faisalman" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/ua-parser-js" + }, + { + "type": "paypal", + "url": "https://paypal.me/faisalman" + } + ], + "license": "MIT" + }, + "node_modules/detect-node-es": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/detect-node-es/-/detect-node-es-1.1.0.tgz", + "integrity": "sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ==", + "dev": true, + "license": "MIT" + }, "node_modules/dunder-proto": { "version": "1.0.1", "resolved": "https://registry.npmmirror.com/dunder-proto/-/dunder-proto-1.0.1.tgz", @@ -2901,6 +3311,13 @@ "node": ">= 0.4" } }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmmirror.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true, + "license": "MIT" + }, "node_modules/electron-to-chromium": { "version": "1.5.158", "resolved": "https://registry.npmmirror.com/electron-to-chromium/-/electron-to-chromium-1.5.158.tgz", @@ -2934,6 +3351,13 @@ "vue": "^3.2.0" } }, + "node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true, + "license": "MIT" + }, "node_modules/entities": { "version": "4.5.0", "resolved": "https://registry.npmmirror.com/entities/-/entities-4.5.0.tgz", @@ -3505,6 +3929,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/fix-dts-default-cjs-exports": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/fix-dts-default-cjs-exports/-/fix-dts-default-cjs-exports-1.0.1.tgz", + "integrity": "sha512-pVIECanWFC61Hzl2+oOCtoJ3F17kglZC/6N94eRWycFgBH35hHx0Li604ZIzhseh97mf2p0cv7vVrOZGoqhlEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "magic-string": "^0.30.17", + "mlly": "^1.7.4", + "rollup": "^4.34.8" + } + }, "node_modules/flat-cache": { "version": "4.0.1", "resolved": "https://registry.npmmirror.com/flat-cache/-/flat-cache-4.0.1.tgz", @@ -3546,6 +3982,23 @@ } } }, + "node_modules/foreground-child": { + "version": "3.3.1", + "resolved": "https://registry.npmmirror.com/foreground-child/-/foreground-child-3.3.1.tgz", + "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", + "dev": true, + "license": "ISC", + "dependencies": { + "cross-spawn": "^7.0.6", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/form-data": { "version": "4.0.2", "resolved": "https://registry.npmmirror.com/form-data/-/form-data-4.0.2.tgz", @@ -3634,6 +4087,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/get-nonce": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/get-nonce/-/get-nonce-1.0.1.tgz", + "integrity": "sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/get-proto": { "version": "1.0.1", "resolved": "https://registry.npmmirror.com/get-proto/-/get-proto-1.0.1.tgz", @@ -3664,6 +4127,27 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmmirror.com/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "dev": true, + "license": "ISC", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/glob-parent": { "version": "6.0.2", "resolved": "https://registry.npmmirror.com/glob-parent/-/glob-parent-6.0.2.tgz", @@ -3854,13 +4338,23 @@ "node": ">=0.10.0" } }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmmirror.com/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, "license": "MIT", - "dependencies": { + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmmirror.com/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { "is-extglob": "^2.1.1" }, "engines": { @@ -3909,6 +4403,27 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-standalone-pwa": { + "version": "0.1.1", + "resolved": "https://registry.npmmirror.com/is-standalone-pwa/-/is-standalone-pwa-0.1.1.tgz", + "integrity": "sha512-9Cbovsa52vNQCjdXOzeQq5CnCbAcRk05aU62K20WO372NrTv0NxibLFCK6lQ4/iZEFdEA3p3t2VNOn8AJ53F5g==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/faisalman" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/ua-parser-js" + }, + { + "type": "paypal", + "url": "https://paypal.me/faisalman" + } + ], + "license": "MIT" + }, "node_modules/is-stream": { "version": "4.0.1", "resolved": "https://registry.npmmirror.com/is-stream/-/is-stream-4.0.1.tgz", @@ -3970,6 +4485,32 @@ "dev": true, "license": "ISC" }, + "node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmmirror.com/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/javascript-time-ago": { + "version": "2.5.11", + "resolved": "https://registry.npmmirror.com/javascript-time-ago/-/javascript-time-ago-2.5.11.tgz", + "integrity": "sha512-Zeyf5R7oM1fSMW9zsU3YgAYwE0bimEeF54Udn2ixGd8PUwu+z1Yc5t4Y8YScJDMHD6uCx6giLt3VJR5K4CMwbg==", + "dev": true, + "license": "MIT", + "dependencies": { + "relative-time-format": "^1.1.6" + } + }, "node_modules/jiti": { "version": "2.4.2", "resolved": "https://registry.npmmirror.com/jiti/-/jiti-2.4.2.tgz", @@ -3980,6 +4521,16 @@ "jiti": "lib/jiti-cli.mjs" } }, + "node_modules/joycon": { + "version": "3.1.1", + "resolved": "https://registry.npmmirror.com/joycon/-/joycon-3.1.1.tgz", + "integrity": "sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmmirror.com/js-tokens/-/js-tokens-4.0.0.tgz", @@ -4101,6 +4652,36 @@ "node": ">= 0.8.0" } }, + "node_modules/lilconfig": { + "version": "3.1.3", + "resolved": "https://registry.npmmirror.com/lilconfig/-/lilconfig-3.1.3.tgz", + "integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antonk52" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmmirror.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true, + "license": "MIT" + }, + "node_modules/load-tsconfig": { + "version": "0.2.5", + "resolved": "https://registry.npmmirror.com/load-tsconfig/-/load-tsconfig-0.2.5.tgz", + "integrity": "sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + }, "node_modules/locate-path": { "version": "6.0.0", "resolved": "https://registry.npmmirror.com/locate-path/-/locate-path-6.0.0.tgz", @@ -4147,6 +4728,13 @@ "dev": true, "license": "MIT" }, + "node_modules/lodash.sortby": { + "version": "4.7.0", + "resolved": "https://registry.npmmirror.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz", + "integrity": "sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==", + "dev": true, + "license": "MIT" + }, "node_modules/lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-5.1.1.tgz", @@ -4157,6 +4745,16 @@ "yallist": "^3.0.2" } }, + "node_modules/lucide-react": { + "version": "0.503.0", + "resolved": "https://registry.npmmirror.com/lucide-react/-/lucide-react-0.503.0.tgz", + "integrity": "sha512-HGGkdlPWQ0vTF8jJ5TdIqhQXZi6uh3LnNgfZ8MHiuxFfX3RZeA79r2MW2tHAZKlAVfoNE8esm3p+O6VkIvpj6w==", + "dev": true, + "license": "ISC", + "peerDependencies": { + "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" + } + }, "node_modules/magic-string": { "version": "0.30.17", "resolved": "https://registry.npmmirror.com/magic-string/-/magic-string-0.30.17.tgz", @@ -4251,12 +4849,35 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmmirror.com/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/mitt": { "version": "3.0.1", "resolved": "https://registry.npmmirror.com/mitt/-/mitt-3.0.1.tgz", "integrity": "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==", "license": "MIT" }, + "node_modules/mlly": { + "version": "1.7.4", + "resolved": "https://registry.npmmirror.com/mlly/-/mlly-1.7.4.tgz", + "integrity": "sha512-qmdSIPC4bDJXgZTCR7XosJiNKySV7O215tsPtDN9iEO/7q/76b/ijtgRu/+epFXSJhijtTCCGp3DWS549P3xKw==", + "dev": true, + "license": "MIT", + "dependencies": { + "acorn": "^8.14.0", + "pathe": "^2.0.1", + "pkg-types": "^1.3.0", + "ufo": "^1.5.4" + } + }, "node_modules/mrmime": { "version": "2.0.1", "resolved": "https://registry.npmmirror.com/mrmime/-/mrmime-2.0.1.tgz", @@ -4281,6 +4902,18 @@ "dev": true, "license": "MIT" }, + "node_modules/mz": { + "version": "2.7.0", + "resolved": "https://registry.npmmirror.com/mz/-/mz-2.7.0.tgz", + "integrity": "sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "any-promise": "^1.0.0", + "object-assign": "^4.0.1", + "thenify-all": "^1.0.0" + } + }, "node_modules/nanoid": { "version": "3.3.11", "resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.11.tgz", @@ -4306,6 +4939,52 @@ "dev": true, "license": "MIT" }, + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmmirror.com/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/node-fetch/node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmmirror.com/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "dev": true, + "license": "MIT" + }, + "node_modules/node-fetch/node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmmirror.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "dev": true, + "license": "BSD-2-Clause" + }, + "node_modules/node-fetch/node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmmirror.com/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dev": true, + "license": "MIT", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, "node_modules/node-releases": { "version": "2.0.19", "resolved": "https://registry.npmmirror.com/node-releases/-/node-releases-2.0.19.tgz", @@ -4438,6 +5117,16 @@ "url": "https://github.com/fb55/nth-check?sponsor=1" } }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmmirror.com/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/open": { "version": "10.1.2", "resolved": "https://registry.npmmirror.com/open/-/open-10.1.2.tgz", @@ -4507,6 +5196,13 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "dev": true, + "license": "BlueOak-1.0.0" + }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmmirror.com/parent-module/-/parent-module-1.0.1.tgz", @@ -4560,6 +5256,30 @@ "node": ">=8" } }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmmirror.com/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true, + "license": "ISC" + }, "node_modules/pathe": { "version": "2.0.3", "resolved": "https://registry.npmmirror.com/pathe/-/pathe-2.0.3.tgz", @@ -4626,6 +5346,28 @@ } } }, + "node_modules/pirates": { + "version": "4.0.7", + "resolved": "https://registry.npmmirror.com/pirates/-/pirates-4.0.7.tgz", + "integrity": "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/pkg-types": { + "version": "1.3.1", + "resolved": "https://registry.npmmirror.com/pkg-types/-/pkg-types-1.3.1.tgz", + "integrity": "sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "confbox": "^0.1.8", + "mlly": "^1.7.4", + "pathe": "^2.0.1" + } + }, "node_modules/postcss": { "version": "8.5.3", "resolved": "https://registry.npmmirror.com/postcss/-/postcss-8.5.3.tgz", @@ -4654,6 +5396,59 @@ "node": "^10 || ^12 || >=14" } }, + "node_modules/postcss-load-config": { + "version": "6.0.1", + "resolved": "https://registry.npmmirror.com/postcss-load-config/-/postcss-load-config-6.0.1.tgz", + "integrity": "sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "lilconfig": "^3.1.1" + }, + "engines": { + "node": ">= 18" + }, + "peerDependencies": { + "jiti": ">=1.21.0", + "postcss": ">=8.0.9", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + }, + "postcss": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/postcss-prefix-selector": { + "version": "2.1.1", + "resolved": "https://registry.npmmirror.com/postcss-prefix-selector/-/postcss-prefix-selector-2.1.1.tgz", + "integrity": "sha512-ZBgf427Et6+XnrnJ9VXtJEKCjJwTvn2wn/qMg+wvvlRhIeFIAxdbrlZZ0CSsWYMJfcyPLBh8ogj5O1kb/Mcx3g==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "postcss": "^8.0.0" + } + }, "node_modules/postcss-selector-parser": { "version": "6.1.2", "resolved": "https://registry.npmmirror.com/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz", @@ -4668,6 +5463,17 @@ "node": ">=4" } }, + "node_modules/preact": { + "version": "10.26.7", + "resolved": "https://registry.npmmirror.com/preact/-/preact-10.26.7.tgz", + "integrity": "sha512-43xS+QYc1X1IPbw03faSgY6I6OYWcLrJRv3hU0+qMOfh/XCHcP0MX2CVjNARYR2cC/guu975sta4OcjlczxD7g==", + "dev": true, + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/preact" + } + }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmmirror.com/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -4760,61 +5566,179 @@ ], "license": "MIT" }, - "node_modules/read-package-json-fast": { - "version": "4.0.0", - "resolved": "https://registry.npmmirror.com/read-package-json-fast/-/read-package-json-fast-4.0.0.tgz", - "integrity": "sha512-qpt8EwugBWDw2cgE2W+/3oxC+KTez2uSVR8JU9Q36TXPAGCaozfQUs59v4j4GFpWTaw0i6hAZSvOmu1J0uOEUg==", + "node_modules/react": { + "version": "19.1.0", + "resolved": "https://registry.npmmirror.com/react/-/react-19.1.0.tgz", + "integrity": "sha512-FS+XFBNvn3GTAWq26joslQgWNoFu08F4kl0J4CgdNKADkdSGXQyTCnKteIAJy96Br6YbpEU1LSzV5dYtjMkMDg==", "dev": true, - "license": "ISC", + "license": "MIT", + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "19.1.0", + "resolved": "https://registry.npmmirror.com/react-dom/-/react-dom-19.1.0.tgz", + "integrity": "sha512-Xs1hdnE+DyKgeHJeJznQmYMIBG3TKIHJJT95Q58nHLSrElKlGQqDTR2HQ9fx5CN/Gk6Vh/kupBTDLU11/nDk/g==", + "dev": true, + "license": "MIT", + "peer": true, "dependencies": { - "json-parse-even-better-errors": "^4.0.0", - "npm-normalize-package-bin": "^4.0.0" + "scheduler": "^0.26.0" }, - "engines": { - "node": "^18.17.0 || >=20.5.0" + "peerDependencies": { + "react": "^19.1.0" } }, - "node_modules/resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmmirror.com/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "node_modules/react-remove-scroll": { + "version": "2.7.0", + "resolved": "https://registry.npmmirror.com/react-remove-scroll/-/react-remove-scroll-2.7.0.tgz", + "integrity": "sha512-sGsQtcjMqdQyijAHytfGEELB8FufGbfXIsvUTe+NLx1GDRJCXtCFLBLUI1eyZCKXXvbEU2C6gai0PZKoIE9Vbg==", "dev": true, "license": "MIT", + "dependencies": { + "react-remove-scroll-bar": "^2.3.7", + "react-style-singleton": "^2.2.3", + "tslib": "^2.1.0", + "use-callback-ref": "^1.3.3", + "use-sidecar": "^1.1.3" + }, "engines": { - "node": ">=4" + "node": ">=10" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } } }, - "node_modules/reusify": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/reusify/-/reusify-1.1.0.tgz", - "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", + "node_modules/react-remove-scroll-bar": { + "version": "2.3.8", + "resolved": "https://registry.npmmirror.com/react-remove-scroll-bar/-/react-remove-scroll-bar-2.3.8.tgz", + "integrity": "sha512-9r+yi9+mgU33AKcj6IbT9oRCO78WriSj6t/cF8DWBZJ9aOGPOTEDvdUDz1FwKim7QXWwmHqtdHnRJfhAxEG46Q==", "dev": true, "license": "MIT", + "dependencies": { + "react-style-singleton": "^2.2.2", + "tslib": "^2.0.0" + }, "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" + "node": ">=10" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } } }, - "node_modules/rfdc": { - "version": "1.4.1", - "resolved": "https://registry.npmmirror.com/rfdc/-/rfdc-1.4.1.tgz", - "integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==", - "license": "MIT" - }, - "node_modules/rollup": { - "version": "4.41.1", - "resolved": "https://registry.npmmirror.com/rollup/-/rollup-4.41.1.tgz", - "integrity": "sha512-cPmwD3FnFv8rKMBc1MxWCwVQFxwf1JEmSX3iQXrRVVG15zerAIXRjMFVWnd5Q5QvgKF7Aj+5ykXFhUl+QGnyOw==", + "node_modules/react-style-singleton": { + "version": "2.2.3", + "resolved": "https://registry.npmmirror.com/react-style-singleton/-/react-style-singleton-2.2.3.tgz", + "integrity": "sha512-b6jSvxvVnyptAiLjbkWLE/lOnR4lfTtDAl+eUC7RZy+QQWc6wRzIV2CE6xBuMmDxc2qIihtDCZD5NPOFl7fRBQ==", "dev": true, "license": "MIT", "dependencies": { - "@types/estree": "1.0.7" - }, - "bin": { - "rollup": "dist/bin/rollup" + "get-nonce": "^1.0.0", + "tslib": "^2.0.0" }, "engines": { - "node": ">=18.0.0", + "node": ">=10" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/read-package-json-fast": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/read-package-json-fast/-/read-package-json-fast-4.0.0.tgz", + "integrity": "sha512-qpt8EwugBWDw2cgE2W+/3oxC+KTez2uSVR8JU9Q36TXPAGCaozfQUs59v4j4GFpWTaw0i6hAZSvOmu1J0uOEUg==", + "dev": true, + "license": "ISC", + "dependencies": { + "json-parse-even-better-errors": "^4.0.0", + "npm-normalize-package-bin": "^4.0.0" + }, + "engines": { + "node": "^18.17.0 || >=20.5.0" + } + }, + "node_modules/readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmmirror.com/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14.18.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/relative-time-format": { + "version": "1.1.6", + "resolved": "https://registry.npmmirror.com/relative-time-format/-/relative-time-format-1.1.6.tgz", + "integrity": "sha512-aCv3juQw4hT1/P/OrVltKWLlp15eW1GRcwP1XdxHrPdZE9MtgqFpegjnTjLhi2m2WI9MT/hQQtE+tjEWG1hgkQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/reusify": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rfdc": { + "version": "1.4.1", + "resolved": "https://registry.npmmirror.com/rfdc/-/rfdc-1.4.1.tgz", + "integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==", + "license": "MIT" + }, + "node_modules/rollup": { + "version": "4.41.1", + "resolved": "https://registry.npmmirror.com/rollup/-/rollup-4.41.1.tgz", + "integrity": "sha512-cPmwD3FnFv8rKMBc1MxWCwVQFxwf1JEmSX3iQXrRVVG15zerAIXRjMFVWnd5Q5QvgKF7Aj+5ykXFhUl+QGnyOw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.7" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", "npm": ">=8.0.0" }, "optionalDependencies": { @@ -4878,6 +5802,14 @@ "queue-microtask": "^1.2.2" } }, + "node_modules/scheduler": { + "version": "0.26.0", + "resolved": "https://registry.npmmirror.com/scheduler/-/scheduler-0.26.0.tgz", + "integrity": "sha512-NlHwttCI/l5gCPR3D1nNXtWABUmBwvZpEQiD4IXSbIDq8BzLIK/7Ir5gTFSGZDUu37K5cMNp0hFtzO38sC7gWA==", + "dev": true, + "license": "MIT", + "peer": true + }, "node_modules/semver": { "version": "7.7.2", "resolved": "https://registry.npmmirror.com/semver/-/semver-7.7.2.tgz", @@ -4955,6 +5887,19 @@ "node": ">=18" } }, + "node_modules/source-map": { + "version": "0.8.0-beta.0", + "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.8.0-beta.0.tgz", + "integrity": "sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "whatwg-url": "^7.0.0" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/source-map-js": { "version": "1.2.1", "resolved": "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.2.1.tgz", @@ -4973,6 +5918,110 @@ "node": ">=0.10.0" } }, + "node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmmirror.com/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/string-width-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/strip-final-newline": { "version": "4.0.0", "resolved": "https://registry.npmmirror.com/strip-final-newline/-/strip-final-newline-4.0.0.tgz", @@ -4999,6 +6048,29 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/sucrase": { + "version": "3.35.0", + "resolved": "https://registry.npmmirror.com/sucrase/-/sucrase-3.35.0.tgz", + "integrity": "sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.2", + "commander": "^4.0.0", + "glob": "^10.3.10", + "lines-and-columns": "^1.1.6", + "mz": "^2.7.0", + "pirates": "^4.0.1", + "ts-interface-checker": "^0.1.9" + }, + "bin": { + "sucrase": "bin/sucrase", + "sucrase-node": "bin/sucrase-node" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/superjson": { "version": "2.2.2", "resolved": "https://registry.npmmirror.com/superjson/-/superjson-2.2.2.tgz", @@ -5040,6 +6112,61 @@ "url": "https://opencollective.com/synckit" } }, + "node_modules/tabbable": { + "version": "6.2.0", + "resolved": "https://registry.npmmirror.com/tabbable/-/tabbable-6.2.0.tgz", + "integrity": "sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew==", + "dev": true, + "license": "MIT" + }, + "node_modules/tailwind-merge": { + "version": "3.3.0", + "resolved": "https://registry.npmmirror.com/tailwind-merge/-/tailwind-merge-3.3.0.tgz", + "integrity": "sha512-fyW/pEfcQSiigd5SNn0nApUOxx0zB/dm6UDU/rEwc2c3sX2smWUNbapHv+QRqLGVp9GWX3THIa7MUGPo+YkDzQ==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/dcastil" + } + }, + "node_modules/tailwindcss": { + "version": "4.1.8", + "resolved": "https://registry.npmmirror.com/tailwindcss/-/tailwindcss-4.1.8.tgz", + "integrity": "sha512-kjeW8gjdxasbmFKpVGrGd5T4i40mV5J2Rasw48QARfYeQ8YS9x02ON9SFWax3Qf616rt4Cp3nVNIj6Hd1mP3og==", + "dev": true, + "license": "MIT" + }, + "node_modules/thenify": { + "version": "3.3.1", + "resolved": "https://registry.npmmirror.com/thenify/-/thenify-3.3.1.tgz", + "integrity": "sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "any-promise": "^1.0.0" + } + }, + "node_modules/thenify-all": { + "version": "1.6.0", + "resolved": "https://registry.npmmirror.com/thenify-all/-/thenify-all-1.6.0.tgz", + "integrity": "sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==", + "dev": true, + "license": "MIT", + "dependencies": { + "thenify": ">= 3.1.0 < 4" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/tinyexec": { + "version": "0.3.2", + "resolved": "https://registry.npmmirror.com/tinyexec/-/tinyexec-0.3.2.tgz", + "integrity": "sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==", + "dev": true, + "license": "MIT" + }, "node_modules/tinyglobby": { "version": "0.2.14", "resolved": "https://registry.npmmirror.com/tinyglobby/-/tinyglobby-0.2.14.tgz", @@ -5108,6 +6235,26 @@ "node": ">=6" } }, + "node_modules/tr46": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/tr46/-/tr46-1.0.1.tgz", + "integrity": "sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA==", + "dev": true, + "license": "MIT", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmmirror.com/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "dev": true, + "license": "MIT", + "bin": { + "tree-kill": "cli.js" + } + }, "node_modules/ts-api-utils": { "version": "2.1.0", "resolved": "https://registry.npmmirror.com/ts-api-utils/-/ts-api-utils-2.1.0.tgz", @@ -5121,6 +6268,83 @@ "typescript": ">=4.8.4" } }, + "node_modules/ts-interface-checker": { + "version": "0.1.13", + "resolved": "https://registry.npmmirror.com/ts-interface-checker/-/ts-interface-checker-0.1.13.tgz", + "integrity": "sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "dev": true, + "license": "0BSD" + }, + "node_modules/tsup": { + "version": "8.5.0", + "resolved": "https://registry.npmmirror.com/tsup/-/tsup-8.5.0.tgz", + "integrity": "sha512-VmBp77lWNQq6PfuMqCHD3xWl22vEoWsKajkF8t+yMBawlUS8JzEI+vOVMeuNZIuMML8qXRizFKi9oD5glKQVcQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "bundle-require": "^5.1.0", + "cac": "^6.7.14", + "chokidar": "^4.0.3", + "consola": "^3.4.0", + "debug": "^4.4.0", + "esbuild": "^0.25.0", + "fix-dts-default-cjs-exports": "^1.0.0", + "joycon": "^3.1.1", + "picocolors": "^1.1.1", + "postcss-load-config": "^6.0.1", + "resolve-from": "^5.0.0", + "rollup": "^4.34.8", + "source-map": "0.8.0-beta.0", + "sucrase": "^3.35.0", + "tinyexec": "^0.3.2", + "tinyglobby": "^0.2.11", + "tree-kill": "^1.2.2" + }, + "bin": { + "tsup": "dist/cli-default.js", + "tsup-node": "dist/cli-node.js" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@microsoft/api-extractor": "^7.36.0", + "@swc/core": "^1", + "postcss": "^8.4.12", + "typescript": ">=4.5.0" + }, + "peerDependenciesMeta": { + "@microsoft/api-extractor": { + "optional": true + }, + "@swc/core": { + "optional": true + }, + "postcss": { + "optional": true + }, + "typescript": { + "optional": true + } + } + }, + "node_modules/tsup/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmmirror.com/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmmirror.com/type-check/-/type-check-0.4.0.tgz", @@ -5171,6 +6395,68 @@ "typescript": ">=4.8.4 <5.9.0" } }, + "node_modules/ua-is-frozen": { + "version": "0.1.2", + "resolved": "https://registry.npmmirror.com/ua-is-frozen/-/ua-is-frozen-0.1.2.tgz", + "integrity": "sha512-RwKDW2p3iyWn4UbaxpP2+VxwqXh0jpvdxsYpZ5j/MLLiQOfbsV5shpgQiw93+KMYQPcteeMQ289MaAFzs3G9pw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/faisalman" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/ua-parser-js" + }, + { + "type": "paypal", + "url": "https://paypal.me/faisalman" + } + ], + "license": "MIT" + }, + "node_modules/ua-parser-js": { + "version": "2.0.3", + "resolved": "https://registry.npmmirror.com/ua-parser-js/-/ua-parser-js-2.0.3.tgz", + "integrity": "sha512-LZyXZdNttONW8LjzEH3Z8+6TE7RfrEiJqDKyh0R11p/kxvrV2o9DrT2FGZO+KVNs3k+drcIQ6C3En6wLnzJGpw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/ua-parser-js" + }, + { + "type": "paypal", + "url": "https://paypal.me/faisalman" + }, + { + "type": "github", + "url": "https://github.com/sponsors/faisalman" + } + ], + "license": "AGPL-3.0-or-later", + "dependencies": { + "@types/node-fetch": "^2.6.12", + "detect-europe-js": "^0.1.2", + "is-standalone-pwa": "^0.1.1", + "node-fetch": "^2.7.0", + "ua-is-frozen": "^0.1.2" + }, + "bin": { + "ua-parser-js": "script/cli.js" + }, + "engines": { + "node": "*" + } + }, + "node_modules/ufo": { + "version": "1.6.1", + "resolved": "https://registry.npmmirror.com/ufo/-/ufo-1.6.1.tgz", + "integrity": "sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA==", + "dev": true, + "license": "MIT" + }, "node_modules/undici-types": { "version": "6.21.0", "resolved": "https://registry.npmmirror.com/undici-types/-/undici-types-6.21.0.tgz", @@ -5242,6 +6528,61 @@ "punycode": "^2.1.0" } }, + "node_modules/use-callback-ref": { + "version": "1.3.3", + "resolved": "https://registry.npmmirror.com/use-callback-ref/-/use-callback-ref-1.3.3.tgz", + "integrity": "sha512-jQL3lRnocaFtu3V00JToYz/4QkNWswxijDaCVNZRiRTO3HQDLsdu1ZtmIUvV4yPp+rvWm5j0y0TG/S61cuijTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "tslib": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/use-sidecar": { + "version": "1.1.3", + "resolved": "https://registry.npmmirror.com/use-sidecar/-/use-sidecar-1.1.3.tgz", + "integrity": "sha512-Fedw0aZvkhynoPYlA5WXrMCAMm+nSWdZt6lzJQ7Ok8S6Q+VsHmHpRWndVRJ8Be0ZbkfPc5LRYH+5XrzXcEeLRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "detect-node-es": "^1.1.0", + "tslib": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/use-sync-external-store": { + "version": "1.5.0", + "resolved": "https://registry.npmmirror.com/use-sync-external-store/-/use-sync-external-store-1.5.0.tgz", + "integrity": "sha512-Rb46I4cGGVBmjamjphe8L/UnvJD+uPPtTkNvX5mZgqdbavhI4EbgIWJiIHXJ8bc/i9EQGPRh4DwEURJ552Do0A==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" + } + }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmmirror.com/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -5337,6 +6678,16 @@ "vite": "^2.6.0 || ^3.0.0 || ^4.0.0 || ^5.0.0-0 || ^6.0.0-0" } }, + "node_modules/vite-plugin-css-injected-by-js": { + "version": "3.5.2", + "resolved": "https://registry.npmmirror.com/vite-plugin-css-injected-by-js/-/vite-plugin-css-injected-by-js-3.5.2.tgz", + "integrity": "sha512-2MpU/Y+SCZyWUB6ua3HbJCrgnF0KACAsmzOQt1UvRVJCGF6S8xdA3ZUhWcWdM9ivG4I5az8PnQmwwrkC2CAQrQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "vite": ">2.0.0-0" + } + }, "node_modules/vite-plugin-inspect": { "version": "0.8.9", "resolved": "https://registry.npmmirror.com/vite-plugin-inspect/-/vite-plugin-inspect-0.8.9.tgz", @@ -5544,6 +6895,25 @@ "typescript": ">=5.0.0" } }, + "node_modules/webidl-conversions": { + "version": "4.0.2", + "resolved": "https://registry.npmmirror.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz", + "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==", + "dev": true, + "license": "BSD-2-Clause" + }, + "node_modules/whatwg-url": { + "version": "7.1.0", + "resolved": "https://registry.npmmirror.com/whatwg-url/-/whatwg-url-7.1.0.tgz", + "integrity": "sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==", + "dev": true, + "license": "MIT", + "dependencies": { + "lodash.sortby": "^4.7.0", + "tr46": "^1.0.1", + "webidl-conversions": "^4.0.2" + } + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmmirror.com/which/-/which-2.0.2.tgz", @@ -5570,6 +6940,101 @@ "node": ">=0.10.0" } }, + "node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/wrap-ansi-cjs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, "node_modules/xml-name-validator": { "version": "4.0.0", "resolved": "https://registry.npmmirror.com/xml-name-validator/-/xml-name-validator-4.0.0.tgz", @@ -5612,6 +7077,46 @@ "funding": { "url": "https://github.com/sponsors/sindresorhus" } + }, + "node_modules/zod": { + "version": "3.25.34", + "resolved": "https://registry.npmmirror.com/zod/-/zod-3.25.34.tgz", + "integrity": "sha512-lZHvSc2PpWdcfpHlyB33HA9nqP16GpC9IpiG4lYq9jZCJVLZNnWd6Y1cj79bcLSBKTkxepfpjckPv5Y5VOPlwA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + }, + "node_modules/zustand": { + "version": "5.0.5", + "resolved": "https://registry.npmmirror.com/zustand/-/zustand-5.0.5.tgz", + "integrity": "sha512-mILtRfKW9xM47hqxGIxCv12gXusoY/xTSHBYApXozR0HmQv299whhBeeAcRy+KrPPybzosvJBCOmVjq6x12fCg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.20.0" + }, + "peerDependencies": { + "@types/react": ">=18.0.0", + "immer": ">=9.0.6", + "react": ">=18.0.0", + "use-sync-external-store": ">=1.2.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "immer": { + "optional": true + }, + "react": { + "optional": true + }, + "use-sync-external-store": { + "optional": true + } + } } } } diff --git a/unilife-frontend/package.json b/unilife-frontend/package.json index 615ad6d..4ac54fe 100644 --- a/unilife-frontend/package.json +++ b/unilife-frontend/package.json @@ -22,6 +22,7 @@ "vue-router": "^4.5.1" }, "devDependencies": { + "@stagewise/toolbar-vue": "^0.1.2", "@tsconfig/node22": "^22.0.1", "@types/node": "^22.15.22", "@vitejs/plugin-vue": "^5.2.3", diff --git a/unilife-frontend/src/App.vue b/unilife-frontend/src/App.vue index eb0f5eb..f912320 100644 --- a/unilife-frontend/src/App.vue +++ b/unilife-frontend/src/App.vue @@ -1,11 +1,36 @@ \ No newline at end of file diff --git a/unilife-frontend/src/views/schedule/TaskView.vue b/unilife-frontend/src/views/schedule/TaskView.vue new file mode 100644 index 0000000..d1bb6e3 --- /dev/null +++ b/unilife-frontend/src/views/schedule/TaskView.vue @@ -0,0 +1,1192 @@ + + + + + \ No newline at end of file diff --git a/unilife-server/pom.xml b/unilife-server/pom.xml index 7f7c6ef..885f4a0 100644 --- a/unilife-server/pom.xml +++ b/unilife-server/pom.xml @@ -15,6 +15,7 @@ 3.4.3 UTF-8 UTF-8 + 1.0.0 @@ -26,6 +27,13 @@ pom import + + org.springframework.ai + spring-ai-bom + ${spring-ai.version} + pom + import + @@ -134,6 +142,11 @@ aliyun-sdk-oss 3.15.0 + + + org.springframework.ai + spring-ai-starter-model-openai + diff --git a/unilife-server/src/main/java/com/unilife/config/AiConfig.java b/unilife-server/src/main/java/com/unilife/config/AiConfig.java new file mode 100644 index 0000000..5444222 --- /dev/null +++ b/unilife-server/src/main/java/com/unilife/config/AiConfig.java @@ -0,0 +1,20 @@ +package com.unilife.config; + +import org.springframework.ai.chat.client.ChatClient; +import org.springframework.ai.chat.client.advisor.SimpleLoggerAdvisor; +import org.springframework.ai.openai.OpenAiChatModel; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +@Configuration +public class AiConfig { + @Bean + public ChatClient chatClient(OpenAiChatModel model) { + return ChatClient.builder(model) + .defaultAdvisors(new SimpleLoggerAdvisor()) + .build(); + } + + + +} diff --git a/unilife-server/src/main/java/com/unilife/controller/AiController.java b/unilife-server/src/main/java/com/unilife/controller/AiController.java new file mode 100644 index 0000000..0c983f5 --- /dev/null +++ b/unilife-server/src/main/java/com/unilife/controller/AiController.java @@ -0,0 +1,27 @@ +package com.unilife.controller; + +import io.swagger.v3.oas.annotations.tags.Tag; +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.ai.chat.client.ChatClient; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import reactor.core.publisher.Flux; + +@RestController +@Slf4j +@RequestMapping("/ai") +@Tag(name = "AI对话") +@AllArgsConstructor +public class AiController { + private final ChatClient chatClient; + + @RequestMapping(value = "/chat",produces = "text/html;charset=UTF-8") + public Fluxchat(String prompt,String chatId){ + return chatClient.prompt(prompt) + .stream() + .content(); + } + + +} diff --git a/unilife-server/src/main/java/com/unilife/mapper/UserMapper.java b/unilife-server/src/main/java/com/unilife/mapper/UserMapper.java index 3a9c0db..e8a7a77 100644 --- a/unilife-server/src/main/java/com/unilife/mapper/UserMapper.java +++ b/unilife-server/src/main/java/com/unilife/mapper/UserMapper.java @@ -30,4 +30,46 @@ public interface UserMapper { * @return 用户列表 */ List searchUsers(@Param("keyword") String keyword); + + /** + * 软删除用户(设置status为0) + * @param id 用户ID + */ + void deleteUser(Long id); + + /** + * 批量删除用户的帖子(软删除) + * @param userId 用户ID + */ + void deleteUserPosts(Long userId); + + /** + * 批量删除用户的评论(软删除) + * @param userId 用户ID + */ + void deleteUserComments(Long userId); + + /** + * 批量删除用户的资源(软删除) + * @param userId 用户ID + */ + void deleteUserResources(Long userId); + + /** + * 批量删除用户的课程 + * @param userId 用户ID + */ + void deleteUserCourses(Long userId); + + /** + * 批量删除用户的日程 + * @param userId 用户ID + */ + void deleteUserSchedules(Long userId); + + /** + * 删除用户的所有点赞记录 + * @param userId 用户ID + */ + void deleteUserLikes(Long userId); } diff --git a/unilife-server/src/main/java/com/unilife/model/dto/CreateScheduleDTO.java b/unilife-server/src/main/java/com/unilife/model/dto/CreateScheduleDTO.java index c0e96ca..56d385b 100644 --- a/unilife-server/src/main/java/com/unilife/model/dto/CreateScheduleDTO.java +++ b/unilife-server/src/main/java/com/unilife/model/dto/CreateScheduleDTO.java @@ -46,7 +46,7 @@ public class CreateScheduleDTO { /** * 提醒时间(分钟) */ - private Byte reminder; + private Integer reminder; /** * 显示颜色 diff --git a/unilife-server/src/main/java/com/unilife/model/entity/Schedule.java b/unilife-server/src/main/java/com/unilife/model/entity/Schedule.java index 5bea3f7..d111d5e 100644 --- a/unilife-server/src/main/java/com/unilife/model/entity/Schedule.java +++ b/unilife-server/src/main/java/com/unilife/model/entity/Schedule.java @@ -62,7 +62,7 @@ public class Schedule implements Serializable { /** * 提醒时间(分钟) */ - private Byte reminder; + private Integer reminder; /** * 显示颜色 diff --git a/unilife-server/src/main/java/com/unilife/model/vo/ScheduleVO.java b/unilife-server/src/main/java/com/unilife/model/vo/ScheduleVO.java index 2db63c6..354a348 100644 --- a/unilife-server/src/main/java/com/unilife/model/vo/ScheduleVO.java +++ b/unilife-server/src/main/java/com/unilife/model/vo/ScheduleVO.java @@ -58,7 +58,7 @@ public class ScheduleVO { /** * 提醒时间(分钟) */ - private Byte reminder; + private Integer reminder; /** * 显示颜色 diff --git a/unilife-server/src/main/java/com/unilife/service/UserService.java b/unilife-server/src/main/java/com/unilife/service/UserService.java index 32fcb90..8e5f701 100644 --- a/unilife-server/src/main/java/com/unilife/service/UserService.java +++ b/unilife-server/src/main/java/com/unilife/service/UserService.java @@ -36,4 +36,12 @@ public interface UserService { // 用户最近帖子 Result getUserRecentPosts(Long userId, Integer limit); + + /** + * 删除用户及其所有相关数据 + * 使用软删除机制,保持数据一致性 + * @param userId 用户ID + * @return 操作结果 + */ + Result deleteUser(Long userId); } diff --git a/unilife-server/src/main/java/com/unilife/service/impl/UserServiceImpl.java b/unilife-server/src/main/java/com/unilife/service/impl/UserServiceImpl.java index 8b06523..1976601 100644 --- a/unilife-server/src/main/java/com/unilife/service/impl/UserServiceImpl.java +++ b/unilife-server/src/main/java/com/unilife/service/impl/UserServiceImpl.java @@ -543,32 +543,81 @@ public class UserServiceImpl implements UserService { @Override public Result getUserRecentPosts(Long userId, Integer limit) { - // 检查用户是否存在 - User user = userMapper.getUserById(userId); - if (user == null) { - return Result.error(404, "用户不存在"); - } + try { + // 获取用户信息,验证用户是否存在 + User user = userMapper.getUserById(userId); + if (user == null) { + return Result.error(404, "用户不存在"); + } - // 参数校验 - if (limit == null || limit <= 0) { - limit = 5; - } - if (limit > 20) { - limit = 20; // 限制最大数量 - } + // 获取用户最近的帖子 + List recentPosts = postMapper.getListByUserId(userId, "time"); + + // 如果指定了限制数量,则截取 + if (limit != null && limit > 0 && recentPosts.size() > limit) { + recentPosts = recentPosts.subList(0, limit); + } - // 获取用户最近的帖子 - List recentPosts = postMapper.getListByUserId(userId, "latest"); - - // 限制数量 - if (recentPosts.size() > limit) { - recentPosts = recentPosts.subList(0, limit); + Map result = new HashMap<>(); + result.put("posts", recentPosts); + result.put("totalCount", postMapper.getCountByUserId(userId)); + + return Result.success(result, "获取用户最近帖子成功"); + } catch (Exception e) { + log.error("获取用户最近帖子失败: userId={}", userId, e); + return Result.error(500, "获取用户最近帖子失败"); + } + } + + @Override + public Result deleteUser(Long userId) { + try { + // 验证用户是否存在 + User user = userMapper.getUserById(userId); + if (user == null) { + return Result.error(404, "用户不存在"); + } + + // 检查用户状态,避免重复删除 + if (user.getStatus() == 0) { + return Result.error(400, "用户已被删除"); + } + + log.info("开始删除用户及其相关数据: userId={}, username={}", userId, user.getUsername()); + + // 1. 软删除用户的所有帖子 + userMapper.deleteUserPosts(userId); + log.info("已删除用户的所有帖子: userId={}", userId); + + // 2. 软删除用户的所有评论 + userMapper.deleteUserComments(userId); + log.info("已删除用户的所有评论: userId={}", userId); + + // 3. 软删除用户的所有资源 + userMapper.deleteUserResources(userId); + log.info("已删除用户的所有资源: userId={}", userId); + + // 4. 删除用户的所有课程(物理删除,因为是个人课程安排) + userMapper.deleteUserCourses(userId); + log.info("已删除用户的所有课程: userId={}", userId); + + // 5. 删除用户的所有日程(物理删除,因为是个人日程安排) + userMapper.deleteUserSchedules(userId); + log.info("已删除用户的所有日程: userId={}", userId); + + // 6. 删除用户的所有点赞记录(物理删除) + userMapper.deleteUserLikes(userId); + log.info("已删除用户的所有点赞记录: userId={}", userId); + + // 7. 最后软删除用户本身 + userMapper.deleteUser(userId); + log.info("已删除用户账号: userId={}, username={}", userId, user.getUsername()); + + return Result.success(null, "用户及其相关数据删除成功"); + + } catch (Exception e) { + log.error("删除用户失败: userId={}", userId, e); + return Result.error(500, "删除用户失败:" + e.getMessage()); } - - // 返回结果 - Map data = new HashMap<>(); - data.put("list", recentPosts); - - return Result.success(data); } } diff --git a/unilife-server/src/main/resources/application.yml b/unilife-server/src/main/resources/application.yml index ff69b93..4303a6d 100644 --- a/unilife-server/src/main/resources/application.yml +++ b/unilife-server/src/main/resources/application.yml @@ -1,6 +1,17 @@ server: port: 8087 spring: + ai: + openai: + base-url: https://dashscope.aliyuncs.com/compatible-mode + api-key: ${OPENAI_API_KEY:} + chat: + options: + model: qwen-max-latest + embedding: + options: + model: text-embedding-v3 + dimensions: 1024 datasource: url: jdbc:mysql://localhost:3306/UniLife?allowPublicKeyRetrieval=true&useSSL=false&serverTimezone=UTC&characterEncoding=UTF-8 username: root @@ -9,8 +20,8 @@ spring: mail: host: smtp.163.com port: 465 - username: c2991692032@163.com - password: VPq5u3NcAAqtG9GT + username: ${MAIL_USERNAME:} + password: ${MAIL_PASSWORD:} properties: mail: smtp: diff --git a/unilife-server/src/main/resources/db/init.sql b/unilife-server/src/main/resources/db/init.sql index ea19796..9f12a84 100644 --- a/unilife-server/src/main/resources/db/init.sql +++ b/unilife-server/src/main/resources/db/init.sql @@ -65,9 +65,7 @@ CREATE TABLE IF NOT EXISTS `posts` ( INDEX `idx_user_id` (`user_id`), INDEX `idx_category_id` (`category_id`), INDEX `idx_status` (`status`), - INDEX `idx_created_at` (`created_at`), - FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE, - FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`) ON DELETE CASCADE + INDEX `idx_created_at` (`created_at`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='帖子表'; -- 评论表 @@ -84,10 +82,7 @@ CREATE TABLE IF NOT EXISTS `comments` ( INDEX `idx_post_id` (`post_id`), INDEX `idx_user_id` (`user_id`), INDEX `idx_parent_id` (`parent_id`), - INDEX `idx_status` (`status`), - FOREIGN KEY (`post_id`) REFERENCES `posts` (`id`) ON DELETE CASCADE, - FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE, - FOREIGN KEY (`parent_id`) REFERENCES `comments` (`id`) ON DELETE SET NULL + INDEX `idx_status` (`status`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='评论表'; -- 点赞表(用户-帖子) @@ -97,8 +92,8 @@ CREATE TABLE IF NOT EXISTS `post_likes` ( `post_id` BIGINT NOT NULL COMMENT '帖子ID', `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', UNIQUE KEY `uk_user_post` (`user_id`, `post_id`), - FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE, - FOREIGN KEY (`post_id`) REFERENCES `posts` (`id`) ON DELETE CASCADE + INDEX `idx_user_id` (`user_id`), + INDEX `idx_post_id` (`post_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='帖子点赞表'; -- 点赞表(用户-评论) @@ -108,8 +103,8 @@ CREATE TABLE IF NOT EXISTS `comment_likes` ( `comment_id` BIGINT NOT NULL COMMENT '评论ID', `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', UNIQUE KEY `uk_user_comment` (`user_id`, `comment_id`), - FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE, - FOREIGN KEY (`comment_id`) REFERENCES `comments` (`id`) ON DELETE CASCADE + INDEX `idx_user_id` (`user_id`), + INDEX `idx_comment_id` (`comment_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='评论点赞表'; -- 点赞表(用户-资源) @@ -119,8 +114,8 @@ CREATE TABLE IF NOT EXISTS `resource_likes` ( `resource_id` BIGINT NOT NULL COMMENT '资源ID', `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', UNIQUE KEY `uk_user_resource` (`user_id`, `resource_id`), - FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE, - FOREIGN KEY (`resource_id`) REFERENCES `resources` (`id`) ON DELETE CASCADE + INDEX `idx_user_id` (`user_id`), + INDEX `idx_resource_id` (`resource_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='资源点赞表'; -- 资源表 @@ -140,9 +135,7 @@ CREATE TABLE IF NOT EXISTS `resources` ( `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', INDEX `idx_user_id` (`user_id`), INDEX `idx_category_id` (`category_id`), - INDEX `idx_status` (`status`), - FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE, - FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`) ON DELETE CASCADE + INDEX `idx_status` (`status`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='资源表'; -- 课程表 @@ -163,8 +156,7 @@ CREATE TABLE IF NOT EXISTS `courses` ( `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', INDEX `idx_user_id` (`user_id`), - INDEX `idx_semester` (`semester`), - FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE + INDEX `idx_semester` (`semester`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='课程表'; -- 日程表 @@ -183,8 +175,7 @@ CREATE TABLE IF NOT EXISTS `schedules` ( `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', INDEX `idx_user_id` (`user_id`), - INDEX `idx_start_time` (`start_time`), - FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE + INDEX `idx_start_time` (`start_time`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='日程表'; -- 初始化分类数据 diff --git a/unilife-server/src/main/resources/db/rebuild-database.sql b/unilife-server/src/main/resources/db/rebuild-database.sql new file mode 100644 index 0000000..e11dfe9 --- /dev/null +++ b/unilife-server/src/main/resources/db/rebuild-database.sql @@ -0,0 +1,386 @@ +-- UniLife数据库完整重建脚本 +-- 此脚本将删除现有数据库并重新创建,然后插入测试数据 +-- 注意:执行前请确保已备份重要数据! + +-- ========================================== +-- 第一步:删除并重新创建数据库 +-- ========================================== + +-- 删除现有数据库(如果存在) +DROP DATABASE IF EXISTS UniLife; + +-- 创建新数据库 +CREATE DATABASE UniLife DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- 使用数据库 +USE UniLife; + +-- ========================================== +-- 第二步:创建表结构(无外键约束) +-- ========================================== + +-- 用户表 +CREATE TABLE `users` ( + `id` BIGINT PRIMARY KEY AUTO_INCREMENT COMMENT '用户ID', + `username` VARCHAR(50) NOT NULL UNIQUE COMMENT '用户名', + `email` VARCHAR(100) NOT NULL UNIQUE COMMENT '邮箱地址(学校邮箱)', + `password` VARCHAR(255) NOT NULL COMMENT '密码(加密存储)', + `nickname` VARCHAR(50) NOT NULL COMMENT '昵称', + `avatar` VARCHAR(255) DEFAULT NULL COMMENT '头像URL', + `bio` TEXT DEFAULT NULL COMMENT '个人简介', + `gender` TINYINT DEFAULT 0 COMMENT '性别(0-未知, 1-男, 2-女)', + `student_id` VARCHAR(20) UNIQUE DEFAULT NULL COMMENT '学号', + `department` VARCHAR(100) DEFAULT NULL COMMENT '院系', + `major` VARCHAR(100) DEFAULT NULL COMMENT '专业', + `grade` VARCHAR(20) DEFAULT NULL COMMENT '年级', + `points` INT DEFAULT 0 COMMENT '积分', + `role` TINYINT DEFAULT 0 COMMENT '角色(0-普通用户, 1-版主, 2-管理员)', + `status` TINYINT DEFAULT 1 COMMENT '状态(0-禁用, 1-启用)', + `is_verified` TINYINT DEFAULT 0 COMMENT '是否验证(0-未验证, 1-已验证)', + `login_ip` VARCHAR(50) DEFAULT NULL COMMENT '最近登录IP', + `login_time` DATETIME DEFAULT NULL COMMENT '最近登录时间', + `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', + INDEX `idx_email` (`email`), + INDEX `idx_username` (`username`), + INDEX `idx_student_id` (`student_id`), + INDEX `idx_role` (`role`), + INDEX `idx_status` (`status`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='用户表'; + +-- 分类表 +CREATE TABLE `categories` ( + `id` BIGINT PRIMARY KEY AUTO_INCREMENT COMMENT '分类ID', + `name` VARCHAR(50) NOT NULL UNIQUE COMMENT '分类名称', + `description` VARCHAR(255) DEFAULT NULL COMMENT '分类描述', + `icon` VARCHAR(255) DEFAULT NULL COMMENT '分类图标', + `sort` INT DEFAULT 0 COMMENT '排序', + `status` TINYINT DEFAULT 1 COMMENT '状态(0-禁用, 1-启用)', + `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', + INDEX `idx_status` (`status`), + INDEX `idx_sort` (`sort`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='分类表'; + +-- 帖子表 +CREATE TABLE `posts` ( + `id` BIGINT PRIMARY KEY AUTO_INCREMENT COMMENT '帖子ID', + `user_id` BIGINT NOT NULL COMMENT '发布用户ID', + `title` VARCHAR(100) NOT NULL COMMENT '帖子标题', + `content` TEXT NOT NULL COMMENT '帖子内容', + `category_id` BIGINT NOT NULL COMMENT '分类ID', + `view_count` INT DEFAULT 0 COMMENT '浏览次数', + `like_count` INT DEFAULT 0 COMMENT '点赞次数', + `comment_count` INT DEFAULT 0 COMMENT '评论次数', + `status` TINYINT DEFAULT 1 COMMENT '状态(0-删除, 1-正常, 2-置顶)', + `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', + INDEX `idx_user_id` (`user_id`), + INDEX `idx_category_id` (`category_id`), + INDEX `idx_status` (`status`), + INDEX `idx_created_at` (`created_at`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='帖子表'; + +-- 评论表 +CREATE TABLE `comments` ( + `id` BIGINT PRIMARY KEY AUTO_INCREMENT COMMENT '评论ID', + `post_id` BIGINT NOT NULL COMMENT '帖子ID', + `user_id` BIGINT NOT NULL COMMENT '评论用户ID', + `content` TEXT NOT NULL COMMENT '评论内容', + `parent_id` BIGINT DEFAULT NULL COMMENT '父评论ID(回复某条评论)', + `like_count` INT DEFAULT 0 COMMENT '点赞次数', + `status` TINYINT DEFAULT 1 COMMENT '状态(0-删除, 1-正常)', + `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', + INDEX `idx_post_id` (`post_id`), + INDEX `idx_user_id` (`user_id`), + INDEX `idx_parent_id` (`parent_id`), + INDEX `idx_status` (`status`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='评论表'; + +-- 点赞表(用户-帖子) +CREATE TABLE `post_likes` ( + `id` BIGINT PRIMARY KEY AUTO_INCREMENT COMMENT '点赞ID', + `user_id` BIGINT NOT NULL COMMENT '用户ID', + `post_id` BIGINT NOT NULL COMMENT '帖子ID', + `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + UNIQUE KEY `uk_user_post` (`user_id`, `post_id`), + INDEX `idx_user_id` (`user_id`), + INDEX `idx_post_id` (`post_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='帖子点赞表'; + +-- 点赞表(用户-评论) +CREATE TABLE `comment_likes` ( + `id` BIGINT PRIMARY KEY AUTO_INCREMENT COMMENT '点赞ID', + `user_id` BIGINT NOT NULL COMMENT '用户ID', + `comment_id` BIGINT NOT NULL COMMENT '评论ID', + `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + UNIQUE KEY `uk_user_comment` (`user_id`, `comment_id`), + INDEX `idx_user_id` (`user_id`), + INDEX `idx_comment_id` (`comment_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='评论点赞表'; + +-- 点赞表(用户-资源) +CREATE TABLE `resource_likes` ( + `id` BIGINT PRIMARY KEY AUTO_INCREMENT COMMENT '点赞ID', + `user_id` BIGINT NOT NULL COMMENT '用户ID', + `resource_id` BIGINT NOT NULL COMMENT '资源ID', + `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + UNIQUE KEY `uk_user_resource` (`user_id`, `resource_id`), + INDEX `idx_user_id` (`user_id`), + INDEX `idx_resource_id` (`resource_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='资源点赞表'; + +-- 资源表 +CREATE TABLE `resources` ( + `id` BIGINT PRIMARY KEY AUTO_INCREMENT COMMENT '资源ID', + `user_id` BIGINT NOT NULL COMMENT '上传用户ID', + `title` VARCHAR(100) NOT NULL COMMENT '资源标题', + `description` TEXT DEFAULT NULL COMMENT '资源描述', + `file_url` VARCHAR(255) NOT NULL COMMENT '文件URL', + `file_size` BIGINT NOT NULL COMMENT '文件大小(字节)', + `file_type` VARCHAR(100) NOT NULL COMMENT '文件类型', + `category_id` BIGINT NOT NULL COMMENT '分类ID', + `download_count` INT DEFAULT 0 COMMENT '下载次数', + `like_count` INT DEFAULT 0 COMMENT '点赞次数', + `status` TINYINT DEFAULT 1 COMMENT '状态(0-删除, 1-正常)', + `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', + INDEX `idx_user_id` (`user_id`), + INDEX `idx_category_id` (`category_id`), + INDEX `idx_status` (`status`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='资源表'; + +-- 课程表 +CREATE TABLE `courses` ( + `id` BIGINT PRIMARY KEY AUTO_INCREMENT COMMENT '课程ID', + `user_id` BIGINT NOT NULL COMMENT '用户ID', + `name` VARCHAR(100) NOT NULL COMMENT '课程名称', + `teacher` VARCHAR(50) DEFAULT NULL COMMENT '教师姓名', + `location` VARCHAR(100) DEFAULT NULL COMMENT '上课地点', + `day_of_week` TINYINT NOT NULL COMMENT '星期几(1-7)', + `start_time` TIME NOT NULL COMMENT '开始时间', + `end_time` TIME NOT NULL COMMENT '结束时间', + `start_week` SMALLINT NOT NULL COMMENT '开始周次', + `end_week` SMALLINT NOT NULL COMMENT '结束周次', + `semester` VARCHAR(20) DEFAULT NULL COMMENT '学期(如:2023-1)', + `color` VARCHAR(20) DEFAULT NULL COMMENT '显示颜色', + `status` TINYINT DEFAULT 1 COMMENT '状态(0-删除, 1-正常)', + `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', + INDEX `idx_user_id` (`user_id`), + INDEX `idx_semester` (`semester`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='课程表'; + +-- 日程表 +CREATE TABLE `schedules` ( + `id` BIGINT PRIMARY KEY AUTO_INCREMENT COMMENT '日程ID', + `user_id` BIGINT NOT NULL COMMENT '用户ID', + `title` VARCHAR(100) NOT NULL COMMENT '日程标题', + `description` TEXT DEFAULT NULL COMMENT '日程描述', + `start_time` DATETIME NOT NULL COMMENT '开始时间', + `end_time` DATETIME NOT NULL COMMENT '结束时间', + `location` VARCHAR(100) DEFAULT NULL COMMENT '地点', + `is_all_day` TINYINT DEFAULT 0 COMMENT '是否全天(0-否, 1-是)', + `reminder` INT DEFAULT NULL COMMENT '提醒时间(分钟)', + `color` VARCHAR(20) DEFAULT NULL COMMENT '显示颜色', + `status` TINYINT DEFAULT 1 COMMENT '状态(0-删除, 1-正常)', + `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `updated_at` DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', + INDEX `idx_user_id` (`user_id`), + INDEX `idx_start_time` (`start_time`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='日程表'; + +-- ========================================== +-- 第三步:插入初始分类数据 +-- ========================================== + +INSERT INTO `categories` (`name`, `description`, `icon`, `sort`, `status`) VALUES +('学习交流', '讨论学习相关话题', 'icon-study', 1, 1), +('校园生活', '分享校园生活点滴', 'icon-campus', 2, 1), +('兴趣爱好', '交流各类兴趣爱好', 'icon-hobby', 3, 1), +('求职就业', '分享求职经验和就业信息', 'icon-job', 4, 1), +('资源共享', '分享各类学习资源', 'icon-resource', 5, 1); + +-- 初始化管理员账号 +INSERT INTO `users` (`username`, `email`, `password`, `nickname`, `role`, `status`, `is_verified`) VALUES +('admin', 'admin@unilife.com', '123456', '系统管理员', 2, 1, 1); + +-- ========================================== +-- 第四步:插入测试数据 +-- ========================================== + +-- 更新现有分类数据(更贴合武汉大学实际) +UPDATE `categories` SET + `name` = '学术交流', + `description` = '学术讨论、科研分享、竞赛经验', + `icon` = '📚' +WHERE `name` = '学习交流'; + +UPDATE `categories` SET + `description` = '武汉大学校园生活、社团活动、文化娱乐', + `icon` = '🏫' +WHERE `name` = '校园生活'; + +UPDATE `categories` SET + `name` = '就业实习', + `description` = '实习经验、求职心得、职业规划', + `icon` = '💼' +WHERE `name` = '求职就业'; + +-- 插入新的分类 +INSERT INTO `categories` (`name`, `description`, `icon`, `sort`, `status`) VALUES +('学院专区', '各学院学生交流专区', '🎓', 6, 1), +('考研考公', '研究生入学考试、公务员考试', '📖', 7, 1), +('生活服务', '二手交易、失物招领、校园服务', '🛍️', 8, 1); + +-- 插入武汉大学学生用户数据 +INSERT INTO `users` (`username`, `email`, `password`, `nickname`, `bio`, `gender`, `student_id`, `department`, `major`, `grade`, `points`, `role`, `status`, `is_verified`, `created_at`) VALUES +-- 文理学部学生 +('czq2024', 'czq@whu.edu.cn', '123456', '珞珈数学狗', '数学与统计学院2022级数学类,热爱数学建模,ACM银牌选手', 1, '2022301140001', '数学与统计学院', '数学类', '2022级', 150, 0, 1, 1, '2024-09-01 09:00:00'), +('lihua_cs', 'lihua@whu.edu.cn', '123456', '代码诗人', '计算机学院2021级软件工程,全栈开发爱好者,开源项目贡献者', 1, '2021301120001', '计算机学院', '软件工程', '2021级', 230, 0, 1, 1, '2024-09-01 10:00:00'), +('wangming_law', 'wangming@whu.edu.cn', '123456', '法学小白', '法学院2023级法学专业,模拟法庭常客,梦想成为大律师', 1, '2023301080001', '法学院', '法学', '2023级', 80, 0, 1, 1, '2024-09-01 11:00:00'), +('zhangwei_chem', 'zhangwei@whu.edu.cn', '123456', '化学实验员', '化学与分子科学学院2022级化学专业,实验室常驻,合成达人', 1, '2022301130001', '化学与分子科学学院', '化学', '2022级', 120, 0, 1, 1, '2024-09-01 12:00:00'), +('liuxin_econ', 'liuxin@whu.edu.cn', '123456', '经济观察者', '经济与管理学院2021级经济学,关注宏观经济政策,券商实习生', 2, '2021301110001', '经济与管理学院', '经济学', '2021级', 200, 0, 1, 1, '2024-09-01 13:00:00'), + +-- 工学部学生 +('chenfei_water', 'chenfei@whu.edu.cn', '123456', '水利工程师', '水利水电学院2022级水利水电工程,三峡实习经历,立志建设美丽中国', 1, '2022301320001', '水利水电学院', '水利水电工程', '2022级', 90, 0, 1, 1, '2024-09-01 14:00:00'), +('sunhao_power', 'sunhao@whu.edu.cn', '123456', '电气小子', '电气与自动化学院2023级电气工程及其自动化,电力系统仿真专家', 1, '2023301330001', '电气与自动化学院', '电气工程及其自动化', '2023级', 70, 0, 1, 1, '2024-09-01 15:00:00'), +('wujing_civil', 'wujing@whu.edu.cn', '123456', '土木妹子', '土木建筑工程学院2022级土木工程,桥梁设计爱好者,BIM技术达人', 2, '2022301340001', '土木建筑工程学院', '土木工程', '2022级', 110, 0, 1, 1, '2024-09-01 16:00:00'), + +-- 信息学部学生 +('liqiang_remote', 'liqiang@whu.edu.cn', '123456', '遥感专家', '遥感信息工程学院2021级遥感科学与技术,无人机航拍爱好者', 1, '2021301210001', '遥感信息工程学院', '遥感科学与技术', '2021级', 180, 0, 1, 1, '2024-09-01 17:00:00'), +('zhaoli_survey', 'zhaoli@whu.edu.cn', '123456', '测绘达人', '测绘学院2022级测绘工程,GPS定位技术研究者,野外作业经验丰富', 1, '2022301220001', '测绘学院', '测绘工程', '2022级', 95, 0, 1, 1, '2024-09-01 18:00:00'), + +-- 医学部学生 +('huangyan_med', 'huangyan@whu.edu.cn', '123456', '未来医生', '基础医学院2020级临床医学,人民医院实习生,立志救死扶伤', 2, '2020301410001', '基础医学院', '临床医学', '2020级', 250, 0, 1, 1, '2024-09-01 19:00:00'), +('wangpeng_dental', 'wangpeng@whu.edu.cn', '123456', '口腔医师', '口腔医学院2021级口腔医学,口腔医院见习,关注口腔健康科普', 1, '2021301420001', '口腔医学院', '口腔医学', '2021级', 160, 0, 1, 1, '2024-09-01 20:00:00'), + +-- 人文社科学部学生 +('luxiaoya_chinese', 'luxiaoya@whu.edu.cn', '123456', '文学少女', '文学院2022级汉语言文学,古典文学爱好者,诗词社社长', 2, '2022301050001', '文学院', '汉语言文学', '2022级', 140, 0, 1, 1, '2024-09-01 21:00:00'), +('zhoujie_history', 'zhoujie@whu.edu.cn', '123456', '史学研究生', '历史学院研究生,中国古代史方向,博物馆志愿者', 1, '2024302050001', '历史学院', '中国史', '2024级', 100, 0, 1, 1, '2024-09-01 22:00:00'), +('tanglei_news', 'tanglei@whu.edu.cn', '123456', '新传人', '新闻与传播学院2021级新闻学,校媒记者,关注社会热点', 1, '2021301070001', '新闻与传播学院', '新闻学', '2021级', 170, 0, 1, 1, '2024-09-01 23:00:00'); + +-- 插入论坛帖子数据(使用已存在的用户ID) +INSERT INTO `posts` (`user_id`, `category_id`, `title`, `content`, `view_count`, `like_count`, `comment_count`, `status`, `created_at`) VALUES +-- 学术交流类帖子 +(2, 1, '数学建模美赛经验分享', '刚刚结束的美国大学生数学建模竞赛,我们团队获得了M奖!分享一下参赛经验和技巧,希望对学弟学妹们有帮助。数模比赛不仅考验数学能力,更重要的是团队协作和论文写作能力。首先要选择合适的队友,最好是数学、编程、英语各有所长的组合...', 256, 42, 8, 2, '2024-12-20 09:30:00'), + +(3, 1, 'ACM-ICPC区域赛总结', '参加了西安站的ACM区域赛,虽然没能拿到金牌,但收获很大。分享一下刷题心得和比赛策略,特别是动态规划和图论算法的练习方法。建议大家多在Codeforces和AtCoder上练习,这些平台的题目质量很高...', 189, 35, 6, 1, '2024-12-19 16:45:00'), + +(6, 1, '宏观经济学课程研讨:通胀与货币政策', '最近在学习宏观经济学,对当前的通胀形势和央行货币政策有一些思考。想和大家讨论一下利率调整对经济的影响机制,特别是在当前全球经济形势下的作用...', 145, 28, 4, 1, '2024-12-18 14:20:00'), + +-- 校园生活类帖子 +(14, 2, '武大樱花季摄影大赛作品展示', '樱花季刚过,分享一些在樱花大道拍摄的照片。今年的樱花开得特别美,虽然人很多,但还是拍到了一些不错的角度。附上拍摄技巧分享!使用的是佳能5D4,光圈f/2.8,ISO400,后期用LR调色...', 1234, 156, 12, 2, '2024-04-10 10:15:00'), + +(16, 2, '校运动会志愿者招募!', '第55届田径运动会即将开始,现招募志愿者!工作内容包括引导、记分、颁奖等。参与志愿服务可获得志愿时长认证,还有纪念品哦~有意向的同学请在评论区留言或私信联系我', 456, 89, 5, 1, '2024-12-15 08:00:00'), + +(11, 2, '测绘学院野外实习日记', '刚从庐山实习回来,分享一下野外测量的酸甜苦辣。早上5点起床,背着仪器爬山,虽然辛苦但收获满满。珞珈山的风景真是看不够啊!学到了很多实际操作技能...', 234, 45, 7, 1, '2024-12-14 19:30:00'), + +-- 学院专区类帖子 +(4, 6, '法学院模拟法庭大赛预告', '一年一度的"枫叶杯"模拟法庭大赛即将开始!欢迎各年级同学组队参加。比赛分为民事组和刑事组,优胜者将代表学院参加全国比赛。这是提升法律实务能力的绝佳机会...', 345, 67, 9, 2, '2024-12-16 11:00:00'), + +(5, 6, '化学实验安全注意事项提醒', '最近实验室发生了几起小事故,提醒大家一定要注意安全!特别是使用强酸强碱时,护目镜和手套必须佩戴。实验无小事,安全第一!同时要做好实验记录...', 178, 34, 3, 1, '2024-12-17 15:20:00'), + +-- 就业实习类帖子 +(6, 3, '券商实习面试经验分享', '刚刚拿到某头部券商的实习offer,分享一下面试经验。金融行业对专业能力和综合素质要求都很高,准备过程中要注意这几个方面:扎实的专业基础、良好的表达能力、对市场的敏感度...', 423, 78, 11, 1, '2024-12-21 14:00:00'), + +(3, 3, 'IT互联网春招总结', '经历了春招季,最终选择了某大厂的后端开发岗位。分享一下投递简历、技术面试、HR面试的全流程经验,希望对计算机专业的同学有帮助。技术面试主要考察数据结构、算法、系统设计...', 567, 89, 15, 2, '2024-05-18 09:15:00'), + +-- 考研考公类帖子 +(15, 7, '历史学考研经验贴', '成功上岸北师大中国史专业!分享一下备考经验:如何选择学校、如何制定复习计划、如何准备专业课等。考研路上不孤单,加油!专业课复习要注意史料分析和论述题...', 389, 72, 13, 1, '2024-12-10 22:00:00'), + +-- 生活服务类帖子 +(9, 8, '出售工科教材一批', '即将毕业,出售一些专业课教材:《结构力学》《材料力学》《工程制图》等,八成新,价格优惠。有需要的学弟学妹可以联系我~都是正版教材,保存得很好', 156, 12, 2, 1, '2024-12-22 18:30:00'), + +(13, 8, '寻找珞珈山丢失的口腔器械包', '昨天在樱花大道丢失了一个蓝色器械包,里面有重要的口腔实习用具。如有好心人捡到,请联系我,必有重谢!器械包上有我的姓名标签', 89, 8, 1, 1, '2024-12-23 07:45:00'); + +-- 插入评论数据 +INSERT INTO `comments` (`post_id`, `user_id`, `content`, `parent_id`, `like_count`, `status`, `created_at`) VALUES +-- 对数学建模帖子的评论 +(1, 3, '恭喜学长!我们正在准备下半年的国赛,请问有什么推荐的学习资料吗?', NULL, 5, 1, '2024-12-20 10:30:00'), +(1, 6, '数模确实需要很强的团队协作能力,我们当时就是沟通不够充分才没拿到好成绩', NULL, 3, 1, '2024-12-20 11:15:00'), +(1, 2, '推荐《数学建模方法与分析》这本书,MATLAB和Python都要熟练掌握', 1, 2, 1, '2024-12-20 12:00:00'), + +-- 对樱花帖子的评论 +(4, 10, '照片拍得真美!求拍摄参数和后期处理方法', NULL, 8, 1, '2024-04-10 14:30:00'), +(4, 16, '武大的樱花确实是一绝,每年都要来打卡', NULL, 4, 1, '2024-04-10 15:45:00'), + +-- 对法学院帖子的评论 +(7, 15, '法学院的模拟法庭一直很有名,想去观摩学习', NULL, 3, 1, '2024-12-16 13:00:00'), +(7, 4, '欢迎其他学院的同学来观摩!比赛时间是下周五晚上', 6, 1, 1, '2024-12-16 14:30:00'), + +-- 对实习帖子的评论 +(9, 2, '金融行业竞争确实激烈,学长有什么建议给想进入这个行业的同学吗?', NULL, 4, 1, '2024-12-21 15:30:00'), +(9, 6, '建议先把CFA一级考出来,然后多参加实习积累经验', 8, 6, 1, '2024-12-21 16:45:00'); + +-- 插入点赞数据 +INSERT INTO `post_likes` (`user_id`, `post_id`, `created_at`) VALUES +-- 用户点赞帖子 +(2, 4, '2024-04-10 11:00:00'), +(2, 7, '2024-12-16 12:00:00'), +(3, 1, '2024-12-20 10:00:00'), +(3, 4, '2024-04-10 16:00:00'), +(4, 1, '2024-12-20 11:30:00'), +(4, 9, '2024-12-21 15:00:00'), +(5, 2, '2024-12-19 17:30:00'), +(6, 1, '2024-12-20 13:00:00'), +(6, 10, '2024-05-18 10:00:00'); + +-- 插入学习资源数据 +INSERT INTO `resources` (`user_id`, `title`, `description`, `file_url`, `file_size`, `file_type`, `category_id`, `download_count`, `like_count`, `status`) VALUES +(2, '数据结构课程设计报告', '包含完整的数据结构课程设计实验报告,涵盖栈、队列、树、图等数据结构的实现和应用。', '/files/data-structure-report.pdf', 2048576, 'application/pdf', 1, 15, 8, 1), +(3, '算法导论学习笔记', '详细的算法导论学习笔记,包含排序算法、图算法、动态规划等重要算法的分析和实现。', '/files/algorithm-notes.docx', 1572864, 'application/msword', 1, 25, 12, 1), +(2, '高等数学期末复习资料', '高等数学期末考试复习资料合集,包含重要公式、定理证明和典型习题解答。', '/files/calculus-review.pdf', 3145728, 'application/pdf', 1, 32, 18, 1), +(6, '宏观经济学PPT课件', '经济学专业课件,包含货币政策、财政政策等核心内容。', '/files/macro-economics.pptx', 5242880, 'application/vnd.ms-powerpoint', 1, 20, 15, 1), +(14, '校园生活指南', '新生校园生活指南,包含宿舍管理、食堂介绍、图书馆使用等实用信息。', '/files/campus-guide.pdf', 1048576, 'application/pdf', 2, 45, 28, 1), +(3, '计算机网络实验代码', '计算机网络课程实验代码合集,包含Socket编程、HTTP协议实现等。', '/files/network-lab-code.zip', 4194304, 'application/zip', 5, 18, 10, 1); + +-- 插入课程数据 +INSERT INTO `courses` (`user_id`, `name`, `teacher`, `location`, `day_of_week`, `start_time`, `end_time`, `start_week`, `end_week`, `semester`, `color`, `status`) VALUES +-- 数学学院学生的课程 +(2, '高等代数', '张教授', '数学学院楼201', 1, '08:00:00', '09:40:00', 1, 16, '2024-2', '#409EFF', 1), +(2, '实变函数', '李老师', '数学学院楼301', 3, '14:00:00', '15:40:00', 1, 16, '2024-2', '#67C23A', 1), +(2, '数学建模', '王教授', '计算中心机房', 5, '19:00:00', '21:00:00', 1, 16, '2024-2', '#E6A23C', 1), + +-- 计算机学院学生的课程 +(3, '数据结构与算法', '赵教授', '信息学部计算机楼', 2, '10:00:00', '11:40:00', 1, 16, '2024-2', '#409EFF', 1), +(3, '软件工程', '钱老师', '信息学部B楼302', 4, '14:00:00', '15:40:00', 1, 16, '2024-2', '#67C23A', 1), +(3, '算法竞赛训练', 'ACM教练', '信息学部机房', 6, '19:30:00', '21:30:00', 1, 16, '2024-2', '#E6A23C', 1), + +-- 法学院学生的课程 +(4, '民法学', '孙教授', '法学院模拟法庭', 1, '10:00:00', '11:40:00', 1, 16, '2024-2', '#409EFF', 1), +(4, '法理学', '周老师', '法学院研讨室', 3, '15:50:00', '17:30:00', 1, 16, '2024-2', '#67C23A', 1), + +-- 经管学院学生的课程 +(6, '宏观经济学', '吴教授', '经管大楼B201', 1, '08:00:00', '09:40:00', 1, 16, '2024-2', '#409EFF', 1), +(6, '计量经济学', '郑老师', '经管大楼机房', 2, '10:00:00', '11:40:00', 1, 16, '2024-2', '#67C23A', 1); + +-- 插入日程数据 +INSERT INTO `schedules` (`user_id`, `title`, `description`, `start_time`, `end_time`, `location`, `is_all_day`, `reminder`, `color`, `status`) VALUES +-- 学习相关日程 +(2, '高等代数期末复习', '准备高等代数期末考试,重点复习线性变换和特征值', '2025-01-10 19:00:00', '2025-01-10 22:00:00', '图书馆总馆3楼', 0, 30, '#409EFF', 1), +(3, '算法竞赛训练', 'ACM周赛讲解,动态规划专题', '2025-01-12 19:30:00', '2025-01-12 21:30:00', '信息学部机房', 0, 15, '#67C23A', 1), +(4, '模拟法庭准备', '准备"枫叶杯"模拟法庭大赛材料', '2025-01-08 14:00:00', '2025-01-08 17:00:00', '法学院研讨室', 0, 60, '#E6A23C', 1), + +-- 社团活动 +(14, '诗词社例会', '讨论新学期诗词创作活动安排', '2025-01-15 18:30:00', '2025-01-15 20:00:00', '樱园学生活动中心', 0, 30, '#909399', 1), +(16, '校报编辑部会议', '讨论下期专题策划和采访安排', '2025-01-16 17:00:00', '2025-01-16 18:30:00', '学生事务中心', 0, 15, '#909399', 1), + +-- 实习实践 +(6, '券商实习面试', '参加XX证券公司实习生面试', '2025-01-20 14:00:00', '2025-01-20 16:00:00', '金融街', 0, 60, '#F56C6C', 1), +(12, '医院见习', '跟随带教老师查房学习', '2025-01-18 07:30:00', '2025-01-18 12:00:00', '人民医院', 0, 120, '#C0C4CC', 1), + +-- 个人安排 +(2, '期末考试', '高等代数期末考试', '2025-01-25 08:00:00', '2025-01-25 10:00:00', '数学学院楼201', 0, 1440, '#F56C6C', 1), +(3, '项目答辩', '软件工程课程设计项目答辩', '2025-01-22 14:00:00', '2025-01-22 17:00:00', '信息学部B楼', 0, 720, '#E6A23C', 1), +(6, '考研复试准备', '准备经济学研究生复试材料', '2025-01-30 09:00:00', '2025-01-30 18:00:00', '图书馆', 1, 2880, '#9B59B6', 1); + +-- ========================================== +-- 完成提示 +-- ========================================== + +SELECT 'UniLife数据库重建完成!所有表和测试数据已成功插入。' AS result; +SELECT '数据库结构:无外键约束,使用应用层维护数据一致性。' AS architecture; +SELECT CONCAT('总共创建了 ', COUNT(*), ' 个表') AS table_count FROM information_schema.tables WHERE table_schema = 'UniLife'; +SELECT '可以开始启动应用服务了!' AS next_step; \ No newline at end of file diff --git a/unilife-server/src/main/resources/db/test-data.sql b/unilife-server/src/main/resources/db/test-data.sql index eda2dbf..7796772 100644 --- a/unilife-server/src/main/resources/db/test-data.sql +++ b/unilife-server/src/main/resources/db/test-data.sql @@ -1,36 +1,195 @@ --- 测试数据插入脚本 +-- 武汉大学学生论坛测试数据 -- 使用数据库 USE UniLife; --- 插入测试用户数据 -INSERT INTO `users` (`username`, `email`, `password`, `nickname`, `role`, `status`, `is_verified`, `student_id`, `department`, `major`, `grade`) VALUES -('testuser1', 'test1@student.edu.cn', '123456', '张小明', 0, 1, 1, '2021001001', '计算机科学与技术学院', '计算机科学与技术', '2021'), -('testuser2', 'test2@student.edu.cn', '123456', '李小红', 0, 1, 1, '2021001002', '数学与统计学院', '数学与应用数学', '2021'), -('testuser3', 'test3@student.edu.cn', '123456', '王小刚', 0, 1, 1, '2021001003', '物理学院', '物理学', '2021'); +-- 清空现有测试数据(保留表结构和管理员账号) +DELETE FROM resource_likes; +DELETE FROM post_likes; +DELETE FROM comment_likes; +DELETE FROM comments; +DELETE FROM posts; +DELETE FROM resources; +DELETE FROM schedules; +DELETE FROM courses; +DELETE FROM users WHERE id > 1; -- 保留管理员账号 --- 插入测试资源数据 +-- 清空可能存在的重复分类 +DELETE FROM categories WHERE name IN ('学院专区', '考研考公', '生活服务'); + +-- 重置自增ID +ALTER TABLE users AUTO_INCREMENT = 2; +ALTER TABLE posts AUTO_INCREMENT = 1; +ALTER TABLE comments AUTO_INCREMENT = 1; +ALTER TABLE post_likes AUTO_INCREMENT = 1; +ALTER TABLE comment_likes AUTO_INCREMENT = 1; +ALTER TABLE resources AUTO_INCREMENT = 1; +ALTER TABLE resource_likes AUTO_INCREMENT = 1; +ALTER TABLE courses AUTO_INCREMENT = 1; +ALTER TABLE schedules AUTO_INCREMENT = 1; +ALTER TABLE categories AUTO_INCREMENT = 6; + +-- 更新现有分类数据(更贴合武汉大学实际) +UPDATE `categories` SET + `name` = '学术交流', + `description` = '学术讨论、科研分享、竞赛经验', + `icon` = '📚' +WHERE `name` = '学习交流'; + +UPDATE `categories` SET + `description` = '武汉大学校园生活、社团活动、文化娱乐', + `icon` = '🏫' +WHERE `name` = '校园生活'; + +UPDATE `categories` SET + `name` = '就业实习', + `description` = '实习经验、求职心得、职业规划', + `icon` = '💼' +WHERE `name` = '求职就业'; + +-- 插入新的分类 +INSERT INTO `categories` (`name`, `description`, `icon`, `sort`, `status`) VALUES +('学院专区', '各学院学生交流专区', '🎓', 6, 1), +('考研考公', '研究生入学考试、公务员考试', '📖', 7, 1), +('生活服务', '二手交易、失物招领、校园服务', '🛍️', 8, 1); + +-- 1. 插入武汉大学学生用户数据 +INSERT INTO `users` (`username`, `email`, `password`, `nickname`, `bio`, `gender`, `student_id`, `department`, `major`, `grade`, `points`, `role`, `status`, `is_verified`, `created_at`) VALUES +-- 文理学部学生 +('czq2024', 'czq@whu.edu.cn', '123456', '珞珈数学狗', '数学与统计学院2022级数学类,热爱数学建模,ACM银牌选手', 1, '2022301140001', '数学与统计学院', '数学类', '2022级', 150, 0, 1, 1, '2024-09-01 09:00:00'), +('lihua_cs', 'lihua@whu.edu.cn', '123456', '代码诗人', '计算机学院2021级软件工程,全栈开发爱好者,开源项目贡献者', 1, '2021301120001', '计算机学院', '软件工程', '2021级', 230, 0, 1, 1, '2024-09-01 10:00:00'), +('wangming_law', 'wangming@whu.edu.cn', '123456', '法学小白', '法学院2023级法学专业,模拟法庭常客,梦想成为大律师', 1, '2023301080001', '法学院', '法学', '2023级', 80, 0, 1, 1, '2024-09-01 11:00:00'), +('zhangwei_chem', 'zhangwei@whu.edu.cn', '123456', '化学实验员', '化学与分子科学学院2022级化学专业,实验室常驻,合成达人', 1, '2022301130001', '化学与分子科学学院', '化学', '2022级', 120, 0, 1, 1, '2024-09-01 12:00:00'), +('liuxin_econ', 'liuxin@whu.edu.cn', '123456', '经济观察者', '经济与管理学院2021级经济学,关注宏观经济政策,券商实习生', 2, '2021301110001', '经济与管理学院', '经济学', '2021级', 200, 0, 1, 1, '2024-09-01 13:00:00'), + +-- 工学部学生 +('chenfei_water', 'chenfei@whu.edu.cn', '123456', '水利工程师', '水利水电学院2022级水利水电工程,三峡实习经历,立志建设美丽中国', 1, '2022301320001', '水利水电学院', '水利水电工程', '2022级', 90, 0, 1, 1, '2024-09-01 14:00:00'), +('sunhao_power', 'sunhao@whu.edu.cn', '123456', '电气小子', '电气与自动化学院2023级电气工程及其自动化,电力系统仿真专家', 1, '2023301330001', '电气与自动化学院', '电气工程及其自动化', '2023级', 70, 0, 1, 1, '2024-09-01 15:00:00'), +('wujing_civil', 'wujing@whu.edu.cn', '123456', '土木妹子', '土木建筑工程学院2022级土木工程,桥梁设计爱好者,BIM技术达人', 2, '2022301340001', '土木建筑工程学院', '土木工程', '2022级', 110, 0, 1, 1, '2024-09-01 16:00:00'), + +-- 信息学部学生 +('liqiang_remote', 'liqiang@whu.edu.cn', '123456', '遥感专家', '遥感信息工程学院2021级遥感科学与技术,无人机航拍爱好者', 1, '2021301210001', '遥感信息工程学院', '遥感科学与技术', '2021级', 180, 0, 1, 1, '2024-09-01 17:00:00'), +('zhaoli_survey', 'zhaoli@whu.edu.cn', '123456', '测绘达人', '测绘学院2022级测绘工程,GPS定位技术研究者,野外作业经验丰富', 1, '2022301220001', '测绘学院', '测绘工程', '2022级', 95, 0, 1, 1, '2024-09-01 18:00:00'), + +-- 医学部学生 +('huangyan_med', 'huangyan@whu.edu.cn', '123456', '未来医生', '基础医学院2020级临床医学,人民医院实习生,立志救死扶伤', 2, '2020301410001', '基础医学院', '临床医学', '2020级', 250, 0, 1, 1, '2024-09-01 19:00:00'), +('wangpeng_dental', 'wangpeng@whu.edu.cn', '123456', '口腔医师', '口腔医学院2021级口腔医学,口腔医院见习,关注口腔健康科普', 1, '2021301420001', '口腔医学院', '口腔医学', '2021级', 160, 0, 1, 1, '2024-09-01 20:00:00'), + +-- 人文社科学部学生 +('luxiaoya_chinese', 'luxiaoya@whu.edu.cn', '123456', '文学少女', '文学院2022级汉语言文学,古典文学爱好者,诗词社社长', 2, '2022301050001', '文学院', '汉语言文学', '2022级', 140, 0, 1, 1, '2024-09-01 21:00:00'), +('zhoujie_history', 'zhoujie@whu.edu.cn', '123456', '史学研究生', '历史学院研究生,中国古代史方向,博物馆志愿者', 1, '2024302050001', '历史学院', '中国史', '2024级', 100, 0, 1, 1, '2024-09-01 22:00:00'), +('tanglei_news', 'tanglei@whu.edu.cn', '123456', '新传人', '新闻与传播学院2021级新闻学,校媒记者,关注社会热点', 1, '2021301070001', '新闻与传播学院', '新闻学', '2021级', 170, 0, 1, 1, '2024-09-01 23:00:00'); + +-- 2. 插入论坛帖子数据(使用已存在的用户ID) +INSERT INTO `posts` (`user_id`, `category_id`, `title`, `content`, `view_count`, `like_count`, `comment_count`, `status`, `created_at`) VALUES +-- 学术交流类帖子 +(2, 1, '数学建模美赛经验分享', '刚刚结束的美国大学生数学建模竞赛,我们团队获得了M奖!分享一下参赛经验和技巧,希望对学弟学妹们有帮助。数模比赛不仅考验数学能力,更重要的是团队协作和论文写作能力。首先要选择合适的队友,最好是数学、编程、英语各有所长的组合...', 256, 42, 8, 2, '2024-12-20 09:30:00'), + +(3, 1, 'ACM-ICPC区域赛总结', '参加了西安站的ACM区域赛,虽然没能拿到金牌,但收获很大。分享一下刷题心得和比赛策略,特别是动态规划和图论算法的练习方法。建议大家多在Codeforces和AtCoder上练习,这些平台的题目质量很高...', 189, 35, 6, 1, '2024-12-19 16:45:00'), + +(6, 1, '宏观经济学课程研讨:通胀与货币政策', '最近在学习宏观经济学,对当前的通胀形势和央行货币政策有一些思考。想和大家讨论一下利率调整对经济的影响机制,特别是在当前全球经济形势下的作用...', 145, 28, 4, 1, '2024-12-18 14:20:00'), + +-- 校园生活类帖子 +(14, 2, '武大樱花季摄影大赛作品展示', '樱花季刚过,分享一些在樱花大道拍摄的照片。今年的樱花开得特别美,虽然人很多,但还是拍到了一些不错的角度。附上拍摄技巧分享!使用的是佳能5D4,光圈f/2.8,ISO400,后期用LR调色...', 1234, 156, 12, 2, '2024-04-10 10:15:00'), + +(16, 2, '校运动会志愿者招募!', '第55届田径运动会即将开始,现招募志愿者!工作内容包括引导、记分、颁奖等。参与志愿服务可获得志愿时长认证,还有纪念品哦~有意向的同学请在评论区留言或私信联系我', 456, 89, 5, 1, '2024-12-15 08:00:00'), + +(11, 2, '测绘学院野外实习日记', '刚从庐山实习回来,分享一下野外测量的酸甜苦辣。早上5点起床,背着仪器爬山,虽然辛苦但收获满满。珞珈山的风景真是看不够啊!学到了很多实际操作技能...', 234, 45, 7, 1, '2024-12-14 19:30:00'), + +-- 学院专区类帖子 +(4, 6, '法学院模拟法庭大赛预告', '一年一度的"枫叶杯"模拟法庭大赛即将开始!欢迎各年级同学组队参加。比赛分为民事组和刑事组,优胜者将代表学院参加全国比赛。这是提升法律实务能力的绝佳机会...', 345, 67, 9, 2, '2024-12-16 11:00:00'), + +(5, 6, '化学实验安全注意事项提醒', '最近实验室发生了几起小事故,提醒大家一定要注意安全!特别是使用强酸强碱时,护目镜和手套必须佩戴。实验无小事,安全第一!同时要做好实验记录...', 178, 34, 3, 1, '2024-12-17 15:20:00'), + +-- 就业实习类帖子 +(6, 3, '券商实习面试经验分享', '刚刚拿到某头部券商的实习offer,分享一下面试经验。金融行业对专业能力和综合素质要求都很高,准备过程中要注意这几个方面:扎实的专业基础、良好的表达能力、对市场的敏感度...', 423, 78, 11, 1, '2024-12-21 14:00:00'), + +(3, 3, 'IT互联网春招总结', '经历了春招季,最终选择了某大厂的后端开发岗位。分享一下投递简历、技术面试、HR面试的全流程经验,希望对计算机专业的同学有帮助。技术面试主要考察数据结构、算法、系统设计...', 567, 89, 15, 2, '2024-05-18 09:15:00'), + +-- 考研考公类帖子 +(15, 7, '历史学考研经验贴', '成功上岸北师大中国史专业!分享一下备考经验:如何选择学校、如何制定复习计划、如何准备专业课等。考研路上不孤单,加油!专业课复习要注意史料分析和论述题...', 389, 72, 13, 1, '2024-12-10 22:00:00'), + +-- 生活服务类帖子 +(9, 8, '出售工科教材一批', '即将毕业,出售一些专业课教材:《结构力学》《材料力学》《工程制图》等,八成新,价格优惠。有需要的学弟学妹可以联系我~都是正版教材,保存得很好', 156, 12, 2, 1, '2024-12-22 18:30:00'), + +(13, 8, '寻找珞珈山丢失的口腔器械包', '昨天在樱花大道丢失了一个蓝色器械包,里面有重要的口腔实习用具。如有好心人捡到,请联系我,必有重谢!器械包上有我的姓名标签', 89, 8, 1, 1, '2024-12-23 07:45:00'); + +-- 3. 插入评论数据 +INSERT INTO `comments` (`post_id`, `user_id`, `content`, `parent_id`, `like_count`, `status`, `created_at`) VALUES +-- 对数学建模帖子的评论 +(1, 3, '恭喜学长!我们正在准备下半年的国赛,请问有什么推荐的学习资料吗?', NULL, 5, 1, '2024-12-20 10:30:00'), +(1, 6, '数模确实需要很强的团队协作能力,我们当时就是沟通不够充分才没拿到好成绩', NULL, 3, 1, '2024-12-20 11:15:00'), +(1, 2, '推荐《数学建模方法与分析》这本书,MATLAB和Python都要熟练掌握', 1, 2, 1, '2024-12-20 12:00:00'), + +-- 对樱花帖子的评论 +(4, 10, '照片拍得真美!求拍摄参数和后期处理方法', NULL, 8, 1, '2024-04-10 14:30:00'), +(4, 16, '武大的樱花确实是一绝,每年都要来打卡', NULL, 4, 1, '2024-04-10 15:45:00'), + +-- 对法学院帖子的评论 +(7, 15, '法学院的模拟法庭一直很有名,想去观摩学习', NULL, 3, 1, '2024-12-16 13:00:00'), +(7, 4, '欢迎其他学院的同学来观摩!比赛时间是下周五晚上', 6, 1, 1, '2024-12-16 14:30:00'), + +-- 对实习帖子的评论 +(9, 2, '金融行业竞争确实激烈,学长有什么建议给想进入这个行业的同学吗?', NULL, 4, 1, '2024-12-21 15:30:00'), +(9, 6, '建议先把CFA一级考出来,然后多参加实习积累经验', 8, 6, 1, '2024-12-21 16:45:00'); + +-- 4. 插入点赞数据 +INSERT INTO `post_likes` (`user_id`, `post_id`, `created_at`) VALUES +-- 用户点赞帖子 +(2, 4, '2024-04-10 11:00:00'), +(2, 7, '2024-12-16 12:00:00'), +(3, 1, '2024-12-20 10:00:00'), +(3, 4, '2024-04-10 16:00:00'), +(4, 1, '2024-12-20 11:30:00'), +(4, 9, '2024-12-21 15:00:00'), +(5, 2, '2024-12-19 17:30:00'), +(6, 1, '2024-12-20 13:00:00'), +(6, 10, '2024-05-18 10:00:00'); + +-- 5. 插入学习资源数据 INSERT INTO `resources` (`user_id`, `title`, `description`, `file_url`, `file_size`, `file_type`, `category_id`, `download_count`, `like_count`, `status`) VALUES -(2, '数据结构课程设计报告', '包含完整的数据结构课程设计实验报告,涵盖栈、队列、树、图等数据结构的实现和应用。', 'https://example.com/files/data-structure-report.pdf', 2048576, 'application/pdf', 1, 15, 8, 1), -(2, '算法导论学习笔记', '详细的算法导论学习笔记,包含排序算法、图算法、动态规划等重要算法的分析和实现。', 'https://example.com/files/algorithm-notes.docx', 1572864, 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 1, 25, 12, 1), -(3, '高等数学期末复习资料', '高等数学期末考试复习资料合集,包含重要公式、定理证明和典型习题解答。', 'https://example.com/files/calculus-review.pdf', 3145728, 'application/pdf', 1, 32, 18, 1), -(3, '线性代数PPT课件', '线性代数完整PPT课件,包含矩阵运算、向量空间、特征值等核心内容。', 'https://example.com/files/linear-algebra.pptx', 5242880, 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 1, 20, 15, 1), -(4, '校园生活指南', '新生校园生活指南,包含宿舍管理、食堂介绍、图书馆使用等实用信息。', 'https://example.com/files/campus-guide.pdf', 1048576, 'application/pdf', 2, 45, 28, 1), -(2, '计算机网络实验代码', '计算机网络课程实验代码合集,包含Socket编程、HTTP协议实现等。', 'https://example.com/files/network-lab-code.zip', 4194304, 'application/zip', 5, 18, 10, 1); - --- 插入测试课程数据 +(2, '数据结构课程设计报告', '包含完整的数据结构课程设计实验报告,涵盖栈、队列、树、图等数据结构的实现和应用。', '/files/data-structure-report.pdf', 2048576, 'application/pdf', 1, 15, 8, 1), +(3, '算法导论学习笔记', '详细的算法导论学习笔记,包含排序算法、图算法、动态规划等重要算法的分析和实现。', '/files/algorithm-notes.docx', 1572864, 'application/msword', 1, 25, 12, 1), +(2, '高等数学期末复习资料', '高等数学期末考试复习资料合集,包含重要公式、定理证明和典型习题解答。', '/files/calculus-review.pdf', 3145728, 'application/pdf', 1, 32, 18, 1), +(6, '宏观经济学PPT课件', '经济学专业课件,包含货币政策、财政政策等核心内容。', '/files/macro-economics.pptx', 5242880, 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 1, 20, 15, 1), +(14, '校园生活指南', '新生校园生活指南,包含宿舍管理、食堂介绍、图书馆使用等实用信息。', '/files/campus-guide.pdf', 1048576, 'application/pdf', 2, 45, 28, 1), +(3, '计算机网络实验代码', '计算机网络课程实验代码合集,包含Socket编程、HTTP协议实现等。', '/files/network-lab-code.zip', 4194304, 'application/zip', 5, 18, 10, 1); + +-- 6. 插入课程数据 INSERT INTO `courses` (`user_id`, `name`, `teacher`, `location`, `day_of_week`, `start_time`, `end_time`, `start_week`, `end_week`, `semester`, `color`, `status`) VALUES -(2, '数据结构', '张教授', '教学楼A201', 1, '08:00:00', '09:40:00', 1, 16, '2024-1', '#409EFF', 1), -(2, '算法设计与分析', '李老师', '教学楼B301', 3, '10:00:00', '11:40:00', 1, 16, '2024-1', '#67C23A', 1), -(2, '计算机网络', '王教授', '实验楼C102', 5, '14:00:00', '15:40:00', 1, 16, '2024-1', '#E6A23C', 1), -(3, '高等数学', '赵老师', '教学楼A101', 2, '08:00:00', '09:40:00', 1, 16, '2024-1', '#F56C6C', 1), -(3, '线性代数', '钱教授', '教学楼A203', 4, '10:00:00', '11:40:00', 1, 16, '2024-1', '#909399', 1), -(4, '大学物理', '孙老师', '物理楼101', 1, '14:00:00', '15:40:00', 1, 16, '2024-1', '#9B59B6', 1), -(4, '物理实验', '周教授', '物理实验室', 3, '16:00:00', '17:40:00', 1, 16, '2024-1', '#3498DB', 1); - --- 插入测试日程数据 +-- 数学学院学生的课程 +(2, '高等代数', '张教授', '数学学院楼201', 1, '08:00:00', '09:40:00', 1, 16, '2024-2', '#409EFF', 1), +(2, '实变函数', '李老师', '数学学院楼301', 3, '14:00:00', '15:40:00', 1, 16, '2024-2', '#67C23A', 1), +(2, '数学建模', '王教授', '计算中心机房', 5, '19:00:00', '21:00:00', 1, 16, '2024-2', '#E6A23C', 1), + +-- 计算机学院学生的课程 +(3, '数据结构与算法', '赵教授', '信息学部计算机楼', 2, '10:00:00', '11:40:00', 1, 16, '2024-2', '#409EFF', 1), +(3, '软件工程', '钱老师', '信息学部B楼302', 4, '14:00:00', '15:40:00', 1, 16, '2024-2', '#67C23A', 1), +(3, '算法竞赛训练', 'ACM教练', '信息学部机房', 6, '19:30:00', '21:30:00', 1, 16, '2024-2', '#E6A23C', 1), + +-- 法学院学生的课程 +(4, '民法学', '孙教授', '法学院模拟法庭', 1, '10:00:00', '11:40:00', 1, 16, '2024-2', '#409EFF', 1), +(4, '法理学', '周老师', '法学院研讨室', 3, '15:50:00', '17:30:00', 1, 16, '2024-2', '#67C23A', 1), + +-- 经管学院学生的课程 +(6, '宏观经济学', '吴教授', '经管大楼B201', 1, '08:00:00', '09:40:00', 1, 16, '2024-2', '#409EFF', 1), +(6, '计量经济学', '郑老师', '经管大楼机房', 2, '10:00:00', '11:40:00', 1, 16, '2024-2', '#67C23A', 1); + +-- 7. 插入日程数据 INSERT INTO `schedules` (`user_id`, `title`, `description`, `start_time`, `end_time`, `location`, `is_all_day`, `reminder`, `color`, `status`) VALUES -(2, '期末考试复习', '准备数据结构期末考试', '2024-06-15 19:00:00', '2024-06-15 22:00:00', '图书馆', 0, 30, '#409EFF', 1), -(2, '项目讨论会', '讨论课程设计项目进展', '2024-06-20 14:00:00', '2024-06-20 16:00:00', '实验室', 0, 15, '#67C23A', 1), -(3, '社团活动', '参加数学建模社团活动', '2024-06-18 00:00:00', '2024-06-18 23:59:59', '学生活动中心', 1, 60, '#E6A23C', 1), -(3, '导师面谈', '与导师讨论学习进度', '2024-06-22 10:00:00', '2024-06-22 11:00:00', '办公楼A305', 0, 30, '#F56C6C', 1), -(4, '实验报告提交', '提交物理实验报告', '2024-06-25 23:59:00', '2024-06-25 23:59:59', '在线提交', 0, 1440, '#9B59B6', 1); \ No newline at end of file +-- 学习相关日程 +(2, '高等代数期末复习', '准备高等代数期末考试,重点复习线性变换和特征值', '2025-01-10 19:00:00', '2025-01-10 22:00:00', '图书馆总馆3楼', 0, 30, '#409EFF', 1), +(3, '算法竞赛训练', 'ACM周赛讲解,动态规划专题', '2025-01-12 19:30:00', '2025-01-12 21:30:00', '信息学部机房', 0, 15, '#67C23A', 1), +(4, '模拟法庭准备', '准备"枫叶杯"模拟法庭大赛材料', '2025-01-08 14:00:00', '2025-01-08 17:00:00', '法学院研讨室', 0, 60, '#E6A23C', 1), + +-- 社团活动 +(14, '诗词社例会', '讨论新学期诗词创作活动安排', '2025-01-15 18:30:00', '2025-01-15 20:00:00', '樱园学生活动中心', 0, 30, '#909399', 1), +(16, '校报编辑部会议', '讨论下期专题策划和采访安排', '2025-01-16 17:00:00', '2025-01-16 18:30:00', '学生事务中心', 0, 15, '#909399', 1), + +-- 实习实践 +(6, '券商实习面试', '参加XX证券公司实习生面试', '2025-01-20 14:00:00', '2025-01-20 16:00:00', '金融街', 0, 60, '#F56C6C', 1), +(12, '医院见习', '跟随带教老师查房学习', '2025-01-18 07:30:00', '2025-01-18 12:00:00', '人民医院', 0, 120, '#C0C4CC', 1), + +-- 个人安排 +(2, '期末考试', '高等代数期末考试', '2025-01-25 08:00:00', '2025-01-25 10:00:00', '数学学院楼201', 0, 1440, '#F56C6C', 1), +(3, '项目答辩', '软件工程课程设计项目答辩', '2025-01-22 14:00:00', '2025-01-22 17:00:00', '信息学部B楼', 0, 720, '#E6A23C', 1), +(6, '考研复试准备', '准备经济学研究生复试材料', '2025-01-30 09:00:00', '2025-01-30 18:00:00', '图书馆', 1, 2880, '#9B59B6', 1); \ No newline at end of file diff --git a/unilife-server/src/main/resources/mappers/UserMapper.xml b/unilife-server/src/main/resources/mappers/UserMapper.xml index 2d4b250..c0003ea 100644 --- a/unilife-server/src/main/resources/mappers/UserMapper.xml +++ b/unilife-server/src/main/resources/mappers/UserMapper.xml @@ -159,4 +159,57 @@ ORDER BY created_at DESC + + + + + + UPDATE users + SET status = 0, + updated_at = NOW() + WHERE id = #{id} + + + + + UPDATE posts + SET status = 0, + updated_at = NOW() + WHERE user_id = #{userId} + + + + + UPDATE comments + SET status = 0, + updated_at = NOW() + WHERE user_id = #{userId} + + + + + UPDATE resources + SET status = 0, + updated_at = NOW() + WHERE user_id = #{userId} + + + + + DELETE FROM courses + WHERE user_id = #{userId} + + + + + DELETE FROM schedules + WHERE user_id = #{userId} + + + + + DELETE FROM post_likes WHERE user_id = #{userId}; + DELETE FROM comment_likes WHERE user_id = #{userId}; + DELETE FROM resource_likes WHERE user_id = #{userId}; + diff --git a/问题修复和stagewise集成说明.md b/问题修复和stagewise集成说明.md new file mode 100644 index 0000000..9d08833 --- /dev/null +++ b/问题修复和stagewise集成说明.md @@ -0,0 +1,123 @@ +# 问题修复和Stagewise集成说明 + +## 🔧 已修复的问题 + +### 1. Schedule实体类reminder字段类型错误 +**问题描述**: +``` +Value '1440' is outside of valid range for type java.lang.Byte +``` + +**根本原因**: +- 数据库中schedules表的reminder字段已修改为INT类型 +- 但Java实体类中的reminder字段仍然是Byte类型(范围-128到127) +- 测试数据中有1440、720等超出Byte范围的值 + +**解决方案**: +修改了以下文件中的reminder字段类型从Byte改为Integer: +- `unilife-server/src/main/java/com/unilife/model/entity/Schedule.java` +- `unilife-server/src/main/java/com/unilife/model/vo/ScheduleVO.java` +- `unilife-server/src/main/java/com/unilife/model/dto/CreateScheduleDTO.java` + +### 2. 评论显示问题分析 +**问题描述**: +前端显示评论数量9条,但实际只显示2条评论 + +**初步分析**: +- 数据库中确实存在评论数据 +- 一级评论和回复查询逻辑正常 +- 可能是前端渲染或API调用的问题 + +**需要进一步调试**: +- 检查浏览器网络请求 +- 查看前端控制台错误 +- 验证API返回数据 + +## 🚀 Stagewise开发工具集成 + +### 安装的包 +```bash +npm install @stagewise/toolbar-vue --save-dev +``` + +### 集成位置 +修改了 `unilife-frontend/src/App.vue` 文件: + +```vue + + + +``` + +### 特性 +1. ✅ **仅在开发模式运行**:使用 `import.meta.env.DEV` 检查 +2. ✅ **动态导入**:避免在生产环境中包含stagewise代码 +3. ✅ **错误处理**:如果包未安装或导入失败,会优雅降级 +4. ✅ **TypeScript支持**:正确的类型定义避免编译错误 +5. ✅ **Vue 3兼容**:使用组合式API和动态组件 + +### 使用方法 +1. 启动开发服务器:`npm run dev` +2. 打开浏览器访问应用 +3. stagewise工具栏将在开发模式下自动显示 +4. 可以选择页面元素并添加AI编辑注释 + +## 📝 后续步骤 + +### 立即处理 +1. **重启后端服务**以应用Schedule实体类修改 +2. **测试日程功能**确保reminder字段正常工作 +3. **调试评论显示问题** + +### 评论问题调试步骤 +1. 在浏览器中访问帖子详情页 +2. 打开开发者工具检查网络请求 +3. 查看 `/comments/post/{postId}` API的返回数据 +4. 检查前端控制台是否有JavaScript错误 +5. 验证CommentVO的数据映射是否正确 + +### Stagewise工具测试 +1. 确认工具栏在开发模式下可见 +2. 测试选择页面元素功能 +3. 验证不会在生产构建中包含 + +## 🎯 预期结果 + +1. **Schedule功能**:日程提醒时间可以正常设置为大于127分钟的值 +2. **评论功能**:所有评论应该正确显示,包括回复 +3. **Stagewise工具**:在开发模式下提供AI驱动的页面编辑能力 + +--- + +*最后更新:2025年5月29日* \ No newline at end of file