Repository: Carole007/carole-admin Branch: master Commit: db15e9b70ac6 Files: 299 Total size: 40.0 MB Directory structure: gitextract_tddldwrd/ ├── .gitignore ├── LICENSE ├── README.md ├── carole.sql ├── docs/ │ ├── .nojekyll │ ├── README.md │ ├── _coverpage.md │ ├── _navbar.md │ ├── _sidebar.md │ ├── code_gen.md │ ├── config.md │ ├── faq.md │ ├── guide.md │ ├── index.html │ └── install.md ├── front/ │ ├── LICENSE │ ├── README.md │ ├── bin/ │ │ ├── build.bat │ │ ├── package.bat │ │ └── run-web.bat │ ├── html/ │ │ └── ie.html │ ├── index.html │ ├── package.json │ ├── src/ │ │ ├── App.vue │ │ ├── api/ │ │ │ ├── login.js │ │ │ ├── menu.js │ │ │ ├── monitor/ │ │ │ │ ├── cache.js │ │ │ │ ├── logininfor.js │ │ │ │ ├── online.js │ │ │ │ └── server.js │ │ │ ├── system/ │ │ │ │ ├── config.js │ │ │ │ ├── dept.js │ │ │ │ ├── dict/ │ │ │ │ │ ├── data.js │ │ │ │ │ └── type.js │ │ │ │ ├── menu.js │ │ │ │ ├── notice.js │ │ │ │ ├── post.js │ │ │ │ ├── role.js │ │ │ │ └── user.js │ │ │ └── tool/ │ │ │ └── gen.js │ │ ├── assets/ │ │ │ └── styles/ │ │ │ ├── btn.scss │ │ │ ├── element-ui.scss │ │ │ ├── index.scss │ │ │ ├── mixin.scss │ │ │ ├── ruoyi.scss │ │ │ ├── sidebar.scss │ │ │ ├── transition.scss │ │ │ └── variables.module.scss │ │ ├── components/ │ │ │ ├── Breadcrumb/ │ │ │ │ └── index.vue │ │ │ ├── Crontab/ │ │ │ │ ├── day.vue │ │ │ │ ├── hour.vue │ │ │ │ ├── index.vue │ │ │ │ ├── min.vue │ │ │ │ ├── month.vue │ │ │ │ ├── result.vue │ │ │ │ ├── second.vue │ │ │ │ ├── week.vue │ │ │ │ └── year.vue │ │ │ ├── DictTag/ │ │ │ │ └── index.vue │ │ │ ├── Editor/ │ │ │ │ └── index.vue │ │ │ ├── FileList/ │ │ │ │ └── index.vue │ │ │ ├── FileUpload/ │ │ │ │ └── index.vue │ │ │ ├── Hamburger/ │ │ │ │ └── index.vue │ │ │ ├── HeaderSearch/ │ │ │ │ └── index.vue │ │ │ ├── IconSelect/ │ │ │ │ ├── index.vue │ │ │ │ └── requireIcons.js │ │ │ ├── ImagePreview/ │ │ │ │ └── index.vue │ │ │ ├── ImageUpload/ │ │ │ │ └── index.vue │ │ │ ├── Pagination/ │ │ │ │ └── index.vue │ │ │ ├── ParentView/ │ │ │ │ └── index.vue │ │ │ ├── RightToolbar/ │ │ │ │ └── index.vue │ │ │ ├── Screenfull/ │ │ │ │ └── index.vue │ │ │ ├── SizeSelect/ │ │ │ │ └── index.vue │ │ │ ├── SvgIcon/ │ │ │ │ ├── index.vue │ │ │ │ └── svgicon.js │ │ │ ├── TopNav/ │ │ │ │ └── index.vue │ │ │ ├── TreeSelect/ │ │ │ │ └── index.vue │ │ │ └── iFrame/ │ │ │ └── index.vue │ │ ├── directive/ │ │ │ ├── common/ │ │ │ │ └── copyText.js │ │ │ ├── index.js │ │ │ └── permission/ │ │ │ ├── hasPermi.js │ │ │ └── hasRole.js │ │ ├── layout/ │ │ │ ├── components/ │ │ │ │ ├── AppMain.vue │ │ │ │ ├── IframeToggle/ │ │ │ │ │ └── index.vue │ │ │ │ ├── InnerLink/ │ │ │ │ │ └── index.vue │ │ │ │ ├── Navbar.vue │ │ │ │ ├── Settings/ │ │ │ │ │ └── index.vue │ │ │ │ ├── Sidebar/ │ │ │ │ │ ├── Link.vue │ │ │ │ │ ├── Logo.vue │ │ │ │ │ ├── SidebarItem.vue │ │ │ │ │ └── index.vue │ │ │ │ ├── TagsView/ │ │ │ │ │ ├── ScrollPane.vue │ │ │ │ │ └── index.vue │ │ │ │ └── index.js │ │ │ └── index.vue │ │ ├── main.js │ │ ├── permission.js │ │ ├── plugins/ │ │ │ ├── auth.js │ │ │ ├── cache.js │ │ │ ├── download.js │ │ │ ├── index.js │ │ │ ├── modal.js │ │ │ └── tab.js │ │ ├── router/ │ │ │ └── index.js │ │ ├── settings.js │ │ ├── store/ │ │ │ ├── index.js │ │ │ └── modules/ │ │ │ ├── app.js │ │ │ ├── dict.js │ │ │ ├── permission.js │ │ │ ├── settings.js │ │ │ ├── tagsView.js │ │ │ └── user.js │ │ ├── utils/ │ │ │ ├── auth.js │ │ │ ├── dict.js │ │ │ ├── dynamicTitle.js │ │ │ ├── errorCode.js │ │ │ ├── index.js │ │ │ ├── jsencrypt.js │ │ │ ├── permission.js │ │ │ ├── request.js │ │ │ ├── ruoyi.js │ │ │ ├── scroll-to.js │ │ │ ├── theme.js │ │ │ └── validate.js │ │ └── views/ │ │ ├── error/ │ │ │ ├── 401.vue │ │ │ └── 404.vue │ │ ├── index.vue │ │ ├── login.vue │ │ ├── monitor/ │ │ │ ├── cache/ │ │ │ │ ├── index.vue │ │ │ │ └── list.vue │ │ │ ├── logininfor/ │ │ │ │ └── index.vue │ │ │ ├── online/ │ │ │ │ └── index.vue │ │ │ └── server/ │ │ │ └── index.vue │ │ ├── redirect/ │ │ │ └── index.vue │ │ ├── system/ │ │ │ ├── config/ │ │ │ │ ├── edit.vue │ │ │ │ └── index.vue │ │ │ ├── dept/ │ │ │ │ └── index.vue │ │ │ ├── dict/ │ │ │ │ ├── data.vue │ │ │ │ └── index.vue │ │ │ ├── menu/ │ │ │ │ └── index.vue │ │ │ ├── notice/ │ │ │ │ └── index.vue │ │ │ ├── post/ │ │ │ │ └── index.vue │ │ │ ├── role/ │ │ │ │ ├── authUser.vue │ │ │ │ ├── index.vue │ │ │ │ └── selectUser.vue │ │ │ └── user/ │ │ │ ├── authRole.vue │ │ │ ├── index.vue │ │ │ └── profile/ │ │ │ ├── index.vue │ │ │ ├── resetPwd.vue │ │ │ ├── userAvatar.vue │ │ │ └── userInfo.vue │ │ └── tool/ │ │ ├── gen/ │ │ │ ├── basicInfoForm.vue │ │ │ ├── editTable.vue │ │ │ ├── excuteSql.vue │ │ │ ├── genInfoForm.vue │ │ │ ├── importTable.vue │ │ │ └── index.vue │ │ └── swagger/ │ │ └── index.vue │ ├── vite/ │ │ └── plugins/ │ │ ├── auto-import.js │ │ ├── compression.js │ │ ├── index.js │ │ ├── setup-extend.js │ │ └── svg-icon.js │ ├── vite.config.js │ └── vite.config.js.timestamp-1718102364365-ed912c0771327.mjs └── server/ ├── .eslintignore ├── .eslintrc.js ├── .prettierrc ├── nest-cli.json ├── package.json ├── src/ │ ├── admin/ │ │ ├── admin.module.ts │ │ ├── common/ │ │ │ ├── captcha/ │ │ │ │ ├── captcha.controller.ts │ │ │ │ └── vo/ │ │ │ │ └── CaptchaImageVo.ts │ │ │ └── upload/ │ │ │ ├── config/ │ │ │ │ └── uploadConfig.ts │ │ │ ├── dto/ │ │ │ │ └── upload.dto.ts │ │ │ ├── upload.controller.ts │ │ │ └── vo/ │ │ │ └── upload.ts │ │ ├── gen/ │ │ │ ├── dto/ │ │ │ │ ├── exucteSqlDto.ts │ │ │ │ ├── queryDatabaseDto.ts │ │ │ │ └── queryGenTableDto.ts │ │ │ └── gen.controller.ts │ │ └── system/ │ │ ├── auth/ │ │ │ ├── auth.controller.ts │ │ │ └── dto/ │ │ │ └── LoginBody.ts │ │ ├── config/ │ │ │ ├── dto/ │ │ │ │ └── index.ts │ │ │ ├── service/ │ │ │ │ └── sys-config.service.ts │ │ │ └── sys-config.controller.ts │ │ ├── dept/ │ │ │ ├── dto/ │ │ │ │ └── index.ts │ │ │ ├── service/ │ │ │ │ └── sys-dept.service.ts │ │ │ └── sys-dept.controller.ts │ │ ├── dict-data/ │ │ │ ├── dict-data.controller.ts │ │ │ ├── dto/ │ │ │ │ ├── createDictDataDto.ts │ │ │ │ ├── queryDictDataDto.ts │ │ │ │ └── updateDictDataDto.ts │ │ │ └── service/ │ │ │ └── sys-dict-data.service.ts │ │ ├── dict-type/ │ │ │ ├── dict-type.controller.ts │ │ │ ├── dto/ │ │ │ │ ├── createDictTypeDto.ts │ │ │ │ ├── queryDictTypeDto.ts │ │ │ │ └── updateDictTypeDto.ts │ │ │ └── service/ │ │ │ └── sys-dict-type.service.ts │ │ ├── logininfor/ │ │ │ ├── dto/ │ │ │ │ └── index.ts │ │ │ ├── service/ │ │ │ │ └── sys-logininfor.service.ts │ │ │ └── sys-logininfor.controller.ts │ │ ├── menu/ │ │ │ ├── dto/ │ │ │ │ ├── index.ts │ │ │ │ └── queryMenuDto.ts │ │ │ ├── service/ │ │ │ │ └── sys-menu.service.ts │ │ │ └── sys-menu.controller.ts │ │ ├── monitor/ │ │ │ └── monitor.controller.ts │ │ ├── notice/ │ │ │ ├── dto/ │ │ │ │ └── index.ts │ │ │ ├── service/ │ │ │ │ └── sys-notice.service.ts │ │ │ └── sys-notice.controller.ts │ │ ├── post/ │ │ │ ├── dto/ │ │ │ │ └── index.ts │ │ │ ├── service/ │ │ │ │ └── sys-post.service.ts │ │ │ └── sys-post.controller.ts │ │ ├── role/ │ │ │ ├── dto/ │ │ │ │ └── index.ts │ │ │ ├── service/ │ │ │ │ └── sys-role.service.ts │ │ │ └── sys-role.controller.ts │ │ └── user/ │ │ ├── dto/ │ │ │ └── index.ts │ │ ├── service/ │ │ │ └── sys-user.service.ts │ │ └── sys-user.controller.ts │ ├── app.module.ts │ ├── common/ │ │ ├── common.module.ts │ │ ├── constant/ │ │ │ ├── Constants.ts │ │ │ ├── GenConstants.ts │ │ │ └── HttpStatus.ts │ │ ├── decorator/ │ │ │ ├── require-premission.decorator.ts │ │ │ ├── require-role.decorator.ts │ │ │ └── throttle-user.ts │ │ ├── domain/ │ │ │ ├── BaseDomain.ts │ │ │ ├── PageDomain.ts │ │ │ ├── TableDataInfo.ts │ │ │ └── queryDomain.ts │ │ ├── exception/ │ │ │ ├── AuthorizationException.ts │ │ │ └── ValidationException.ts │ │ ├── filter/ │ │ │ └── global-error.filter.ts │ │ ├── guard/ │ │ │ ├── permission/ │ │ │ │ ├── permission.guard.ts │ │ │ │ └── role.guard.ts │ │ │ └── throttler/ │ │ │ └── throttler-custom.guard.ts │ │ ├── interceptors/ │ │ │ └── remove-throttle-headers.interceptor.ts │ │ ├── middleware/ │ │ │ └── auth/ │ │ │ └── auth.middleware.ts │ │ ├── pipe/ │ │ │ ├── parse-int-array.pipe.ts │ │ │ └── validation.pipe.ts │ │ ├── prisma-client/ │ │ │ ├── default.d.ts │ │ │ ├── default.js │ │ │ ├── edge.d.ts │ │ │ ├── edge.js │ │ │ ├── index-browser.js │ │ │ ├── index.d.ts │ │ │ ├── index.js │ │ │ ├── libquery_engine-darwin.dylib.node │ │ │ ├── package.json │ │ │ ├── query_engine-windows.dll.node │ │ │ ├── runtime/ │ │ │ │ ├── edge-esm.js │ │ │ │ ├── edge.js │ │ │ │ ├── index-browser.d.ts │ │ │ │ ├── index-browser.js │ │ │ │ ├── library.d.ts │ │ │ │ ├── library.js │ │ │ │ ├── react-native.js │ │ │ │ └── wasm.js │ │ │ ├── schema.prisma │ │ │ ├── wasm.d.ts │ │ │ └── wasm.js │ │ ├── result/ │ │ │ └── Result.ts │ │ ├── service/ │ │ │ ├── auth/ │ │ │ │ └── auth.service.ts │ │ │ ├── gen/ │ │ │ │ ├── gen-template/ │ │ │ │ │ ├── js/ │ │ │ │ │ │ └── api.js.vm │ │ │ │ │ ├── node/ │ │ │ │ │ │ ├── controller.ts.vm │ │ │ │ │ │ ├── dto.ts.vm │ │ │ │ │ │ └── service.ts.vm │ │ │ │ │ ├── sql/ │ │ │ │ │ │ └── sql.vm │ │ │ │ │ └── vue/ │ │ │ │ │ └── index.vue.vm │ │ │ │ └── gen.service.ts │ │ │ └── prisma/ │ │ │ └── prisma.service.ts │ │ ├── swagger/ │ │ │ └── vo/ │ │ │ └── index.ts │ │ ├── types/ │ │ │ └── gen.d.ts │ │ └── utils/ │ │ ├── Valids.ts │ │ ├── cache.ts │ │ ├── captcha.ts │ │ ├── email.ts │ │ ├── index.ts │ │ ├── prismaUtil.js │ │ ├── redisUtils.ts │ │ └── systemInfo.ts │ ├── config-development.json │ ├── config-production.json │ ├── config.ts │ ├── main.ts │ ├── prisma/ │ │ ├── schema/ │ │ │ ├── gen.prisma │ │ │ └── system.prisma │ │ └── schema.prisma │ └── schedule/ │ └── index.ts ├── test/ │ ├── app.e2e-spec.ts │ ├── jest-e2e.json │ └── password.js ├── tsconfig.build.json ├── tsconfig.json ├── 更新prisma的model.bat ├── 更新prisma的model.sh ├── 驼峰生成prisma的model.bat └── 驼峰生成prisma的model.sh ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitignore ================================================ .DS_Store # Logs logs *.log npm-debug.log* yarn-debug.log* yarn-error.log* lerna-debug.log* .pnpm-debug.log* # Diagnostic reports (https://nodejs.org/api/report.html) report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json # Runtime data pids *.pid *.seed *.pid.lock # Directory for instrumented libs generated by jscoverage/JSCover lib-cov # Coverage directory used by tools like istanbul coverage *.lcov # nyc test coverage .nyc_output # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) .grunt # Bower dependency directory (https://bower.io/) bower_components # node-waf configuration .lock-wscript # Compiled binary addons (https://nodejs.org/api/addons.html) build/Release # Dependency directories node_modules/ jspm_packages/ # Snowpack dependency directory (https://snowpack.dev/) web_modules/ # TypeScript cache *.tsbuildinfo # Optional npm cache directory .npm # Optional eslint cache .eslintcache # Optional stylelint cache .stylelintcache # Microbundle cache .rpt2_cache/ .rts2_cache_cjs/ .rts2_cache_es/ .rts2_cache_umd/ # Optional REPL history .node_repl_history # Output of 'npm pack' *.tgz # Yarn Integrity file .yarn-integrity # dotenv environment variable files .env.development.local .env.test.local .env.production.local .env.local # parcel-bundler cache (https://parceljs.org/) .cache .parcel-cache # Next.js build output .next out # Nuxt.js build / generate output .nuxt dist # Gatsby files .cache/ # Comment in the public line in if your project uses Gatsby and not Next.js # https://nextjs.org/blog/next-9-1#public-directory-support # public # vuepress build output .vuepress/dist # vuepress v2.x temp and cache directory .temp .cache # Docusaurus cache and generated files .docusaurus # Serverless directories .serverless/ # FuseBox cache .fusebox/ # DynamoDB Local files .dynamodb/ # TernJS port file .tern-port # Stores VSCode versions used for testing VSCode extensions .vscode-test # yarn v2 .yarn/cache .yarn/unplugged .yarn/build-state.yml .yarn/install-state.gz .pnp.* # idea .idea .vscode ================================================ FILE: LICENSE ================================================ MIT License Copyright (c) 2024 Carole Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: README.md ================================================
Carole-Admin Logo

Carole-Admin

一款基于 NestJS + Vue 前后端分离的后台框架

--- ## 🌟 平台简介 **Carole-Admin** 是一款基于 [NestJS](https://nestjs.com/) + [Prisma](https://www.prisma.io/) + [Vue](https://vuejs.org/) + [Vite](https://vitejs.dev/) 的前后端分离全栈快速开发平台,前端参考 [若依](https://github.com/yangzongzhuan/RuoYi-Vue3) 实现。 - 前端: [Vue3](https://vuejs.org/)、[Element Plus](https://element-plus.org/)、[Vite](https://vitejs.dev/) - 后端: [NestJS](https://nestjs.com/)、[Prisma](https://www.prisma.io/)、[ioredis](https://github.com/redis/ioredis)、[JWT](https://github.com/auth0/node-jsonwebtoken) - 权限认证:基于 JWT,支持多终端认证 - 动态权限菜单:多方式权限控制,灵活高效 - 支持接口限流 - 提供代码生成器,一键生成前后端代码,加速开发效率 --- ## 📚 项目文档 👉 本项目详细文档请访问: 🌐 [在线文档](https://carole007.github.io/carole-admin/) 📂 [README.md](./docs/README.md) ================================================ FILE: carole.sql ================================================ /* Navicat Premium Dump SQL Source Server : mysql8 Source Server Type : MySQL Source Server Version : 80404 (8.4.4) Source Host : localhost:3306 Source Schema : carole Target Server Type : MySQL Target Server Version : 80404 (8.4.4) File Encoding : 65001 Date: 04/07/2025 17:07:50 */ SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for gen_table -- ---------------------------- DROP TABLE IF EXISTS `gen_table`; CREATE TABLE `gen_table` ( `table_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT '编号', `table_name` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '表名称', `table_comment` varchar(500) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '表描述', `sub_table_name` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '关联子表的表名', `sub_table_fk_name` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '子表关联的外键名', `class_name` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '实体类名称', `tpl_category` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT 'crud' COMMENT '使用的模板(crud单表操作 tree树表操作)', `tpl_web_type` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '前端模板类型(element-ui模版 element-plus模版)', `package_name` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '生成包路径', `module_name` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '生成模块名', `business_name` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '生成业务名', `function_name` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '生成功能名', `function_author` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '生成功能作者', `gen_type` char(1) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '0' COMMENT '生成代码方式(0zip压缩包 1自定义路径)', `gen_path` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '/' COMMENT '生成路径(不填默认项目路径)', `options` varchar(1000) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '其它生成选项', `create_by` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '创建者', `create_time` varchar(25) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '创建时间', `update_by` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '更新者', `update_time` varchar(25) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '更新时间', `remark` varchar(500) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '备注', PRIMARY KEY (`table_id`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=117 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='代码生成业务表'; -- ---------------------------- -- Records of gen_table -- ---------------------------- BEGIN; INSERT INTO `gen_table` (`table_id`, `table_name`, `table_comment`, `sub_table_name`, `sub_table_fk_name`, `class_name`, `tpl_category`, `tpl_web_type`, `package_name`, `module_name`, `business_name`, `function_name`, `function_author`, `gen_type`, `gen_path`, `options`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (107, 'sys_logininfor', '系统访问记录', NULL, NULL, 'SysLogininfor', 'crud', 'element-plus', 'admin', 'system', 'logininfor', '系统访问记录', 'carole', '0', '/', NULL, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16', NULL); INSERT INTO `gen_table` (`table_id`, `table_name`, `table_comment`, `sub_table_name`, `sub_table_fk_name`, `class_name`, `tpl_category`, `tpl_web_type`, `package_name`, `module_name`, `business_name`, `function_name`, `function_author`, `gen_type`, `gen_path`, `options`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (108, 'sys_menu', '菜单权限表', NULL, NULL, 'SysMenu', 'crud', 'element-plus', 'admin', 'system', 'menu', '菜单权限表', 'carole', '0', '/', NULL, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16', NULL); INSERT INTO `gen_table` (`table_id`, `table_name`, `table_comment`, `sub_table_name`, `sub_table_fk_name`, `class_name`, `tpl_category`, `tpl_web_type`, `package_name`, `module_name`, `business_name`, `function_name`, `function_author`, `gen_type`, `gen_path`, `options`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (109, 'sys_notice', '通知公告表', NULL, NULL, 'SysNotice', 'crud', 'element-plus', 'admin', 'system', 'notice', '通知公告表', 'carole', '0', '/', NULL, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16', NULL); INSERT INTO `gen_table` (`table_id`, `table_name`, `table_comment`, `sub_table_name`, `sub_table_fk_name`, `class_name`, `tpl_category`, `tpl_web_type`, `package_name`, `module_name`, `business_name`, `function_name`, `function_author`, `gen_type`, `gen_path`, `options`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (110, 'sys_post', '岗位信息表', NULL, NULL, 'SysPost', 'crud', 'element-plus', 'admin', 'system', 'post', '岗位信息表', 'carole', '0', '/', NULL, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16', NULL); INSERT INTO `gen_table` (`table_id`, `table_name`, `table_comment`, `sub_table_name`, `sub_table_fk_name`, `class_name`, `tpl_category`, `tpl_web_type`, `package_name`, `module_name`, `business_name`, `function_name`, `function_author`, `gen_type`, `gen_path`, `options`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (111, 'sys_role', '角色信息表', NULL, NULL, 'SysRole', 'crud', 'element-plus', 'admin', 'system', 'role', '角色信息表', 'carole', '0', '/', NULL, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16', NULL); INSERT INTO `gen_table` (`table_id`, `table_name`, `table_comment`, `sub_table_name`, `sub_table_fk_name`, `class_name`, `tpl_category`, `tpl_web_type`, `package_name`, `module_name`, `business_name`, `function_name`, `function_author`, `gen_type`, `gen_path`, `options`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (112, 'sys_user', '用户信息表', NULL, NULL, 'SysUser', 'crud', 'element-plus', 'admin', 'system', 'user', '用户信息表', 'carole', '0', '/', NULL, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16', NULL); INSERT INTO `gen_table` (`table_id`, `table_name`, `table_comment`, `sub_table_name`, `sub_table_fk_name`, `class_name`, `tpl_category`, `tpl_web_type`, `package_name`, `module_name`, `business_name`, `function_name`, `function_author`, `gen_type`, `gen_path`, `options`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (113, 'sys_config', '参数配置表', NULL, NULL, 'SysConfig', 'crud', 'element-plus', 'admin', 'system', 'config', '参数配置表', 'carole', '0', '/', NULL, 'admin', '2024-06-16 14:05:26', 'admin', '2024-06-16 14:05:26', NULL); INSERT INTO `gen_table` (`table_id`, `table_name`, `table_comment`, `sub_table_name`, `sub_table_fk_name`, `class_name`, `tpl_category`, `tpl_web_type`, `package_name`, `module_name`, `business_name`, `function_name`, `function_author`, `gen_type`, `gen_path`, `options`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (114, 'sys_dept', '部门表', NULL, NULL, 'SysDept', 'crud', 'element-plus', 'admin', 'system', 'dept', '部门表', 'carole', '0', '/', NULL, 'admin', '2024-06-16 14:05:26', 'admin', '2024-06-16 14:05:26', NULL); INSERT INTO `gen_table` (`table_id`, `table_name`, `table_comment`, `sub_table_name`, `sub_table_fk_name`, `class_name`, `tpl_category`, `tpl_web_type`, `package_name`, `module_name`, `business_name`, `function_name`, `function_author`, `gen_type`, `gen_path`, `options`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (115, 'sys_dict_data', '字典数据表', NULL, NULL, 'SysDictData', 'crud', 'element-plus', 'admin', 'system', 'data', '字典数据表', 'carole', '0', '/', NULL, 'admin', '2024-06-16 14:05:26', 'admin', '2024-06-16 14:05:26', NULL); INSERT INTO `gen_table` (`table_id`, `table_name`, `table_comment`, `sub_table_name`, `sub_table_fk_name`, `class_name`, `tpl_category`, `tpl_web_type`, `package_name`, `module_name`, `business_name`, `function_name`, `function_author`, `gen_type`, `gen_path`, `options`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (116, 'sys_dict_type', '字典类型表', NULL, NULL, 'SysDictType', 'crud', 'element-plus', 'admin', 'system', 'type', '字典类型表', 'carole', '0', '/', NULL, 'admin', '2024-06-16 14:05:26', 'admin', '2024-06-16 14:05:26', NULL); COMMIT; -- ---------------------------- -- Table structure for gen_table_column -- ---------------------------- DROP TABLE IF EXISTS `gen_table_column`; CREATE TABLE `gen_table_column` ( `column_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT '编号', `table_id` int unsigned DEFAULT NULL COMMENT '归属表编号', `column_name` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '列名称', `column_comment` varchar(500) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '列描述', `column_type` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '列类型', `java_type` varchar(500) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT 'JAVA类型', `java_field` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT 'JAVA字段名', `is_pk` char(1) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '是否主键(1是)', `is_increment` char(1) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '是否自增(1是)', `is_required` char(1) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '是否必填(1是)', `is_insert` char(1) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '是否为插入字段(1是)', `is_edit` char(1) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '是否编辑字段(1是)', `is_list` char(1) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '是否列表字段(1是)', `is_query` char(1) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '是否查询字段(1是)', `query_type` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT 'EQ' COMMENT '查询方式(等于、不等于、大于、小于、范围)', `html_type` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '显示类型(文本框、文本域、下拉框、复选框、单选框、日期控件)', `dict_type` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '字典类型', `sort` int DEFAULT NULL COMMENT '排序', `create_by` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '创建者', `create_time` varchar(25) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '创建时间', `update_by` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '更新者', `update_time` varchar(25) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '更新时间', PRIMARY KEY (`column_id`) USING BTREE, KEY `gen_table_column_table_id_idx` (`table_id`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=1300 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='代码生成业务表字段'; -- ---------------------------- -- Records of gen_table_column -- ---------------------------- BEGIN; INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1175, 107, 'info_id', '访问ID', 'int(10) unsigned', 'Number', 'infoId', '1', '1', '0', '1', NULL, NULL, NULL, 'EQ', 'input', '', 1, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1176, 107, 'user_name', '用户账号', 'varchar(50)', 'String', 'userName', '0', '0', '0', '1', '1', '1', '1', 'LIKE', 'input', '', 2, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1177, 107, 'ipaddr', '登录IP地址', 'varchar(128)', 'String', 'ipaddr', '0', '0', '0', '1', '1', '1', '1', 'EQ', 'input', '', 3, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1178, 107, 'login_location', '登录地点', 'varchar(255)', 'String', 'loginLocation', '0', '0', '0', '1', '1', '1', '1', 'EQ', 'input', '', 4, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1179, 107, 'browser', '浏览器类型', 'varchar(50)', 'String', 'browser', '0', '0', '0', '1', '1', '1', '1', 'EQ', 'input', '', 5, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1180, 107, 'os', '操作系统', 'varchar(50)', 'String', 'os', '0', '0', '0', '1', '1', '1', '1', 'EQ', 'input', '', 6, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1181, 107, 'status', '登录状态(0失败,1成功)', 'char(1)', 'String', 'status', '0', '0', '0', '1', '1', '1', '1', 'EQ', 'radio', '', 7, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1182, 107, 'msg', '提示消息', 'varchar(255)', 'String', 'msg', '0', '0', '0', '1', '1', '1', '1', 'EQ', 'input', '', 8, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1183, 107, 'login_time', '访问时间', 'varchar(25)', 'String', 'loginTime', '0', '0', '0', '1', '1', '1', '1', 'BETWEEN', 'datetime', '', 9, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1184, 108, 'menu_id', '菜单ID', 'int(10) unsigned', 'Number', 'menuId', '1', '1', '0', '1', NULL, NULL, NULL, 'EQ', 'input', '', 1, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1185, 108, 'menu_name', '菜单名称', 'varchar(50)', 'String', 'menuName', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 2, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1186, 108, 'parent_id', '父菜单ID', 'int(10) unsigned', 'Number', 'parentId', '0', '0', '0', '1', NULL, NULL, NULL, 'EQ', 'input', '', 3, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1187, 108, 'order_num', '显示顺序', 'int(11)', 'Number', 'orderNum', '0', '0', '0', '1', '1', '1', '1', 'EQ', 'input', '', 4, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1188, 108, 'path', '路由地址', 'varchar(200)', 'String', 'path', '0', '0', '0', '1', '1', '1', '1', 'EQ', 'input', '', 5, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1189, 108, 'component', '组件路径', 'varchar(255)', 'String', 'component', '0', '0', '0', '1', '1', '1', '1', 'EQ', 'input', '', 6, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1190, 108, 'query', '路由参数', 'varchar(255)', 'String', 'query', '0', '0', '0', '1', '1', '1', '1', 'EQ', 'input', '', 7, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1191, 108, 'is_frame', '是否为外链(0否 1是)', 'int(11)', 'Number', 'isFrame', '0', '0', '0', '1', '1', '1', '1', 'EQ', 'input', '', 8, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1192, 108, 'is_cache', '是否缓存(0不缓存 1缓存)', 'int(11)', 'Number', 'isCache', '0', '0', '0', '1', '1', '1', '1', 'EQ', 'input', '', 9, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1193, 108, 'menu_type', '菜单类型(M目录 C菜单 F按钮)', 'char(1)', 'String', 'menuType', '0', '0', '0', '1', '1', '1', '1', 'EQ', 'select', '', 10, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1194, 108, 'visible', '菜单状态(0隐藏 1显示)', 'char(1)', 'String', 'visible', '0', '0', '0', '1', '1', '1', '1', 'EQ', 'input', '', 11, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1195, 108, 'status', '菜单状态(0停用 1正常)', 'char(1)', 'String', 'status', '0', '0', '0', '1', '1', '1', '1', 'EQ', 'radio', '', 12, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1196, 108, 'perms', '权限标识', 'varchar(100)', 'String', 'perms', '0', '0', '0', '1', '1', '1', '1', 'EQ', 'input', '', 13, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1197, 108, 'icon', '菜单图标', 'varchar(100)', 'String', 'icon', '0', '0', '0', '1', '1', '1', '1', 'EQ', 'input', '', 14, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1198, 108, 'create_by', '创建者', 'varchar(64)', 'String', 'createBy', '0', '0', '0', '1', NULL, NULL, NULL, 'EQ', 'input', '', 15, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1199, 108, 'create_time', '创建时间', 'varchar(25)', 'String', 'createTime', '0', '0', '0', '1', NULL, NULL, NULL, 'BETWEEN', 'datetime', '', 16, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1200, 108, 'update_by', '更新者', 'varchar(64)', 'String', 'updateBy', '0', '0', '0', '1', '1', NULL, NULL, 'EQ', 'input', '', 17, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1201, 108, 'update_time', '更新时间', 'varchar(25)', 'String', 'updateTime', '0', '0', '0', '1', '1', NULL, NULL, 'BETWEEN', 'datetime', '', 18, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1202, 108, 'remark', '备注', 'varchar(500)', 'String', 'remark', '0', '0', '0', '1', '1', '1', NULL, 'EQ', 'textarea', '', 19, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1203, 109, 'notice_id', '公告ID', 'int(11)', 'Number', 'noticeId', '1', '1', '0', '1', NULL, NULL, NULL, 'EQ', 'input', '', 1, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1204, 109, 'notice_title', '公告标题', 'varchar(50)', 'String', 'noticeTitle', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 2, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1205, 109, 'notice_type', '公告类型(1通知 2公告)', 'char(1)', 'String', 'noticeType', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'select', '', 3, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1206, 109, 'notice_content', '公告内容', 'mediumtext', 'String', 'noticeContent', '0', '0', '0', '1', '1', '1', NULL, 'EQ', 'editor', '', 4, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1207, 109, 'status', '公告状态(0关闭 1正常)', 'char(1)', 'String', 'status', '0', '0', '0', '1', '1', '1', '1', 'EQ', 'radio', '', 5, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1208, 109, 'create_by', '创建者', 'varchar(64)', 'String', 'createBy', '0', '0', '0', '1', NULL, NULL, NULL, 'EQ', 'input', '', 6, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1209, 109, 'create_time', '创建时间', 'varchar(25)', 'String', 'createTime', '0', '0', '0', '1', NULL, NULL, NULL, 'BETWEEN', 'datetime', '', 7, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1210, 109, 'update_by', '更新者', 'varchar(64)', 'String', 'updateBy', '0', '0', '0', '1', '1', NULL, NULL, 'EQ', 'input', '', 8, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1211, 109, 'update_time', '更新时间', 'varchar(25)', 'String', 'updateTime', '0', '0', '0', '1', '1', NULL, NULL, 'BETWEEN', 'datetime', '', 9, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1212, 109, 'remark', '备注', 'varchar(255)', 'String', 'remark', '0', '0', '0', '1', '1', '1', NULL, 'EQ', 'input', '', 10, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1213, 110, 'post_id', '岗位ID', 'int(10) unsigned', 'Number', 'postId', '1', '1', '0', '1', NULL, NULL, NULL, 'EQ', 'input', '', 1, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1214, 110, 'post_code', '岗位编码', 'varchar(64)', 'String', 'postCode', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 2, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1215, 110, 'post_name', '岗位名称', 'varchar(50)', 'String', 'postName', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 3, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1216, 110, 'post_sort', '显示顺序', 'int(11)', 'Number', 'postSort', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 4, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1217, 110, 'status', '状态(0停用 1正常)', 'char(1)', 'String', 'status', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'radio', '', 5, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1218, 110, 'create_by', '创建者', 'varchar(64)', 'String', 'createBy', '0', '0', '0', '1', NULL, NULL, NULL, 'EQ', 'input', '', 6, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1219, 110, 'create_time', '创建时间', 'varchar(25)', 'String', 'createTime', '0', '0', '0', '1', NULL, NULL, NULL, 'BETWEEN', 'datetime', '', 7, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1220, 110, 'update_by', '更新者', 'varchar(64)', 'String', 'updateBy', '0', '0', '0', '1', '1', NULL, NULL, 'EQ', 'input', '', 8, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1221, 110, 'update_time', '更新时间', 'varchar(25)', 'String', 'updateTime', '0', '0', '0', '1', '1', NULL, NULL, 'BETWEEN', 'datetime', '', 9, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1222, 110, 'remark', '备注', 'varchar(500)', 'String', 'remark', '0', '0', '0', '1', '1', '1', NULL, 'EQ', 'textarea', '', 10, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1223, 111, 'role_id', '角色ID', 'int(10) unsigned', 'Number', 'roleId', '1', '1', '0', '1', NULL, NULL, NULL, 'EQ', 'input', '', 1, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1224, 111, 'role_name', '角色名称', 'varchar(30)', 'String', 'roleName', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 2, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1225, 111, 'role_key', '角色权限字符串', 'varchar(100)', 'String', 'roleKey', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 3, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1226, 111, 'role_sort', '显示顺序', 'int(11)', 'Number', 'roleSort', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 4, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1227, 111, 'data_scope', '数据范围(1:全部数据权限 2:自定数据权限 3:本部门数据权限 4:本部门及以下数据权限 5:仅个人权限)', 'char(1)', 'String', 'dataScope', '0', '0', '0', '1', '1', '1', '1', 'EQ', 'input', '', 5, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1228, 111, 'menu_check_strictly', '菜单树选择项是否关联显示', 'tinyint(11)', 'Number', 'menuCheckStrictly', '0', '0', '0', '1', '1', '1', '1', 'EQ', 'input', '', 6, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1229, 111, 'dept_check_strictly', '部门树选择项是否关联显示', 'tinyint(11)', 'Number', 'deptCheckStrictly', '0', '0', '0', '1', '1', '1', '1', 'EQ', 'input', '', 7, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1230, 111, 'status', '角色状态(0停用 1正常)', 'char(1)', 'String', 'status', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'radio', '', 8, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1231, 111, 'create_by', '创建者', 'varchar(64)', 'String', 'createBy', '0', '0', '0', '1', NULL, NULL, NULL, 'EQ', 'input', '', 9, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1232, 111, 'create_time', '创建时间', 'varchar(25)', 'String', 'createTime', '0', '0', '0', '1', NULL, NULL, NULL, 'BETWEEN', 'datetime', '', 10, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1233, 111, 'update_by', '更新者', 'varchar(64)', 'String', 'updateBy', '0', '0', '0', '1', '1', NULL, NULL, 'EQ', 'input', '', 11, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1234, 111, 'update_time', '更新时间', 'varchar(25)', 'String', 'updateTime', '0', '0', '0', '1', '1', NULL, NULL, 'BETWEEN', 'datetime', '', 12, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1235, 111, 'remark', '备注', 'varchar(500)', 'String', 'remark', '0', '0', '0', '1', '1', '1', NULL, 'EQ', 'textarea', '', 13, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1236, 112, 'user_id', '用户ID', 'int(10) unsigned', 'Number', 'userId', '1', '1', '0', '1', NULL, NULL, NULL, 'EQ', 'input', '', 1, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1237, 112, 'dept_id', '部门ID', 'int(10) unsigned', 'Number', 'deptId', '0', '0', '0', '1', NULL, NULL, NULL, 'EQ', 'input', '', 2, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1238, 112, 'user_name', '用户账号', 'varchar(30)', 'String', 'userName', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 3, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1239, 112, 'nick_name', '用户昵称', 'varchar(30)', 'String', 'nickName', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 4, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1240, 112, 'user_type', '用户类型(00系统用户)', 'varchar(2)', 'String', 'userType', '0', '0', '0', '1', '1', '1', '1', 'EQ', 'select', '', 5, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1241, 112, 'email', '用户邮箱', 'varchar(50)', 'String', 'email', '0', '0', '0', '1', '1', '1', '1', 'EQ', 'input', '', 6, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1242, 112, 'phonenumber', '手机号码', 'varchar(11)', 'String', 'phonenumber', '0', '0', '0', '1', '1', '1', '1', 'EQ', 'input', '', 7, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1243, 112, 'sex', '用户性别(0男 1女 2未知)', 'char(1)', 'String', 'sex', '0', '0', '0', '1', '1', '1', '1', 'EQ', 'select', '', 8, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1244, 112, 'avatar', '头像地址', 'varchar(100)', 'String', 'avatar', '0', '0', '0', '1', '1', '1', '1', 'EQ', 'input', '', 9, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1245, 112, 'password', '密码', 'varchar(100)', 'String', 'password', '0', '0', '0', '1', '1', '1', '1', 'EQ', 'input', '', 10, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1246, 112, 'status', '帐号状态(0停用,1正常 )', 'char(1)', 'String', 'status', '0', '0', '0', '1', '1', '1', '1', 'EQ', 'radio', '', 11, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1247, 112, 'login_ip', '最后登录IP', 'varchar(128)', 'String', 'loginIp', '0', '0', '0', '1', '1', '1', '1', 'EQ', 'input', '', 12, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1248, 112, 'login_date', '最后登录时间', 'varchar(25)', 'String', 'loginDate', '0', '0', '0', '1', '1', '1', '1', 'BETWEEN', 'datetime', '', 13, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1249, 112, 'create_by', '创建者', 'varchar(64)', 'String', 'createBy', '0', '0', '0', '1', NULL, NULL, NULL, 'EQ', 'input', '', 14, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1250, 112, 'create_time', '创建时间', 'varchar(25)', 'String', 'createTime', '0', '0', '0', '1', NULL, NULL, NULL, 'BETWEEN', 'datetime', '', 15, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1251, 112, 'update_by', '更新者', 'varchar(64)', 'String', 'updateBy', '0', '0', '0', '1', '1', NULL, NULL, 'EQ', 'input', '', 16, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1252, 112, 'update_time', '更新时间', 'varchar(25)', 'String', 'updateTime', '0', '0', '0', '1', '1', NULL, NULL, 'BETWEEN', 'datetime', '', 17, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1253, 112, 'remark', '备注', 'varchar(500)', 'String', 'remark', '0', '0', '0', '1', '1', '1', NULL, 'EQ', 'textarea', '', 18, 'admin', '2024-06-16 14:05:16', 'admin', '2024-06-16 14:05:16'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1254, 113, 'config_id', '参数主键', 'int(11)', 'Number', 'configId', '1', '1', '0', '1', NULL, NULL, NULL, 'EQ', 'input', '', 1, 'admin', '2024-06-16 14:05:26', 'admin', '2024-06-16 14:05:26'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1255, 113, 'config_name', '参数名称', 'varchar(100)', 'String', 'configName', '0', '0', '0', '1', '1', '1', '1', 'LIKE', 'input', '', 2, 'admin', '2024-06-16 14:05:26', 'admin', '2024-06-16 14:05:26'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1256, 113, 'config_key', '参数键名', 'varchar(100)', 'String', 'configKey', '0', '0', '0', '1', '1', '1', '1', 'EQ', 'input', '', 3, 'admin', '2024-06-16 14:05:26', 'admin', '2024-06-16 14:05:26'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1257, 113, 'config_value', '参数键值', 'varchar(500)', 'String', 'configValue', '0', '0', '0', '1', '1', '1', NULL, 'EQ', 'textarea', '', 4, 'admin', '2024-06-16 14:05:26', 'admin', '2024-06-16 14:05:26'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1258, 113, 'config_type', '系统内置(Y是 N否)', 'char(1)', 'String', 'configType', '0', '0', '0', '1', '1', '1', '1', 'EQ', 'select', '', 5, 'admin', '2024-06-16 14:05:26', 'admin', '2024-06-16 14:05:26'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1259, 113, 'create_by', '创建者', 'varchar(64)', 'String', 'createBy', '0', '0', '0', '1', NULL, NULL, NULL, 'EQ', 'input', '', 6, 'admin', '2024-06-16 14:05:26', 'admin', '2024-06-16 14:05:26'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1260, 113, 'create_time', '创建时间', 'varchar(25)', 'String', 'createTime', '0', '0', '0', '1', NULL, NULL, NULL, 'BETWEEN', 'datetime', '', 7, 'admin', '2024-06-16 14:05:26', 'admin', '2024-06-16 14:05:26'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1261, 113, 'update_by', '更新者', 'varchar(64)', 'String', 'updateBy', '0', '0', '0', '1', '1', NULL, NULL, 'EQ', 'input', '', 8, 'admin', '2024-06-16 14:05:26', 'admin', '2024-06-16 14:05:26'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1262, 113, 'update_time', '更新时间', 'varchar(25)', 'String', 'updateTime', '0', '0', '0', '1', '1', NULL, NULL, 'BETWEEN', 'datetime', '', 9, 'admin', '2024-06-16 14:05:26', 'admin', '2024-06-16 14:05:26'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1263, 113, 'remark', '备注', 'varchar(500)', 'String', 'remark', '0', '0', '0', '1', '1', '1', NULL, 'EQ', 'textarea', '', 10, 'admin', '2024-06-16 14:05:26', 'admin', '2024-06-16 14:05:26'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1264, 114, 'dept_id', '部门id', 'int(10) unsigned', 'Number', 'deptId', '1', '1', '0', '1', NULL, NULL, NULL, 'EQ', 'input', '', 1, 'admin', '2024-06-16 14:05:26', 'admin', '2024-06-16 14:05:26'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1265, 114, 'parent_id', '父部门id', 'int(10) unsigned', 'Number', 'parentId', '0', '0', '0', '1', NULL, NULL, NULL, 'EQ', 'input', '', 2, 'admin', '2024-06-16 14:05:26', 'admin', '2024-06-16 14:05:26'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1266, 114, 'ancestors', '祖级列表', 'varchar(50)', 'String', 'ancestors', '0', '0', '0', '1', '1', '1', '1', 'EQ', 'input', '', 3, 'admin', '2024-06-16 14:05:26', 'admin', '2024-06-16 14:05:26'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1267, 114, 'dept_name', '部门名称', 'varchar(30)', 'String', 'deptName', '0', '0', '0', '1', '1', '1', '1', 'LIKE', 'input', '', 4, 'admin', '2024-06-16 14:05:26', 'admin', '2024-06-16 14:05:26'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1268, 114, 'order_num', '显示顺序', 'int(11)', 'Number', 'orderNum', '0', '0', '0', '1', '1', '1', '1', 'EQ', 'input', '', 5, 'admin', '2024-06-16 14:05:26', 'admin', '2024-06-16 14:05:26'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1269, 114, 'leader', '负责人', 'varchar(20)', 'String', 'leader', '0', '0', '0', '1', '1', '1', '1', 'EQ', 'input', '', 6, 'admin', '2024-06-16 14:05:26', 'admin', '2024-06-16 14:05:26'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1270, 114, 'phone', '联系电话', 'varchar(11)', 'String', 'phone', '0', '0', '0', '1', '1', '1', '1', 'EQ', 'input', '', 7, 'admin', '2024-06-16 14:05:26', 'admin', '2024-06-16 14:05:26'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1271, 114, 'email', '邮箱', 'varchar(50)', 'String', 'email', '0', '0', '0', '1', '1', '1', '1', 'EQ', 'input', '', 8, 'admin', '2024-06-16 14:05:26', 'admin', '2024-06-16 14:05:26'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1272, 114, 'status', '部门状态(0停用,1正常)', 'char(1)', 'String', 'status', '0', '0', '0', '1', '1', '1', '1', 'EQ', 'radio', '', 9, 'admin', '2024-06-16 14:05:26', 'admin', '2024-06-16 14:05:26'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1273, 114, 'create_by', '创建者', 'varchar(64)', 'String', 'createBy', '0', '0', '0', '1', NULL, NULL, NULL, 'EQ', 'input', '', 10, 'admin', '2024-06-16 14:05:26', 'admin', '2024-06-16 14:05:26'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1274, 114, 'create_time', '创建时间', 'varchar(25)', 'String', 'createTime', '0', '0', '0', '1', NULL, NULL, NULL, 'BETWEEN', 'datetime', '', 11, 'admin', '2024-06-16 14:05:26', 'admin', '2024-06-16 14:05:26'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1275, 114, 'update_by', '更新者', 'varchar(64)', 'String', 'updateBy', '0', '0', '0', '1', '1', NULL, NULL, 'EQ', 'input', '', 12, 'admin', '2024-06-16 14:05:26', 'admin', '2024-06-16 14:05:26'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1276, 114, 'update_time', '更新时间', 'varchar(25)', 'String', 'updateTime', '0', '0', '0', '1', '1', NULL, NULL, 'BETWEEN', 'datetime', '', 13, 'admin', '2024-06-16 14:05:26', 'admin', '2024-06-16 14:05:26'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1277, 115, 'dict_code', '字典编码', 'int(10) unsigned', 'Number', 'dictCode', '1', '1', '0', '1', NULL, NULL, NULL, 'EQ', 'input', '', 1, 'admin', '2024-06-16 14:05:26', 'admin', '2024-06-16 14:05:26'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1278, 115, 'dict_sort', '字典排序', 'int(11)', 'Number', 'dictSort', '0', '0', '0', '1', '1', '1', '1', 'EQ', 'input', '', 2, 'admin', '2024-06-16 14:05:26', 'admin', '2024-06-16 14:05:26'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1279, 115, 'dict_label', '字典标签', 'varchar(100)', 'String', 'dictLabel', '0', '0', '0', '1', '1', '1', '1', 'EQ', 'input', '', 3, 'admin', '2024-06-16 14:05:26', 'admin', '2024-06-16 14:05:26'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1280, 115, 'dict_value', '字典键值', 'varchar(100)', 'String', 'dictValue', '0', '0', '0', '1', '1', '1', '1', 'EQ', 'input', '', 4, 'admin', '2024-06-16 14:05:26', 'admin', '2024-06-16 14:05:26'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1281, 115, 'dict_type', '字典类型', 'varchar(100)', 'String', 'dictType', '0', '0', '0', '1', '1', '1', '1', 'EQ', 'select', '', 5, 'admin', '2024-06-16 14:05:26', 'admin', '2024-06-16 14:05:26'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1282, 115, 'css_class', '样式属性(其他样式扩展)', 'varchar(100)', 'String', 'cssClass', '0', '0', '0', '1', '1', '1', '1', 'EQ', 'input', '', 6, 'admin', '2024-06-16 14:05:26', 'admin', '2024-06-16 14:05:26'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1283, 115, 'list_class', '表格回显样式', 'varchar(100)', 'String', 'listClass', '0', '0', '0', '1', '1', '1', '1', 'EQ', 'input', '', 7, 'admin', '2024-06-16 14:05:26', 'admin', '2024-06-16 14:05:26'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1284, 115, 'is_default', '是否默认(Y是 N否)', 'char(1)', 'String', 'isDefault', '0', '0', '0', '1', '1', '1', '1', 'EQ', 'input', '', 8, 'admin', '2024-06-16 14:05:26', 'admin', '2024-06-16 14:05:26'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1285, 115, 'status', '状态(0停用 1正常)', 'char(1)', 'String', 'status', '0', '0', '0', '1', '1', '1', '1', 'EQ', 'radio', '', 9, 'admin', '2024-06-16 14:05:26', 'admin', '2024-06-16 14:05:26'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1286, 115, 'create_by', '创建者', 'varchar(64)', 'String', 'createBy', '0', '0', '0', '1', NULL, NULL, NULL, 'EQ', 'input', '', 10, 'admin', '2024-06-16 14:05:26', 'admin', '2024-06-16 14:05:26'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1287, 115, 'create_time', '创建时间', 'varchar(25)', 'String', 'createTime', '0', '0', '0', '1', NULL, NULL, NULL, 'BETWEEN', 'datetime', '', 11, 'admin', '2024-06-16 14:05:26', 'admin', '2024-06-16 14:05:26'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1288, 115, 'update_by', '更新者', 'varchar(64)', 'String', 'updateBy', '0', '0', '0', '1', '1', NULL, NULL, 'EQ', 'input', '', 12, 'admin', '2024-06-16 14:05:26', 'admin', '2024-06-16 14:05:26'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1289, 115, 'update_time', '更新时间', 'varchar(25)', 'String', 'updateTime', '0', '0', '0', '1', '1', NULL, NULL, 'BETWEEN', 'datetime', '', 13, 'admin', '2024-06-16 14:05:26', 'admin', '2024-06-16 14:05:26'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1290, 115, 'remark', '备注', 'varchar(500)', 'String', 'remark', '0', '0', '0', '1', '1', '1', NULL, 'EQ', 'textarea', '', 14, 'admin', '2024-06-16 14:05:26', 'admin', '2024-06-16 14:05:26'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1291, 116, 'dict_id', '字典主键', 'int(10) unsigned', 'Number', 'dictId', '1', '1', '0', '1', NULL, NULL, NULL, 'EQ', 'input', '', 1, 'admin', '2024-06-16 14:05:26', 'admin', '2024-06-16 14:05:26'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1292, 116, 'dict_name', '字典名称', 'varchar(100)', 'String', 'dictName', '0', '0', '0', '1', '1', '1', '1', 'LIKE', 'input', '', 2, 'admin', '2024-06-16 14:05:26', 'admin', '2024-06-16 14:05:26'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1293, 116, 'dict_type', '字典类型', 'varchar(100)', 'String', 'dictType', '0', '0', '0', '1', '1', '1', '1', 'EQ', 'select', '', 3, 'admin', '2024-06-16 14:05:26', 'admin', '2024-06-16 14:05:26'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1294, 116, 'status', '状态(0停用,1正常)', 'char(1)', 'String', 'status', '0', '0', '0', '1', '1', '1', '1', 'EQ', 'radio', '', 4, 'admin', '2024-06-16 14:05:26', 'admin', '2024-06-16 14:05:26'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1295, 116, 'create_by', '创建者', 'varchar(64)', 'String', 'createBy', '0', '0', '0', '1', NULL, NULL, NULL, 'EQ', 'input', '', 5, 'admin', '2024-06-16 14:05:26', 'admin', '2024-06-16 14:05:26'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1296, 116, 'create_time', '创建时间', 'varchar(25)', 'String', 'createTime', '0', '0', '0', '1', NULL, NULL, NULL, 'BETWEEN', 'datetime', '', 6, 'admin', '2024-06-16 14:05:26', 'admin', '2024-06-16 14:05:26'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1297, 116, 'update_by', '更新者', 'varchar(64)', 'String', 'updateBy', '0', '0', '0', '1', '1', NULL, NULL, 'EQ', 'input', '', 7, 'admin', '2024-06-16 14:05:26', 'admin', '2024-06-16 14:05:26'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1298, 116, 'update_time', '更新时间', 'varchar(25)', 'String', 'updateTime', '0', '0', '0', '1', '1', NULL, NULL, 'BETWEEN', 'datetime', '', 8, 'admin', '2024-06-16 14:05:26', 'admin', '2024-06-16 14:05:26'); INSERT INTO `gen_table_column` (`column_id`, `table_id`, `column_name`, `column_comment`, `column_type`, `java_type`, `java_field`, `is_pk`, `is_increment`, `is_required`, `is_insert`, `is_edit`, `is_list`, `is_query`, `query_type`, `html_type`, `dict_type`, `sort`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (1299, 116, 'remark', '备注', 'varchar(500)', 'String', 'remark', '0', '0', '0', '1', '1', '1', NULL, 'EQ', 'textarea', '', 9, 'admin', '2024-06-16 14:05:26', 'admin', '2024-06-16 14:05:26'); COMMIT; -- ---------------------------- -- Table structure for sys_config -- ---------------------------- DROP TABLE IF EXISTS `sys_config`; CREATE TABLE `sys_config` ( `config_id` int NOT NULL AUTO_INCREMENT COMMENT '参数主键', `config_name` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '参数名称', `config_key` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '参数键名', `config_value` varchar(500) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '参数键值', `config_type` char(1) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT 'N' COMMENT '系统内置(Y是 N否)', `create_by` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '创建者', `create_time` varchar(25) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '创建时间', `update_by` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '更新者', `update_time` varchar(25) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '更新时间', `remark` varchar(500) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '备注', PRIMARY KEY (`config_id`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=101 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='参数配置表'; -- ---------------------------- -- Records of sys_config -- ---------------------------- BEGIN; INSERT INTO `sys_config` (`config_id`, `config_name`, `config_key`, `config_value`, `config_type`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (2, '用户管理-账号初始密码', 'sys.user.initPassword', '123456', 'Y', 'admin', '2023-12-18 14:59:08', '', NULL, '初始化密码 123456'); INSERT INTO `sys_config` (`config_id`, `config_name`, `config_key`, `config_value`, `config_type`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (4, '账号自助-验证码开关', 'sys.account.captchaEnabled', 'true', 'Y', 'admin', '2023-12-18 14:59:08', 'admin', '2024-06-06 20:03:46', '是否开启验证码功能(true开启,false关闭)'); INSERT INTO `sys_config` (`config_id`, `config_name`, `config_key`, `config_value`, `config_type`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (6, '用户登录-黑名单列表', 'sys.login.blackIPList', '1.1.1.1', 'Y', 'admin', '2023-12-18 14:59:08', 'admin', '2024-06-05 20:24:10', '设置登录IP黑名单限制,多个匹配项以;分隔,支持匹配(*通配、网段)'); COMMIT; -- ---------------------------- -- Table structure for sys_dept -- ---------------------------- DROP TABLE IF EXISTS `sys_dept`; CREATE TABLE `sys_dept` ( `dept_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT '部门id', `parent_id` int unsigned DEFAULT '0' COMMENT '父部门id', `ancestors` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '祖级列表', `dept_name` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '部门名称', `order_num` int DEFAULT '0' COMMENT '显示顺序', `leader` varchar(20) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '负责人', `phone` varchar(11) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '联系电话', `email` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '邮箱', `status` char(1) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '1' COMMENT '部门状态(0停用,1正常)', `create_by` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '创建者', `create_time` varchar(25) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '创建时间', `update_by` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '更新者', `update_time` varchar(25) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '更新时间', PRIMARY KEY (`dept_id`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=205 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='部门表'; -- ---------------------------- -- Records of sys_dept -- ---------------------------- BEGIN; INSERT INTO `sys_dept` (`dept_id`, `parent_id`, `ancestors`, `dept_name`, `order_num`, `leader`, `phone`, `email`, `status`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (100, 0, '0', '全国总部', 0, 'carole', '15888888888', 'admin@carole.top', '1', 'admin', '2023-12-18 14:59:00', 'admin', '2023-12-19 11:51:14'); INSERT INTO `sys_dept` (`dept_id`, `parent_id`, `ancestors`, `dept_name`, `order_num`, `leader`, `phone`, `email`, `status`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (101, 100, '0,100', '深圳总公司', 1, 'carole', '15888888888', 'admin@carole.top', '1', 'admin', '2023-12-18 14:59:00', 'admin', '2023-12-19 11:51:25'); INSERT INTO `sys_dept` (`dept_id`, `parent_id`, `ancestors`, `dept_name`, `order_num`, `leader`, `phone`, `email`, `status`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (103, 101, '0,100,101', '研发部门', 1, 'carole', '15888888888', 'admin@carole.top', '1', 'admin', '2023-12-18 14:59:00', '', NULL); INSERT INTO `sys_dept` (`dept_id`, `parent_id`, `ancestors`, `dept_name`, `order_num`, `leader`, `phone`, `email`, `status`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (104, 101, '0,100,101', '市场部门', 2, 'carole', '15888888888', 'admin@carole.top', '1', 'admin', '2023-12-18 14:59:00', '', NULL); INSERT INTO `sys_dept` (`dept_id`, `parent_id`, `ancestors`, `dept_name`, `order_num`, `leader`, `phone`, `email`, `status`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (105, 101, '0,100,101', '测试部门', 3, 'carole', '15888888888', 'admin@carole.top', '1', 'admin', '2023-12-18 14:59:00', '', NULL); INSERT INTO `sys_dept` (`dept_id`, `parent_id`, `ancestors`, `dept_name`, `order_num`, `leader`, `phone`, `email`, `status`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES (106, 101, '0,100,101', '财务部门', 2, 'carole', '15888888888', 'admin@carole.top', '1', 'admin', '2023-12-18 14:59:00', 'admin', '2024-06-10 12:39:55'); COMMIT; -- ---------------------------- -- Table structure for sys_dict_data -- ---------------------------- DROP TABLE IF EXISTS `sys_dict_data`; CREATE TABLE `sys_dict_data` ( `dict_code` int unsigned NOT NULL AUTO_INCREMENT COMMENT '字典编码', `dict_sort` int DEFAULT '0' COMMENT '字典排序', `dict_label` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '字典标签', `dict_value` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '字典键值', `dict_type` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '字典类型', `css_class` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '样式属性(其他样式扩展)', `list_class` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '表格回显样式', `is_default` char(1) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT 'N' COMMENT '是否默认(Y是 N否)', `status` char(1) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '1' COMMENT '状态(0停用 1正常)', `create_by` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '创建者', `create_time` varchar(25) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '创建时间', `update_by` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '更新者', `update_time` varchar(25) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '更新时间', `remark` varchar(500) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '备注', PRIMARY KEY (`dict_code`) USING BTREE, KEY `sys_dict_data_dict_type_idx` (`dict_type`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=124 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='字典数据表'; -- ---------------------------- -- Records of sys_dict_data -- ---------------------------- BEGIN; INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1, 1, '男', '0', 'sys_user_sex', '', '', 'Y', '1', 'admin', '2023-12-18 14:59:07', '', NULL, '性别男'); INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (2, 2, '女', '1', 'sys_user_sex', '', '', 'N', '1', 'admin', '2023-12-18 14:59:07', '', NULL, '性别女'); INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (3, 3, '未知', '2', 'sys_user_sex', '', '', 'N', '1', 'admin', '2023-12-18 14:59:07', '', NULL, '性别未知'); INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (4, 1, '显示', '1', 'sys_show_hide', '', 'primary', 'Y', '1', 'admin', '2023-12-18 14:59:07', '', NULL, '显示菜单'); INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (5, 2, '隐藏', '0', 'sys_show_hide', '', 'danger', 'N', '1', 'admin', '2023-12-18 14:59:07', '', NULL, '隐藏菜单'); INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (6, 1, '正常', '1', 'sys_normal_disable', '', 'primary', 'Y', '1', 'admin', '2023-12-18 14:59:07', '', NULL, '正常状态'); INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (7, 2, '停用', '0', 'sys_normal_disable', '', 'danger', 'N', '1', 'admin', '2023-12-18 14:59:07', '', NULL, '停用状态'); INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (8, 1, '正常', '1', 'sys_job_status', '', 'primary', 'Y', '1', 'admin', '2023-12-18 14:59:07', '', NULL, '正常状态'); INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (9, 2, '暂停', '0', 'sys_job_status', '', 'danger', 'N', '1', 'admin', '2023-12-18 14:59:07', '', NULL, '停用状态'); INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (10, 1, '默认', 'DEFAULT', 'sys_job_group', '', '', 'Y', '1', 'admin', '2023-12-18 14:59:07', '', NULL, '默认分组'); INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (11, 2, '系统', 'SYSTEM', 'sys_job_group', '', '', 'N', '1', 'admin', '2023-12-18 14:59:07', '', NULL, '系统分组'); INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (12, 1, '是', 'Y', 'sys_yes_no', '', 'primary', 'Y', '1', 'admin', '2023-12-18 14:59:07', '', NULL, '系统默认是'); INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (13, 2, '否', 'N', 'sys_yes_no', '', 'danger', 'N', '1', 'admin', '2023-12-18 14:59:07', '', NULL, '系统默认否'); INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (14, 1, '通知', '1', 'sys_notice_type', '', 'warning', 'Y', '1', 'admin', '2023-12-18 14:59:07', '', NULL, '通知'); INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (15, 2, '公告', '2', 'sys_notice_type', '', 'success', 'N', '1', 'admin', '2023-12-18 14:59:07', '', NULL, '公告'); INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (16, 1, '正常', '1', 'sys_notice_status', '', 'primary', 'Y', '1', 'admin', '2023-12-18 14:59:07', '', NULL, '正常状态'); INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (17, 2, '关闭', '0', 'sys_notice_status', '', 'danger', 'N', '1', 'admin', '2023-12-18 14:59:07', '', NULL, '关闭状态'); INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (18, 99, '其他', '0', 'sys_oper_type', '', 'info', 'N', '1', 'admin', '2023-12-18 14:59:07', '', NULL, '其他操作'); INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (19, 1, '新增', '1', 'sys_oper_type', '', 'info', 'N', '1', 'admin', '2023-12-18 14:59:07', '', NULL, '新增操作'); INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (20, 2, '修改', '2', 'sys_oper_type', '', 'info', 'N', '1', 'admin', '2023-12-18 14:59:07', '', NULL, '修改操作'); INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (21, 3, '删除', '3', 'sys_oper_type', '', 'danger', 'N', '1', 'admin', '2023-12-18 14:59:07', '', NULL, '删除操作'); INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (22, 4, '授权', '4', 'sys_oper_type', '', 'primary', 'N', '1', 'admin', '2023-12-18 14:59:07', '', NULL, '授权操作'); INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (23, 5, '导出', '5', 'sys_oper_type', '', 'warning', 'N', '1', 'admin', '2023-12-18 14:59:07', '', NULL, '导出操作'); INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (24, 6, '导入', '6', 'sys_oper_type', '', 'warning', 'N', '1', 'admin', '2023-12-18 14:59:07', '', NULL, '导入操作'); INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (25, 7, '强退', '7', 'sys_oper_type', '', 'danger', 'N', '1', 'admin', '2023-12-18 14:59:07', '', NULL, '强退操作'); INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (26, 8, '生成代码', '8', 'sys_oper_type', '', 'warning', 'N', '1', 'admin', '2023-12-18 14:59:07', '', NULL, '生成操作'); INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (27, 9, '清空数据', '9', 'sys_oper_type', '', 'danger', 'N', '1', 'admin', '2023-12-18 14:59:07', '', NULL, '清空操作'); INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (28, 1, '成功', '1', 'sys_common_status', '', 'primary', 'N', '1', 'admin', '2023-12-18 14:59:07', '', NULL, '正常状态'); INSERT INTO `sys_dict_data` (`dict_code`, `dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (29, 2, '失败', '0', 'sys_common_status', '', 'danger', 'N', '1', 'admin', '2023-12-18 14:59:07', '', NULL, '停用状态'); COMMIT; -- ---------------------------- -- Table structure for sys_dict_type -- ---------------------------- DROP TABLE IF EXISTS `sys_dict_type`; CREATE TABLE `sys_dict_type` ( `dict_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT '字典主键', `dict_name` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '字典名称', `dict_type` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '字典类型', `status` char(1) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '1' COMMENT '状态(0停用,1正常)', `create_by` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '创建者', `create_time` varchar(25) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '创建时间', `update_by` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '更新者', `update_time` varchar(25) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '更新时间', `remark` varchar(500) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '备注', PRIMARY KEY (`dict_id`) USING BTREE, UNIQUE KEY `dict_type` (`dict_type`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=118 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='字典类型表'; -- ---------------------------- -- Records of sys_dict_type -- ---------------------------- BEGIN; INSERT INTO `sys_dict_type` (`dict_id`, `dict_name`, `dict_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1, '用户性别', 'sys_user_sex', '1', 'admin', '2023-12-18 14:59:07', 'admin', '2024-01-16 00:00:00', '用户性别列表'); INSERT INTO `sys_dict_type` (`dict_id`, `dict_name`, `dict_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (2, '菜单状态', 'sys_show_hide', '1', 'admin', '2023-12-18 14:59:07', 'admin', '2024-01-16 00:00:00', '菜单状态列表'); INSERT INTO `sys_dict_type` (`dict_id`, `dict_name`, `dict_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (3, '系统开关', 'sys_normal_disable', '1', 'admin', '2023-12-18 14:59:07', 'admin', '2024-01-16 00:00:00', '系统开关列表'); INSERT INTO `sys_dict_type` (`dict_id`, `dict_name`, `dict_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (4, '任务状态', 'sys_job_status', '1', 'admin', '2023-12-18 14:59:07', 'admin', '2024-01-16 00:00:00', '任务状态列表'); INSERT INTO `sys_dict_type` (`dict_id`, `dict_name`, `dict_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (5, '任务分组', 'sys_job_group', '1', 'admin', '2023-12-18 14:59:07', 'admin', '2024-01-16 00:00:00', '任务分组列表'); INSERT INTO `sys_dict_type` (`dict_id`, `dict_name`, `dict_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (6, '系统是否', 'sys_yes_no', '1', 'admin', '2023-12-18 14:59:07', 'admin', '2024-01-16 00:00:00', '系统是否列表'); INSERT INTO `sys_dict_type` (`dict_id`, `dict_name`, `dict_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (7, '通知类型', 'sys_notice_type', '1', 'admin', '2023-12-18 14:59:07', 'admin', '2024-01-16 00:00:00', '通知类型列表'); INSERT INTO `sys_dict_type` (`dict_id`, `dict_name`, `dict_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (8, '通知状态', 'sys_notice_status', '1', 'admin', '2023-12-18 14:59:07', 'admin', '2024-01-16 00:00:00', '通知状态列表'); INSERT INTO `sys_dict_type` (`dict_id`, `dict_name`, `dict_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (9, '操作类型', 'sys_oper_type', '1', 'admin', '2023-12-18 14:59:07', 'admin', '2024-01-16 00:00:00', '操作类型列表'); INSERT INTO `sys_dict_type` (`dict_id`, `dict_name`, `dict_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (10, '系统状态', 'sys_common_status', '1', 'admin', '2023-12-18 14:59:07', 'admin', '2024-01-16 00:00:00', '登录状态列表'); COMMIT; -- ---------------------------- -- Table structure for sys_logininfor -- ---------------------------- DROP TABLE IF EXISTS `sys_logininfor`; CREATE TABLE `sys_logininfor` ( `info_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT '访问ID', `user_name` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '用户账号', `ipaddr` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '登录IP地址', `login_location` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '登录地点', `browser` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '浏览器类型', `os` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '操作系统', `status` char(1) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '1' COMMENT '登录状态(0失败,1成功)', `msg` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '提示消息', `login_time` varchar(25) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '访问时间', PRIMARY KEY (`info_id`) USING BTREE, KEY `idx_sys_logininfor_s` (`status`) USING BTREE, KEY `idx_sys_logininfor_lt` (`login_time`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=355 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='系统访问记录'; -- ---------------------------- -- Records of sys_logininfor -- ---------------------------- BEGIN; INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (260, 'test', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '1', '登录成功', '2024-06-05 10:13:04'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (261, 'test', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '1', '登录成功', '2024-06-05 10:26:49'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (262, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '0', '用户不存在/密码错误', '2024-06-05 11:14:49'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (263, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '0', '验证码错误!', '2024-06-05 11:14:55'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (264, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '0', '验证码错误!', '2024-06-05 11:15:02'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (265, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '1', '登录成功', '2024-06-05 11:15:08'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (266, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '0', '验证码错误!', '2024-06-05 20:19:51'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (267, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '0', '验证码错误!', '2024-06-05 20:23:02'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (268, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '0', '验证码错误!', '2024-06-05 20:23:09'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (269, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '0', '验证码错误!', '2024-06-05 20:23:18'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (270, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '0', '验证码错误!', '2024-06-05 20:23:27'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (271, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '0', '验证码错误!', '2024-06-05 20:23:34'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (272, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '0', '验证码错误!', '2024-06-05 20:23:45'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (273, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '0', 'ip:127.0.0.1被封禁', '2024-06-05 20:24:02'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (274, 'test', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '1', '登录成功', '2024-06-05 21:23:49'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (275, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '0', '用户不存在/密码错误', '2024-06-05 21:27:55'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (276, 'test', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '0', '验证码错误!', '2024-06-05 21:28:07'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (277, 'test', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '1', '登录成功', '2024-06-05 21:28:13'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (278, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '0', '用户不存在/密码错误', '2024-06-05 21:39:50'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (279, 'test', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '1', '登录成功', '2024-06-05 21:40:01'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (280, 'test', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '1', '登录成功', '2024-06-05 21:42:49'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (281, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '0', '用户不存在/密码错误', '2024-06-06 08:38:07'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (282, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '0', '用户不存在/密码错误', '2024-06-06 08:38:13'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (283, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '1', '登录成功', '2024-06-06 08:38:27'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (284, 'admin', '127.0.0.1', '内网IP', 'Chrome 120', 'Windows 10', '0', '验证码错误!', '2024-06-06 15:09:09'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (285, 'admin', '127.0.0.1', '内网IP', 'Chrome 120', 'Windows 10', '0', '验证码错误!', '2024-06-06 15:09:14'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (286, 'admin', '127.0.0.1', '内网IP', 'Chrome 120', 'Windows 10', '0', '验证码错误!', '2024-06-06 15:09:16'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (287, 'admin', '127.0.0.1', '内网IP', 'Chrome 120', 'Windows 10', '0', '验证码错误!', '2024-06-06 15:09:18'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (288, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '0', '验证码错误!', '2024-06-07 15:35:29'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (289, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '0', '验证码错误!', '2024-06-07 15:39:11'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (290, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '0', '用户不存在/密码错误', '2024-06-07 15:39:16'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (291, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '1', '登录成功', '2024-06-07 15:39:28'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (292, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '0', '用户不存在/密码错误', '2024-06-07 15:42:45'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (293, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '0', '验证码错误!', '2024-06-07 15:43:16'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (294, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '1', '登录成功', '2024-06-07 15:43:23'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (295, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '1', '登录成功', '2024-06-07 15:46:04'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (296, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '1', '登录成功', '2024-06-07 15:47:56'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (297, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '1', '登录成功', '2024-06-07 15:53:44'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (298, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '0', '验证码错误!', '2024-06-07 16:22:49'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (299, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '1', '登录成功', '2024-06-07 16:22:58'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (300, 'test2', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '0', '验证码错误!', '2024-06-07 16:47:27'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (301, 'test2', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '1', '登录成功', '2024-06-07 16:47:34'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (302, 'test', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '0', '验证码错误!', '2024-06-07 20:19:38'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (303, 'test', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '1', '登录成功', '2024-06-07 20:19:48'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (304, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '0', '验证码错误!', '2024-06-08 13:53:25'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (305, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '0', '验证码错误!', '2024-06-08 13:53:39'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (306, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '1', '登录成功', '2024-06-08 13:53:45'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (307, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '1', '登录成功', '2024-06-10 10:59:44'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (308, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '1', '登录成功', '2024-06-10 11:00:07'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (309, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '1', '登录成功', '2024-06-10 11:01:54'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (310, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '1', '登录成功', '2024-06-10 11:02:42'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (311, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '1', '登录成功', '2024-06-10 11:03:37'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (312, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '0', '验证码错误!', '2024-06-10 13:35:32'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (313, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '1', '登录成功', '2024-06-10 13:35:41'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (314, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '1', '登录成功', '2024-06-10 14:51:52'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (315, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '0', '验证码错误!', '2024-06-10 15:03:14'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (316, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '0', '密码不正确', '2024-06-10 15:03:22'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (317, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '1', '登录成功', '2024-06-10 15:03:33'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (318, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '0', '验证码错误!', '2024-06-10 15:20:14'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (319, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '1', '登录成功', '2024-06-10 15:20:21'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (320, 'test', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '0', '验证码错误!', '2024-06-10 15:21:24'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (321, 'test', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '1', '登录成功', '2024-06-10 15:21:29'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (322, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '1', '登录成功', '2024-06-10 15:53:15'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (323, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '0', '验证码错误!', '2024-06-10 15:56:40'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (324, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '1', '登录成功', '2024-06-10 15:56:49'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (325, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '1', '登录成功', '2024-06-10 18:12:33'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (326, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '0', '密码不正确', '2024-06-10 18:14:24'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (327, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '0', '验证码错误!', '2024-06-10 18:17:58'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (328, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '0', '验证码错误!', '2024-06-10 18:18:02'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (329, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '0', '密码不正确', '2024-06-10 18:18:10'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (330, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '0', '验证码错误!', '2024-06-10 18:37:48'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (331, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '1', '登录成功', '2024-06-10 18:37:53'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (332, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '1', '登录成功', '2024-06-10 18:38:22'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (333, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '1', '登录成功', '2024-06-11 08:37:46'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (334, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '1', '登录成功', '2024-06-11 08:38:36'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (335, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '1', '登录成功', '2024-06-11 08:39:30'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (336, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '1', '登录成功', '2024-06-11 08:48:50'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (337, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '0', '验证码错误!', '2024-06-11 09:05:23'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (338, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '1', '登录成功', '2024-06-11 09:05:29'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (339, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '1', '登录成功', '2024-06-11 09:07:52'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (340, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '1', '登录成功', '2024-06-11 09:29:37'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (341, 'test', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '1', '登录成功', '2024-06-11 09:53:13'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (342, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '1', '登录成功', '2024-06-11 10:24:10'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (343, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '1', '登录成功', '2024-06-11 15:11:36'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (344, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '1', '登录成功', '2024-06-11 15:37:20'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (345, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '1', '登录成功', '2024-06-11 16:57:29'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (346, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '0', '验证码错误!', '2024-06-11 18:40:48'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (347, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '1', '登录成功', '2024-06-11 18:40:55'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (348, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '1', '登录成功', '2024-06-12 12:15:46'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (349, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '1', '登录成功', '2024-06-12 12:19:56'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (350, 'admin', '127.0.0.1', '内网IP', 'Chrome 125', 'Windows 10', '1', '登录成功', '2024-06-12 12:21:38'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (351, 'admin', '127.0.0.1', '内网IP', 'Chrome 126', 'Windows 10', '1', '登录成功', '2024-06-14 21:27:00'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (352, 'admin', '127.0.0.1', '内网IP', 'Chrome 126', 'Windows 10', '1', '登录成功', '2024-06-16 13:54:15'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (353, 'admin', '127.0.0.1', '内网IP', 'Chrome 137', 'macOS Catalina', '0', '密码不正确', '2025-07-04 15:14:33'); INSERT INTO `sys_logininfor` (`info_id`, `user_name`, `ipaddr`, `login_location`, `browser`, `os`, `status`, `msg`, `login_time`) VALUES (354, 'admin', '127.0.0.1', '内网IP', 'Chrome 137', 'macOS Catalina', '1', '登录成功', '2025-07-04 15:14:51'); COMMIT; -- ---------------------------- -- Table structure for sys_menu -- ---------------------------- DROP TABLE IF EXISTS `sys_menu`; CREATE TABLE `sys_menu` ( `menu_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT '菜单ID', `menu_name` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '菜单名称', `parent_id` int unsigned DEFAULT '0' COMMENT '父菜单ID', `order_num` int DEFAULT '0' COMMENT '显示顺序', `path` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '路由地址', `component` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '组件路径', `query` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '路由参数', `is_frame` int DEFAULT '0' COMMENT '是否为外链(0否 1是)', `is_cache` int DEFAULT '1' COMMENT '是否缓存(0不缓存 1缓存)', `menu_type` char(1) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '菜单类型(M目录 C菜单 F按钮)', `visible` char(1) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '1' COMMENT '菜单状态(0隐藏 1显示)', `status` char(1) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '1' COMMENT '菜单状态(0停用 1正常)', `perms` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '权限标识', `icon` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '#' COMMENT '菜单图标', `create_by` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '创建者', `create_time` varchar(25) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '创建时间', `update_by` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '更新者', `update_time` varchar(25) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '更新时间', `remark` varchar(500) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '备注', PRIMARY KEY (`menu_id`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=2052 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='菜单权限表'; -- ---------------------------- -- Records of sys_menu -- ---------------------------- BEGIN; INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1, '系统管理', 0, 1, 'system', NULL, '', 0, 1, 'M', '1', '1', '', 'system', 'admin', '2023-12-18 14:59:03', '', NULL, '系统管理目录'); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (2, '系统监控', 0, 2, 'monitor', NULL, '', 0, 1, 'M', '1', '1', '', 'monitor', 'admin', '2023-12-18 14:59:03', '', NULL, '系统监控目录'); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (3, '系统工具', 0, 3, 'tool', NULL, '', 0, 1, 'M', '1', '1', '', 'tool', 'admin', '2023-12-18 14:59:03', '', NULL, '系统工具目录'); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (100, '用户管理', 1, 1, 'user', 'system/user/index', '', 0, 1, 'C', '1', '1', 'system:user:list', 'user', 'admin', '2023-12-18 14:59:03', '', NULL, '用户管理菜单'); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (101, '角色管理', 1, 2, 'role', 'system/role/index', '', 0, 1, 'C', '1', '1', 'system:role:list', 'peoples', 'admin', '2023-12-18 14:59:03', '', NULL, '角色管理菜单'); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (102, '菜单管理', 1, 3, 'menu', 'system/menu/index', '', 0, 1, 'C', '1', '1', 'system:menu:list', 'tree-table', 'admin', '2023-12-18 14:59:03', '', NULL, '菜单管理菜单'); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (103, '部门管理', 1, 4, 'dept', 'system/dept/index', '', 0, 1, 'C', '1', '1', 'system:dept:list', 'tree', 'admin', '2023-12-18 14:59:03', '', NULL, '部门管理菜单'); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (104, '岗位管理', 1, 5, 'post', 'system/post/index', '', 0, 1, 'C', '1', '1', 'system:post:list', 'post', 'admin', '2023-12-18 14:59:03', '', NULL, '岗位管理菜单'); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (105, '字典管理', 1, 6, 'dict', 'system/dict/index', '', 0, 1, 'C', '1', '1', 'system:dict:list', 'dict', 'admin', '2023-12-18 14:59:03', '', NULL, '字典管理菜单'); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (106, '参数设置', 1, 7, 'config', 'system/config/index', '', 0, 1, 'C', '1', '1', 'system:config:list', 'edit', 'admin', '2023-12-18 14:59:03', '', NULL, '参数设置菜单'); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (107, '通知公告', 1, 8, 'notice', 'system/notice/index', '', 0, 1, 'C', '1', '1', 'system:notice:list', 'message', 'admin', '2023-12-18 14:59:03', '', NULL, '通知公告菜单'); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (108, '日志管理', 1, 9, 'log', '', '', 0, 1, 'M', '1', '1', '', 'log', 'admin', '2023-12-18 14:59:03', '', NULL, '日志管理菜单'); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (109, '在线用户', 2, 1, 'online', 'monitor/online/index', '', 0, 1, 'C', '1', '1', 'monitor:online:list', 'online', 'admin', '2024-05-22 17:50:50', '', NULL, '在线用户菜单'); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (112, '服务监控', 2, 4, 'server', 'monitor/server/index', '', 0, 1, 'C', '1', '1', 'monitor:server:list', 'server', 'admin', '2023-12-18 14:59:03', '', NULL, '服务监控菜单'); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (116, '代码生成', 3, 2, 'gen', 'tool/gen/index', '', 0, 1, 'C', '1', '1', 'tool:gen:list', 'code', 'admin', '2023-12-18 14:59:03', '', NULL, '代码生成菜单'); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (501, '登录日志', 108, 2, 'logininfor', 'monitor/logininfor/index', '', 0, 1, 'C', '1', '1', 'monitor:logininfor:list', 'logininfor', 'admin', '2023-12-18 14:59:03', '', NULL, '登录日志菜单'); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1000, '用户查询', 100, 1, '', '', '', 0, 1, 'F', '1', '1', 'system:user:query', '#', 'admin', '2023-12-18 14:59:03', '', NULL, ''); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1001, '用户新增', 100, 2, '', '', '', 0, 1, 'F', '1', '1', 'system:user:add', '#', 'admin', '2023-12-18 14:59:03', '', NULL, ''); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1002, '用户修改', 100, 3, '', '', '', 0, 1, 'F', '1', '1', 'system:user:edit', '#', 'admin', '2023-12-18 14:59:03', '', NULL, ''); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1003, '用户删除', 100, 4, '', '', '', 0, 1, 'F', '1', '1', 'system:user:remove', '#', 'admin', '2023-12-18 14:59:03', '', NULL, ''); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1004, '用户导出', 100, 5, '', '', '', 0, 1, 'F', '1', '1', 'system:user:export', '#', 'admin', '2023-12-18 14:59:03', '', NULL, ''); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1007, '角色查询', 101, 1, '', '', '', 0, 1, 'F', '1', '1', 'system:role:query', '#', 'admin', '2023-12-18 14:59:03', '', NULL, ''); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1008, '角色新增', 101, 2, '', '', '', 0, 1, 'F', '1', '1', 'system:role:add', '#', 'admin', '2023-12-18 14:59:03', '', NULL, ''); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1009, '角色修改', 101, 3, '', '', '', 0, 1, 'F', '1', '1', 'system:role:edit', '#', 'admin', '2023-12-18 14:59:03', '', NULL, ''); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1010, '角色删除', 101, 4, '', '', '', 0, 1, 'F', '1', '1', 'system:role:remove', '#', 'admin', '2023-12-18 14:59:03', '', NULL, ''); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1011, '角色导出', 101, 5, '', '', '', 0, 1, 'F', '1', '1', 'system:role:export', '#', 'admin', '2023-12-18 14:59:03', '', NULL, ''); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1012, '菜单查询', 102, 1, '', '', '', 0, 1, 'F', '1', '1', 'system:menu:query', '#', 'admin', '2023-12-18 14:59:03', '', NULL, ''); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1013, '菜单新增', 102, 2, '', '', '', 0, 1, 'F', '1', '1', 'system:menu:add', '#', 'admin', '2023-12-18 14:59:03', '', NULL, ''); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1014, '菜单修改', 102, 3, '', '', '', 0, 1, 'F', '1', '1', 'system:menu:edit', '#', 'admin', '2023-12-18 14:59:03', '', NULL, ''); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1015, '菜单删除', 102, 4, '', '', '', 0, 1, 'F', '1', '1', 'system:menu:remove', '#', 'admin', '2023-12-18 14:59:03', '', NULL, ''); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1016, '部门查询', 103, 1, '', '', '', 0, 1, 'F', '1', '1', 'system:dept:query', '#', 'admin', '2023-12-18 14:59:03', '', NULL, ''); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1017, '部门新增', 103, 2, '', '', '', 0, 1, 'F', '1', '1', 'system:dept:add', '#', 'admin', '2023-12-18 14:59:03', '', NULL, ''); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1018, '部门修改', 103, 3, '', '', '', 0, 1, 'F', '1', '1', 'system:dept:edit', '#', 'admin', '2023-12-18 14:59:03', '', NULL, ''); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1019, '部门删除', 103, 4, '', '', '', 0, 1, 'F', '1', '1', 'system:dept:remove', '#', 'admin', '2023-12-18 14:59:03', '', NULL, ''); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1020, '岗位查询', 104, 1, '', '', '', 0, 1, 'F', '1', '1', 'system:post:query', '#', 'admin', '2023-12-18 14:59:03', '', NULL, ''); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1021, '岗位新增', 104, 2, '', '', '', 0, 1, 'F', '1', '1', 'system:post:add', '#', 'admin', '2023-12-18 14:59:03', '', NULL, ''); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1022, '岗位修改', 104, 3, '', '', '', 0, 1, 'F', '1', '1', 'system:post:edit', '#', 'admin', '2023-12-18 14:59:03', '', NULL, ''); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1023, '岗位删除', 104, 4, '', '', '', 0, 1, 'F', '1', '1', 'system:post:remove', '#', 'admin', '2023-12-18 14:59:03', '', NULL, ''); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1024, '岗位导出', 104, 5, '', '', '', 0, 1, 'F', '1', '1', 'system:post:export', '#', 'admin', '2023-12-18 14:59:03', '', NULL, ''); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1025, '字典查询', 105, 1, '#', '', '', 0, 1, 'F', '1', '1', 'system:dict:query', '#', 'admin', '2023-12-18 14:59:03', '', NULL, ''); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1026, '字典新增', 105, 2, '#', '', '', 0, 1, 'F', '1', '1', 'system:dict:add', '#', 'admin', '2023-12-18 14:59:03', '', NULL, ''); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1027, '字典修改', 105, 3, '#', '', '', 0, 1, 'F', '1', '1', 'system:dict:edit', '#', 'admin', '2023-12-18 14:59:03', '', NULL, ''); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1028, '字典删除', 105, 4, '#', '', '', 0, 1, 'F', '1', '1', 'system:dict:remove', '#', 'admin', '2023-12-18 14:59:03', '', NULL, ''); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1029, '字典导出', 105, 5, '#', '', '', 0, 1, 'F', '1', '1', 'system:dict:export', '#', 'admin', '2023-12-18 14:59:03', '', NULL, ''); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1030, '参数查询', 106, 1, '#', '', '', 0, 1, 'F', '1', '1', 'system:config:query', '#', 'admin', '2023-12-18 14:59:03', '', NULL, ''); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1031, '参数新增', 106, 2, '#', '', '', 0, 1, 'F', '1', '1', 'system:config:add', '#', 'admin', '2023-12-18 14:59:03', '', NULL, ''); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1032, '参数修改', 106, 3, '#', '', '', 0, 1, 'F', '1', '1', 'system:config:edit', '#', 'admin', '2023-12-18 14:59:03', '', NULL, ''); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1033, '参数删除', 106, 4, '#', '', '', 0, 1, 'F', '1', '1', 'system:config:remove', '#', 'admin', '2023-12-18 14:59:03', '', NULL, ''); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1034, '参数导出', 106, 5, '#', '', '', 0, 1, 'F', '1', '1', 'system:config:export', '#', 'admin', '2023-12-18 14:59:03', '', NULL, ''); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1035, '公告查询', 107, 1, '#', '', '', 0, 1, 'F', '1', '1', 'system:notice:query', '#', 'admin', '2023-12-18 14:59:03', '', NULL, ''); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1036, '公告新增', 107, 2, '#', '', '', 0, 1, 'F', '1', '1', 'system:notice:add', '#', 'admin', '2023-12-18 14:59:03', '', NULL, ''); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1037, '公告修改', 107, 3, '#', '', '', 0, 1, 'F', '1', '1', 'system:notice:edit', '#', 'admin', '2023-12-18 14:59:03', '', NULL, ''); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1038, '公告删除', 107, 4, '#', '', '', 0, 1, 'F', '1', '1', 'system:notice:remove', '#', 'admin', '2023-12-18 14:59:03', '', NULL, ''); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1042, '登录查询', 501, 1, '#', '', '', 0, 1, 'F', '1', '1', 'monitor:logininfor:query', '#', 'admin', '2023-12-18 14:59:03', '', NULL, ''); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1043, '登录删除', 501, 2, '#', '', '', 0, 1, 'F', '1', '1', 'monitor:logininfor:remove', '#', 'admin', '2023-12-18 14:59:03', '', NULL, ''); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1044, '日志导出', 501, 3, '#', '', '', 0, 1, 'F', '1', '1', 'monitor:logininfor:export', '#', 'admin', '2023-12-18 14:59:03', '', NULL, ''); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1046, '在线查询', 109, 1, '#', '', '', 0, 1, 'F', '1', '1', 'monitor:online:query', '#', 'admin', '2024-05-22 17:50:50', '', NULL, ''); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1047, '批量强退', 109, 2, '#', '', '', 0, 1, 'F', '1', '1', 'monitor:online:batchLogout', '#', 'admin', '2024-05-22 17:50:50', '', NULL, ''); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1055, '生成查询', 116, 1, '#', '', '', 0, 1, 'F', '1', '1', 'tool:gen:query', '#', 'admin', '2023-12-18 14:59:03', '', NULL, ''); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1056, '生成修改', 116, 2, '#', '', '', 0, 1, 'F', '1', '1', 'tool:gen:edit', '#', 'admin', '2023-12-18 14:59:03', '', NULL, ''); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1057, '生成删除', 116, 3, '#', '', '', 0, 1, 'F', '1', '1', 'tool:gen:remove', '#', 'admin', '2023-12-18 14:59:03', '', NULL, ''); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1058, '导入代码', 116, 4, '#', '', '', 0, 1, 'F', '1', '1', 'tool:gen:import', '#', 'admin', '2023-12-18 14:59:03', '', NULL, ''); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1059, '预览代码', 116, 5, '#', '', '', 0, 1, 'F', '1', '1', 'tool:gen:preview', '#', 'admin', '2023-12-18 14:59:03', '', NULL, ''); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1060, '生成代码', 116, 6, '#', '', '', 0, 1, 'F', '1', '1', 'tool:gen:code', '#', 'admin', '2023-12-18 14:59:03', '', NULL, ''); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (2032, '接口文档', 3, 3, 'swagger', 'tool/swagger/index', NULL, 0, 1, 'C', '1', '1', NULL, 'documentation', 'admin', '2024-06-05 19:03:55', 'admin', '2024-06-05 19:14:40', ''); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (2035, '缓存监控', 2, 2, 'cache', 'monitor/cache/index', NULL, 0, 1, 'C', '1', '1', 'monitor:cache:list', 'redis', 'admin', '2024-06-05 20:55:04', 'admin', '2024-06-05 21:03:09', ''); INSERT INTO `sys_menu` (`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (2051, '配置信息修改', 0, 0, 'serverconfig', 'system/config/edit', NULL, 0, 1, 'C', '1', '1', 'system:serverconfig:menu', 'documentation', 'admin', '2025-07-04 16:10:04', 'admin', '2025-07-04 16:22:37', ''); COMMIT; -- ---------------------------- -- Table structure for sys_notice -- ---------------------------- DROP TABLE IF EXISTS `sys_notice`; CREATE TABLE `sys_notice` ( `notice_id` int NOT NULL AUTO_INCREMENT COMMENT '公告ID', `notice_title` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '公告标题', `notice_type` char(1) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '公告类型(1通知 2公告)', `notice_content` mediumtext CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci COMMENT '公告内容', `status` char(1) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '1' COMMENT '公告状态(0关闭 1正常)', `create_by` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '创建者', `create_time` varchar(25) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '创建时间', `update_by` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '更新者', `update_time` varchar(25) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '更新时间', `remark` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '备注', PRIMARY KEY (`notice_id`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='通知公告表'; -- ---------------------------- -- Records of sys_notice -- ---------------------------- BEGIN; INSERT INTO `sys_notice` (`notice_id`, `notice_title`, `notice_type`, `notice_content`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (10, '测试', '1', '

hello

', '1', 'admin', '2024-06-05 20:30:23', 'admin', '2024-06-05 20:30:23', NULL); COMMIT; -- ---------------------------- -- Table structure for sys_post -- ---------------------------- DROP TABLE IF EXISTS `sys_post`; CREATE TABLE `sys_post` ( `post_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT '岗位ID', `post_code` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '岗位编码', `post_name` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '岗位名称', `post_sort` int NOT NULL COMMENT '显示顺序', `status` char(1) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '1' COMMENT '状态(0停用 1正常)', `create_by` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '创建者', `create_time` varchar(25) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '创建时间', `update_by` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '更新者', `update_time` varchar(25) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '更新时间', `remark` varchar(500) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '备注', PRIMARY KEY (`post_id`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='岗位信息表'; -- ---------------------------- -- Records of sys_post -- ---------------------------- BEGIN; INSERT INTO `sys_post` (`post_id`, `post_code`, `post_name`, `post_sort`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1, 'ceo', '董事长', 1, '1', 'admin', '2023-12-18 14:59:02', '', NULL, ''); INSERT INTO `sys_post` (`post_id`, `post_code`, `post_name`, `post_sort`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (2, 'se', '项目经理', 2, '1', 'admin', '2023-12-18 14:59:02', '', NULL, ''); INSERT INTO `sys_post` (`post_id`, `post_code`, `post_name`, `post_sort`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (3, 'hr', '人力资源', 3, '1', 'admin', '2023-12-18 14:59:02', '', NULL, ''); INSERT INTO `sys_post` (`post_id`, `post_code`, `post_name`, `post_sort`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (4, 'user', '普通员工', 4, '1', 'admin', '2023-12-18 14:59:02', '', NULL, ''); COMMIT; -- ---------------------------- -- Table structure for sys_role -- ---------------------------- DROP TABLE IF EXISTS `sys_role`; CREATE TABLE `sys_role` ( `role_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT '角色ID', `role_name` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '角色名称', `role_key` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '角色权限字符串', `role_sort` int NOT NULL COMMENT '显示顺序', `data_scope` char(1) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '5' COMMENT '数据范围(1:全部数据权限 2:自定数据权限 3:本部门数据权限 4:本部门及以下数据权限 5:仅个人权限)', `menu_check_strictly` tinyint DEFAULT '1' COMMENT '菜单树选择项是否关联显示', `dept_check_strictly` tinyint DEFAULT '1' COMMENT '部门树选择项是否关联显示', `status` char(1) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL DEFAULT '1' COMMENT '角色状态(0停用 1正常)', `create_by` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '创建者', `create_time` varchar(25) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '创建时间', `update_by` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '更新者', `update_time` varchar(25) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '更新时间', `remark` varchar(500) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '备注', PRIMARY KEY (`role_id`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=107 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='角色信息表'; -- ---------------------------- -- Records of sys_role -- ---------------------------- BEGIN; INSERT INTO `sys_role` (`role_id`, `role_name`, `role_key`, `role_sort`, `data_scope`, `menu_check_strictly`, `dept_check_strictly`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1, '超级管理员', 'admin', 1, '1', 1, 1, '1', 'admin', '2023-12-18 14:59:03', '', NULL, '超级管理员'); INSERT INTO `sys_role` (`role_id`, `role_name`, `role_key`, `role_sort`, `data_scope`, `menu_check_strictly`, `dept_check_strictly`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (2, '普通角色', 'common', 2, '2', 1, 1, '1', 'admin', '2023-12-18 14:59:03', 'admin', '2024-06-07 20:34:41', '普通角色'); COMMIT; -- ---------------------------- -- Table structure for sys_role_dept -- ---------------------------- DROP TABLE IF EXISTS `sys_role_dept`; CREATE TABLE `sys_role_dept` ( `role_id` int unsigned NOT NULL COMMENT '角色ID', `dept_id` int unsigned NOT NULL COMMENT '部门ID', PRIMARY KEY (`role_id`,`dept_id`) USING BTREE, KEY `sys_role_dept_dept_id_idx` (`dept_id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='角色和部门关联表'; -- ---------------------------- -- Records of sys_role_dept -- ---------------------------- BEGIN; INSERT INTO `sys_role_dept` (`role_id`, `dept_id`) VALUES (2, 100); INSERT INTO `sys_role_dept` (`role_id`, `dept_id`) VALUES (2, 101); INSERT INTO `sys_role_dept` (`role_id`, `dept_id`) VALUES (2, 103); INSERT INTO `sys_role_dept` (`role_id`, `dept_id`) VALUES (2, 104); INSERT INTO `sys_role_dept` (`role_id`, `dept_id`) VALUES (2, 105); INSERT INTO `sys_role_dept` (`role_id`, `dept_id`) VALUES (2, 106); COMMIT; -- ---------------------------- -- Table structure for sys_role_menu -- ---------------------------- DROP TABLE IF EXISTS `sys_role_menu`; CREATE TABLE `sys_role_menu` ( `role_id` int unsigned NOT NULL COMMENT '角色ID', `menu_id` int unsigned NOT NULL COMMENT '菜单ID', PRIMARY KEY (`role_id`,`menu_id`) USING BTREE, KEY `sys_role_menu_menu_id_idx` (`menu_id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='角色和菜单关联表'; -- ---------------------------- -- Records of sys_role_menu -- ---------------------------- BEGIN; INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (2, 1); INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (2, 2); INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (2, 3); INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (2, 100); INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (2, 101); INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (2, 102); INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (2, 103); INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (2, 104); INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (2, 105); INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (2, 106); INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (2, 107); INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (2, 108); INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (2, 112); INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (2, 116); INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (2, 501); INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (2, 1000); INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (2, 1007); INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (2, 1012); INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (2, 1016); INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (2, 1020); INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (2, 1025); INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (2, 1030); INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (2, 1035); INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (2, 1042); INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (2, 1055); INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (2, 2032); INSERT INTO `sys_role_menu` (`role_id`, `menu_id`) VALUES (2, 2035); COMMIT; -- ---------------------------- -- Table structure for sys_user -- ---------------------------- DROP TABLE IF EXISTS `sys_user`; CREATE TABLE `sys_user` ( `user_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT '用户ID', `dept_id` int unsigned DEFAULT NULL COMMENT '部门ID', `user_name` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '用户账号', `nick_name` varchar(30) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '用户昵称', `user_type` varchar(2) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '00' COMMENT '用户类型(00系统用户)', `email` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '用户邮箱', `phonenumber` varchar(11) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '手机号码', `sex` char(1) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '0' COMMENT '用户性别(0男 1女 2未知)', `avatar` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '头像地址', `password` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '密码', `status` char(1) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '1' COMMENT '帐号状态(0停用,1正常 )', `login_ip` varchar(128) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '最后登录IP', `login_date` varchar(25) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '最后登录时间', `create_by` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '创建者', `create_time` varchar(25) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '创建时间', `update_by` varchar(64) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT '' COMMENT '更新者', `update_time` varchar(25) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '更新时间', `remark` varchar(500) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL COMMENT '备注', PRIMARY KEY (`user_id`) USING BTREE, KEY `sys_user_dept_id_idx` (`dept_id`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=125 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='用户信息表'; -- ---------------------------- -- Records of sys_user -- ---------------------------- BEGIN; INSERT INTO `sys_user` (`user_id`, `dept_id`, `user_name`, `nick_name`, `user_type`, `email`, `phonenumber`, `sex`, `avatar`, `password`, `status`, `login_ip`, `login_date`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (1, 103, 'admin', 'admin', '00', 'admin@carole.top', '18888888888', '0', '', 'e5fa720ab8006315ad95dd38736675b3e67604e099f19d644c503b604e9222bd', '1', '127.0.0.1', '2023-12-21 15:19:31', 'admin', '2023-12-18 14:59:02', '', '2024-01-20 21:49:45', '管理员'); INSERT INTO `sys_user` (`user_id`, `dept_id`, `user_name`, `nick_name`, `user_type`, `email`, `phonenumber`, `sex`, `avatar`, `password`, `status`, `login_ip`, `login_date`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (2, 103, 'test', 'test', '00', 'test@carole.top', '18888888888', '0', '', 'e7e266243c001eb54353a87b890206dc3fe8af383a7e90a5577d609a97e87a9f', '1', '127.0.0.1', '2023-12-21 15:19:31', 'admin', '2024-06-07 16:47:07', 'admin', '2024-06-07 17:09:14', 'test'); COMMIT; -- ---------------------------- -- Table structure for sys_user_post -- ---------------------------- DROP TABLE IF EXISTS `sys_user_post`; CREATE TABLE `sys_user_post` ( `user_id` int unsigned NOT NULL COMMENT '用户ID', `post_id` int unsigned NOT NULL COMMENT '岗位ID', PRIMARY KEY (`user_id`,`post_id`) USING BTREE, KEY `sys_user_post_post_id_idx` (`post_id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='用户与岗位关联表'; -- ---------------------------- -- Records of sys_user_post -- ---------------------------- BEGIN; INSERT INTO `sys_user_post` (`user_id`, `post_id`) VALUES (1, 1); COMMIT; -- ---------------------------- -- Table structure for sys_user_role -- ---------------------------- DROP TABLE IF EXISTS `sys_user_role`; CREATE TABLE `sys_user_role` ( `user_id` int unsigned NOT NULL COMMENT '用户ID', `role_id` int unsigned NOT NULL COMMENT '角色ID', PRIMARY KEY (`user_id`,`role_id`) USING BTREE, KEY `sys_user_role_role_id_idx` (`role_id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='用户和角色关联表'; -- ---------------------------- -- Records of sys_user_role -- ---------------------------- BEGIN; INSERT INTO `sys_user_role` (`user_id`, `role_id`) VALUES (1, 1); INSERT INTO `sys_user_role` (`user_id`, `role_id`) VALUES (2, 2); COMMIT; SET FOREIGN_KEY_CHECKS = 1; ================================================ FILE: docs/.nojekyll ================================================ ================================================ FILE: docs/README.md ================================================
logo

Carole-Admin

一款基于 Nestjs+Vue前后端分离的后台框架

# 介绍 ## 平台简介 `carole-admin` 是一款[Nestjs](https://nestjs.com/)+[Prisma](https://www.prisma.io/)+[Vue](https://vuejs.org/)+[Vite](https://vitejs.dev/)前后端分离的全栈快速开发平台, 前端基于[若依](https://github.com/yangzongzhuan/RuoYi-Vue3)。 - 前端采用[Vue3](https://vuejs.org/)、[Element-Plus](https://element-plus.org/)、[Vite](https://vitejs.dev/)。 - 后端采用[Nest](https://nestjs.com/)、[Prisma](https://www.prisma.io/)、[ioredis](https://github.com/redis/ioredis) & [Jwt](https://github.com/auth0/node-jsonwebtoken)。 - 权限认证使用[Jwt](https://github.com/auth0/node-jsonwebtoken),支持多终端认证系统。 - 支持加载动态权限菜单,多方式轻松权限控制。 - 支持接口限流 - 高效率开发,使用代码生成器可以一键生成前后端代码。 ## 项目 > 演示地址:[https://carole-admin-demo.carole.top](https://carole-admin-demo.carole.top) > > 默认有两个用户: admin的密码为carole test的密码为123456 > > github: > ## 内置功能 1. 用户管理:用户是系统操作者,该功能主要完成系统用户配置。 2. 部门管理:配置系统组织机构。 3. 岗位管理:配置系统用户所属担任职务。 4. 菜单管理:配置系统菜单,操作权限,按钮权限标识等。 5. 角色管理:角色菜单权限分配、设置角色按机构进行数据范围权限划分。 6. 字典管理:对系统中经常使用的一些较为固定的数据进行维护。 7. 参数管理:对系统动态配置常用参数。 8. 通知公告:系统通知公告信息发布维护。 9. 登录日志:系统登录日志记录查询包含登录异常。 10. 代码生成:前后端代码的生成(js、vue、sql)支持CRUD下载 。 11. 系统接口:根据业务代码自动生成相关的api接口文档。 12. 在线用户:当前系统中活跃用户状态监控。 13. 服务监控:监视当前系统CPU、内存、磁盘、堆栈等相关信息。 14. 缓存监控:对系统的缓存信息查询,命令统计等。 ## 演示图 | ![image-20240611165616048](assets/image-20240611165616048.png) | ![image-20240610160231844](assets/image-20240610160231844.png) | | ------------------------------------------------------------ | ------------------------------------------------------------ | | ![image-20240610155809785](assets/image-20240610155809785.png) | ![image-20240610155824377](assets/image-20240610155824377.png) | | ![image-20240610155853085](assets/image-20240610155853085.png) | ![image-20240610155914577](assets/image-20240610155914577.png) | | ![image-20240610155928620](assets/image-20240610155928620.png) | ![image-20240610155939603](assets/image-20240610155939603.png) | | ![image-20240610155953022](assets/image-20240610155953022.png) | ![image-20240610160014116](assets/image-20240610160014116.png) | | ![image-20240610160033126](assets/image-20240610160033126.png) | ![image-20240610160106498](assets/image-20240610160106498.png) | | ![image-20240610160120728](assets/image-20240610160120728.png) | ![image-20240610160137315](assets/image-20240610160137315.png) | | ![image-20240610160152700](assets/image-20240610160152700.png) | ![image-20240610160221567](assets/image-20240610160221567.png) | | | | # 文档 ## 主要文件结构 ``` server #系统后端 front #系统前端 server/src目录 ├─admin #系统管理模块 │ ├─gen #代码生成 │ └─system #系统代码 │ └─admin.module.ts #系统模块配置 ├─common #工具类 │ ├─decorator #自定义注解 │ ├─filter #异常处理 │ ├─guard │ │ ├─permission #权限校验 │ ├─middleware #中间件 │ │ └─auth #身份校验 │ ├─pipe #自定义管道 │ ├─prisma-client #prisma客户端 │ ├─result #返回对象 │ ├─service │ │ ├─auth #身份相关处理逻辑 │ │ ├─gen #代码生成逻辑 │ │ │ └─gen-template #代码模板 │ └─utils #通用工具 ├─prisma │ └─schema #数据库模型定义 │ └─schema.prisma #prisma主文件 ├─schedule #定时任务 ├─.env #环境变量配置, 密码 ├─main.ts #主文件 ├─config.ts #系统配置文件 ├─config-production.json #系统生产配置文件 ├─config-development.json #系统开发配置文件 ├─app.module.ts #系统主模块 ``` ## 开发指南 详细的开发指南请参考以下文档: - [安装指南](install.md) - 安装使用详解 - [配置说明](config.md) - 系统配置文件详解 - [开发指南](guide.md) - 包含权限控制、Prisma使用、代码生成等详细说明 - [常见问题](faq.md) - 常见问题解答 ## 部署指南 关于如何部署系统,请参考[部署指南](guide.md?id=部署)。 ================================================ FILE: docs/_coverpage.md ================================================ # Carole-Admin > 一款基于 Nestjs+Vue 前后端分离的后台框架 - 🚀 高效开发,一键生成前后端代码 - 🔒 完善的权限管理和认证系统 - 🛠️ 丰富的内置功能和组件 - 📱 响应式设计,支持多终端访问 [GitHub](https://github.com/Carole007/carole-admin) [演示站点](https://carole-admin-demo.carole.top) [开始使用](#介绍) ================================================ FILE: docs/_navbar.md ================================================ * [首页](/) * 文档 * [安装指南](/install.md) * [配置说明](/config.md) * [开发指南](/guide.md) * [代码生成](code_gen.md) * [部署指南](guide.md?id=部署) * [常见问题](/faq.md) * 链接 * [GitHub](https://github.com/Carole007/carole-admin) * [演示站点](https://carole-admin-demo.carole.top) * 相关技术 * [NestJS](https://nestjs.com/) * [Prisma](https://www.prisma.io/) * [Vue3](https://vuejs.org/) * [Element Plus](https://element-plus.org/) ================================================ FILE: docs/_sidebar.md ================================================ * [首页](README.md) * [安装指南](install.md) * [配置说明](config.md) * [开发指南](guide.md) * [代码生成](code_gen.md) * [部署指南](guide.md?id=部署) * [常见问题](faq.md) ================================================ FILE: docs/code_gen.md ================================================ # 代码生成的使用 ​ > 本篇文章介绍carole-admin系统的代码生成器使用 > > 这里演示一个用户管理crud ​ ## 前置准备 ```sql -- 建表 CREATE TABLE `test_user` ( `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', `username` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户账号', `password` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '密码', `nickname` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '昵称', `avatar` varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '头像', `status` char(1) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '1' COMMENT '状态(0禁用,1正常)', `create_time` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '注册时间', `update_time` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '修改时间', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='测试用户表'; -- 插入数据 INSERT INTO `test_user` (`id`, `username`, `password`, `nickname`, `avatar`, `status`, `create_time`, `update_time`) VALUES (1, 'Steve', 'U4GC3q7QRo', 'Liao Wai Lam', NULL, '1', '2022-12-15 08:24:00', '2001-02-06'); INSERT INTO `test_user` (`id`, `username`, `password`, `nickname`, `avatar`, `status`, `create_time`, `update_time`) VALUES (2, 'Sarah', '1oQl45QK1b', 'Kwong Tin Lok', NULL, '0', '2020-08-02 06:48:56', '2024-02-02'); INSERT INTO `test_user` (`id`, `username`, `password`, `nickname`, `avatar`, `status`, `create_time`, `update_time`) VALUES (3, 'Jose', 'JvVL0dC243', 'Tong Ka Ming', NULL, '1', '2007-10-03 09:13:04', '2009-08-16'); INSERT INTO `test_user` (`id`, `username`, `password`, `nickname`, `avatar`, `status`, `create_time`, `update_time`) VALUES (4, 'Matthew', 'qAEgP7NxFY', 'Kwok Ka Keung', NULL, '0', '2012-04-07 15:29:30', '2021-02-25'); INSERT INTO `test_user` (`id`, `username`, `password`, `nickname`, `avatar`, `status`, `create_time`, `update_time`) VALUES (5, 'Ronald', '2qME1z0UhZ', 'Choi Tsz Ching', NULL, '1', '2006-04-08 01:21:21', '2010-01-29'); INSERT INTO `test_user` (`id`, `username`, `password`, `nickname`, `avatar`, `status`, `create_time`, `update_time`) VALUES (6, 'Ellen', 'FRuTzGFgWj', 'Yip Sze Yu', NULL, '1', '2012-04-21 17:20:16', '2003-12-24'); INSERT INTO `test_user` (`id`, `username`, `password`, `nickname`, `avatar`, `status`, `create_time`, `update_time`) VALUES (7, 'Shirley', 'pouCHlM5jm', 'Yue Kar Yan', NULL, '1', '2011-03-13 21:45:26', '2003-12-02'); ``` ## 导入表 ​ - 登录系统,进入系统工具-代码生成,点击导入,勾选需要生成的表,点击确定。 ​ ![alt text](image.png) ​ ![alt text](assets/image-1.png) ​ ## 字典添加 ​ 这里我们用户有两种状态(禁用,正常),咋们可以使用字典进行管理,后期进行添加修改比较方便,比如再添加一个状态为封禁。 ​ 1. 添加字典类型 ​ ![alt text](assets/image-2.png) ![alt text](assets/image-3.png) 2. 点击字典类型,为此类型添加数据 ​ ![alt text](assets/image-4.png) ![alt text](assets/image-5.png) ![alt text](assets/image-6.png) ![alt text](assets/image-7.png) ​ ## 修改代码生成配置 ​点击左侧菜单-> 系统工具 -> 代码生成 修改刚才添加的表 ![alt text](assets/image-8.png) ### 修改字段信息 这里按照自己的业务需求设置即可,用户状态选择单选或者下拉,字典类型选择刚才新建的那个。 ​![alt text](assets/image-9.png) ### 修改生成信息 ![alt text](assets/image-10.png) #### 💡 **注意事项** 系统admin模块中已存在默认的`/system/user`,因此建议在生成业务代码时: - 将业务名修改为 `user1` 或其他不冲突的名称。 - 或者修改子系统名,以避免接口 URL 冲突。 生成的菜单信息中 `name` 默认使用业务名,请务必确保名称不与现有菜单重复。 如果业务名与已有模块(如 `user`)重复,可以选择: ✅ 修改业务名后生成代码 ✅ 或直接生成代码并执行菜单创建 SQL,再通过菜单管理手动修改菜单路由地址 此外,如果将代码生成到独立的模块目录中(不用默认的admin模块),也可避免路径冲突。 这里主要演示此类场景的处理方式。 ​这里我们修改子系统名和业务名 点击提交 ![alt text](assets/image-11.png) ## 添加菜单和权限 > 如果你已经有此表对应的菜单,不需要再执行 ​ - 点击这个小眼睛图标查看代码 ![alt text](assets/image-12.png) - 复制sql代码 ![alt text](assets/image-13.png) - 执行sql ![alt text](assets/image-14.png) 粘贴刚才复制的sql代码,执行 ![alt text](assets/image-15.png) 执行完毕刷新网页可看到菜单已添加 ​ ![alt text](assets/image-16.png) 修改菜单图标 ![alt text](assets/image-17.png) ![alt text](assets/image-18.png) 接下来完成代码导入 ## 生成prisma模型 > 因为这个表是新建的,没有prisma模型,所以需要生成 > 如果你已经有这表的模型了,可以不用生成 ​ 1. cd到server目录 执行server目录下的 `驼峰生成prisma的model.bat`或者驼峰生成prisma的model.sh ` ./驼峰生成prisma的model.sh ` ​ ![alt text](assets/image-19.png) ​ 1. 生成完毕后,会在prisma里生成一个文件,introspected.prisma,我们可以自己改名移动到schema里面,或者把model复制粘贴到schema里面的某个文件中(记得删除文件),这里我就改为test移动到schema里面。 ​ ![alt text](assets/image-20.png) ![alt text](assets/image-21.png) ## 下载&导入代码 ​ 1. 下载代码 ​这里我们点击右边的下载图标即可 ![alt text](assets/image-22.png) ​ 2. 解压得到,node就是后端的代码,vue前端代码 ​ ![alt text](assets/image-23.png) ​ > 建议大家使用git管理代码,防止代码丢失,导入代码时会覆盖代码 ### 导入后端代码 ​ > 如果您使用了eslint,请格式化代码 > > 如果你生成时没有用默认的admin模块,请确保已存在你填写的模块,没有的话:执行`nest g mo 模块名`生成模块 ​ 进入node目录, 复制整个模块到 覆盖项目server/src ​ > 一定要选择合并覆盖 而不是替换该目录。 ![alt text](assets/image-24.png) ​ 在代码生成的模块中,我们刚才选择的是默认的admin模块,注册service和controller ​ ![alt text](assets/image-26.png) ​ 如果serice或controller类名冲突,我们可以手动改下类名,或者修改代码生成的基本信息实体类配置 ### 导入前端代码 ​ 进入下载的压缩文件vue目录, 复制代码到 front/src 合并覆盖 ​ ![alt text](assets/image-27.png) ## 刷新页面查看效果 >若出现500错误,重启一下后端服务 ### 默认查询 ![alt text](assets/image-28.png) ​ ### 测试修改 ![alt text](assets/image-29.png) ​ ![alt text](assets/image-30.png) 本期教程结束。 ================================================ FILE: docs/config.md ================================================ ## ⚙️ 配置说明 > ⚠️ **重要说明** 如果 JSON 配置文件中存在 `Config` 里的 配置项,它将覆盖默认的 `Config` 对象对应的键值,请修改对应JSON文件确保配置生效! - 修改时请遵循开发环境优先,编辑对应的开发或生产 JSON 文件。 - 如果 JSON 文件中未包含某个 key,则该 key 的值将使用 `config.ts` 中的默认配置。 **Carole-Admin** 的配置主要分为两部分: 1. **主配置文件** 文件路径:`server/src/config.ts` - 包含系统的主要配置项。 - 对应的 `config-development.json` 和 `config-production.json` 文件分别用于开发环境和生产环境配置。 - 可在 `config.ts` 中修改: ```ts const runMode: 'development' | 'production' = 'development' ``` 用于加载对应的配置文件,并覆盖 `Config` 对象的内容。 2. **环境变量文件** 文件路径:`server/src/.env` - 包含数据库连接信息、以及自定义一些私密参数。 ## 主配置文件详解 `config.ts` 文件包含了系统的大部分配置项,下面是各配置项的详细说明: ```typescript import * as dotenv from 'dotenv' import { join } from 'path' import { watch } from 'fs' import { readJsonFile } from './common/utils' dotenv.config({ path: join(__dirname, `.env`) }) //运行模式,根据不同的模式加载不同的配置文件 development=>开发环境 production=>生产环境 export let runMode: 'development' | 'production' = 'development' const config_file_path = join(__dirname, `config-${runMode}.json`) /* 根据运行模式加载文件后,会覆盖默认配置 可直接修改对应的json文件 config-${runMode}.json 或者删除json文件中对应的key,默认就使用下面的配置。 后台提供了默认的配置文件修改,Config也会自动加载修改后的配置。 */ export const Config = { //服务器的HTTP端口,默认为3000 port: 3000, //# 应用的访问路径前缀 contextPath: '/v1', swagger: { //是否启用swagger enable: true, //接口文档路径 prefix: '/api' }, captcha: { //验证码类型 math或text mode: 'math', //验证码过期时间 expiresIn: 60 * 2 }, //配置文件列表,管理后台可快捷编辑同步Config数据 注意:开发环境运行在dist目录,修改的也是dist里面的配置文件 //根据业务可能会有多个配置文件 ConfigFileMap: { production_config: { desc: '生产环境配置', filePath: join(__dirname, './config-production.json') }, dev_config: { desc: '开发环境配置', filePath: join(__dirname, './config-production.json') } }, //接口限流 2分钟内同一个接口允许60次请求 rateLimit: { //数据存储在redis or memory storage: 'redis', ttl: 2 * 60 * 1000, limit: 60 }, crypto: { //密码加密秘钥 psdSecret: 'carole123456' }, token: { // token加密秘钥 secret: 'carole123456', //过期时间秒 expiresIn: 60 * 60 * 24 }, prisma: { //是否显示执行的sql指令 logEnable: false, //显示那些日志 log: ['query', 'info', 'warn', 'error'] as any }, //redis连接配置 redis: { //主机地址 host: '127.0.0.1', //端口 port: 6379, //数据库 db: 5, //密码 password: '' }, upload: { //上传文件存储基目录 请设置一个绝对路径 path: join(__dirname, 'uploads'), config: { img: { fileSize: 2 * 1024 * 1024, files: 1, fieldSize: 0.5 * 1024 * 1024, fields: 100, fieldNameSize: 100, parts: 100, headerPairs: 100 }, file: { fileSize: 100 * 1024 * 1024, files: 10, fieldSize: 0.5 * 1024 * 1024, fields: 100, fieldNameSize: 100, parts: 100, headerPairs: 100 } } }, //生成配置 gen: { //作者 author: 'carole', //默认生成模块 packageName: 'admin', //子模块目录 moduleName: 'system', //是否去除表前缀,默认是false autoRemovePre: false, //表前缀(生成类名不会包含表前缀,多个用逗号分隔) tablePrefix: ['sys_'] }, //邮件发送配置 mail: { //是否启用邮箱 enable: false, //超时设置, 30秒未发送邮件,则返回失败 timeout: 30 * 1000, config: { //邮箱服务器 qq:smtp.qq.com 网易: smtp.163.com host: '', //端口 port: 465, auth: { //用户名 user: '', //密码 pass: '' }, // 端口465设置true, 其他false secure: true, tls: { //建立 TLS 连接时是否应该拒绝未经授权的服务器证书 rejectUnauthorized: false } } } } initConfig() export function initConfig() { let data = readJsonFile(config_file_path) if (data) { for (let k in data) { Config[k] = data[k] } } } // 监听config文件变化 watch(config_file_path, (eventType, filename) => { if (eventType === 'change') { try { initConfig() console.log('config已更新') } catch (err) { console.log('更新config失败:', err) } } }) //是否开发环境 export function isDevelopment() { return runMode === 'development' } //是否生产环境 export function isProduction() { return runMode === 'production' } ``` ## 后台修改配置 > 注意:开发模式修改的是dist下的文件 > > 修改后会同步更新Conifg > ![alt text](assets/config-edit.png) ================================================ FILE: docs/faq.md ================================================ # 常见问题解答 (FAQ) 本文档收集了使用 Carole-Admin 系统时可能遇到的常见问题及其解决方案。 ## 安装与配置问题 ### Q: 执行 `npx prisma generate` 时失败怎么办? **A:** 这通常是由于网络问题导致的。可以尝试以下解决方案: 1. 多次执行该命令 2. 使用代理或更换网络环境 ### Q: 如何修改默认的数据库连接? **A:** 编辑 `server/src/.env` 文件中的 `DATABASE_URL` 变量: ``` DATABASE_URL="mysql://用户名:密码@主机:端口/数据库名?charset=utf8mb4" ``` ### Q: 如何修改系统的默认端口? **A:** 编辑 `server/src/config.ts` 文件中的 `port` 配置项: ```typescript port: 3000, // 修改为你需要的端口 ``` ### Q: 修改了密码加密秘钥后,无法登录系统怎么办? **A:** 修改密码加密秘钥后,需要重新生成用户密码并更新数据库: 1. 执行 `server/test/password.js` 脚本生成新密码 2. 使用生成的密码更新数据库中的用户密码 ```bash node server/test/password.js ``` ## Prisma 相关问题 ### Q: 如何处理 Prisma 中的日期时区问题? **A:** Prisma 中日期类型字段插入时可能存在时差问题。建议将数据库中的日期类型改为字符串类型,并在插入/更新时手动设置时间: ```typescript // 插入数据时 const nowDate = () => dayjs().format('YYYY-MM-DD'); await prisma.user.create({ data: { // ...其他字段 createTime: nowDate(), updateTime: nowDate(), }, }); ``` ### Q: 如何处理 BigInt 类型在 JSON 中的序列化问题? **A:** 当数据库使用 `bigint` 类型时,在 JSON 序列化时可能会出现问题。可以通过扩展 `BigInt` 的 `toJSON` 方法解决: ```typescript // 在应用启动时添加 BigInt.prototype.toJSON = function() { return this.toString(); }; ``` 或者在查询时将 BigInt 转换为字符串: ```typescript const result = await prisma.table.findMany(); return result.map(item => ({ ...item, bigIntField: item.bigIntField.toString(), })); ``` ### Q: 如何在 Prisma 中使用事务? **A:** Prisma 提供了 `$transaction` 方法来支持事务操作: ```typescript const [result1, result2] = await prisma.$transaction([ prisma.user.create({ data: { name: 'Alice' } }), prisma.post.create({ data: { title: 'Hello World' } }), ]); ``` 对于更复杂的事务逻辑,可以使用交互式事务: ```typescript const result = await prisma.$transaction(async (tx) => { // 使用 tx 代替 prisma 执行查询 const user = await tx.user.create({ data: { name: 'Alice' } }); // 基于第一个查询的结果执行第二个查询 const post = await tx.post.create({ data: { title: 'Hello World', authorId: user.id, }, }); return { user, post }; }); ``` ## 代码生成问题 ### Q: 代码生成时找不到表怎么办? **A:** 确保以下几点: 1. 表已经在数据库中创建 2. 数据库连接配置正确 3. 在 Prisma schema 中已经定义了对应的模型 4. 模型名称使用 PascalCase 命名,并正确设置了 `@@map` 映射到表名 ### Q: 生成的代码中字段名与数据库不一致怎么办? **A:** 这通常是因为 Prisma 模型中的字段映射配置不正确。确保在模型中使用 `@map` 注解正确映射字段名: ```typescript model User { id Int @id @default(autoincrement()) firstName String @map("first_name") lastName String @map("last_name") @@map("sys_user") } ``` ### Q: 如何自定义生成的代码模板? **A:** 代码生成模板位于 `server/src/common/service/gen/gen-template` 目录下。你可以根据需要修改这些模板文件,但请注意保留模板中的变量占位符。 ## 部署与性能问题 ### Q: 如何优化系统性能? **A:** 可以考虑以下优化措施: 1. **数据库优化**: - 为常用查询添加索引 - 优化复杂查询 - 使用数据库连接池 2. **缓存策略**: - 使用 Redis 缓存频繁访问的数据 - 实现适当的缓存失效策略 3. **代码优化**: - 避免 N+1 查询问题 - 使用批量操作代替循环单个操作 - 优化大型响应的数据结构 4. **服务器配置**: - 增加服务器资源(CPU、内存) - 使用负载均衡分发请求 - 配置适当的 Node.js 内存限制 ## 其他问题 ### Q: 如何扩展现有功能? **A:** 扩展现有功能的最佳实践: 1. **遵循模块化原则**: - 创建新的模块来封装相关功能 - 使用依赖注入来集成现有服务 2. **扩展而非修改**: - 尽量不直接修改核心代码 - 使用继承或组合模式扩展现有类 3. **保持一致的代码风格**: - 遵循项目的命名约定和结构 - 编写单元测试验证新功能 ### Q: 如何贡献代码? **A:** 欢迎通过以下方式贡献代码: 1. Fork 项目仓库 2. 创建功能分支 3. 提交更改 4. 确保代码通过测试 5. 提交 Pull Request 请确保您的代码符合项目的编码规范,并包含适当的文档和测试。 ### Q: 在哪里可以获取更多帮助? **A:** 如果您有其他问题,可以通过以下渠道获取帮助: 1. 查阅项目文档 2. 在 GitHub 仓库中提交 Issue 3. 加入社区讨论组 4. 联系项目维护者 --- 如果您的问题未在此 FAQ 中列出,请在 GitHub 仓库中提交 Issue,我们会尽快回复并更新此 FAQ。 ================================================ FILE: docs/guide.md ================================================ # 开发指南 本文档提供了 Carole-Admin 系统的开发指南,帮助开发者更好地使用和扩展系统。 ## 权限控制 Carole-Admin 提供了两种权限注解用于控制接口访问:`@RequireRole` 和 `@RequirePermission`。 ### @RequireRole `@RequireRole` 注解用于配置接口要求用户拥有指定角色才可访问。 | 参数 | 类型 | 描述 | | ----- | ------ | ---- | | value | String | 角色 | 示例:以下代码表示必须拥有 `admin` 角色才可访问 ```typescript @RequireRole("admin") async test() { return Result.ok() } ``` ### @RequirePermission `@RequirePermission` 注解用于配置接口要求用户拥有指定权限才可访问。 | 参数 | 类型 | 描述 | | ----- | ------ | ---- | | value | String | 权限 | 示例:以下代码表示必须拥有 `system:user:remove` 权限才可访问 ```typescript @RequirePermission("system:user:remove") async test() { return Result.ok() } ``` ## Prisma 相关 [Prisma 官方文档](https://www.prisma.io/docs/getting-started) ### Prisma 脚本功能 项目提供了两个 Prisma 相关的 bat 脚本: #### 更新 prisma 的 model.bat - 此脚本用于当你已经编写好 Prisma 的 model 文件,但数据库结构发生了更改时。它可以同步数据库的最新结构到 Prisma 的 schema 文件中。 - 相当于执行 `npx prisma db pull && npx prisma generate` #### 驼峰生成 prisma 的 model.bat - 此脚本用于从数据库中生成 Prisma 的 model 定义,适用于数据库表没有在 Prisma 中的 model 定义过。(代码生成模板会使用驼峰命名法,并自动添加字段和表的 map 映射关系。) - 生成之后会在 src/prisma 目录中有个 `introspected.prisma` 文件,可以更改名字并移动到 `src/prisma/schema` 里面。 ### Prisma 使用注意事项 - 项目打包时,可以在 schema.prisma 里的 binaryTargets 添加目标平台 - 确保 model 都写好表和字段的映射关系,使用 @@map 映射表,@Map 映射字段 - model 名称使用 PascalCase 命名,如 test -> Test, sys_config -> SysConfig 示例: ```javascript model SysConfig { configId Int @id @default(autoincrement()) @map("config_id") configName String? @default("") @map("config_name") @db.VarChar(100) configKey String? @default("") @map("config_key") @db.VarChar(100) configValue String? @default("") @map("config_value") @db.VarChar(500) configType String? @default("N") @map("config_type") @db.Char(1) createBy String? @default("") @map("create_by") @db.VarChar(64) createTime String? @map("create_time") @db.VarChar(25) updateBy String? @default("") @map("update_by") @db.VarChar(64) updateTime String? @map("update_time") @db.VarChar(25) remark String? @map("remark") @db.VarChar(500) @@map("sys_config") } ``` - Prisma 中日期类型字段插入时存在时差问题 > 解决办法:把 SQL 中的日期类型改成字符串,插入更新时手动设置时间 - 处理 BigInt 类型数据时,可以使用以下方法解决 JSON 转换问题: ```javascript BigInt.prototype.toJSON = function () { return this.toString() } ``` ## 代码生成使用 代码生成器是 Carole-Admin 的核心功能之一,可以大幅提高开发效率。 详细教程:[代码生成器使用教程](code_gen.md) ### 使用步骤 1. 在 prisma\schema 写好对应表的 Model,字段名驼峰映射 2. 登录系统(系统工具 -> 代码生成 -> 导入对应表) 3. 在代码生成列表中找到需要的表(可预览、编辑、同步、删除生成配置) 4. 点击生成代码获取 `carole.zip`,执行 `sql` 文件生成菜单权限,按照包内目录结构复制到自己的项目中 5. 修改对应模块的 module.ts 文件,在 providers 中注册生成的 Service,controllers 注册生成的 Controller 类 ### 代码生成功能 代码生成支持以下功能: - **预览**:对生成的代码提前预览,防止出现一些不符合预期的情况。 - **同步**:对原表的字段进行同步,包括新增、删除、修改的字段处理。 - **修改**:对生成的代码基本信息、字段信息、生成信息做一系列的调整。 ### 生成代码结构 生成的代码包括: - 前端:Vue 组件、API 调用、路由配置 - 后端:Controller、Service、DTO 类 - SQL:菜单权限配置 ## 定时任务 Carole-Admin 使用 [@nestjs/schedule](https://docs.nestjs.com/techniques/task-scheduling#task-scheduling) 实现定时任务功能。 ### 使用方法 在 `server\src\schedule\index.ts` 中添加需要执行的方法并加上 @Cron 注解并携带 cron 表达式即可。 示例: ```typescript // cron任务,每隔两秒执行一次 @Cron('*/2 * * * * *') testCron() { console.log("cron excute...") } ``` ### Cron 表达式说明 Cron 表达式由 6 个部分组成,从左到右依次为: ``` * * * * * * ┬ ┬ ┬ ┬ ┬ ┬ │ │ │ │ │ │ │ │ │ │ │ └ 星期几 (0 - 7) (0 或 7 是星期日) │ │ │ │ └───── 月份 (1 - 12) │ │ │ └────────── 日期 (1 - 31) │ │ └─────────────── 小时 (0 - 23) │ └──────────────────── 分钟 (0 - 59) └───────────────────────── 秒 (0 - 59, 可选) ``` 常用表达式: - `* * * * * *` - 每秒执行 - `0 * * * * *` - 每分钟开始时执行 - `0 0 * * * *` - 每小时开始时执行 - `0 0 0 * * *` - 每天午夜执行 - `0 0 12 * * *` - 每天中午 12 点执行 ## 接口限流 Carole-Admin 使用 [@nestjs/throttler](https://docs.nestjs.com/security/rate-limiting#multiple-throttler-definitions) 实现接口限流功能。 ### 全局限流配置 默认所有接口 2 分钟内都只允许 60 次请求,可以在 config.ts 里面配置 rateLimit: ```typescript rateLimit: { // 数据存储在 redis 或 memory storage: "redis", // 时间窗口(毫秒) ttl: 2 * 60 * 1000, // 在时间窗口内允许的最大请求次数 limit: 60, }, ``` ### 单个接口限流 使用 `@Throttle` 注解可以为单个接口配置限流规则: ```typescript // 1个小时之内只能请求8次 @Throttle({ default: { limit: 8, ttl: 1000 * 60 * 60 } }) async test1() { return Result.ok() } // 5s内只能请求一次 @Throttle({ default: { limit: 1, ttl: 1000 * 5 } }) async test2() { return Result.ok() } ``` ### 用户级别限流 使用 `@ThrottleUser()` 注解可以对用户进行限流: ```typescript // 用户1天只能请求一次 @ThrottleUser() @Throttle({ default: { limit: 1, ttl: 1000 * 60 * 60 * 24 } }) async test3() { return Result.ok() } ``` ## 请求跳过登录验证 在某些情况下,您可能需要允许某些接口无需登录即可访问(如公开 API、健康检查等)。 修改 `server\src\app.module.ts` 文件: ```typescript .exclude('/test(.*)', '/a') // 排除 /test 开头和 /a 的路由 .forRoutes('*') // 应用到所有路由 .forRoutes('/admin(*)') // 应用到所有 /admin 开头的路由 ``` 支持通配符: - `/test(.*)` - 排除所有以 `/test` 开头的路由 - `*` - 应用到所有路由 - `/admin(*)` - 应用到所有以 `/admin` 开头的路由 ## 使用 Redis Carole-Admin 封装了 Redis 工具类,提供了常用的 Redis 操作方法。 ### Redis 工具类 文件位置:`server\src\common\utils\redisUtils.ts` 该工具类封装了一个 Redis 连接池,提供了常用的 Redis 操作方法。 ### 使用方法 ```typescript import { redisUtils } from '@/common/utils/redisUtils' // 导入 // 使用直接调用方法即可 const r = await redisUtils.get('demo') await redisUtils.set('demo', 'hello world!', 10) // 过期时间秒为单位 10s过期 ``` ### 主要方法 - `get(key)` - 获取键值 - `set(key, value, expireTime)` - 设置键值,可选过期时间 - `del(key)` - 删除键 - `exists(key)` - 检查键是否存在 - `expire(key, seconds)` - 设置过期时间 - `ttl(key)` - 获取剩余过期时间 - `keys(pattern)` - 获取匹配模式的所有键 - 更多方法请查看源码 ## 请求参数验证 Carole-Admin 使用 [class-validator](https://github.com/typestack/class-validator) 进行请求参数验证。 ### 使用场景 使用类定义参数的模型规则,请求时会对参数做校验,不通过直接返回错误,以及自动删除不在类中的字段,更加安全方便。 例如,对于用户修改接口,如果只允许修改 nickname、age 和 email,但用户恶意传入了 password,使用参数验证可以自动过滤掉不允许的字段。 ### 使用方法 1. 定义 DTO 类: ```typescript export class CreateDictDataDto extends BaseDomain { @ApiProperty({ description: '字典类型' }) @IsNotEmpty({ message: '字典类型不能为空' }) @IsString() dictType: string @ApiProperty({ description: '数据标签' }) @IsNotEmpty({ message: '数据标签不能为空' }) @IsString() dictLabel: string @ApiProperty({ description: '数据键值' }) @IsNotEmpty({ message: '数据键值不能为空' }) @IsString() dictValue?: string @ApiProperty({ description: '样式属性' }) @IsOptional() cssClass?: string @ApiProperty({ description: '回显样式' }) @IsOptional() listClass?: string @ApiProperty({ description: '显示排序' }) @IsNotEmpty({ message: '排序值不能为空' }) @Transform(v => +v.value) @IsNumber() dictSort: number @ApiProperty({ description: '字典状态(0停用,1正常)' }) @IsOptional() status?: string = '1' } ``` 2. 在 Controller 中使用: ```typescript @Post() async create(@Body() createDto: CreateDictDataDto) { // createDto 已经经过验证,可以安全使用 return this.service.create(createDto); } ``` ### 注意事项 在 `server\src\app.module.ts` 中设置了 `whiteList: true`,会自动删除不在 DTO 类中的字段: ```typescript app.useGlobalPipes( new ValidationPipe({ whitelist: true, // 自动删除不在 DTO 类中的字段 transform: true, // 自动转换类型 forbidNonWhitelisted: false // 不允许未在白名单中的属性 }) ) ``` 因此,如果你使用了类来修饰参数类型,某个参数不想要验证,请务必加上 `@IsOptional()` 注解,标识可选的,否则这个字段会被直接删除掉。 ## 发送邮件 Carole-Admin 提供了邮件发送功能,可用于系统通知、密码重置等场景。 ### 配置邮件服务 1. 根据运行环境,修改 `config-[development|production].json` 文件中的邮箱配置: ```typescript "mail": { "enable": true, // 设置为 true 启用邮件服务 "timeout": 30000, //发送超时 "config": { "host": "smtp.example.com", "port": 465, "auth": { "user": "用户名", "pass": "密码" }, "secure": true, "tls": { "rejectUnauthorized": false } } } ``` ### 使用邮件服务 系统提供了邮件工具类 `server\src\common\utils\email.ts`,可以直接参考该文件使用: ## 部署 本节介绍如何将 Carole-Admin 系统部署到生产环境。 ### 后端部署 > 建议在config-production.json中 关闭 swagger 文档 `"swagger": { "enable": false }` > > 后台管理中修改用户密码,删除默认测试账号 1. 准备 Prisma 引擎: [查看平台的引擎](https://www.prisma.io/docs/orm/reference/prisma-schema-reference#binarytargets-options) ```bash cd server # 方法一:在本地生成目标平台的引擎 # 在 schema.prisma 文件中添加目标平台 # generator client { # provider = "prisma-client-js" # binaryTargets = ["native", "linux-musl", "debian-openssl-1.1.x"] # } npx prisma generate # 方法二:在服务器上生成引擎 # 将源代码上传到服务器,然后执行 npx prisma generate ``` 2. 构建后端应用: ```bash # 在本地或服务器上构建 npm run build ``` 3. 准备部署文件: ```bash # 将 package.json 复制到 dist 目录 cp package.json dist/ ``` 4. 部署到服务器: ```bash # 上传 dist 目录到服务器 cd dist # 在服务器上安装依赖 npm install # 修改为生产环境配置 .env # 修改config.ts运行模式为production,并修改config-production.json相关配置 export let runMode: "development" | "production" = "production"; # 使用 PM2 启动应用 - 安装PM2 npm install -g pm2 pm2 start main.js --name carole-admin ``` ### 前端部署 1. 构建前端应用: ```bash cd front # 修改生产环境 API 地址(如需) # 编辑 .env.production 文件 # 构建生产版本 npm run build:prod ``` 2. 部署到 Web 服务器: ```bash # 上传 dist 目录到服务器 ``` 3. 配置 Nginx: ```nginx #server块添加以下内容 location / { try_files $uri $uri/ /index.html; } ``` ================================================ FILE: docs/index.html ================================================ Carole-Admin - 基于 Nestjs+Vue 的后台框架
加载中...
================================================ FILE: docs/install.md ================================================ # 安装指南 本文档提供了 Carole-Admin 的基本安装步骤,帮助您快速搭建开发环境。更详细的配置和使用说明请参考[开发指南](guide.md)。 ## 环境准备 在开始安装之前,请确保您的系统满足以下要求: - **Node.js**: v20.12.0 或更高版本 - **MySQL**: 8.0.12 或更高版本 - **Redis**: 最新稳定版 您可以使用以下命令检查您的 Node.js 版本: ```bash node -v ``` ## 下载项目 ```bash # 克隆项目 git clone https://github.com/Carole007/carole-admin.git # 进入项目目录 cd carole-admin ``` ## 数据库配置 1. 创建一个名为 `carole` 的数据库 (可自定义数据库名称) > 记得修改 `server/src/.env` 文件中的 `DATABASE_URL` 变量配置 2. 导入项目根目录下的 SQL 文件 ## 快速启动 ### 后端配置 ```typescript # 进入后端目录 cd server # 安装依赖 npm install # 生成 Prisma 客户端 npx prisma generate # 配置环境变量 # 编辑 server/src/.env 文件,配置数据库连接信息 DATABASE_URL="mysql://root:root@localhost:3306/carole" #url格式 mysql://用户名:密码@ip:端口/数据库?参数charset=utf8mb4 # 修改相关配置 server/src/config-development.json //redis连接信息 "redis": { "host": "127.0.0.1", "port": 6379, "db": 5, "password": "" }, //文件上传路径 "upload": { "path": "/Users/carole/carole-admin/upload", } ``` ### 前端配置 ```bash # 进入前端目录 cd ../front # 安装依赖 npm install ``` ### 启动服务 ```bash # 启动后端服务 cd server npm run start:dev # 启动前端服务 cd ../front npm run dev ``` ## 访问系统 启动成功后,您可以通过以下地址访问系统: - 前端页面: - 后端 API: ## 默认账户 系统默认提供了两个账户: - 管理员账户:用户名 `admin`,密码 `carole` - 测试账户:用户名 `test`,密码 `123456` ## 更多配置 关于更详细的配置说明,请参考: - [配置说明](config.md) - 系统配置文件详解 - [开发指南](guide.md) - 包含权限控制、Prisma 使用、代码生成等详细说明 - [常见问题](faq.md) - 常见问题解答 ================================================ FILE: front/LICENSE ================================================ The MIT License (MIT) Copyright (c) 2018 RuoYi Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: front/README.md ================================================ ## 开始 ```bash # 克隆项目 git clone https://github.com/Carole007/carole-admin.git # 进入项目目录 cd carole-admin/front # 安装依赖 npm i # 启动服务 npm run dev # 构建测试环境 npm run build:stage # 构建生产环境 npm run build:prod # 前端访问地址 http://localhost:3001 ``` ================================================ FILE: front/bin/build.bat ================================================ @echo off echo. echo [��Ϣ] ���Web���̣�����dist�ļ��� echo. %~d0 cd %~dp0 cd .. npm run build:prod pause ================================================ FILE: front/bin/package.bat ================================================ @echo off echo. echo [��Ϣ] ��װWeb���̣�����node_modules�ļ��� echo. %~d0 cd %~dp0 cd .. npm i --registry=https://registry.npmmirror.com pause ================================================ FILE: front/bin/run-web.bat ================================================ @echo off echo. echo [��Ϣ] ʹ�� Vite �������� Web ���̡� echo. %~d0 cd %~dp0 cd .. npm run dev pause ================================================ FILE: front/html/ie.html ================================================ 请升级您的浏览器

请升级您的浏览器,以便我们更好的为您提供服务!

您正在使用 Internet Explorer 的早期版本(IE11以下版本或使用该内核的浏览器)。这意味着在升级浏览器前,您将无法访问此网站。


请注意:微软公司对Windows XP 及 Internet Explorer 早期版本的支持已经结束

自 2016 年 1 月 12 日起,Microsoft 不再为 IE 11 以下版本提供相应支持和更新。没有关键的浏览器安全更新,您的电脑可能易受有害病毒、间谍软件和其他恶意软件的攻击,它们可以窃取或损害您的业务数据和信息。请参阅 微软对 Internet Explorer 早期版本的支持将于 2016 年 1 月 12 日结束的说明


您可以选择更先进的浏览器

推荐使用以下浏览器的最新版本。如果您的电脑已有以下浏览器的最新版本则直接使用该浏览器访问即可。


================================================ FILE: front/index.html ================================================ carole管理系统
正在加载系统资源,请耐心等待
================================================ FILE: front/package.json ================================================ { "name": "carole-admin", "version": "1.0.0", "description": "carole管理系统", "license": "MIT", "type": "module", "scripts": { "dev": "vite", "build:prod": "vite build", "build:stage": "vite build --mode staging", "preview": "vite preview" }, "dependencies": { "@element-plus/icons-vue": "2.3.1", "@guolao/vue-monaco-editor": "^1.5.5", "@vueup/vue-quill": "1.2.0", "@vueuse/core": "10.6.1", "axios": "0.27.2", "echarts": "5.4.3", "element-plus": "2.4.3", "file-saver": "2.0.5", "fuse.js": "6.6.2", "highlight.js": "^11.9.0", "js-cookie": "3.0.5", "jsencrypt": "3.3.2", "nprogress": "0.2.0", "pinia": "2.1.7", "vue": "3.3.9", "vue-cropper": "1.1.1", "vue-router": "4.2.5" }, "devDependencies": { "@vitejs/plugin-vue": "4.5.0", "@vue/compiler-sfc": "3.3.9", "sass": "1.69.5", "unplugin-auto-import": "0.17.1", "unplugin-vue-setup-extend-plus": "1.0.0", "vite": "5.0.4", "vite-plugin-compression": "0.5.1", "vite-plugin-svg-icons": "2.0.1" } } ================================================ FILE: front/src/App.vue ================================================ ================================================ FILE: front/src/api/login.js ================================================ import request from '@/utils/request' // 登录方法 export function login(username, password, code, uuid) { const data = { username, password, code, uuid } return request({ url: '/login', headers: { isToken: false, repeatSubmit: false }, method: 'post', data: data }) } // 获取用户详细信息 export function getInfo() { return request({ url: '/getInfo', method: 'get' }) } // 退出方法 export function logout() { return request({ url: '/logout', method: 'post' }) } // 获取验证码 export function getCodeImg() { return request({ url: '/captchaImage', headers: { isToken: false }, method: 'get', timeout: 20000 }) } ================================================ FILE: front/src/api/menu.js ================================================ import request from '@/utils/request' // 获取路由 export const getRouters = () => { return request({ url: '/getRouters', method: 'get' }) } ================================================ FILE: front/src/api/monitor/cache.js ================================================ import request from '@/utils/request' // 查询缓存详细 export function getCache() { return request({ url: '/monitor/cache', method: 'get' }) } // 查询缓存名称列表 export function listCacheName() { return request({ url: '/monitor/cache/getNames', method: 'get' }) } // 查询缓存键名列表 export function listCacheKey(cacheName) { return request({ url: '/monitor/cache/getKeys/' + cacheName, method: 'get' }) } // 查询缓存内容 export function getCacheValue(cacheName, cacheKey) { return request({ url: '/monitor/cache/getValue/' + cacheName + '/' + cacheKey, method: 'get' }) } // 清理指定名称缓存 export function clearCacheName(cacheName) { return request({ url: '/monitor/cache/clearCacheName/' + cacheName, method: 'delete' }) } // 清理指定键名缓存 export function clearCacheKey(cacheKey) { return request({ url: '/monitor/cache/clearCacheKey/' + cacheKey, method: 'delete' }) } // 清理全部缓存 export function clearCacheAll() { return request({ url: '/monitor/cache/clearCacheAll', method: 'delete' }) } ================================================ FILE: front/src/api/monitor/logininfor.js ================================================ import request from '@/utils/request' // 查询登录日志列表 export function list(query) { return request({ url: '/monitor/logininfor/list', method: 'get', params: query }) } // 删除登录日志 export function delLogininfor(infoId) { return request({ url: '/monitor/logininfor/' + infoId, method: 'delete' }) } // 解锁用户登录状态 export function unlockLogininfor(userName) { return request({ url: '/monitor/logininfor/unlock/' + userName, method: 'get' }) } // 清空登录日志 export function cleanLogininfor() { return request({ url: '/monitor/logininfor/clean', method: 'delete' }) } ================================================ FILE: front/src/api/monitor/online.js ================================================ import request from '@/utils/request' // 查询在线用户列表 export function list(query) { return request({ url: '/monitor/online/list', method: 'get', params: query }) } // 强退用户 export function forceLogout(tokenId) { return request({ url: '/monitor/online/' + tokenId, method: 'delete' }) } ================================================ FILE: front/src/api/monitor/server.js ================================================ import request from '@/utils/request' // 获取服务信息 export function getServer() { return request({ url: '/monitor/server', method: 'get' }) } ================================================ FILE: front/src/api/system/config.js ================================================ import request from '@/utils/request' // 查询参数列表 export function listConfig(query) { return request({ url: '/system/config/list', method: 'get', params: query }) } // 查询参数详细 export function getConfig(configId) { return request({ url: '/system/config/' + configId, method: 'get' }) } // 根据参数键名查询参数值 export function getConfigKey(configKey) { return request({ url: '/system/config/configKey/' + configKey, method: 'get' }) } // 新增参数配置 export function addConfig(data) { return request({ url: '/system/config', method: 'post', data: data }) } // 修改参数配置 export function updateConfig(data) { return request({ url: '/system/config', method: 'put', data: data }) } // 删除参数配置 export function delConfig(configId) { return request({ url: '/system/config/' + configId, method: 'delete' }) } // 刷新参数缓存 export function refreshCache() { return request({ url: '/system/config/refreshCache', method: 'delete' }) } /** 获取所有 Filekey 列表 */ export function getKeys() { return request({ url: '/system/config/getFileKeys', method: 'get', }) } /** 根据 key 获取文件数据 */ export function getInfoByKey(key) { return request({ url: '/system/config/getConfigInfo', method: 'get', params: { key } }) } /** 根据 key 修改文件数据 */ export function updateInfoByKey(key, data) { return request({ url: '/system/config/serverConfig', method: 'post', params: { key }, data }) } ================================================ FILE: front/src/api/system/dept.js ================================================ import request from '@/utils/request' // 查询部门列表 export function listDept(query) { return request({ url: '/system/dept/list', method: 'get', params: query }) } // 查询部门列表(排除节点) export function listDeptExcludeChild(deptId) { return request({ url: '/system/dept/list/exclude/' + deptId, method: 'get' }) } // 查询部门详细 export function getDept(deptId) { return request({ url: '/system/dept/' + deptId, method: 'get' }) } // 新增部门 export function addDept(data) { return request({ url: '/system/dept', method: 'post', data: data }) } // 修改部门 export function updateDept(data) { return request({ url: '/system/dept', method: 'put', data: data }) } // 删除部门 export function delDept(deptId) { return request({ url: '/system/dept/' + deptId, method: 'delete' }) } ================================================ FILE: front/src/api/system/dict/data.js ================================================ import request from '@/utils/request' // 查询字典数据列表 export function listData(query) { return request({ url: '/system/dict/data/list', method: 'get', params: query }) } // 查询字典数据详细 export function getData(dictCode) { return request({ url: '/system/dict/data/' + dictCode, method: 'get' }) } // 根据字典类型查询字典数据信息 export function getDicts(dictType) { return request({ url: '/system/dict/data/type/' + dictType, method: 'get' }) } // 新增字典数据 export function addData(data) { return request({ url: '/system/dict/data', method: 'post', data: data }) } // 修改字典数据 export function updateData(data) { return request({ url: '/system/dict/data', method: 'put', data: data }) } // 删除字典数据 export function delData(dictCode) { return request({ url: '/system/dict/data/' + dictCode, method: 'delete' }) } ================================================ FILE: front/src/api/system/dict/type.js ================================================ import request from '@/utils/request' // 查询字典类型列表 export function listType(query) { return request({ url: '/system/dict/type/list', method: 'get', params: query }) } // 查询字典类型详细 export function getType(dictId) { return request({ url: '/system/dict/type/' + dictId, method: 'get' }) } // 新增字典类型 export function addType(data) { return request({ url: '/system/dict/type', method: 'post', data: data }) } // 修改字典类型 export function updateType(data) { return request({ url: '/system/dict/type', method: 'put', data: data }) } // 删除字典类型 export function delType(dictId) { return request({ url: '/system/dict/type/' + dictId, method: 'delete' }) } // 刷新字典缓存 export function refreshCache() { return request({ url: '/system/dict/type/refreshCache', method: 'delete' }) } // 获取字典选择框列表 export function optionselect() { return request({ url: '/system/dict/type/optionselect', method: 'get' }) } ================================================ FILE: front/src/api/system/menu.js ================================================ import request from '@/utils/request' // 查询菜单列表 export function listMenu(query) { return request({ url: '/system/menu/list', method: 'get', params: query }) } // 查询菜单详细 export function getMenu(menuId) { return request({ url: '/system/menu/' + menuId, method: 'get' }) } // 查询菜单下拉树结构 export function treeselect() { return request({ url: '/system/menu/treeselect', method: 'get' }) } // 根据角色ID查询菜单下拉树结构 export function roleMenuTreeselect(roleId) { return request({ url: '/system/menu/roleMenuTreeselect/' + roleId, method: 'get' }) } // 新增菜单 export function addMenu(data) { return request({ url: '/system/menu', method: 'post', data: data }) } // 修改菜单 export function updateMenu(data) { return request({ url: '/system/menu', method: 'put', data: data }) } // 删除菜单 export function delMenu(menuId) { return request({ url: '/system/menu/' + menuId, method: 'delete' }) } ================================================ FILE: front/src/api/system/notice.js ================================================ import request from '@/utils/request' // 查询公告列表 export function listNotice(query) { return request({ url: '/system/notice/list', method: 'get', params: query }) } // 查询公告详细 export function getNotice(noticeId) { return request({ url: '/system/notice/' + noticeId, method: 'get' }) } // 新增公告 export function addNotice(data) { return request({ url: '/system/notice', method: 'post', data: data }) } // 修改公告 export function updateNotice(data) { return request({ url: '/system/notice', method: 'put', data: data }) } // 删除公告 export function delNotice(noticeId) { return request({ url: '/system/notice/' + noticeId, method: 'delete' }) } ================================================ FILE: front/src/api/system/post.js ================================================ import request from '@/utils/request' // 查询岗位列表 export function listPost(query) { return request({ url: '/system/post/list', method: 'get', params: query }) } // 查询岗位详细 export function getPost(postId) { return request({ url: '/system/post/' + postId, method: 'get' }) } // 新增岗位 export function addPost(data) { return request({ url: '/system/post', method: 'post', data: data }) } // 修改岗位 export function updatePost(data) { return request({ url: '/system/post', method: 'put', data: data }) } // 删除岗位 export function delPost(postId) { return request({ url: '/system/post/' + postId, method: 'delete' }) } ================================================ FILE: front/src/api/system/role.js ================================================ import request from '@/utils/request' // 查询角色列表 export function listRole(query) { return request({ url: '/system/role/list', method: 'get', params: query }) } // 查询角色详细 export function getRole(roleId) { return request({ url: '/system/role/' + roleId, method: 'get' }) } // 新增角色 export function addRole(data) { return request({ url: '/system/role', method: 'post', data: data }) } // 修改角色 export function updateRole(data) { return request({ url: '/system/role', method: 'put', data: data }) } // 角色数据权限 export function dataScope(data) { return request({ url: '/system/role/dataScope', method: 'put', data: data }) } // 角色状态修改 export function changeRoleStatus(roleId, status) { const data = { roleId, status } return request({ url: '/system/role/changeStatus', method: 'put', data: data }) } // 删除角色 export function delRole(roleId) { return request({ url: '/system/role/' + roleId, method: 'delete' }) } // 查询角色已授权用户列表 export function allocatedUserList(query) { return request({ url: '/system/role/authUser/allocatedList', method: 'get', params: query }) } // 查询角色未授权用户列表 export function unallocatedUserList(query) { return request({ url: '/system/role/authUser/unallocatedList', method: 'get', params: query }) } // 取消用户授权角色 export function authUserCancel(data) { return request({ url: '/system/role/authUser/cancel', method: 'put', data: data }) } // 批量取消用户授权角色 export function authUserCancelAll(data) { return request({ url: '/system/role/authUser/cancelAll', method: 'put', params: data }) } // 授权用户选择 export function authUserSelectAll(data) { return request({ url: '/system/role/authUser/selectAll', method: 'put', params: data }) } // 根据角色ID查询部门树结构 export function deptTreeSelect(roleId) { return request({ url: '/system/role/deptTree/' + roleId, method: 'get' }) } ================================================ FILE: front/src/api/system/user.js ================================================ import request from '@/utils/request' import { parseStrEmpty } from "@/utils/ruoyi"; // 查询用户列表 export function listUser(query) { return request({ url: '/system/user/list', method: 'get', params: query }) } // 查询用户详细 export function getUser(userId) { return request({ url: '/system/user/' + parseStrEmpty(userId), method: 'get' }) } // 新增用户 export function addUser(data) { return request({ url: '/system/user', method: 'post', data: data }) } // 修改用户 export function updateUser(data) { return request({ url: '/system/user', method: 'put', data: data }) } // 删除用户 export function delUser(userId) { return request({ url: '/system/user/' + userId, method: 'delete' }) } // 用户密码重置 export function resetUserPwd(userId, password) { const data = { userId, password } return request({ url: '/system/user/resetPwd', method: 'put', data: data }) } // 用户状态修改 export function changeUserStatus(userId, status) { const data = { userId, status } return request({ url: '/system/user/changeStatus', method: 'put', data: data }) } // 查询用户个人信息 export function getUserProfile() { return request({ url: '/system/user/profile', method: 'get' }) } // 修改用户个人信息 export function updateUserProfile(data) { return request({ url: '/system/user/profile', method: 'put', data: data }) } // 用户密码重置 export function updateUserPwd(oldPassword, newPassword) { const data = { oldPassword, newPassword } return request({ url: '/system/user/profile/updatePwd', method: 'put', params: data }) } // 用户头像上传 export function uploadAvatar(data) { return request({ url: '/system/user/profile/avatar', method: 'post', data: data }) } // 查询授权角色 export function getAuthRole(userId) { return request({ url: '/system/user/authRole/' + userId, method: 'get' }) } // 保存授权角色 export function updateAuthRole(data) { return request({ url: '/system/user/authRole', method: 'put', params: data }) } // 查询部门下拉树结构 export function deptTreeSelect() { return request({ url: '/system/user/deptTree', method: 'get' }) } ================================================ FILE: front/src/api/tool/gen.js ================================================ import request from '@/utils/request' // 查询生成表数据 export function listTable(query) { return request({ url: '/tool/gen/list', method: 'get', params: query }) } // 查询db数据库列表 export function listDbTable(query) { return request({ url: '/tool/gen/db/list', method: 'get', params: query }) } // 查询表详细信息 export function getGenTable(tableId) { return request({ url: '/tool/gen/' + tableId, method: 'get' }) } // 修改代码生成信息 export function updateGenTable(data) { return request({ url: '/tool/gen', method: 'put', data: data }) } // 导入表 export function importTable(data) { return request({ url: '/tool/gen/importTable', method: 'post', params: data }) } // 预览生成代码 export function previewTable(tableId) { return request({ url: '/tool/gen/preview/' + tableId, method: 'get' }) } // 删除表数据 export function delTable(tableId) { return request({ url: '/tool/gen/' + tableId, method: 'delete' }) } // 生成代码(自定义路径) export function genCode(tableName) { return request({ url: '/tool/gen/genCode/' + tableName, method: 'get' }) } // 同步数据库 export function synchDb(tableName) { return request({ url: '/tool/gen/synchDb/' + tableName, method: 'get' }) } // 执行sql export function excuteSql(data) { return request({ url: '/tool/gen/excute', method: 'post', data }) } ================================================ FILE: front/src/assets/styles/btn.scss ================================================ @import './variables.module.scss'; @mixin colorBtn($color) { background: $color; &:hover { color: $color; &:before, &:after { background: $color; } } } .blue-btn { @include colorBtn($blue) } .light-blue-btn { @include colorBtn($light-blue) } .red-btn { @include colorBtn($red) } .pink-btn { @include colorBtn($pink) } .green-btn { @include colorBtn($green) } .tiffany-btn { @include colorBtn($tiffany) } .yellow-btn { @include colorBtn($yellow) } .pan-btn { font-size: 14px; color: #fff; padding: 14px 36px; border-radius: 8px; border: none; outline: none; transition: 600ms ease all; position: relative; display: inline-block; &:hover { background: #fff; &:before, &:after { width: 100%; transition: 600ms ease all; } } &:before, &:after { content: ''; position: absolute; top: 0; right: 0; height: 2px; width: 0; transition: 400ms ease all; } &::after { right: inherit; top: inherit; left: 0; bottom: 0; } } .custom-button { display: inline-block; line-height: 1; white-space: nowrap; cursor: pointer; background: #fff; color: #fff; -webkit-appearance: none; text-align: center; box-sizing: border-box; outline: 0; margin: 0; padding: 10px 15px; font-size: 14px; border-radius: 4px; } ================================================ FILE: front/src/assets/styles/element-ui.scss ================================================ // cover some element-ui styles .el-breadcrumb__inner, .el-breadcrumb__inner a { font-weight: 400 !important; } .el-upload { input[type="file"] { display: none !important; } } .el-upload__input { display: none; } .cell { .el-tag { margin-right: 0px; } } .small-padding { .cell { padding-left: 5px; padding-right: 5px; } } .fixed-width { .el-button--mini { padding: 7px 10px; width: 60px; } } .status-col { .cell { padding: 0 10px; text-align: center; .el-tag { margin-right: 0px; } } } // to fixed https://github.com/ElemeFE/element/issues/2461 .el-dialog { transform: none; left: 0; position: relative; margin: 0 auto; } // refine element ui upload .upload-container { .el-upload { width: 100%; .el-upload-dragger { width: 100%; height: 200px; } } } // dropdown .el-dropdown-menu { a { display: block } } // fix date-picker ui bug in filter-item .el-range-editor.el-input__inner { display: inline-flex !important; } // to fix el-date-picker css style .el-range-separator { box-sizing: content-box; } .el-menu--collapse > div > .el-submenu > .el-submenu__title .el-submenu__icon-arrow { display: none; } .el-dropdown .el-dropdown-link{ color: var(--el-color-primary) !important; } ================================================ FILE: front/src/assets/styles/index.scss ================================================ @import './variables.module.scss'; @import './mixin.scss'; @import './transition.scss'; @import './element-ui.scss'; @import './sidebar.scss'; @import './btn.scss'; @import './ruoyi.scss'; body { height: 100%; margin: 0; -moz-osx-font-smoothing: grayscale; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif; } label { font-weight: 700; } html { height: 100%; box-sizing: border-box; } #app { height: 100%; } *, *:before, *:after { box-sizing: inherit; } .no-padding { padding: 0px !important; } .padding-content { padding: 4px 0; } a:focus, a:active { outline: none; } a, a:focus, a:hover { cursor: pointer; color: inherit; text-decoration: none; } div:focus { outline: none; } .fr { float: right; } .fl { float: left; } .pr-5 { padding-right: 5px; } .pl-5 { padding-left: 5px; } .block { display: block; } .pointer { cursor: pointer; } .inlineBlock { display: block; } .clearfix { &:after { visibility: hidden; display: block; font-size: 0; content: " "; clear: both; height: 0; } } aside { background: #eef1f6; padding: 8px 24px; margin-bottom: 20px; border-radius: 2px; display: block; line-height: 32px; font-size: 16px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; color: #2c3e50; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; a { color: #337ab7; cursor: pointer; &:hover { color: rgb(32, 160, 255); } } } //main-container全局样式 .app-container { padding: 20px; } .components-container { margin: 30px 50px; position: relative; } .pagination-container { margin-top: 30px; } .text-center { text-align: center } .sub-navbar { height: 50px; line-height: 50px; position: relative; width: 100%; text-align: right; padding-right: 20px; transition: 600ms ease position; background: linear-gradient(90deg, rgba(32, 182, 249, 1) 0%, rgba(32, 182, 249, 1) 0%, rgba(33, 120, 241, 1) 100%, rgba(33, 120, 241, 1) 100%); .subtitle { font-size: 20px; color: #fff; } &.draft { background: #d0d0d0; } &.deleted { background: #d0d0d0; } } .link-type, .link-type:focus { color: #337ab7; cursor: pointer; &:hover { color: rgb(32, 160, 255); } } .filter-container { padding-bottom: 10px; .filter-item { display: inline-block; vertical-align: middle; margin-bottom: 10px; } } ================================================ FILE: front/src/assets/styles/mixin.scss ================================================ @mixin clearfix { &:after { content: ""; display: table; clear: both; } } @mixin scrollBar { &::-webkit-scrollbar-track-piece { background: #d3dce6; } &::-webkit-scrollbar { width: 6px; } &::-webkit-scrollbar-thumb { background: #99a9bf; border-radius: 20px; } } @mixin relative { position: relative; width: 100%; height: 100%; } @mixin pct($pct) { width: #{$pct}; position: relative; margin: 0 auto; } @mixin triangle($width, $height, $color, $direction) { $width: $width/2; $color-border-style: $height solid $color; $transparent-border-style: $width solid transparent; height: 0; width: 0; @if $direction==up { border-bottom: $color-border-style; border-left: $transparent-border-style; border-right: $transparent-border-style; } @else if $direction==right { border-left: $color-border-style; border-top: $transparent-border-style; border-bottom: $transparent-border-style; } @else if $direction==down { border-top: $color-border-style; border-left: $transparent-border-style; border-right: $transparent-border-style; } @else if $direction==left { border-right: $color-border-style; border-top: $transparent-border-style; border-bottom: $transparent-border-style; } } ================================================ FILE: front/src/assets/styles/ruoyi.scss ================================================ /** * 通用css样式布局处理 * Copyright (c) 2019 ruoyi */ /** 基础通用 **/ .pt5 { padding-top: 5px; } .pr5 { padding-right: 5px; } .pb5 { padding-bottom: 5px; } .mt5 { margin-top: 5px; } .mr5 { margin-right: 5px; } .mb5 { margin-bottom: 5px; } .mb8 { margin-bottom: 8px; } .ml5 { margin-left: 5px; } .mt10 { margin-top: 10px; } .mr10 { margin-right: 10px; } .mb10 { margin-bottom: 10px; } .ml10 { margin-left: 10px; } .mt20 { margin-top: 20px; } .mr20 { margin-right: 20px; } .mb20 { margin-bottom: 20px; } .ml20 { margin-left: 20px; } .h1, .h2, .h3, .h4, .h5, .h6, h1, h2, h3, h4, h5, h6 { font-family: inherit; font-weight: 500; line-height: 1.1; color: inherit; } .el-form .el-form-item__label { font-weight: 700; } .el-dialog:not(.is-fullscreen) { margin-top: 6vh !important; } .el-dialog.scrollbar .el-dialog__body { overflow: auto; overflow-x: hidden; max-height: 70vh; padding: 10px 20px 0; } .el-table { .el-table__header-wrapper, .el-table__fixed-header-wrapper { th { word-break: break-word; background-color: #f8f8f9 !important; color: #515a6e; height: 40px !important; font-size: 13px; } } .el-table__body-wrapper { .el-button [class*="el-icon-"] + span { margin-left: 1px; } } } /** 表单布局 **/ .form-header { font-size:15px; color:#6379bb; border-bottom:1px solid #ddd; margin:8px 10px 25px 10px; padding-bottom:5px } /** 表格布局 **/ .pagination-container { position: relative; height: 25px; margin-bottom: 10px; margin-top: 15px; padding: 10px 20px !important; } .el-dialog .pagination-container { position: static !important; } /* tree border */ .tree-border { margin-top: 5px; border: 1px solid #e5e6e7; background: #FFFFFF none; border-radius:4px; width: 100%; } .pagination-container .el-pagination { right: 0; position: absolute; } @media ( max-width : 768px) { .pagination-container .el-pagination > .el-pagination__jump { display: none !important; } .pagination-container .el-pagination > .el-pagination__sizes { display: none !important; } } .el-table .fixed-width .el-button--small { padding-left: 0; padding-right: 0; width: inherit; } /** 表格更多操作下拉样式 */ .el-table .el-dropdown-link { cursor: pointer; color: #409EFF; margin-left: 10px; } .el-table .el-dropdown, .el-icon-arrow-down { font-size: 12px; } .el-tree-node__content > .el-checkbox { margin-right: 8px; } .list-group-striped > .list-group-item { border-left: 0; border-right: 0; border-radius: 0; padding-left: 0; padding-right: 0; } .list-group { padding-left: 0px; list-style: none; } .list-group-item { border-bottom: 1px solid #e7eaec; border-top: 1px solid #e7eaec; margin-bottom: -1px; padding: 11px 0px; font-size: 13px; } .pull-right { float: right !important; } .el-card__header { padding: 14px 15px 7px !important; min-height: 40px; } .el-card__body { padding: 15px 20px 20px 20px !important; } .card-box { padding-right: 15px; padding-left: 15px; margin-bottom: 10px; } /* button color */ .el-button--cyan.is-active, .el-button--cyan:active { background: #20B2AA; border-color: #20B2AA; color: #FFFFFF; } .el-button--cyan:focus, .el-button--cyan:hover { background: #48D1CC; border-color: #48D1CC; color: #FFFFFF; } .el-button--cyan { background-color: #20B2AA; border-color: #20B2AA; color: #FFFFFF; } /* text color */ .text-navy { color: #1ab394; } .text-primary { color: inherit; } .text-success { color: #1c84c6; } .text-info { color: #23c6c8; } .text-warning { color: #f8ac59; } .text-danger { color: #ed5565; } .text-muted { color: #888888; } /* image */ .img-circle { border-radius: 50%; } .img-lg { width: 120px; height: 120px; } .avatar-upload-preview { position: absolute; top: 50%; transform: translate(50%, -50%); width: 200px; height: 200px; border-radius: 50%; box-shadow: 0 0 4px #ccc; overflow: hidden; } /* 拖拽列样式 */ .sortable-ghost{ opacity: .8; color: #fff!important; background: #42b983!important; } /* 表格右侧工具栏样式 */ .top-right-btn { margin-left: auto; } ================================================ FILE: front/src/assets/styles/sidebar.scss ================================================ #app { .main-container { height: 100%; transition: margin-left .28s; margin-left: $base-sidebar-width; position: relative; } .sidebarHide { margin-left: 0!important; } .sidebar-container { -webkit-transition: width .28s; transition: width 0.28s; width: $base-sidebar-width !important; background-color: $base-menu-background; height: 100%; position: fixed; font-size: 0px; top: 0; bottom: 0; left: 0; z-index: 1001; overflow: hidden; -webkit-box-shadow: 2px 0 6px rgba(0,21,41,.35); box-shadow: 2px 0 6px rgba(0,21,41,.35); // reset element-ui css .horizontal-collapse-transition { transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out; } .scrollbar-wrapper { overflow-x: hidden !important; } .el-scrollbar__bar.is-vertical { right: 0px; } .el-scrollbar { height: 100%; } &.has-logo { .el-scrollbar { height: calc(100% - 50px); } } .is-horizontal { display: none; } a { display: inline-block; width: 100%; overflow: hidden; } .svg-icon { margin-right: 16px; } .el-menu { border: none; height: 100%; width: 100% !important; } .el-menu-item, .menu-title { overflow: hidden !important; text-overflow: ellipsis !important; white-space: nowrap !important; } .el-menu-item .el-menu-tooltip__trigger { display: inline-block !important; } // menu hover .sub-menu-title-noDropdown, .el-sub-menu__title { &:hover { background-color: rgba(0, 0, 0, 0.06) !important; } } & .theme-dark .is-active > .el-sub-menu__title { color: $base-menu-color-active !important; } & .nest-menu .el-sub-menu>.el-sub-menu__title, & .el-sub-menu .el-menu-item { min-width: $base-sidebar-width !important; &:hover { background-color: rgba(0, 0, 0, 0.06) !important; } } & .theme-dark .nest-menu .el-sub-menu>.el-sub-menu__title, & .theme-dark .el-sub-menu .el-menu-item { background-color: $base-sub-menu-background !important; &:hover { background-color: $base-sub-menu-hover !important; } } } .hideSidebar { .sidebar-container { width: 54px !important; } .main-container { margin-left: 54px; } .sub-menu-title-noDropdown { padding: 0 !important; position: relative; .el-tooltip { padding: 0 !important; .svg-icon { margin-left: 20px; } } } .el-sub-menu { overflow: hidden; &>.el-sub-menu__title { padding: 0 !important; .svg-icon { margin-left: 20px; } } } .el-menu--collapse { .el-sub-menu { &>.el-sub-menu__title { &>span { height: 0; width: 0; overflow: hidden; visibility: hidden; display: inline-block; } &>i { height: 0; width: 0; overflow: hidden; visibility: hidden; display: inline-block; } } } } } .el-menu--collapse .el-menu .el-sub-menu { min-width: $base-sidebar-width !important; } // mobile responsive .mobile { .main-container { margin-left: 0px; } .sidebar-container { transition: transform .28s; width: $base-sidebar-width !important; } &.hideSidebar { .sidebar-container { pointer-events: none; transition-duration: 0.3s; transform: translate3d(-$base-sidebar-width, 0, 0); } } } .withoutAnimation { .main-container, .sidebar-container { transition: none; } } } // when menu collapsed .el-menu--vertical { &>.el-menu { .svg-icon { margin-right: 16px; } } .nest-menu .el-sub-menu>.el-sub-menu__title, .el-menu-item { &:hover { // you can use $sub-menuHover background-color: rgba(0, 0, 0, 0.06) !important; } } // the scroll bar appears when the sub-menu is too long >.el-menu--popup { max-height: 100vh; overflow-y: auto; &::-webkit-scrollbar-track-piece { background: #d3dce6; } &::-webkit-scrollbar { width: 6px; } &::-webkit-scrollbar-thumb { background: #99a9bf; border-radius: 20px; } } } ================================================ FILE: front/src/assets/styles/transition.scss ================================================ // global transition css /* fade */ .fade-enter-active, .fade-leave-active { transition: opacity 0.28s; } .fade-enter, .fade-leave-active { opacity: 0; } /* fade-transform */ .fade-transform--move, .fade-transform-leave-active, .fade-transform-enter-active { transition: all .5s; } .fade-transform-enter { opacity: 0; transform: translateX(-30px); } .fade-transform-leave-to { opacity: 0; transform: translateX(30px); } /* breadcrumb transition */ .breadcrumb-enter-active, .breadcrumb-leave-active { transition: all .5s; } .breadcrumb-enter, .breadcrumb-leave-active { opacity: 0; transform: translateX(20px); } .breadcrumb-move { transition: all .5s; } .breadcrumb-leave-active { position: absolute; } ================================================ FILE: front/src/assets/styles/variables.module.scss ================================================ // base color $blue: #324157; $light-blue: #3A71A8; $red: #C03639; $pink: #E65D6E; $green: #30B08F; $tiffany: #4AB7BD; $yellow: #FEC171; $panGreen: #30B08F; // 默认菜单主题风格 $base-menu-color: #bfcbd9; $base-menu-color-active: #f4f4f5; $base-menu-background: #304156; $base-logo-title-color: #ffffff; $base-menu-light-color: rgba(0, 0, 0, 0.7); $base-menu-light-background: #ffffff; $base-logo-light-title-color: #001529; $base-sub-menu-background: #1f2d3d; $base-sub-menu-hover: #001528; // 自定义暗色菜单风格 /** $base-menu-color:hsla(0,0%,100%,.65); $base-menu-color-active:#fff; $base-menu-background:#001529; $base-logo-title-color: #ffffff; $base-menu-light-color:rgba(0,0,0,.70); $base-menu-light-background:#ffffff; $base-logo-light-title-color: #001529; $base-sub-menu-background:#000c17; $base-sub-menu-hover:#001528; */ $--color-primary: #409EFF; $--color-success: #67C23A; $--color-warning: #E6A23C; $--color-danger: #F56C6C; $--color-info: #909399; $base-sidebar-width: 200px; // the :export directive is the magic sauce for webpack // https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass :export { menuColor: $base-menu-color; menuLightColor: $base-menu-light-color; menuColorActive: $base-menu-color-active; menuBackground: $base-menu-background; menuLightBackground: $base-menu-light-background; subMenuBackground: $base-sub-menu-background; subMenuHover: $base-sub-menu-hover; sideBarWidth: $base-sidebar-width; logoTitleColor: $base-logo-title-color; logoLightTitleColor: $base-logo-light-title-color; primaryColor: $--color-primary; successColor: $--color-success; dangerColor: $--color-danger; infoColor: $--color-info; warningColor: $--color-warning; } ================================================ FILE: front/src/components/Breadcrumb/index.vue ================================================ ================================================ FILE: front/src/components/Crontab/day.vue ================================================ ================================================ FILE: front/src/components/Crontab/hour.vue ================================================ ================================================ FILE: front/src/components/Crontab/index.vue ================================================ ================================================ FILE: front/src/components/Crontab/min.vue ================================================ ================================================ FILE: front/src/components/Crontab/month.vue ================================================ ================================================ FILE: front/src/components/Crontab/result.vue ================================================ ================================================ FILE: front/src/components/Crontab/second.vue ================================================ ================================================ FILE: front/src/components/Crontab/week.vue ================================================ ================================================ FILE: front/src/components/Crontab/year.vue ================================================ ================================================ FILE: front/src/components/DictTag/index.vue ================================================ ================================================ FILE: front/src/components/Editor/index.vue ================================================ ================================================ FILE: front/src/components/FileList/index.vue ================================================ ================================================ FILE: front/src/components/FileUpload/index.vue ================================================ ================================================ FILE: front/src/components/Hamburger/index.vue ================================================ ================================================ FILE: front/src/components/HeaderSearch/index.vue ================================================ ================================================ FILE: front/src/components/IconSelect/index.vue ================================================ ================================================ FILE: front/src/components/IconSelect/requireIcons.js ================================================ let icons = [] const modules = import.meta.glob('./../../assets/icons/svg/*.svg'); for (const path in modules) { const p = path.split('assets/icons/svg/')[1].split('.svg')[0]; icons.push(p); } export default icons ================================================ FILE: front/src/components/ImagePreview/index.vue ================================================ ================================================ FILE: front/src/components/ImageUpload/index.vue ================================================ ================================================ FILE: front/src/components/Pagination/index.vue ================================================ ================================================ FILE: front/src/components/ParentView/index.vue ================================================ ================================================ FILE: front/src/components/RightToolbar/index.vue ================================================ ================================================ FILE: front/src/components/Screenfull/index.vue ================================================ ================================================ FILE: front/src/components/SizeSelect/index.vue ================================================ ================================================ FILE: front/src/components/SvgIcon/index.vue ================================================ ================================================ FILE: front/src/components/SvgIcon/svgicon.js ================================================ import * as components from '@element-plus/icons-vue' export default { install: (app) => { for (const key in components) { const componentConfig = components[key]; app.component(componentConfig.name, componentConfig); } }, }; ================================================ FILE: front/src/components/TopNav/index.vue ================================================ ================================================ FILE: front/src/components/TreeSelect/index.vue ================================================ ================================================ FILE: front/src/components/iFrame/index.vue ================================================ ================================================ FILE: front/src/layout/components/Navbar.vue ================================================ ================================================ FILE: front/src/layout/components/Settings/index.vue ================================================ ================================================ FILE: front/src/layout/components/Sidebar/Link.vue ================================================ ================================================ FILE: front/src/layout/components/Sidebar/Logo.vue ================================================ ================================================ FILE: front/src/layout/components/Sidebar/SidebarItem.vue ================================================ ================================================ FILE: front/src/layout/components/Sidebar/index.vue ================================================ ================================================ FILE: front/src/layout/components/TagsView/ScrollPane.vue ================================================ ================================================ FILE: front/src/layout/components/TagsView/index.vue ================================================ ================================================ FILE: front/src/layout/components/index.js ================================================ export { default as AppMain } from './AppMain' export { default as Navbar } from './Navbar' export { default as Settings } from './Settings' export { default as TagsView } from './TagsView/index.vue' ================================================ FILE: front/src/layout/index.vue ================================================ ================================================ FILE: front/src/main.js ================================================ import { createApp } from 'vue' import Cookies from 'js-cookie' import ElementPlus from 'element-plus' import 'element-plus/dist/index.css' import locale from 'element-plus/es/locale/lang/zh-cn' import '@/assets/styles/index.scss' // global css import App from './App' import store from './store' import router from './router' import directive from './directive' // directive // 注册指令 import plugins from './plugins' // plugins import { download } from '@/utils/request' // svg图标 import 'virtual:svg-icons-register' import SvgIcon from '@/components/SvgIcon' import elementIcons from '@/components/SvgIcon/svgicon' import './permission' // permission control import { useDict } from '@/utils/dict' import { parseTime, resetForm, addDateRange, handleTree, selectDictLabel, selectDictLabels } from '@/utils/ruoyi' // 分页组件 import Pagination from '@/components/Pagination' // 自定义表格工具组件 import RightToolbar from '@/components/RightToolbar' // 富文本组件 import Editor from "@/components/Editor" // 文件上传组件 import FileUpload from "@/components/FileUpload" // 图片上传组件 import ImageUpload from "@/components/ImageUpload" // 图片预览组件 import ImagePreview from "@/components/ImagePreview" // 自定义树选择组件 import TreeSelect from '@/components/TreeSelect' // 字典标签组件 import DictTag from '@/components/DictTag' //文件列表显示组件 import FileList from "@/components/FileList" //文件编辑 import { install as VueMonacoEditorPlugin } from '@guolao/vue-monaco-editor' const app = createApp(App) app.use(VueMonacoEditorPlugin, { paths: { vs: 'https://unpkg.com/monaco-editor@0.43.0/min/vs' }, }) // 全局方法挂载 app.config.globalProperties.useDict = useDict app.config.globalProperties.download = download app.config.globalProperties.parseTime = parseTime app.config.globalProperties.resetForm = resetForm app.config.globalProperties.handleTree = handleTree app.config.globalProperties.addDateRange = addDateRange app.config.globalProperties.selectDictLabel = selectDictLabel app.config.globalProperties.selectDictLabels = selectDictLabels // 全局组件挂载 app.component('DictTag', DictTag) app.component('Pagination', Pagination) app.component('TreeSelect', TreeSelect) app.component('FileUpload', FileUpload) app.component('ImageUpload', ImageUpload) app.component('ImagePreview', ImagePreview) app.component('RightToolbar', RightToolbar) app.component('Editor', Editor) app.component('FileList', FileList) app.use(router) app.use(store) app.use(plugins) app.use(elementIcons) app.component('svg-icon', SvgIcon) directive(app) // 使用element-plus 并且设置全局的大小 app.use(ElementPlus, { locale: locale, // 支持 large、default、small size: Cookies.get('size') || 'default' }) app.mount('#app') ================================================ FILE: front/src/permission.js ================================================ import router from './router' import { ElMessage } from 'element-plus' import NProgress from 'nprogress' import 'nprogress/nprogress.css' import { getToken } from '@/utils/auth' import { isHttp } from '@/utils/validate' import { isRelogin } from '@/utils/request' import useUserStore from '@/store/modules/user' import useSettingsStore from '@/store/modules/settings' import usePermissionStore from '@/store/modules/permission' NProgress.configure({ showSpinner: false }); const whiteList = ['/login', '/register']; router.beforeEach((to, from, next) => { NProgress.start() if (getToken()) { to.meta.title && useSettingsStore().setTitle(to.meta.title) /* has token*/ if (to.path === '/login') { next({ path: '/' }) NProgress.done() } else if (whiteList.indexOf(to.path) !== -1) { next() } else { if (useUserStore().roles.length === 0) { isRelogin.show = true // 判断当前用户是否已拉取完user_info信息 useUserStore().getInfo().then(() => { isRelogin.show = false usePermissionStore().generateRoutes().then(accessRoutes => { // 根据roles权限生成可访问的路由表 accessRoutes.forEach(route => { if (!isHttp(route.path)) { router.addRoute(route) // 动态添加可访问路由表 } }) next({ ...to, replace: true }) // hack方法 确保addRoutes已完成 }) }).catch(err => { useUserStore().logOut().then(() => { ElMessage.error(err) next({ path: '/' }) }) }) } else { next() } } } else { // 没有token if (whiteList.indexOf(to.path) !== -1) { // 在免登录白名单,直接进入 next() } else { next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页 NProgress.done() } } }) router.afterEach(() => { NProgress.done() }) ================================================ FILE: front/src/plugins/auth.js ================================================ import useUserStore from '@/store/modules/user' function authPermission(permission) { const all_permission = "*:*:*"; const permissions = useUserStore().permissions if (permission && permission.length > 0) { return permissions.some(v => { return all_permission === v || v === permission }) } else { return false } } function authRole(role) { const super_admin = "admin"; const roles = useUserStore().roles if (role && role.length > 0) { return roles.some(v => { return super_admin === v || v === role }) } else { return false } } export default { // 验证用户是否具备某权限 hasPermi(permission) { return authPermission(permission); }, // 验证用户是否含有指定权限,只需包含其中一个 hasPermiOr(permissions) { return permissions.some(item => { return authPermission(item) }) }, // 验证用户是否含有指定权限,必须全部拥有 hasPermiAnd(permissions) { return permissions.every(item => { return authPermission(item) }) }, // 验证用户是否具备某角色 hasRole(role) { return authRole(role); }, // 验证用户是否含有指定角色,只需包含其中一个 hasRoleOr(roles) { return roles.some(item => { return authRole(item) }) }, // 验证用户是否含有指定角色,必须全部拥有 hasRoleAnd(roles) { return roles.every(item => { return authRole(item) }) } } ================================================ FILE: front/src/plugins/cache.js ================================================ const sessionCache = { set (key, value) { if (!sessionStorage) { return } if (key != null && value != null) { sessionStorage.setItem(key, value) } }, get (key) { if (!sessionStorage) { return null } if (key == null) { return null } return sessionStorage.getItem(key) }, setJSON (key, jsonValue) { if (jsonValue != null) { this.set(key, JSON.stringify(jsonValue)) } }, getJSON (key) { const value = this.get(key) if (value != null) { return JSON.parse(value) } }, remove (key) { sessionStorage.removeItem(key); } } const localCache = { set (key, value) { if (!localStorage) { return } if (key != null && value != null) { localStorage.setItem(key, value) } }, get (key) { if (!localStorage) { return null } if (key == null) { return null } return localStorage.getItem(key) }, setJSON (key, jsonValue) { if (jsonValue != null) { this.set(key, JSON.stringify(jsonValue)) } }, getJSON (key) { const value = this.get(key) if (value != null) { return JSON.parse(value) } }, remove (key) { localStorage.removeItem(key); } } export default { /** * 会话级缓存 */ session: sessionCache, /** * 本地缓存 */ local: localCache } ================================================ FILE: front/src/plugins/download.js ================================================ import axios from 'axios' import { ElLoading, ElMessage } from 'element-plus' import { saveAs } from 'file-saver' import { getToken } from '@/utils/auth' import errorCode from '@/utils/errorCode' import { blobValidate } from '@/utils/ruoyi' const baseURL = import.meta.env.VITE_APP_BASE_API let downloadLoadingInstance; export default { name(name, isDelete = true) { let url = baseURL + encodeURIComponent(name) axios({ method: 'get', url: url, responseType: 'blob', headers: { 'Authorization': 'Bearer ' + getToken() } }).then((res) => { const isBlob = blobValidate(res.data); if (isBlob) { const blob = new Blob([res.data]) this.saveAs(blob) } else { this.printErrMsg(res.data); } }) }, resource(resource) { let url = baseURL + encodeURIComponent(resource); axios({ method: 'get', url: url, responseType: 'blob', headers: { 'Authorization': 'Bearer ' + getToken() } }).then((res) => { const isBlob = blobValidate(res.data); if (isBlob) { const blob = new Blob([res.data]) this.saveAs(blob) } else { this.printErrMsg(res.data); } }) }, zip(url, name) { url = baseURL + url downloadLoadingInstance = ElLoading.service({ text: "正在下载数据,请稍候", background: "rgba(0, 0, 0, 0.7)", }) axios({ method: 'get', url: url, responseType: 'blob', headers: { 'Authorization': 'Bearer ' + getToken() } }).then((res) => { const isBlob = blobValidate(res.data); if (isBlob) { const blob = new Blob([res.data], { type: 'application/zip' }) this.saveAs(blob, name) } else { this.printErrMsg(res.data); } downloadLoadingInstance.close(); }).catch((r) => { console.error(r) ElMessage.error('下载文件出现错误,请联系管理员!') downloadLoadingInstance.close(); }) }, saveAs(text, name, opts) { saveAs(text, name, opts); }, async printErrMsg(data) { const resText = await data.text(); const rspObj = JSON.parse(resText); const errMsg = errorCode[rspObj.code] || rspObj.msg || errorCode['default'] ElMessage.error(errMsg); } } ================================================ FILE: front/src/plugins/index.js ================================================ import tab from './tab' import auth from './auth' import cache from './cache' import modal from './modal' import download from './download' export default function installPlugins(app){ // 页签操作 app.config.globalProperties.$tab = tab // 认证对象 app.config.globalProperties.$auth = auth // 缓存对象 app.config.globalProperties.$cache = cache // 模态框对象 app.config.globalProperties.$modal = modal // 下载文件 app.config.globalProperties.$download = download } ================================================ FILE: front/src/plugins/modal.js ================================================ import { ElMessage, ElMessageBox, ElNotification, ElLoading } from 'element-plus' let loadingInstance; export default { // 消息提示 msg(content) { ElMessage.info(content) }, // 错误消息 msgError(content) { ElMessage.error(content) }, // 成功消息 msgSuccess(content) { ElMessage.success(content) }, // 警告消息 msgWarning(content) { ElMessage.warning(content) }, // 弹出提示 alert(content) { ElMessageBox.alert(content, "系统提示") }, // 错误提示 alertError(content) { ElMessageBox.alert(content, "系统提示", { type: 'error' }) }, // 成功提示 alertSuccess(content) { ElMessageBox.alert(content, "系统提示", { type: 'success' }) }, // 警告提示 alertWarning(content) { ElMessageBox.alert(content, "系统提示", { type: 'warning' }) }, // 通知提示 notify(content) { ElNotification.info(content) }, // 错误通知 notifyError(content) { ElNotification.error(content); }, // 成功通知 notifySuccess(content) { ElNotification.success(content) }, // 警告通知 notifyWarning(content) { ElNotification.warning(content) }, // 确认窗体 confirm(content) { return ElMessageBox.confirm(content, "系统提示", { confirmButtonText: '确定', cancelButtonText: '取消', type: "warning", }) }, // 提交内容 prompt(content) { return ElMessageBox.prompt(content, "系统提示", { confirmButtonText: '确定', cancelButtonText: '取消', type: "warning", }) }, // 打开遮罩层 loading(content) { loadingInstance = ElLoading.service({ lock: true, text: content, background: "rgba(0, 0, 0, 0.7)", }) }, // 关闭遮罩层 closeLoading() { loadingInstance.close(); } } ================================================ FILE: front/src/plugins/tab.js ================================================ import useTagsViewStore from '@/store/modules/tagsView' import router from '@/router' export default { // 刷新当前tab页签 refreshPage(obj) { const { path, query, matched } = router.currentRoute.value; if (obj === undefined) { matched.forEach((m) => { if (m.components && m.components.default && m.components.default.name) { if (!['Layout', 'ParentView'].includes(m.components.default.name)) { obj = { name: m.components.default.name, path: path, query: query }; } } }); } return useTagsViewStore().delCachedView(obj).then(() => { const { path, query } = obj router.replace({ path: '/redirect' + path, query: query }) }) }, // 关闭当前tab页签,打开新页签 closeOpenPage(obj) { useTagsViewStore().delView(router.currentRoute.value); if (obj !== undefined) { return router.push(obj); } }, // 关闭指定tab页签 closePage(obj) { if (obj === undefined) { return useTagsViewStore().delView(router.currentRoute.value).then(({ visitedViews }) => { const latestView = visitedViews.slice(-1)[0] if (latestView) { return router.push(latestView.fullPath) } return router.push('/'); }); } return useTagsViewStore().delView(obj); }, // 关闭所有tab页签 closeAllPage() { return useTagsViewStore().delAllViews(); }, // 关闭左侧tab页签 closeLeftPage(obj) { return useTagsViewStore().delLeftTags(obj || router.currentRoute.value); }, // 关闭右侧tab页签 closeRightPage(obj) { return useTagsViewStore().delRightTags(obj || router.currentRoute.value); }, // 关闭其他tab页签 closeOtherPage(obj) { return useTagsViewStore().delOthersViews(obj || router.currentRoute.value); }, // 打开tab页签 openPage(url) { return router.push(url); }, // 修改tab页签 updatePage(obj) { return useTagsViewStore().updateVisitedView(obj); } } ================================================ FILE: front/src/router/index.js ================================================ import { createWebHistory, createRouter } from 'vue-router' /* Layout */ import Layout from '@/layout' /** * Note: 路由配置项 * * hidden: true // 当设置 true 的时候该路由不会再侧边栏出现 如401,login等页面,或者如一些编辑页面/edit/1 * alwaysShow: true // 当你一个路由下面的 children 声明的路由大于1个时,自动会变成嵌套的模式--如组件页面 * // 只有一个时,会将那个子路由当做根路由显示在侧边栏--如引导页面 * // 若你想不管路由下面的 children 声明的个数都显示你的根路由 * // 你可以设置 alwaysShow: true,这样它就会忽略之前定义的规则,一直显示根路由 * redirect: noRedirect // 当设置 noRedirect 的时候该路由在面包屑导航中不可被点击 * name:'router-name' // 设定路由的名字,一定要填写不然使用时会出现各种问题 * query: '{"id": 1, "name": "ry"}' // 访问路由的默认传递参数 * roles: ['admin', 'common'] // 访问路由的角色权限 * permissions: ['a:a:a', 'b:b:b'] // 访问路由的菜单权限 * meta : { noCache: true // 如果设置为true,则不会被 缓存(默认 false) title: 'title' // 设置该路由在侧边栏和面包屑中展示的名字 icon: 'svg-name' // 设置该路由的图标,对应路径src/assets/icons/svg breadcrumb: false // 如果设置为false,则不会在breadcrumb面包屑中显示 activeMenu: '/system/user' // 当路由设置了该属性,则会高亮相对应的侧边栏。 } */ // 公共路由 export const constantRoutes = [ { path: '/redirect', component: Layout, hidden: true, children: [ { path: '/redirect/:path(.*)', component: () => import('@/views/redirect/index.vue') } ] }, { path: '/login', component: () => import('@/views/login'), hidden: true }, { path: "/:pathMatch(.*)*", component: () => import('@/views/error/404'), hidden: true }, { path: '/401', component: () => import('@/views/error/401'), hidden: true }, { path: '', component: Layout, redirect: '/index', children: [ { path: '/index', component: () => import('@/views/index'), name: 'Index', meta: { title: '首页', icon: 'dashboard', affix: true,noCache: false } } ] }, { path: '/user', component: Layout, hidden: true, redirect: 'noredirect', children: [ { path: 'profile', component: () => import('@/views/system/user/profile/index'), name: 'Profile', meta: { title: '个人中心', icon: 'user' } } ] } ] // 动态路由,基于用户权限动态去加载 export const dynamicRoutes = [ { path: '/system/user-auth', component: Layout, hidden: true, permissions: ['system:user:edit'], children: [ { path: 'role/:userId(\\d+)', component: () => import('@/views/system/user/authRole'), name: 'AuthRole', meta: { title: '分配角色', activeMenu: '/system/user' } } ] }, { path: '/system/role-auth', component: Layout, hidden: true, permissions: ['system:role:edit'], children: [ { path: 'user/:roleId(\\d+)', component: () => import('@/views/system/role/authUser'), name: 'AuthUser', meta: { title: '分配用户', activeMenu: '/system/role' } } ] }, { path: '/system/dict-data', component: Layout, hidden: true, permissions: ['system:dict:list'], children: [ { path: 'index/:dictId(\\d+)', component: () => import('@/views/system/dict/data'), name: 'Data', meta: { title: '字典数据', activeMenu: '/system/dict' } } ] }, { path: '/tool/gen-edit', component: Layout, hidden: true, permissions: ['tool:gen:edit'], children: [ { path: 'index/:tableId(\\d+)', component: () => import('@/views/tool/gen/editTable'), name: 'GenEdit', meta: { title: '修改生成配置', activeMenu: '/tool/gen' } } ] } ] const router = createRouter({ history: createWebHistory(), routes: constantRoutes, scrollBehavior(to, from, savedPosition) { if (savedPosition) { return savedPosition } else { return { top: 0 } } }, }); export default router; ================================================ FILE: front/src/settings.js ================================================ export default { /** * 网页标题 */ title: import.meta.env.VITE_APP_TITLE, /** * 侧边栏主题 深色主题theme-dark,浅色主题theme-light */ sideTheme: 'theme-light', /** * 是否系统布局配置 */ showSettings: true, /** * 是否显示顶部导航 */ topNav: false, /** * 是否显示 tagsView */ tagsView: true, /** * 是否固定头部 */ fixedHeader: false, /** * 是否显示logo */ sidebarLogo: true, /** * 是否显示动态标题 */ dynamicTitle: false, /** * @type {string | array} 'production' | ['production', 'development'] * @description Need show err logs component. * The default is only used in the production env * If you want to also use it in dev, you can pass ['production', 'development'] */ errorLog: 'production' } ================================================ FILE: front/src/store/index.js ================================================ const store = createPinia() export default store ================================================ FILE: front/src/store/modules/app.js ================================================ import Cookies from 'js-cookie' const useAppStore = defineStore( 'app', { state: () => ({ sidebar: { opened: Cookies.get('sidebarStatus') ? !!+Cookies.get('sidebarStatus') : true, withoutAnimation: false, hide: false }, device: 'desktop', size: Cookies.get('size') || 'default' }), actions: { toggleSideBar(withoutAnimation) { if (this.sidebar.hide) { return false; } this.sidebar.opened = !this.sidebar.opened this.sidebar.withoutAnimation = withoutAnimation if (this.sidebar.opened) { Cookies.set('sidebarStatus', 1) } else { Cookies.set('sidebarStatus', 0) } }, closeSideBar({ withoutAnimation }) { Cookies.set('sidebarStatus', 0) this.sidebar.opened = false this.sidebar.withoutAnimation = withoutAnimation }, toggleDevice(device) { this.device = device }, setSize(size) { this.size = size; Cookies.set('size', size) }, toggleSideBarHide(status) { this.sidebar.hide = status } } }) export default useAppStore ================================================ FILE: front/src/store/modules/dict.js ================================================ const useDictStore = defineStore( 'dict', { state: () => ({ dict: new Array() }), actions: { // 获取字典 getDict(_key) { if (_key == null && _key == "") { return null; } try { for (let i = 0; i < this.dict.length; i++) { if (this.dict[i].key == _key) { return this.dict[i].value; } } } catch (e) { return null; } }, // 设置字典 setDict(_key, value) { if (_key !== null && _key !== "") { this.dict.push({ key: _key, value: value }); } }, // 删除字典 removeDict(_key) { var bln = false; try { for (let i = 0; i < this.dict.length; i++) { if (this.dict[i].key == _key) { this.dict.splice(i, 1); return true; } } } catch (e) { bln = false; } return bln; }, // 清空字典 cleanDict() { this.dict = new Array(); }, // 初始字典 initDict() { } } }) export default useDictStore ================================================ FILE: front/src/store/modules/permission.js ================================================ import auth from '@/plugins/auth' import router, { constantRoutes, dynamicRoutes } from '@/router' import { getRouters } from '@/api/menu' import Layout from '@/layout/index' import ParentView from '@/components/ParentView' import InnerLink from '@/layout/components/InnerLink' // 匹配views里面所有的.vue文件 const modules = import.meta.glob('./../../views/**/*.vue') const usePermissionStore = defineStore( 'permission', { state: () => ({ routes: [], addRoutes: [], defaultRoutes: [], topbarRouters: [], sidebarRouters: [] }), actions: { setRoutes(routes) { this.addRoutes = routes this.routes = constantRoutes.concat(routes) }, setDefaultRoutes(routes) { this.defaultRoutes = constantRoutes.concat(routes) }, setTopbarRoutes(routes) { this.topbarRouters = routes }, setSidebarRouters(routes) { this.sidebarRouters = routes }, generateRoutes(roles) { return new Promise(resolve => { // 向后端请求路由数据 getRouters().then(res => { const sdata = JSON.parse(JSON.stringify(res.data)) const rdata = JSON.parse(JSON.stringify(res.data)) const defaultData = JSON.parse(JSON.stringify(res.data)) const sidebarRoutes = filterAsyncRouter(sdata) const rewriteRoutes = filterAsyncRouter(rdata, false, true) const defaultRoutes = filterAsyncRouter(defaultData) const asyncRoutes = filterDynamicRoutes(dynamicRoutes) asyncRoutes.forEach(route => { router.addRoute(route) }) this.setRoutes(rewriteRoutes) this.setSidebarRouters(constantRoutes.concat(sidebarRoutes)) this.setDefaultRoutes(sidebarRoutes) this.setTopbarRoutes(defaultRoutes) resolve(rewriteRoutes) }) }) } } }) // 遍历后台传来的路由字符串,转换为组件对象 function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) { return asyncRouterMap.filter(route => { if (type && route.children) { route.children = filterChildren(route.children) } if (route.component) { // Layout ParentView 组件特殊处理 if (route.component === 'Layout') { route.component = Layout } else if (route.component === 'ParentView') { route.component = ParentView } else if (route.component === 'InnerLink') { route.component = InnerLink } else { route.component = loadView(route.component) } } if (route.children != null && route.children && route.children.length) { route.children = filterAsyncRouter(route.children, route, type) } else { delete route['children'] delete route['redirect'] } return true }) } function filterChildren(childrenMap, lastRouter = false) { var children = [] childrenMap.forEach((el, index) => { if (el.children && el.children.length) { if (el.component === 'ParentView' && !lastRouter) { el.children.forEach(c => { c.path = el.path + '/' + c.path if (c.children && c.children.length) { children = children.concat(filterChildren(c.children, c)) return } children.push(c) }) return } } if (lastRouter) { el.path = lastRouter.path + '/' + el.path if (el.children && el.children.length) { children = children.concat(filterChildren(el.children, el)) return } } children = children.concat(el) }) return children } // 动态路由遍历,验证是否具备权限 export function filterDynamicRoutes(routes) { const res = [] routes.forEach(route => { if (route.permissions) { if (auth.hasPermiOr(route.permissions)) { res.push(route) } } else if (route.roles) { if (auth.hasRoleOr(route.roles)) { res.push(route) } } }) return res } export const loadView = (view) => { let res; for (const path in modules) { const dir = path.split('views/')[1].split('.vue')[0]; if (dir === view) { res = () => modules[path](); } } return res; } export default usePermissionStore ================================================ FILE: front/src/store/modules/settings.js ================================================ import defaultSettings from '@/settings' import { useDynamicTitle } from '@/utils/dynamicTitle' const { sideTheme, showSettings, topNav, tagsView, fixedHeader, sidebarLogo, dynamicTitle } = defaultSettings const storageSetting = JSON.parse(localStorage.getItem('layout-setting')) || '' const useSettingsStore = defineStore( 'settings', { state: () => ({ title: '', theme: storageSetting.theme || '#3F51B5', sideTheme: storageSetting.sideTheme || sideTheme, showSettings: showSettings, topNav: storageSetting.topNav === undefined ? topNav : storageSetting.topNav, tagsView: storageSetting.tagsView === undefined ? tagsView : storageSetting.tagsView, fixedHeader: storageSetting.fixedHeader === undefined ? fixedHeader : storageSetting.fixedHeader, sidebarLogo: storageSetting.sidebarLogo === undefined ? sidebarLogo : storageSetting.sidebarLogo, dynamicTitle: storageSetting.dynamicTitle === undefined ? dynamicTitle : storageSetting.dynamicTitle }), actions: { // 修改布局设置 changeSetting(data) { const { key, value } = data if (this.hasOwnProperty(key)) { this[key] = value } }, // 设置网页标题 setTitle(title) { this.title = title useDynamicTitle(); } } }) export default useSettingsStore ================================================ FILE: front/src/store/modules/tagsView.js ================================================ const useTagsViewStore = defineStore( 'tags-view', { state: () => ({ visitedViews: [], cachedViews: [], iframeViews: [] }), actions: { addView(view) { this.addVisitedView(view) this.addCachedView(view) }, addIframeView(view) { if (this.iframeViews.some(v => v.path === view.path)) return this.iframeViews.push( Object.assign({}, view, { title: view.meta.title || 'no-name' }) ) }, addVisitedView(view) { if (this.visitedViews.some(v => v.path === view.path)) return this.visitedViews.push( Object.assign({}, view, { title: view.meta.title || 'no-name' }) ) }, addCachedView(view) { if (this.cachedViews.includes(view.name)) return if (!view.meta.noCache) { this.cachedViews.push(view.name) } }, delView(view) { return new Promise(resolve => { this.delVisitedView(view) this.delCachedView(view) resolve({ visitedViews: [...this.visitedViews], cachedViews: [...this.cachedViews] }) }) }, delVisitedView(view) { return new Promise(resolve => { for (const [i, v] of this.visitedViews.entries()) { if (v.path === view.path) { this.visitedViews.splice(i, 1) break } } this.iframeViews = this.iframeViews.filter(item => item.path !== view.path) resolve([...this.visitedViews]) }) }, delIframeView(view) { return new Promise(resolve => { this.iframeViews = this.iframeViews.filter(item => item.path !== view.path) resolve([...this.iframeViews]) }) }, delCachedView(view) { return new Promise(resolve => { const index = this.cachedViews.indexOf(view.name) index > -1 && this.cachedViews.splice(index, 1) resolve([...this.cachedViews]) }) }, delOthersViews(view) { return new Promise(resolve => { this.delOthersVisitedViews(view) this.delOthersCachedViews(view) resolve({ visitedViews: [...this.visitedViews], cachedViews: [...this.cachedViews] }) }) }, delOthersVisitedViews(view) { return new Promise(resolve => { this.visitedViews = this.visitedViews.filter(v => { return v.meta.affix || v.path === view.path }) this.iframeViews = this.iframeViews.filter(item => item.path === view.path) resolve([...this.visitedViews]) }) }, delOthersCachedViews(view) { return new Promise(resolve => { const index = this.cachedViews.indexOf(view.name) if (index > -1) { this.cachedViews = this.cachedViews.slice(index, index + 1) } else { this.cachedViews = [] } resolve([...this.cachedViews]) }) }, delAllViews(view) { return new Promise(resolve => { this.delAllVisitedViews(view) this.delAllCachedViews(view) resolve({ visitedViews: [...this.visitedViews], cachedViews: [...this.cachedViews] }) }) }, delAllVisitedViews(view) { return new Promise(resolve => { const affixTags = this.visitedViews.filter(tag => tag.meta.affix) this.visitedViews = affixTags this.iframeViews = [] resolve([...this.visitedViews]) }) }, delAllCachedViews(view) { return new Promise(resolve => { this.cachedViews = [] resolve([...this.cachedViews]) }) }, updateVisitedView(view) { for (let v of this.visitedViews) { if (v.path === view.path) { v = Object.assign(v, view) break } } }, delRightTags(view) { return new Promise(resolve => { const index = this.visitedViews.findIndex(v => v.path === view.path) if (index === -1) { return } this.visitedViews = this.visitedViews.filter((item, idx) => { if (idx <= index || (item.meta && item.meta.affix)) { return true } const i = this.cachedViews.indexOf(item.name) if (i > -1) { this.cachedViews.splice(i, 1) } if(item.meta.link) { const fi = this.iframeViews.findIndex(v => v.path === item.path) this.iframeViews.splice(fi, 1) } return false }) resolve([...this.visitedViews]) }) }, delLeftTags(view) { return new Promise(resolve => { const index = this.visitedViews.findIndex(v => v.path === view.path) if (index === -1) { return } this.visitedViews = this.visitedViews.filter((item, idx) => { if (idx >= index || (item.meta && item.meta.affix)) { return true } const i = this.cachedViews.indexOf(item.name) if (i > -1) { this.cachedViews.splice(i, 1) } if(item.meta.link) { const fi = this.iframeViews.findIndex(v => v.path === item.path) this.iframeViews.splice(fi, 1) } return false }) resolve([...this.visitedViews]) }) } } }) export default useTagsViewStore ================================================ FILE: front/src/store/modules/user.js ================================================ import { login, logout, getInfo } from '@/api/login' import { getToken, setToken, removeToken } from '@/utils/auth' import defAva from '@/assets/images/profile.jpg' const useUserStore = defineStore( 'user', { state: () => ({ token: getToken(), id: '', name: '', avatar: '', roles: [], permissions: [] }), actions: { // 登录 login(userInfo) { const username = userInfo.username.trim() const password = userInfo.password const code = userInfo.code const uuid = userInfo.uuid return new Promise((resolve, reject) => { login(username, password, code, uuid).then(res => { setToken(res.token) this.token = res.token resolve() }).catch(error => { reject(error) }) }) }, // 获取用户信息 getInfo() { return new Promise((resolve, reject) => { getInfo().then(res => { const user = res.user const avatar = (user.avatar == "" || user.avatar == null) ? defAva : import.meta.env.VITE_APP_BASE_API + user.avatar; if (res.roles && res.roles.length > 0) { // 验证返回的roles是否是一个非空数组 this.roles = res.roles this.permissions = res.permissions } else { this.roles = ['ROLE_DEFAULT'] } this.id = user.userId this.name = user.userName this.avatar = avatar resolve(res) }).catch(error => { reject(error) }) }) }, // 退出系统 logOut() { return new Promise((resolve, reject) => { logout(this.token).then(() => { this.token = '' this.roles = [] this.permissions = [] removeToken() resolve() }).catch(error => { reject(error) }) }) } } }) export default useUserStore ================================================ FILE: front/src/utils/auth.js ================================================ import Cookies from 'js-cookie' const TokenKey = 'Admin-Token' export function getToken() { return Cookies.get(TokenKey) } export function setToken(token) { return Cookies.set(TokenKey, token) } export function removeToken() { return Cookies.remove(TokenKey) } ================================================ FILE: front/src/utils/dict.js ================================================ import useDictStore from '@/store/modules/dict' import { getDicts } from '@/api/system/dict/data' /** * 获取字典数据 */ export function useDict(...args) { const res = ref({}); return (() => { args.forEach((dictType, index) => { res.value[dictType] = []; const dicts = useDictStore().getDict(dictType); if (dicts) { res.value[dictType] = dicts; } else { getDicts(dictType).then(resp => { res.value[dictType] = resp.data.map(p => ({ label: p.dictLabel, value: p.dictValue, elTagType: p.listClass, elTagClass: p.cssClass })) useDictStore().setDict(dictType, res.value[dictType]); }) } }) return toRefs(res.value); })() } ================================================ FILE: front/src/utils/dynamicTitle.js ================================================ import store from '@/store' import defaultSettings from '@/settings' import useSettingsStore from '@/store/modules/settings' /** * 动态修改标题 */ export function useDynamicTitle() { const settingsStore = useSettingsStore(); if (settingsStore.dynamicTitle) { document.title = settingsStore.title + ' - ' + defaultSettings.title; } else { document.title = defaultSettings.title; } } ================================================ FILE: front/src/utils/errorCode.js ================================================ export default { '401': '认证失败,无法访问系统资源', '403': '当前操作没有权限', '404': '访问资源不存在', 'default': '系统未知错误,请反馈给管理员' } ================================================ FILE: front/src/utils/index.js ================================================ import { parseTime } from './ruoyi' /** * 表格时间格式化 */ export function formatDate(cellValue) { if (cellValue == null || cellValue == "") return ""; var date = new Date(cellValue) var year = date.getFullYear() var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1 var day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate() var hours = date.getHours() < 10 ? '0' + date.getHours() : date.getHours() var minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes() var seconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds() return year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds } /** * @param {number} time * @param {string} option * @returns {string} */ export function formatTime(time, option) { if (('' + time).length === 10) { time = parseInt(time) * 1000 } else { time = +time } const d = new Date(time) const now = Date.now() const diff = (now - d) / 1000 if (diff < 30) { return '刚刚' } else if (diff < 3600) { // less 1 hour return Math.ceil(diff / 60) + '分钟前' } else if (diff < 3600 * 24) { return Math.ceil(diff / 3600) + '小时前' } else if (diff < 3600 * 24 * 2) { return '1天前' } if (option) { return parseTime(time, option) } else { return ( d.getMonth() + 1 + '月' + d.getDate() + '日' + d.getHours() + '时' + d.getMinutes() + '分' ) } } /** * @param {string} url * @returns {Object} */ export function getQueryObject(url) { url = url == null ? window.location.href : url const search = url.substring(url.lastIndexOf('?') + 1) const obj = {} const reg = /([^?&=]+)=([^?&=]*)/g search.replace(reg, (rs, $1, $2) => { const name = decodeURIComponent($1) let val = decodeURIComponent($2) val = String(val) obj[name] = val return rs }) return obj } /** * @param {string} input value * @returns {number} output value */ export function byteLength(str) { // returns the byte length of an utf8 string let s = str.length for (var i = str.length - 1; i >= 0; i--) { const code = str.charCodeAt(i) if (code > 0x7f && code <= 0x7ff) s++ else if (code > 0x7ff && code <= 0xffff) s += 2 if (code >= 0xDC00 && code <= 0xDFFF) i-- } return s } /** * @param {Array} actual * @returns {Array} */ export function cleanArray(actual) { const newArray = [] for (let i = 0; i < actual.length; i++) { if (actual[i]) { newArray.push(actual[i]) } } return newArray } /** * @param {Object} json * @returns {Array} */ export function param(json) { if (!json) return '' return cleanArray( Object.keys(json).map(key => { if (json[key] === undefined) return '' return encodeURIComponent(key) + '=' + encodeURIComponent(json[key]) }) ).join('&') } /** * @param {string} url * @returns {Object} */ export function param2Obj(url) { const search = decodeURIComponent(url.split('?')[1]).replace(/\+/g, ' ') if (!search) { return {} } const obj = {} const searchArr = search.split('&') searchArr.forEach(v => { const index = v.indexOf('=') if (index !== -1) { const name = v.substring(0, index) const val = v.substring(index + 1, v.length) obj[name] = val } }) return obj } /** * @param {string} val * @returns {string} */ export function html2Text(val) { const div = document.createElement('div') div.innerHTML = val return div.textContent || div.innerText } /** * Merges two objects, giving the last one precedence * @param {Object} target * @param {(Object|Array)} source * @returns {Object} */ export function objectMerge(target, source) { if (typeof target !== 'object') { target = {} } if (Array.isArray(source)) { return source.slice() } Object.keys(source).forEach(property => { const sourceProperty = source[property] if (typeof sourceProperty === 'object') { target[property] = objectMerge(target[property], sourceProperty) } else { target[property] = sourceProperty } }) return target } /** * @param {HTMLElement} element * @param {string} className */ export function toggleClass(element, className) { if (!element || !className) { return } let classString = element.className const nameIndex = classString.indexOf(className) if (nameIndex === -1) { classString += '' + className } else { classString = classString.substr(0, nameIndex) + classString.substr(nameIndex + className.length) } element.className = classString } /** * @param {string} type * @returns {Date} */ export function getTime(type) { if (type === 'start') { return new Date().getTime() - 3600 * 1000 * 24 * 90 } else { return new Date(new Date().toDateString()) } } /** * @param {Function} func * @param {number} wait * @param {boolean} immediate * @return {*} */ export function debounce(func, wait, immediate) { let timeout, args, context, timestamp, result const later = function() { // 据上一次触发时间间隔 const last = +new Date() - timestamp // 上次被包装函数被调用时间间隔 last 小于设定时间间隔 wait if (last < wait && last > 0) { timeout = setTimeout(later, wait - last) } else { timeout = null // 如果设定为immediate===true,因为开始边界已经调用过了此处无需调用 if (!immediate) { result = func.apply(context, args) if (!timeout) context = args = null } } } return function(...args) { context = this timestamp = +new Date() const callNow = immediate && !timeout // 如果延时不存在,重新设定延时 if (!timeout) timeout = setTimeout(later, wait) if (callNow) { result = func.apply(context, args) context = args = null } return result } } /** * This is just a simple version of deep copy * Has a lot of edge cases bug * If you want to use a perfect deep copy, use lodash's _.cloneDeep * @param {Object} source * @returns {Object} */ export function deepClone(source) { if (!source && typeof source !== 'object') { throw new Error('error arguments', 'deepClone') } const targetObj = source.constructor === Array ? [] : {} Object.keys(source).forEach(keys => { if (source[keys] && typeof source[keys] === 'object') { targetObj[keys] = deepClone(source[keys]) } else { targetObj[keys] = source[keys] } }) return targetObj } /** * @param {Array} arr * @returns {Array} */ export function uniqueArr(arr) { return Array.from(new Set(arr)) } /** * @returns {string} */ export function createUniqueString() { const timestamp = +new Date() + '' const randomNum = parseInt((1 + Math.random()) * 65536) + '' return (+(randomNum + timestamp)).toString(32) } /** * Check if an element has a class * @param {HTMLElement} elm * @param {string} cls * @returns {boolean} */ export function hasClass(ele, cls) { return !!ele.className.match(new RegExp('(\\s|^)' + cls + '(\\s|$)')) } /** * Add class to element * @param {HTMLElement} elm * @param {string} cls */ export function addClass(ele, cls) { if (!hasClass(ele, cls)) ele.className += ' ' + cls } /** * Remove class from element * @param {HTMLElement} elm * @param {string} cls */ export function removeClass(ele, cls) { if (hasClass(ele, cls)) { const reg = new RegExp('(\\s|^)' + cls + '(\\s|$)') ele.className = ele.className.replace(reg, ' ') } } export function makeMap(str, expectsLowerCase) { const map = Object.create(null) const list = str.split(',') for (let i = 0; i < list.length; i++) { map[list[i]] = true } return expectsLowerCase ? val => map[val.toLowerCase()] : val => map[val] } export const exportDefault = 'export default ' export const beautifierConf = { html: { indent_size: '2', indent_char: ' ', max_preserve_newlines: '-1', preserve_newlines: false, keep_array_indentation: false, break_chained_methods: false, indent_scripts: 'separate', brace_style: 'end-expand', space_before_conditional: true, unescape_strings: false, jslint_happy: false, end_with_newline: true, wrap_line_length: '110', indent_inner_html: true, comma_first: false, e4x: true, indent_empty_lines: true }, js: { indent_size: '2', indent_char: ' ', max_preserve_newlines: '-1', preserve_newlines: false, keep_array_indentation: false, break_chained_methods: false, indent_scripts: 'normal', brace_style: 'end-expand', space_before_conditional: true, unescape_strings: false, jslint_happy: true, end_with_newline: true, wrap_line_length: '110', indent_inner_html: true, comma_first: false, e4x: true, indent_empty_lines: true } } // 首字母大小 export function titleCase(str) { return str.replace(/( |^)[a-z]/g, L => L.toUpperCase()) } // 下划转驼峰 export function camelCase(str) { return str.replace(/_[a-z]/g, str1 => str1.substr(-1).toUpperCase()) } export function isNumberStr(str) { return /^[+-]?(0|([1-9]\d*))(\.\d+)?$/g.test(str) } ================================================ FILE: front/src/utils/jsencrypt.js ================================================ import JSEncrypt from 'jsencrypt/bin/jsencrypt.min' // 密钥对生成 http://web.chacuo.net/netrsakeypair const publicKey = 'MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKoR8mX0rGKLqzcWmOzbfj64K8ZIgOdH\n' + 'nzkXSOVOZbFu/TJhZ7rFAN+eaGkl3C4buccQd/EjEsj9ir7ijT7h96MCAwEAAQ==' const privateKey = 'MIIBVAIBADANBgkqhkiG9w0BAQEFAASCAT4wggE6AgEAAkEAqhHyZfSsYourNxaY\n' + '7Nt+PrgrxkiA50efORdI5U5lsW79MmFnusUA355oaSXcLhu5xxB38SMSyP2KvuKN\n' + 'PuH3owIDAQABAkAfoiLyL+Z4lf4Myxk6xUDgLaWGximj20CUf+5BKKnlrK+Ed8gA\n' + 'kM0HqoTt2UZwA5E2MzS4EI2gjfQhz5X28uqxAiEA3wNFxfrCZlSZHb0gn2zDpWow\n' + 'cSxQAgiCstxGUoOqlW8CIQDDOerGKH5OmCJ4Z21v+F25WaHYPxCFMvwxpcw99Ecv\n' + 'DQIgIdhDTIqD2jfYjPTY8Jj3EDGPbH2HHuffvflECt3Ek60CIQCFRlCkHpi7hthh\n' + 'YhovyloRYsM+IS9h/0BzlEAuO0ktMQIgSPT3aFAgJYwKpqRYKlLDVcflZFCKY7u3\n' + 'UP8iWi1Qw0Y=' // 加密 export function encrypt(txt) { const encryptor = new JSEncrypt() encryptor.setPublicKey(publicKey) // 设置公钥 return encryptor.encrypt(txt) // 对数据进行加密 } // 解密 export function decrypt(txt) { const encryptor = new JSEncrypt() encryptor.setPrivateKey(privateKey) // 设置私钥 return encryptor.decrypt(txt) // 对数据进行解密 } ================================================ FILE: front/src/utils/permission.js ================================================ import useUserStore from '@/store/modules/user' /** * 字符权限校验 * @param {Array} value 校验值 * @returns {Boolean} */ export function checkPermi(value) { if (value && value instanceof Array && value.length > 0) { const permissions = useUserStore().permissions const permissionDatas = value const all_permission = "*:*:*"; const hasPermission = permissions.some(permission => { return all_permission === permission || permissionDatas.includes(permission) }) if (!hasPermission) { return false } return true } else { console.error(`need roles! Like checkPermi="['system:user:add','system:user:edit']"`) return false } } /** * 角色权限校验 * @param {Array} value 校验值 * @returns {Boolean} */ export function checkRole(value) { if (value && value instanceof Array && value.length > 0) { const roles = useUserStore().roles const permissionRoles = value const super_admin = "admin"; const hasRole = roles.some(role => { return super_admin === role || permissionRoles.includes(role) }) if (!hasRole) { return false } return true } else { console.error(`need roles! Like checkRole="['admin','editor']"`) return false } } ================================================ FILE: front/src/utils/request.js ================================================ import axios from 'axios' import { ElNotification, ElMessageBox, ElMessage, ElLoading } from 'element-plus' import { getToken } from '@/utils/auth' import errorCode from '@/utils/errorCode' import { tansParams, blobValidate } from '@/utils/ruoyi' import cache from '@/plugins/cache' import { saveAs } from 'file-saver' import useUserStore from '@/store/modules/user' let downloadLoadingInstance; // 是否显示重新登录 export let isRelogin = { show: false }; axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8' // 创建axios实例 const service = axios.create({ // axios中请求配置有baseURL选项,表示请求URL公共部分 baseURL: import.meta.env.VITE_APP_BASE_API, // 超时 timeout: 10000 }) // request拦截器 service.interceptors.request.use(config => { // 是否需要设置 token const isToken = (config.headers || {}).isToken === false // 是否需要防止数据重复提交 const isRepeatSubmit = (config.headers || {}).repeatSubmit === false if (getToken() && !isToken) { config.headers['Authorization'] = 'Bearer ' + getToken() // 让每个请求携带自定义token 请根据实际情况自行修改 } // get请求映射params参数 if (config.method === 'get' && config.params) { let url = config.url + '?' + tansParams(config.params); url = url.slice(0, -1); config.params = {}; config.url = url; } if (!isRepeatSubmit && (config.method === 'post' || config.method === 'put')) { const requestObj = { url: config.url, data: typeof config.data === 'object' ? JSON.stringify(config.data) : config.data, time: new Date().getTime() } const requestSize = Object.keys(JSON.stringify(requestObj)).length; // 请求数据大小 const limitSize = 5 * 1024 * 1024; // 限制存放数据5M if (requestSize >= limitSize) { console.warn(`[${config.url}]: ` + '请求数据大小超出允许的5M限制,无法进行防重复提交验证。') return config; } const sessionObj = cache.session.getJSON('sessionObj') if (sessionObj === undefined || sessionObj === null || sessionObj === '') { cache.session.setJSON('sessionObj', requestObj) } else { const s_url = sessionObj.url; // 请求地址 const s_data = sessionObj.data; // 请求数据 const s_time = sessionObj.time; // 请求时间 const interval = 1000; // 间隔时间(ms),小于此时间视为重复提交 if (s_data === requestObj.data && requestObj.time - s_time < interval && s_url === requestObj.url) { const message = '数据正在处理,请勿重复提交'; console.warn(`[${s_url}]: ` + message) return Promise.reject(new Error(message)) } else { cache.session.setJSON('sessionObj', requestObj) } } } return config }, error => { console.log(error) Promise.reject(error) }) // 响应拦截器 service.interceptors.response.use(res => { // 未设置状态码则默认成功状态 const code = res.data.code || 200; // 获取错误信息 const msg = errorCode[code] || res.data.msg || errorCode['default'] // 二进制数据则直接返回 if (res.request.responseType === 'blob' || res.request.responseType === 'arraybuffer') { return res.data } if (code === 401) { if (!isRelogin.show) { isRelogin.show = true; ElMessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', { confirmButtonText: '重新登录', cancelButtonText: '取消', type: 'warning' }).then(() => { isRelogin.show = false; useUserStore().logOut().then(() => { location.href = '/index'; }) }).catch(() => { isRelogin.show = false; }); } return Promise.reject('无效的会话,或者会话已过期,请重新登录。') } else if (code === 500) { ElMessage({ message: msg, type: 'error' }) return Promise.reject(new Error(msg)) } else if (code === 422) { ElMessage({ message: msg, type: 'error' }) return Promise.reject(new Error(msg)) } else if (code !== 200) { ElNotification.error({ title: msg }) return Promise.reject('error') } else { return Promise.resolve(res.data) } }, error => { console.log('err' + error) let { message } = error; if (message == "Network Error") { message = "后端接口连接异常"; } else if (message.includes("timeout")) { message = "系统接口请求超时"; } else if (message.includes("Request failed with status code")) { message = "系统接口" + message.substr(message.length - 3) + "异常"; } ElMessage({ message: message, type: 'error', duration: 5 * 1000 }) return Promise.reject(error) } ) // 通用下载方法 export function download(url, params = {}, filename, config) { downloadLoadingInstance = ElLoading.service({ text: "正在下载数据,请稍候", background: "rgba(0, 0, 0, 0.7)", }) return service.get(url, { responseType: 'blob', ...config, params }).then(async (data) => { const isBlob = blobValidate(data); if (isBlob) { const blob = new Blob([data]) saveAs(blob, filename) } else { const resText = await data.text(); const rspObj = JSON.parse(resText); const errMsg = errorCode[rspObj.code] || rspObj.msg || errorCode['default'] ElMessage.error(errMsg); } downloadLoadingInstance.close(); }).catch((r) => { console.error(r) ElMessage.error('下载文件出现错误,请联系管理员!') downloadLoadingInstance.close(); }) } export default service ================================================ FILE: front/src/utils/ruoyi.js ================================================ import { isExternal } from "./validate" /** * 通用js方法封装处理 * Copyright (c) 2019 ruoyi */ // 日期格式化 export function parseTime(time, pattern) { if (arguments.length === 0 || !time) { return null } const format = pattern || '{y}-{m}-{d} {h}:{i}:{s}' let date if (typeof time === 'object') { date = time } else { if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) { time = parseInt(time) } else if (typeof time === 'string') { time = time.replace(new RegExp(/-/gm), '/').replace('T', ' ').replace(new RegExp(/\.[\d]{3}/gm), ''); } if ((typeof time === 'number') && (time.toString().length === 10)) { time = time * 1000 } date = new Date(time) } const formatObj = { y: date.getFullYear(), m: date.getMonth() + 1, d: date.getDate(), h: date.getHours(), i: date.getMinutes(), s: date.getSeconds(), a: date.getDay() } const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => { let value = formatObj[key] // Note: getDay() returns 0 on Sunday if (key === 'a') { return ['日', '一', '二', '三', '四', '五', '六'][value] } if (result.length > 0 && value < 10) { value = '0' + value } return value || 0 }) return time_str } // 表单重置 export function resetForm(refName) { if (this.$refs[refName]) { this.$refs[refName].resetFields(); } } // 添加日期范围 export function addDateRange(params, dateRange, propName) { let search = params; search.params = typeof (search.params) === 'object' && search.params !== null && !Array.isArray(search.params) ? search.params : {}; dateRange = Array.isArray(dateRange) ? dateRange : []; if (typeof (propName) === 'undefined') { search.params['beginTime'] = dateRange[0]; search.params['endTime'] = dateRange[1]; } else { search.params['begin' + propName] = dateRange[0]; search.params['end' + propName] = dateRange[1]; } return search; } // 回显数据字典 export function selectDictLabel(datas, value) { if (value === undefined) { return ""; } var actions = []; Object.keys(datas).some((key) => { if (datas[key].value == ('' + value)) { actions.push(datas[key].label); return true; } }) if (actions.length === 0) { actions.push(value); } return actions.join(''); } // 回显数据字典(字符串数组) export function selectDictLabels(datas, value, separator) { if (value === undefined || value.length ===0) { return ""; } if (Array.isArray(value)) { value = value.join(","); } var actions = []; var currentSeparator = undefined === separator ? "," : separator; var temp = value.split(currentSeparator); Object.keys(value.split(currentSeparator)).some((val) => { var match = false; Object.keys(datas).some((key) => { if (datas[key].value == ('' + temp[val])) { actions.push(datas[key].label + currentSeparator); match = true; } }) if (!match) { actions.push(temp[val] + currentSeparator); } }) return actions.join('').substring(0, actions.join('').length - 1); } // 字符串格式化(%s ) export function sprintf(str) { var args = arguments, flag = true, i = 1; str = str.replace(/%s/g, function () { var arg = args[i++]; if (typeof arg === 'undefined') { flag = false; return ''; } return arg; }); return flag ? str : ''; } // 转换字符串,undefined,null等转化为"" export function parseStrEmpty(str) { if (!str || str == "undefined" || str == "null") { return ""; } return str; } // 数据合并 export function mergeRecursive(source, target) { for (var p in target) { try { if (target[p].constructor == Object) { source[p] = mergeRecursive(source[p], target[p]); } else { source[p] = target[p]; } } catch (e) { source[p] = target[p]; } } return source; }; /** * 构造树型结构数据 * @param {*} data 数据源 * @param {*} id id字段 默认 'id' * @param {*} parentId 父节点字段 默认 'parentId' * @param {*} children 孩子节点字段 默认 'children' */ export function handleTree(data, id, parentId, children) { let config = { id: id || 'id', parentId: parentId || 'parentId', childrenList: children || 'children' }; var childrenListMap = {}; var nodeIds = {}; var tree = []; for (let d of data) { let parentId = d[config.parentId]; if (childrenListMap[parentId] == null) { childrenListMap[parentId] = []; } nodeIds[d[config.id]] = d; childrenListMap[parentId].push(d); } for (let d of data) { let parentId = d[config.parentId]; if (nodeIds[parentId] == null) { tree.push(d); } } for (let t of tree) { adaptToChildrenList(t); } function adaptToChildrenList(o) { if (childrenListMap[o[config.id]] !== null) { o[config.childrenList] = childrenListMap[o[config.id]]; } if (o[config.childrenList]) { for (let c of o[config.childrenList]) { adaptToChildrenList(c); } } } return tree; } /** * 参数处理 * @param {*} params 参数 */ export function tansParams(params) { let result = '' for (const propName of Object.keys(params)) { const value = params[propName]; var part = encodeURIComponent(propName) + "="; if (value !== null && value !== "" && typeof (value) !== "undefined") { if (typeof value === 'object') { for (const key of Object.keys(value)) { if (value[key] !== null && value[key] !== "" && typeof (value[key]) !== 'undefined') { let params = propName + '[' + key + ']'; var subPart = encodeURIComponent(params) + "="; result += subPart + encodeURIComponent(value[key]) + "&"; } } } else { result += part + encodeURIComponent(value) + "&"; } } } return result } // 返回项目路径 export function getNormalPath(p) { if (p.length === 0 || !p || p == 'undefined') { return p }; let res = p.replace('//', '/') if (res[res.length - 1] === '/') { return res.slice(0, res.length - 1) } return res; } // 验证是否为blob格式 export function blobValidate(data) { return data.type !== 'application/json' } //获取文件或者图片地址 export function getFilePath(path) { return isExternal(path) ? path : import.meta.env.VITE_APP_BASE_API + path; } ================================================ FILE: front/src/utils/scroll-to.js ================================================ Math.easeInOutQuad = function(t, b, c, d) { t /= d / 2 if (t < 1) { return c / 2 * t * t + b } t-- return -c / 2 * (t * (t - 2) - 1) + b } // requestAnimationFrame for Smart Animating http://goo.gl/sx5sts var requestAnimFrame = (function() { return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function(callback) { window.setTimeout(callback, 1000 / 60) } })() /** * Because it's so fucking difficult to detect the scrolling element, just move them all * @param {number} amount */ function move(amount) { document.documentElement.scrollTop = amount document.body.parentNode.scrollTop = amount document.body.scrollTop = amount } function position() { return document.documentElement.scrollTop || document.body.parentNode.scrollTop || document.body.scrollTop } /** * @param {number} to * @param {number} duration * @param {Function} callback */ export function scrollTo(to, duration, callback) { const start = position() const change = to - start const increment = 20 let currentTime = 0 duration = (typeof (duration) === 'undefined') ? 500 : duration var animateScroll = function() { // increment the time currentTime += increment // find the value with the quadratic in-out easing function var val = Math.easeInOutQuad(currentTime, start, change, duration) // move the document.body move(val) // do the animation unless its over if (currentTime < duration) { requestAnimFrame(animateScroll) } else { if (callback && typeof (callback) === 'function') { // the animation is done so lets callback callback() } } } animateScroll() } ================================================ FILE: front/src/utils/theme.js ================================================ // 处理主题样式 export function handleThemeStyle(theme) { document.documentElement.style.setProperty('--el-color-primary', theme) for (let i = 1; i <= 9; i++) { document.documentElement.style.setProperty(`--el-color-primary-light-${i}`, `${getLightColor(theme, i / 10)}`) } for (let i = 1; i <= 9; i++) { document.documentElement.style.setProperty(`--el-color-primary-dark-${i}`, `${getDarkColor(theme, i / 10)}`) } } // hex颜色转rgb颜色 export function hexToRgb(str) { str = str.replace('#', '') let hexs = str.match(/../g) for (let i = 0; i < 3; i++) { hexs[i] = parseInt(hexs[i], 16) } return hexs } // rgb颜色转Hex颜色 export function rgbToHex(r, g, b) { let hexs = [r.toString(16), g.toString(16), b.toString(16)] for (let i = 0; i < 3; i++) { if (hexs[i].length == 1) { hexs[i] = `0${hexs[i]}` } } return `#${hexs.join('')}` } // 变浅颜色值 export function getLightColor(color, level) { let rgb = hexToRgb(color) for (let i = 0; i < 3; i++) { rgb[i] = Math.floor((255 - rgb[i]) * level + rgb[i]) } return rgbToHex(rgb[0], rgb[1], rgb[2]) } // 变深颜色值 export function getDarkColor(color, level) { let rgb = hexToRgb(color) for (let i = 0; i < 3; i++) { rgb[i] = Math.floor(rgb[i] * (1 - level)) } return rgbToHex(rgb[0], rgb[1], rgb[2]) } ================================================ FILE: front/src/utils/validate.js ================================================ /** * 判断url是否是http或https * @param {string} path * @returns {Boolean} */ export function isHttp(url) { return url.indexOf('http://') !== -1 || url.indexOf('https://') !== -1 } /** * 判断path是否为外链 * @param {string} path * @returns {Boolean} */ export function isExternal(path) { return /^(https?:|mailto:|tel:)/.test(path) } /** * @param {string} str * @returns {Boolean} */ export function validUsername(str) { const valid_map = ['admin', 'editor'] return valid_map.indexOf(str.trim()) >= 0 } /** * @param {string} url * @returns {Boolean} */ export function validURL(url) { const reg = /^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/ return reg.test(url) } /** * @param {string} str * @returns {Boolean} */ export function validLowerCase(str) { const reg = /^[a-z]+$/ return reg.test(str) } /** * @param {string} str * @returns {Boolean} */ export function validUpperCase(str) { const reg = /^[A-Z]+$/ return reg.test(str) } /** * @param {string} str * @returns {Boolean} */ export function validAlphabets(str) { const reg = /^[A-Za-z]+$/ return reg.test(str) } /** * @param {string} email * @returns {Boolean} */ export function validEmail(email) { const reg = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/ return reg.test(email) } /** * @param {string} str * @returns {Boolean} */ export function isString(str) { if (typeof str === 'string' || str instanceof String) { return true } return false } /** * @param {Array} arg * @returns {Boolean} */ export function isArray(arg) { if (typeof Array.isArray === 'undefined') { return Object.prototype.toString.call(arg) === '[object Array]' } return Array.isArray(arg) } ================================================ FILE: front/src/views/error/401.vue ================================================ ================================================ FILE: front/src/views/error/404.vue ================================================ ================================================ FILE: front/src/views/index.vue ================================================ ================================================ FILE: front/src/views/login.vue ================================================ ================================================ FILE: front/src/views/monitor/cache/index.vue ================================================ ================================================ FILE: front/src/views/monitor/cache/list.vue ================================================ ================================================ FILE: front/src/views/monitor/logininfor/index.vue ================================================ ================================================ FILE: front/src/views/monitor/online/index.vue ================================================ ================================================ FILE: front/src/views/monitor/server/index.vue ================================================ ================================================ FILE: front/src/views/redirect/index.vue ================================================ ================================================ FILE: front/src/views/system/config/edit.vue ================================================ ================================================ FILE: front/src/views/system/config/index.vue ================================================ ================================================ FILE: front/src/views/system/dept/index.vue ================================================ ================================================ FILE: front/src/views/system/dict/data.vue ================================================ ================================================ FILE: front/src/views/system/dict/index.vue ================================================ ================================================ FILE: front/src/views/system/menu/index.vue ================================================ ================================================ FILE: front/src/views/system/notice/index.vue ================================================ ================================================ FILE: front/src/views/system/post/index.vue ================================================ ================================================ FILE: front/src/views/system/role/authUser.vue ================================================ ================================================ FILE: front/src/views/system/role/index.vue ================================================ ================================================ FILE: front/src/views/system/role/selectUser.vue ================================================ ================================================ FILE: front/src/views/system/user/authRole.vue ================================================ ================================================ FILE: front/src/views/system/user/index.vue ================================================ ================================================ FILE: front/src/views/system/user/profile/index.vue ================================================ ================================================ FILE: front/src/views/system/user/profile/resetPwd.vue ================================================ ================================================ FILE: front/src/views/system/user/profile/userAvatar.vue ================================================ ================================================ FILE: front/src/views/system/user/profile/userInfo.vue ================================================ ================================================ FILE: front/src/views/tool/gen/basicInfoForm.vue ================================================ ================================================ FILE: front/src/views/tool/gen/editTable.vue ================================================ ================================================ FILE: front/src/views/tool/gen/excuteSql.vue ================================================ ================================================ FILE: front/src/views/tool/gen/genInfoForm.vue ================================================ ================================================ FILE: front/src/views/tool/gen/importTable.vue ================================================ ================================================ FILE: front/src/views/tool/gen/index.vue ================================================ ================================================ FILE: front/src/views/tool/swagger/index.vue ================================================ ================================================ FILE: front/vite/plugins/auto-import.js ================================================ import autoImport from 'unplugin-auto-import/vite' export default function createAutoImport() { return autoImport({ imports: [ 'vue', 'vue-router', 'pinia' ], dts: false }) } ================================================ FILE: front/vite/plugins/compression.js ================================================ import compression from 'vite-plugin-compression' export default function createCompression(env) { const { VITE_BUILD_COMPRESS } = env const plugin = [] if (VITE_BUILD_COMPRESS) { const compressList = VITE_BUILD_COMPRESS.split(',') if (compressList.includes('gzip')) { // http://doc.ruoyi.vip/ruoyi-vue/other/faq.html#使用gzip解压缩静态文件 plugin.push( compression({ ext: '.gz', deleteOriginFile: false }) ) } if (compressList.includes('brotli')) { plugin.push( compression({ ext: '.br', algorithm: 'brotliCompress', deleteOriginFile: false }) ) } } return plugin } ================================================ FILE: front/vite/plugins/index.js ================================================ import vue from '@vitejs/plugin-vue' import createAutoImport from './auto-import' import createSvgIcon from './svg-icon' import createCompression from './compression' import createSetupExtend from './setup-extend' export default function createVitePlugins(viteEnv, isBuild = false) { const vitePlugins = [vue()] vitePlugins.push(createAutoImport()) vitePlugins.push(createSetupExtend()) vitePlugins.push(createSvgIcon(isBuild)) isBuild && vitePlugins.push(...createCompression(viteEnv)) return vitePlugins } ================================================ FILE: front/vite/plugins/setup-extend.js ================================================ import setupExtend from 'unplugin-vue-setup-extend-plus/vite' export default function createSetupExtend() { return setupExtend({}) } ================================================ FILE: front/vite/plugins/svg-icon.js ================================================ import { createSvgIconsPlugin } from 'vite-plugin-svg-icons' import path from 'path' export default function createSvgIcon(isBuild) { return createSvgIconsPlugin({ iconDirs: [path.resolve(process.cwd(), 'src/assets/icons/svg')], symbolId: 'icon-[dir]-[name]', svgoOptions: isBuild }) } ================================================ FILE: front/vite.config.js ================================================ import { defineConfig, loadEnv } from 'vite' import path from 'path' import createVitePlugins from './vite/plugins' // https://vitejs.dev/config/ export default defineConfig(({ mode, command }) => { const env = loadEnv(mode, process.cwd()) const { VITE_APP_ENV } = env return { // 部署生产环境和开发环境下的URL。 // 默认情况下,vite 会假设你的应用是被部署在一个域名的根路径上 // 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。 base: VITE_APP_ENV === 'production' ? '/' : '/', plugins: createVitePlugins(env, command === 'build'), resolve: { // https://cn.vitejs.dev/config/#resolve-alias alias: { // 设置路径 '~': path.resolve(__dirname, './'), // 设置别名 '@': path.resolve(__dirname, './src') }, // https://cn.vitejs.dev/config/#resolve-extensions extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue'] }, // // vite 相关配置 server: { port: 3001, host: true, open: true, proxy: { // https://cn.vitejs.dev/config/#server-proxy '/dev': { target: 'http://localhost:3000/v1', changeOrigin: true, rewrite: (p) => p.replace(/^\/dev/, '') } } }, //fix:error:stdin>:7356:1: warning: "@charset" must be the first rule in the file css: { postcss: { plugins: [ { postcssPlugin: 'internal:charset-removal', AtRule: { charset: (atRule) => { if (atRule.name === 'charset') { atRule.remove(); } } } } ] } } } }) ================================================ FILE: front/vite.config.js.timestamp-1718102364365-ed912c0771327.mjs ================================================ // vite.config.js import { defineConfig, loadEnv } from "file:///F:/carole-admin/front/node_modules/vite/dist/node/index.js"; import path2 from "path"; // vite/plugins/index.js import vue from "file:///F:/carole-admin/front/node_modules/@vitejs/plugin-vue/dist/index.mjs"; // vite/plugins/auto-import.js import autoImport from "file:///F:/carole-admin/front/node_modules/unplugin-auto-import/dist/vite.js"; function createAutoImport() { return autoImport({ imports: [ "vue", "vue-router", "pinia" ], dts: false }); } // vite/plugins/svg-icon.js import { createSvgIconsPlugin } from "file:///F:/carole-admin/front/node_modules/vite-plugin-svg-icons/dist/index.mjs"; import path from "path"; function createSvgIcon(isBuild) { return createSvgIconsPlugin({ iconDirs: [path.resolve(process.cwd(), "src/assets/icons/svg")], symbolId: "icon-[dir]-[name]", svgoOptions: isBuild }); } // vite/plugins/compression.js import compression from "file:///F:/carole-admin/front/node_modules/vite-plugin-compression/dist/index.mjs"; function createCompression(env) { const { VITE_BUILD_COMPRESS } = env; const plugin = []; if (VITE_BUILD_COMPRESS) { const compressList = VITE_BUILD_COMPRESS.split(","); if (compressList.includes("gzip")) { plugin.push( compression({ ext: ".gz", deleteOriginFile: false }) ); } if (compressList.includes("brotli")) { plugin.push( compression({ ext: ".br", algorithm: "brotliCompress", deleteOriginFile: false }) ); } } return plugin; } // vite/plugins/setup-extend.js import setupExtend from "file:///F:/carole-admin/front/node_modules/unplugin-vue-setup-extend-plus/dist/vite.js"; function createSetupExtend() { return setupExtend({}); } // vite/plugins/index.js function createVitePlugins(viteEnv, isBuild = false) { const vitePlugins = [vue()]; vitePlugins.push(createAutoImport()); vitePlugins.push(createSetupExtend()); vitePlugins.push(createSvgIcon(isBuild)); isBuild && vitePlugins.push(...createCompression(viteEnv)); return vitePlugins; } // vite.config.js var __vite_injected_original_dirname = "F:\\carole-admin\\front"; var vite_config_default = defineConfig(({ mode, command }) => { const env = loadEnv(mode, process.cwd()); const { VITE_APP_ENV } = env; return { // 部署生产环境和开发环境下的URL。 // 默认情况下,vite 会假设你的应用是被部署在一个域名的根路径上 // 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。 base: VITE_APP_ENV === "production" ? "/" : "/", plugins: createVitePlugins(env, command === "build"), resolve: { // https://cn.vitejs.dev/config/#resolve-alias alias: { // 设置路径 "~": path2.resolve(__vite_injected_original_dirname, "./"), // 设置别名 "@": path2.resolve(__vite_injected_original_dirname, "./src") }, // https://cn.vitejs.dev/config/#resolve-extensions extensions: [".mjs", ".js", ".ts", ".jsx", ".tsx", ".json", ".vue"] }, // // vite 相关配置 server: { port: 3001, host: true, open: true, proxy: { // https://cn.vitejs.dev/config/#server-proxy "/dev": { target: "http://localhost:3000/v1", changeOrigin: true, rewrite: (p) => p.replace(/^\/dev/, "") } } }, //fix:error:stdin>:7356:1: warning: "@charset" must be the first rule in the file css: { postcss: { plugins: [ { postcssPlugin: "internal:charset-removal", AtRule: { charset: (atRule) => { if (atRule.name === "charset") { atRule.remove(); } } } } ] } } }; }); export { vite_config_default as default }; //# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcuanMiLCAidml0ZS9wbHVnaW5zL2luZGV4LmpzIiwgInZpdGUvcGx1Z2lucy9hdXRvLWltcG9ydC5qcyIsICJ2aXRlL3BsdWdpbnMvc3ZnLWljb24uanMiLCAidml0ZS9wbHVnaW5zL2NvbXByZXNzaW9uLmpzIiwgInZpdGUvcGx1Z2lucy9zZXR1cC1leHRlbmQuanMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCJGOlxcXFxjYXJvbGUtYWRtaW5cXFxcZnJvbnRcIjtjb25zdCBfX3ZpdGVfaW5qZWN0ZWRfb3JpZ2luYWxfZmlsZW5hbWUgPSBcIkY6XFxcXGNhcm9sZS1hZG1pblxcXFxmcm9udFxcXFx2aXRlLmNvbmZpZy5qc1wiO2NvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9pbXBvcnRfbWV0YV91cmwgPSBcImZpbGU6Ly8vRjovY2Fyb2xlLWFkbWluL2Zyb250L3ZpdGUuY29uZmlnLmpzXCI7aW1wb3J0IHsgZGVmaW5lQ29uZmlnLCBsb2FkRW52IH0gZnJvbSAndml0ZSdcclxuaW1wb3J0IHBhdGggZnJvbSAncGF0aCdcclxuaW1wb3J0IGNyZWF0ZVZpdGVQbHVnaW5zIGZyb20gJy4vdml0ZS9wbHVnaW5zJ1xyXG5cclxuLy8gaHR0cHM6Ly92aXRlanMuZGV2L2NvbmZpZy9cclxuZXhwb3J0IGRlZmF1bHQgZGVmaW5lQ29uZmlnKCh7IG1vZGUsIGNvbW1hbmQgfSkgPT4ge1xyXG4gIGNvbnN0IGVudiA9IGxvYWRFbnYobW9kZSwgcHJvY2Vzcy5jd2QoKSlcclxuICBjb25zdCB7IFZJVEVfQVBQX0VOViB9ID0gZW52XHJcbiAgcmV0dXJuIHtcclxuICAgIC8vIFx1OTBFOFx1N0Y3Mlx1NzUxRlx1NEVBN1x1NzNBRlx1NTg4M1x1NTQ4Q1x1NUYwMFx1NTNEMVx1NzNBRlx1NTg4M1x1NEUwQlx1NzY4NFVSTFx1MzAwMlxyXG4gICAgLy8gXHU5RUQ4XHU4QkE0XHU2MEM1XHU1MUI1XHU0RTBCXHVGRjBDdml0ZSBcdTRGMUFcdTUwNDdcdThCQkVcdTRGNjBcdTc2ODRcdTVFOTRcdTc1MjhcdTY2MkZcdTg4QUJcdTkwRThcdTdGNzJcdTU3MjhcdTRFMDBcdTRFMkFcdTU3REZcdTU0MERcdTc2ODRcdTY4MzlcdThERUZcdTVGODRcdTRFMEFcclxuICAgIC8vIFx1NEY4Qlx1NTk4MiBodHRwczovL3d3dy5ydW95aS52aXAvXHUzMDAyXHU1OTgyXHU2NzlDXHU1RTk0XHU3NTI4XHU4OEFCXHU5MEU4XHU3RjcyXHU1NzI4XHU0RTAwXHU0RTJBXHU1QjUwXHU4REVGXHU1Rjg0XHU0RTBBXHVGRjBDXHU0RjYwXHU1QzMxXHU5NzAwXHU4OTgxXHU3NTI4XHU4RkQ5XHU0RTJBXHU5MDA5XHU5ODc5XHU2MzA3XHU1QjlBXHU4RkQ5XHU0RTJBXHU1QjUwXHU4REVGXHU1Rjg0XHUzMDAyXHU0RjhCXHU1OTgyXHVGRjBDXHU1OTgyXHU2NzlDXHU0RjYwXHU3Njg0XHU1RTk0XHU3NTI4XHU4OEFCXHU5MEU4XHU3RjcyXHU1NzI4IGh0dHBzOi8vd3d3LnJ1b3lpLnZpcC9hZG1pbi9cdUZGMENcdTUyMTlcdThCQkVcdTdGNkUgYmFzZVVybCBcdTRFM0EgL2FkbWluL1x1MzAwMlxyXG4gICAgYmFzZTogVklURV9BUFBfRU5WID09PSAncHJvZHVjdGlvbicgPyAnLycgOiAnLycsXHJcbiAgICBwbHVnaW5zOiBjcmVhdGVWaXRlUGx1Z2lucyhlbnYsIGNvbW1hbmQgPT09ICdidWlsZCcpLFxyXG4gICAgcmVzb2x2ZToge1xyXG4gICAgICAvLyBodHRwczovL2NuLnZpdGVqcy5kZXYvY29uZmlnLyNyZXNvbHZlLWFsaWFzXHJcbiAgICAgIGFsaWFzOiB7XHJcbiAgICAgICAgLy8gXHU4QkJFXHU3RjZFXHU4REVGXHU1Rjg0XHJcbiAgICAgICAgJ34nOiBwYXRoLnJlc29sdmUoX19kaXJuYW1lLCAnLi8nKSxcclxuICAgICAgICAvLyBcdThCQkVcdTdGNkVcdTUyMkJcdTU0MERcclxuICAgICAgICAnQCc6IHBhdGgucmVzb2x2ZShfX2Rpcm5hbWUsICcuL3NyYycpXHJcbiAgICAgIH0sXHJcbiAgICAgIC8vIGh0dHBzOi8vY24udml0ZWpzLmRldi9jb25maWcvI3Jlc29sdmUtZXh0ZW5zaW9uc1xyXG4gICAgICBleHRlbnNpb25zOiBbJy5tanMnLCAnLmpzJywgJy50cycsICcuanN4JywgJy50c3gnLCAnLmpzb24nLCAnLnZ1ZSddXHJcbiAgICB9LFxyXG4gICAgLy8gLy8gdml0ZSBcdTc2RjhcdTUxNzNcdTkxNERcdTdGNkVcclxuICAgIHNlcnZlcjoge1xyXG4gICAgICBwb3J0OiAzMDAxLFxyXG4gICAgICBob3N0OiB0cnVlLFxyXG4gICAgICBvcGVuOiB0cnVlLFxyXG4gICAgICBwcm94eToge1xyXG4gICAgICAgIC8vIGh0dHBzOi8vY24udml0ZWpzLmRldi9jb25maWcvI3NlcnZlci1wcm94eVxyXG4gICAgICAgICcvZGV2Jzoge1xyXG4gICAgICAgICAgdGFyZ2V0OiAnaHR0cDovL2xvY2FsaG9zdDozMDAwL3YxJyxcclxuICAgICAgICAgIGNoYW5nZU9yaWdpbjogdHJ1ZSxcclxuICAgICAgICAgIHJld3JpdGU6IChwKSA9PiBwLnJlcGxhY2UoL15cXC9kZXYvLCAnJylcclxuICAgICAgICB9XHJcbiAgICAgIH1cclxuICAgIH0sXHJcbiAgICAvL2ZpeDplcnJvcjpzdGRpbj46NzM1NjoxOiB3YXJuaW5nOiBcIkBjaGFyc2V0XCIgbXVzdCBiZSB0aGUgZmlyc3QgcnVsZSBpbiB0aGUgZmlsZVxyXG4gICAgY3NzOiB7XHJcbiAgICAgIHBvc3Rjc3M6IHtcclxuICAgICAgICBwbHVnaW5zOiBbXHJcbiAgICAgICAgICB7XHJcbiAgICAgICAgICAgIHBvc3Rjc3NQbHVnaW46ICdpbnRlcm5hbDpjaGFyc2V0LXJlbW92YWwnLFxyXG4gICAgICAgICAgICBBdFJ1bGU6IHtcclxuICAgICAgICAgICAgICBjaGFyc2V0OiAoYXRSdWxlKSA9PiB7XHJcbiAgICAgICAgICAgICAgICBpZiAoYXRSdWxlLm5hbWUgPT09ICdjaGFyc2V0Jykge1xyXG4gICAgICAgICAgICAgICAgICBhdFJ1bGUucmVtb3ZlKCk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICB9XHJcbiAgICAgICAgXVxyXG4gICAgICB9XHJcbiAgICB9XHJcbiAgfVxyXG59KVxyXG4iLCAiY29uc3QgX192aXRlX2luamVjdGVkX29yaWdpbmFsX2Rpcm5hbWUgPSBcIkY6XFxcXGNhcm9sZS1hZG1pblxcXFxmcm9udFxcXFx2aXRlXFxcXHBsdWdpbnNcIjtjb25zdCBfX3ZpdGVfaW5qZWN0ZWRfb3JpZ2luYWxfZmlsZW5hbWUgPSBcIkY6XFxcXGNhcm9sZS1hZG1pblxcXFxmcm9udFxcXFx2aXRlXFxcXHBsdWdpbnNcXFxcaW5kZXguanNcIjtjb25zdCBfX3ZpdGVfaW5qZWN0ZWRfb3JpZ2luYWxfaW1wb3J0X21ldGFfdXJsID0gXCJmaWxlOi8vL0Y6L2Nhcm9sZS1hZG1pbi9mcm9udC92aXRlL3BsdWdpbnMvaW5kZXguanNcIjtpbXBvcnQgdnVlIGZyb20gJ0B2aXRlanMvcGx1Z2luLXZ1ZSdcclxuXHJcbmltcG9ydCBjcmVhdGVBdXRvSW1wb3J0IGZyb20gJy4vYXV0by1pbXBvcnQnXHJcbmltcG9ydCBjcmVhdGVTdmdJY29uIGZyb20gJy4vc3ZnLWljb24nXHJcbmltcG9ydCBjcmVhdGVDb21wcmVzc2lvbiBmcm9tICcuL2NvbXByZXNzaW9uJ1xyXG5pbXBvcnQgY3JlYXRlU2V0dXBFeHRlbmQgZnJvbSAnLi9zZXR1cC1leHRlbmQnXHJcblxyXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBjcmVhdGVWaXRlUGx1Z2lucyh2aXRlRW52LCBpc0J1aWxkID0gZmFsc2UpIHtcclxuICAgIGNvbnN0IHZpdGVQbHVnaW5zID0gW3Z1ZSgpXVxyXG4gICAgdml0ZVBsdWdpbnMucHVzaChjcmVhdGVBdXRvSW1wb3J0KCkpXHJcblx0dml0ZVBsdWdpbnMucHVzaChjcmVhdGVTZXR1cEV4dGVuZCgpKVxyXG4gICAgdml0ZVBsdWdpbnMucHVzaChjcmVhdGVTdmdJY29uKGlzQnVpbGQpKVxyXG5cdGlzQnVpbGQgJiYgdml0ZVBsdWdpbnMucHVzaCguLi5jcmVhdGVDb21wcmVzc2lvbih2aXRlRW52KSlcclxuICAgIHJldHVybiB2aXRlUGx1Z2luc1xyXG59XHJcbiIsICJjb25zdCBfX3ZpdGVfaW5qZWN0ZWRfb3JpZ2luYWxfZGlybmFtZSA9IFwiRjpcXFxcY2Fyb2xlLWFkbWluXFxcXGZyb250XFxcXHZpdGVcXFxccGx1Z2luc1wiO2NvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9maWxlbmFtZSA9IFwiRjpcXFxcY2Fyb2xlLWFkbWluXFxcXGZyb250XFxcXHZpdGVcXFxccGx1Z2luc1xcXFxhdXRvLWltcG9ydC5qc1wiO2NvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9pbXBvcnRfbWV0YV91cmwgPSBcImZpbGU6Ly8vRjovY2Fyb2xlLWFkbWluL2Zyb250L3ZpdGUvcGx1Z2lucy9hdXRvLWltcG9ydC5qc1wiO2ltcG9ydCBhdXRvSW1wb3J0IGZyb20gJ3VucGx1Z2luLWF1dG8taW1wb3J0L3ZpdGUnXHJcblxyXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBjcmVhdGVBdXRvSW1wb3J0KCkge1xyXG4gICAgcmV0dXJuIGF1dG9JbXBvcnQoe1xyXG4gICAgICAgIGltcG9ydHM6IFtcclxuICAgICAgICAgICAgJ3Z1ZScsXHJcbiAgICAgICAgICAgICd2dWUtcm91dGVyJyxcclxuICAgICAgICAgICAgJ3BpbmlhJ1xyXG4gICAgICAgIF0sXHJcbiAgICAgICAgZHRzOiBmYWxzZVxyXG4gICAgfSlcclxufVxyXG4iLCAiY29uc3QgX192aXRlX2luamVjdGVkX29yaWdpbmFsX2Rpcm5hbWUgPSBcIkY6XFxcXGNhcm9sZS1hZG1pblxcXFxmcm9udFxcXFx2aXRlXFxcXHBsdWdpbnNcIjtjb25zdCBfX3ZpdGVfaW5qZWN0ZWRfb3JpZ2luYWxfZmlsZW5hbWUgPSBcIkY6XFxcXGNhcm9sZS1hZG1pblxcXFxmcm9udFxcXFx2aXRlXFxcXHBsdWdpbnNcXFxcc3ZnLWljb24uanNcIjtjb25zdCBfX3ZpdGVfaW5qZWN0ZWRfb3JpZ2luYWxfaW1wb3J0X21ldGFfdXJsID0gXCJmaWxlOi8vL0Y6L2Nhcm9sZS1hZG1pbi9mcm9udC92aXRlL3BsdWdpbnMvc3ZnLWljb24uanNcIjtpbXBvcnQgeyBjcmVhdGVTdmdJY29uc1BsdWdpbiB9IGZyb20gJ3ZpdGUtcGx1Z2luLXN2Zy1pY29ucydcclxuaW1wb3J0IHBhdGggZnJvbSAncGF0aCdcclxuXHJcbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uIGNyZWF0ZVN2Z0ljb24oaXNCdWlsZCkge1xyXG4gICAgcmV0dXJuIGNyZWF0ZVN2Z0ljb25zUGx1Z2luKHtcclxuXHRcdGljb25EaXJzOiBbcGF0aC5yZXNvbHZlKHByb2Nlc3MuY3dkKCksICdzcmMvYXNzZXRzL2ljb25zL3N2ZycpXSxcclxuICAgICAgICBzeW1ib2xJZDogJ2ljb24tW2Rpcl0tW25hbWVdJyxcclxuICAgICAgICBzdmdvT3B0aW9uczogaXNCdWlsZFxyXG4gICAgfSlcclxufVxyXG4iLCAiY29uc3QgX192aXRlX2luamVjdGVkX29yaWdpbmFsX2Rpcm5hbWUgPSBcIkY6XFxcXGNhcm9sZS1hZG1pblxcXFxmcm9udFxcXFx2aXRlXFxcXHBsdWdpbnNcIjtjb25zdCBfX3ZpdGVfaW5qZWN0ZWRfb3JpZ2luYWxfZmlsZW5hbWUgPSBcIkY6XFxcXGNhcm9sZS1hZG1pblxcXFxmcm9udFxcXFx2aXRlXFxcXHBsdWdpbnNcXFxcY29tcHJlc3Npb24uanNcIjtjb25zdCBfX3ZpdGVfaW5qZWN0ZWRfb3JpZ2luYWxfaW1wb3J0X21ldGFfdXJsID0gXCJmaWxlOi8vL0Y6L2Nhcm9sZS1hZG1pbi9mcm9udC92aXRlL3BsdWdpbnMvY29tcHJlc3Npb24uanNcIjtpbXBvcnQgY29tcHJlc3Npb24gZnJvbSAndml0ZS1wbHVnaW4tY29tcHJlc3Npb24nXHJcblxyXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBjcmVhdGVDb21wcmVzc2lvbihlbnYpIHtcclxuICAgIGNvbnN0IHsgVklURV9CVUlMRF9DT01QUkVTUyB9ID0gZW52XHJcbiAgICBjb25zdCBwbHVnaW4gPSBbXVxyXG4gICAgaWYgKFZJVEVfQlVJTERfQ09NUFJFU1MpIHtcclxuICAgICAgICBjb25zdCBjb21wcmVzc0xpc3QgPSBWSVRFX0JVSUxEX0NPTVBSRVNTLnNwbGl0KCcsJylcclxuICAgICAgICBpZiAoY29tcHJlc3NMaXN0LmluY2x1ZGVzKCdnemlwJykpIHtcclxuICAgICAgICAgICAgLy8gaHR0cDovL2RvYy5ydW95aS52aXAvcnVveWktdnVlL290aGVyL2ZhcS5odG1sI1x1NEY3Rlx1NzUyOGd6aXBcdTg5RTNcdTUzOEJcdTdGMjlcdTk3NTlcdTYwMDFcdTY1ODdcdTRFRjZcclxuICAgICAgICAgICAgcGx1Z2luLnB1c2goXHJcbiAgICAgICAgICAgICAgICBjb21wcmVzc2lvbih7XHJcbiAgICAgICAgICAgICAgICAgICAgZXh0OiAnLmd6JyxcclxuICAgICAgICAgICAgICAgICAgICBkZWxldGVPcmlnaW5GaWxlOiBmYWxzZVxyXG4gICAgICAgICAgICAgICAgfSlcclxuICAgICAgICAgICAgKVxyXG4gICAgICAgIH1cclxuICAgICAgICBpZiAoY29tcHJlc3NMaXN0LmluY2x1ZGVzKCdicm90bGknKSkge1xyXG4gICAgICAgICAgICBwbHVnaW4ucHVzaChcclxuICAgICAgICAgICAgICAgIGNvbXByZXNzaW9uKHtcclxuICAgICAgICAgICAgICAgICAgICBleHQ6ICcuYnInLFxyXG4gICAgICAgICAgICAgICAgICAgIGFsZ29yaXRobTogJ2Jyb3RsaUNvbXByZXNzJyxcclxuICAgICAgICAgICAgICAgICAgICBkZWxldGVPcmlnaW5GaWxlOiBmYWxzZVxyXG4gICAgICAgICAgICAgICAgfSlcclxuICAgICAgICAgICAgKVxyXG4gICAgICAgIH1cclxuICAgIH1cclxuICAgIHJldHVybiBwbHVnaW5cclxufVxyXG4iLCAiY29uc3QgX192aXRlX2luamVjdGVkX29yaWdpbmFsX2Rpcm5hbWUgPSBcIkY6XFxcXGNhcm9sZS1hZG1pblxcXFxmcm9udFxcXFx2aXRlXFxcXHBsdWdpbnNcIjtjb25zdCBfX3ZpdGVfaW5qZWN0ZWRfb3JpZ2luYWxfZmlsZW5hbWUgPSBcIkY6XFxcXGNhcm9sZS1hZG1pblxcXFxmcm9udFxcXFx2aXRlXFxcXHBsdWdpbnNcXFxcc2V0dXAtZXh0ZW5kLmpzXCI7Y29uc3QgX192aXRlX2luamVjdGVkX29yaWdpbmFsX2ltcG9ydF9tZXRhX3VybCA9IFwiZmlsZTovLy9GOi9jYXJvbGUtYWRtaW4vZnJvbnQvdml0ZS9wbHVnaW5zL3NldHVwLWV4dGVuZC5qc1wiO2ltcG9ydCBzZXR1cEV4dGVuZCBmcm9tICd1bnBsdWdpbi12dWUtc2V0dXAtZXh0ZW5kLXBsdXMvdml0ZSdcclxuXHJcbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uIGNyZWF0ZVNldHVwRXh0ZW5kKCkge1xyXG4gICAgcmV0dXJuIHNldHVwRXh0ZW5kKHt9KVxyXG59XHJcbiJdLAogICJtYXBwaW5ncyI6ICI7QUFBdVAsU0FBUyxjQUFjLGVBQWU7QUFDN1IsT0FBT0EsV0FBVTs7O0FDRHFRLE9BQU8sU0FBUzs7O0FDQUosT0FBTyxnQkFBZ0I7QUFFMVMsU0FBUixtQkFBb0M7QUFDdkMsU0FBTyxXQUFXO0FBQUEsSUFDZCxTQUFTO0FBQUEsTUFDTDtBQUFBLE1BQ0E7QUFBQSxNQUNBO0FBQUEsSUFDSjtBQUFBLElBQ0EsS0FBSztBQUFBLEVBQ1QsQ0FBQztBQUNMOzs7QUNYNFIsU0FBUyw0QkFBNEI7QUFDalUsT0FBTyxVQUFVO0FBRUYsU0FBUixjQUErQixTQUFTO0FBQzNDLFNBQU8scUJBQXFCO0FBQUEsSUFDOUIsVUFBVSxDQUFDLEtBQUssUUFBUSxRQUFRLElBQUksR0FBRyxzQkFBc0IsQ0FBQztBQUFBLElBQ3hELFVBQVU7QUFBQSxJQUNWLGFBQWE7QUFBQSxFQUNqQixDQUFDO0FBQ0w7OztBQ1RrUyxPQUFPLGlCQUFpQjtBQUUzUyxTQUFSLGtCQUFtQyxLQUFLO0FBQzNDLFFBQU0sRUFBRSxvQkFBb0IsSUFBSTtBQUNoQyxRQUFNLFNBQVMsQ0FBQztBQUNoQixNQUFJLHFCQUFxQjtBQUNyQixVQUFNLGVBQWUsb0JBQW9CLE1BQU0sR0FBRztBQUNsRCxRQUFJLGFBQWEsU0FBUyxNQUFNLEdBQUc7QUFFL0IsYUFBTztBQUFBLFFBQ0gsWUFBWTtBQUFBLFVBQ1IsS0FBSztBQUFBLFVBQ0wsa0JBQWtCO0FBQUEsUUFDdEIsQ0FBQztBQUFBLE1BQ0w7QUFBQSxJQUNKO0FBQ0EsUUFBSSxhQUFhLFNBQVMsUUFBUSxHQUFHO0FBQ2pDLGFBQU87QUFBQSxRQUNILFlBQVk7QUFBQSxVQUNSLEtBQUs7QUFBQSxVQUNMLFdBQVc7QUFBQSxVQUNYLGtCQUFrQjtBQUFBLFFBQ3RCLENBQUM7QUFBQSxNQUNMO0FBQUEsSUFDSjtBQUFBLEVBQ0o7QUFDQSxTQUFPO0FBQ1g7OztBQzNCb1MsT0FBTyxpQkFBaUI7QUFFN1MsU0FBUixvQkFBcUM7QUFDeEMsU0FBTyxZQUFZLENBQUMsQ0FBQztBQUN6Qjs7O0FKR2UsU0FBUixrQkFBbUMsU0FBUyxVQUFVLE9BQU87QUFDaEUsUUFBTSxjQUFjLENBQUMsSUFBSSxDQUFDO0FBQzFCLGNBQVksS0FBSyxpQkFBaUIsQ0FBQztBQUN0QyxjQUFZLEtBQUssa0JBQWtCLENBQUM7QUFDakMsY0FBWSxLQUFLLGNBQWMsT0FBTyxDQUFDO0FBQzFDLGFBQVcsWUFBWSxLQUFLLEdBQUcsa0JBQWtCLE9BQU8sQ0FBQztBQUN0RCxTQUFPO0FBQ1g7OztBRGRBLElBQU0sbUNBQW1DO0FBS3pDLElBQU8sc0JBQVEsYUFBYSxDQUFDLEVBQUUsTUFBTSxRQUFRLE1BQU07QUFDakQsUUFBTSxNQUFNLFFBQVEsTUFBTSxRQUFRLElBQUksQ0FBQztBQUN2QyxRQUFNLEVBQUUsYUFBYSxJQUFJO0FBQ3pCLFNBQU87QUFBQTtBQUFBO0FBQUE7QUFBQSxJQUlMLE1BQU0saUJBQWlCLGVBQWUsTUFBTTtBQUFBLElBQzVDLFNBQVMsa0JBQWtCLEtBQUssWUFBWSxPQUFPO0FBQUEsSUFDbkQsU0FBUztBQUFBO0FBQUEsTUFFUCxPQUFPO0FBQUE7QUFBQSxRQUVMLEtBQUtDLE1BQUssUUFBUSxrQ0FBVyxJQUFJO0FBQUE7QUFBQSxRQUVqQyxLQUFLQSxNQUFLLFFBQVEsa0NBQVcsT0FBTztBQUFBLE1BQ3RDO0FBQUE7QUFBQSxNQUVBLFlBQVksQ0FBQyxRQUFRLE9BQU8sT0FBTyxRQUFRLFFBQVEsU0FBUyxNQUFNO0FBQUEsSUFDcEU7QUFBQTtBQUFBLElBRUEsUUFBUTtBQUFBLE1BQ04sTUFBTTtBQUFBLE1BQ04sTUFBTTtBQUFBLE1BQ04sTUFBTTtBQUFBLE1BQ04sT0FBTztBQUFBO0FBQUEsUUFFTCxRQUFRO0FBQUEsVUFDTixRQUFRO0FBQUEsVUFDUixjQUFjO0FBQUEsVUFDZCxTQUFTLENBQUMsTUFBTSxFQUFFLFFBQVEsVUFBVSxFQUFFO0FBQUEsUUFDeEM7QUFBQSxNQUNGO0FBQUEsSUFDRjtBQUFBO0FBQUEsSUFFQSxLQUFLO0FBQUEsTUFDSCxTQUFTO0FBQUEsUUFDUCxTQUFTO0FBQUEsVUFDUDtBQUFBLFlBQ0UsZUFBZTtBQUFBLFlBQ2YsUUFBUTtBQUFBLGNBQ04sU0FBUyxDQUFDLFdBQVc7QUFDbkIsb0JBQUksT0FBTyxTQUFTLFdBQVc7QUFDN0IseUJBQU8sT0FBTztBQUFBLGdCQUNoQjtBQUFBLGNBQ0Y7QUFBQSxZQUNGO0FBQUEsVUFDRjtBQUFBLFFBQ0Y7QUFBQSxNQUNGO0FBQUEsSUFDRjtBQUFBLEVBQ0Y7QUFDRixDQUFDOyIsCiAgIm5hbWVzIjogWyJwYXRoIiwgInBhdGgiXQp9Cg== ================================================ FILE: server/.eslintignore ================================================ prisma-client ================================================ FILE: server/.eslintrc.js ================================================ module.exports = { parser: '@typescript-eslint/parser', parserOptions: { project: 'tsconfig.json', tsconfigRootDir: __dirname, sourceType: 'module', }, plugins: ['@typescript-eslint/eslint-plugin'], extends: [ 'plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended', ], root: true, env: { node: true, jest: true, }, ignorePatterns: ['.eslintrc.js'], rules: { '@typescript-eslint/interface-name-prefix': 'off', // 关闭接口名称前缀规则 '@typescript-eslint/explicit-function-return-type': 'off', // 关闭显式函数返回类型规则 '@typescript-eslint/explicit-module-boundary-types': 'off', // 关闭显式模块边界类型规则 '@typescript-eslint/no-explicit-any': 'off', // 允许使用 any 类型 '@typescript-eslint/no-var-requires': 'off', // 允许使用 require '@typescript-eslint/no-empty-function': 'off', // 允许空函数 '@typescript-eslint/ban-types': 'off', // 关闭禁止特定类型的规则 'prettier/prettier': ['error', { endOfLine: 'auto' }], // 确保 Prettier 使用自动行尾格式 'prefer-const': 'off', '@typescript-eslint/no-unused-vars': 'off', '@typescript-eslint/ban-ts-comment': 'off', 'quotes': ['0'] //忽略单双引号 }, overrides: [ { files: ['src/common/middleware/auth/auth.middleware.ts'], rules: { '@typescript-eslint/ban-ts-comment': 'off', // 在特定文件中关闭该规则 }, }, ], }; ================================================ FILE: server/.prettierrc ================================================ { "singleQuote": true, "trailingComma": "all" } ================================================ FILE: server/nest-cli.json ================================================ { "$schema": "https://json.schemastore.org/nest-cli", "collection": "@nestjs/schematics", "sourceRoot": "src", "compilerOptions": { "deleteOutDir": true, "assets": [ { "include": ".env", "watchAssets": true }, { "include": "common/service/gen/gen-template", "watchAssets": true }, { "include": "common/prisma-client", "watchAssets": true }, { "include": "**/*.json", "watchAssets": true } ] } } ================================================ FILE: server/package.json ================================================ { "name": "carole-admin", "version": "1.0.0", "description": "carole-admin后台框架", "author": "carole", "private": true, "license": "UNLICENSED", "prisma": { "schema": "./src/prisma/" }, "scripts": { "build": "nest build", "format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"", "start": "nest start", "start:dev": "nest start --watch", "start:debug": "nest start --debug --watch", "start:prod": "node dist/main", "lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix", "test": "jest", "test:watch": "jest --watch", "test:cov": "jest --coverage", "test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand", "test:e2e": "jest --config ./test/jest-e2e.json" }, "dependencies": { "@nestjs/common": "^10.0.0", "@nestjs/core": "^10.0.0", "@nestjs/platform-express": "^10.0.0", "@nestjs/schedule": "^4.0.2", "@nestjs/swagger": "^7.3.1", "@nestjs/throttler": "^5.1.2", "@prisma/client": "^5.15.0", "archiver": "^7.0.1", "axios": "^1.6.8", "bowser": "^2.11.0", "class-transformer": "^0.5.1", "class-validator": "^0.14.1", "crypto-js": "^4.2.0", "dayjs": "^1.11.11", "dotenv": "^16.4.5", "generic-pool": "^3.9.0", "ioredis": "^5.4.1", "jsonwebtoken": "^9.0.2", "kolorist": "^1.8.0", "lib-qqwry": "^1.3.4", "lodash": "^4.17.21", "module-alias": "^2.2.3", "multer": "^1.4.5-lts.1", "mysql2": "^3.9.7", "nestjs-throttler-storage-redis": "^0.4.4", "node-xlsx": "^0.24.0", "nodemailer": "^6.9.13", "redis": "^4.6.13", "reflect-metadata": "^0.2.0", "rxjs": "^7.8.1", "svg-captcha": "^1.4.0", "swagger-ui-express": "^5.0.0", "systeminformation": "^5.22.7", "velocityjs": "^2.0.6" }, "devDependencies": { "@nestjs/cli": "^10.0.0", "@nestjs/schematics": "^10.0.0", "@nestjs/testing": "^10.0.0", "@types/crypto-js": "^4.2.2", "@types/express": "^4.17.17", "@types/jest": "^29.5.2", "@types/jsonwebtoken": "^9.0.6", "@types/lodash": "^4.17.0", "@types/multer": "^1.4.11", "@types/node": "^20.12.12", "@types/nodemailer": "^6.4.15", "@types/redis": "^4.0.11", "@types/supertest": "^6.0.0", "@types/systeminformation": "^3.54.1", "@typescript-eslint/eslint-plugin": "^6.0.0", "@typescript-eslint/parser": "^6.0.0", "eslint": "^8.42.0", "eslint-config-prettier": "^9.0.0", "eslint-plugin-prettier": "^5.0.0", "jest": "^29.5.0", "prettier": "^3.0.0", "prisma": "^5.15.0", "source-map-support": "^0.5.21", "supertest": "^6.3.3", "ts-jest": "^29.1.0", "ts-loader": "^9.4.3", "ts-node": "^10.9.1", "tsconfig-paths": "^4.2.0", "typescript": "^5.3.2" }, "jest": { "moduleFileExtensions": [ "js", "json", "ts" ], "rootDir": "src", "testRegex": ".*\\.spec\\.ts$", "transform": { "^.+\\.(t|j)s$": "ts-jest" }, "collectCoverageFrom": [ "**/*.(t|j)s" ], "coverageDirectory": "../coverage", "testEnvironment": "node" } } ================================================ FILE: server/src/admin/admin.module.ts ================================================ import { Module } from '@nestjs/common'; import { CaptchaController } from '@/admin/common/captcha/captcha.controller'; import { UploadController } from './common/upload/upload.controller'; import { AuthController } from './system/auth/auth.controller'; import { SysUserController } from './system/user/sys-user.controller'; import { SysDeptController } from './system/dept/sys-dept.controller'; import { SysConfigController } from './system/config/sys-config.controller'; import { DictDataController } from './system/dict-data/dict-data.controller'; import { DictTypeController } from './system/dict-type/dict-type.controller'; import { SysMenuController } from './system/menu/sys-menu.controller'; import { SysPostController } from './system/post/sys-post.controller'; import { SysRoleController } from './system/role/sys-role.controller'; import { GenController } from './gen/gen.controller'; import { DeptService } from './system/dept/service/sys-dept.service'; import { MenuService } from './system/menu/service/sys-menu.service'; import { ConfigService } from './system/config/service/sys-config.service'; import { LogininforService } from './system/logininfor/service/sys-logininfor.service'; import { NoticeService } from './system/notice/service/sys-notice.service'; import { PostService } from './system/post/service/sys-post.service'; import { RoleService } from './system/role/service/sys-role.service'; import { GenService } from '@/common/service/gen/gen.service'; import { SysDictTypeService } from './system/dict-type/service/sys-dict-type.service'; import { SysDictDataService } from './system/dict-data/service/sys-dict-data.service'; import { UserService } from './system/user/service/sys-user.service'; import { SysNoticeController } from './system/notice/sys-notice.controller'; import { SysLogininforController } from './system/logininfor/sys-logininfor.controller'; import { monitorController } from './system/monitor/monitor.controller'; @Module({ imports: [], controllers: [ CaptchaController, UploadController, AuthController, SysDeptController, SysConfigController, DictDataController, DictTypeController, SysMenuController, SysPostController, SysRoleController, GenController, SysUserController, SysNoticeController, SysLogininforController, monitorController, ], providers: [ DeptService, MenuService, ConfigService, LogininforService, MenuService, NoticeService, PostService, RoleService, GenService, SysDictDataService, SysDictTypeService, UserService, LogininforService, ], }) export class AdminModule {} ================================================ FILE: server/src/admin/common/captcha/captcha.controller.ts ================================================ import { Controller, Get } from '@nestjs/common'; import { createMath, createText } from '@/common/utils/captcha'; import { Config } from '@/config'; import { redisUtils } from '@/common/utils/redisUtils'; import Result from '@/common/result/Result'; import { Constants } from '@/common/constant/Constants'; import { ApiOkResponse, ApiOperation, ApiTags } from '@nestjs/swagger'; import CaptchaImageVo from './vo/CaptchaImageVo'; import { randomUUID } from 'crypto'; import { Throttle } from '@nestjs/throttler'; @ApiTags('验证码模块') @Controller('/captchaImage') export class CaptchaController { /* * 生成验证码 * */ @Get() @ApiOperation({ summary: '获取验证码', }) @ApiOkResponse({ type: CaptchaImageVo, }) @Throttle({ default: { limit: 8, ttl: 1000 * 60, }, }) async getCaptchaImage() { const map = { math: createMath, text: createText, }; //根据配置的是math还是text自动调用方法生成数据 const captchaInfo = map[Config.captcha.mode](); //是否开启验证码 const enable = await redisUtils.get( Constants.SYS_CONFIG_KEY + 'sys.account.captchaEnabled', ); const captchaEnabled: boolean = enable == '' ? true : enable === 'true'; const data = { captchaEnabled, img: captchaInfo.data, uuid: randomUUID(), }; try { await redisUtils.set( Constants.CAPTCHA_CODE_KEY + data.uuid, captchaInfo.text.toLowerCase(), Config.captcha.expiresIn, ); return data; } catch (err) { return Result.Error('生成验证码错误,请重试'); } } } ================================================ FILE: server/src/admin/common/captcha/vo/CaptchaImageVo.ts ================================================ import { ApiProperty } from '@nestjs/swagger'; class Data { @ApiProperty({ example: true, description: '验证码是否启用', }) 'captchaEnabled': boolean; @ApiProperty({ example: '.....', description: '接口图片svg格式', }) 'img': string; @ApiProperty({ example: '14196d31-2bdf-4a42-b34c-eb771556e10e', description: '接口uuid,验证需要', }) 'uuid': string; } export default class CaptchaImageVo { @ApiProperty({ example: 200, description: '响应code', }) code: number; @ApiProperty({ example: true, description: '请求是否成功处理', }) 'success': boolean; @ApiProperty({ example: 'successful', description: '接口备注信息', }) 'msg': string; @ApiProperty({ type: Data, description: '返回数据', }) 'data': Data; @ApiProperty({ example: '2024-04-28 22:32:35', description: '处理时间', }) 'time': string; } ================================================ FILE: server/src/admin/common/upload/config/uploadConfig.ts ================================================ import { createFolder, nowDate } from '@/common/utils'; import * as path from 'path'; import * as multer from 'multer'; import { randomUUID } from 'crypto'; import { Config } from '@/config'; import { Constants } from '@/common/constant/Constants'; let saveDir = Config.upload.path; const avatarDir = path.join(saveDir, 'avatar'); saveDir = path.join(saveDir, 'files'); function createStorage(dir = saveDir) { return multer.diskStorage({ destination: function (req, file, cb) { createFolder(path.join(dir, nowDate())); // 接收到文件后输出的保存路径(若不存在则需要创建) cb(null, path.join(dir, nowDate())); }, filename: function (req, file, cb) { // 将保存文件名设置为 uuid + 文件原始名 cb( null, +new Date() + randomUUID().replaceAll('-', '') + (path.extname(file.originalname) || '.jpg'), ); }, }); } createFolder(saveDir); createFolder(avatarDir); export const uploadFileConfig = { storage: createStorage(saveDir), limits: Config.upload.config.file, fileFilter: function (_req, file, cb) { checkFileType(file, cb); }, }; export const uploadAvatarConfig = { storage: createStorage(avatarDir), limits: Config.upload.config.img, fileFilter: function (_req, file, cb) { checkImgFileType(file, cb); }, }; function checkImgFileType(file, cb) { const filetypes = ['jpeg', 'jpg', 'png', 'gif']; const mimetypes = [ 'image/png', 'image/jpeg', 'image/jpg', 'image/webp', 'image/gif', ]; const extname = filetypes.includes( file.originalname.split('.').pop().toLowerCase(), ); const mimetype = mimetypes.includes(file.mimetype); if (mimetype && extname) { return cb(null, true); } else { const err = new multer.MulterError( < | 'LIMIT_PART_COUNT' | 'LIMIT_FILE_SIZE' | 'LIMIT_FILE_COUNT' | 'LIMIT_FIELD_KEY' | 'LIMIT_FIELD_VALUE' | 'LIMIT_FIELD_COUNT' | 'LIMIT_UNEXPECTED_FILE' >'TypeError', ); err.message = '只允许上传图片类型!'; cb(err, false); } } function checkFileType(file, cb) { const fileTypes = [ // 图片 'gif', 'jpg', 'jpeg', 'png', // word excel powerpoint 'doc', 'docx', 'csv', 'text/csv', 'xls', 'xlsx', 'ppt', 'pptx', 'txt', // 压缩文件 'rar', 'zip', 'gz', // 视频格式 'mp4', 'avi', // pdf 'pdf', ]; const mimeTypes = [ 'image/gif', 'image/jpeg', 'image/jpeg', 'image/png', 'application/msword', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/vnd.ms-powerpoint', 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'text/plain', 'application/vnd.rar', 'application/zip', 'application/gzip', 'video/mp4', 'video/x-msvideo', 'application/pdf', 'application/x-zip-compressed', ]; const extname = fileTypes.includes( file.originalname.split('.').pop().toLowerCase(), ); const mimetype = mimeTypes.some((v) => file.mimetype.includes(v)); if (mimetype && extname) { return cb(null, true); } else { const err = new multer.MulterError( < | 'LIMIT_PART_COUNT' | 'LIMIT_FILE_SIZE' | 'LIMIT_FILE_COUNT' | 'LIMIT_FIELD_KEY' | 'LIMIT_FIELD_VALUE' | 'LIMIT_FIELD_COUNT' | 'LIMIT_UNEXPECTED_FILE' >'error', ); err.message = '不允许上传的文件!'; cb(err, false); } } export function getFilePath(file: Express.Multer.File) { const configPath = Config.upload.path.replace(/\\+/g, '/'); const uploadPath = file.path.replace(/\\+/g, '/'); return Constants.FILE_PREFIX + uploadPath.replace(configPath, ''); } ================================================ FILE: server/src/admin/common/upload/dto/upload.dto.ts ================================================ import { ApiProperty } from '@nestjs/swagger'; export class UploadFileDto { @ApiProperty({ example: '文件', description: '上传文件', }) file: Express.Multer.File; } export class UploadFilesDto { @ApiProperty({ example: ['文件'], description: '上传多个文件', }) files: Express.Multer.File[]; } ================================================ FILE: server/src/admin/common/upload/upload.controller.ts ================================================ import { Controller, Post, UploadedFile, UploadedFiles, UseInterceptors, } from '@nestjs/common'; import { FileInterceptor, FilesInterceptor } from '@nestjs/platform-express'; import Result from '@/common/result/Result'; import { getFilePath, uploadFileConfig, } from '@/admin/common/upload/config/uploadConfig'; import { ApiBearerAuth, ApiBody, ApiConsumes, ApiOkResponse, ApiOperation, ApiTags, } from '@nestjs/swagger'; import { uploadMultiple, uploadSingle } from './vo/upload'; import { UploadFileDto, UploadFilesDto, } from '@/admin/common/upload/dto/upload.dto'; @ApiBearerAuth() @ApiTags('文件上传模块') @Controller() export class UploadController { @Post('/common/upload') @ApiOperation({ summary: '上传单个文件', description: '上传单个文件', }) @ApiConsumes('multipart/form-data') @ApiBody({ type: UploadFileDto, }) @ApiOkResponse({ schema: { example: uploadSingle, }, }) @UseInterceptors(FileInterceptor('file', uploadFileConfig)) async uploadFile(@UploadedFile() file: Express.Multer.File) { if (!file) { return Result.BadRequest('请选择要上传的文件!'); } const data = { fileName: file.filename, newFileName: file.filename, originalFilename: file.originalname, url: getFilePath(file), size: file.size, }; return { ...Result.ok(), ...data }; } @Post('/common/uploads') @ApiOperation({ summary: '上传多文件', description: '上传多文件', }) @ApiConsumes('multipart/form-data') @ApiBody({ type: UploadFilesDto, }) @ApiOkResponse({ schema: { example: uploadMultiple, }, }) @UseInterceptors(FilesInterceptor('files', 10, uploadFileConfig)) async uploadFiles(@UploadedFiles() files: Express.Multer.File[]) { if (!files?.length) { return Result.BadRequest('请选择要上传的文件!'); } const data = []; files.forEach((file) => { data.push({ fileName: file.filename, newFileName: file.filename, originalFilename: file.originalname, url: getFilePath(file), size: file.size, }); }); return Result.ok(data); } } ================================================ FILE: server/src/admin/common/upload/vo/upload.ts ================================================ export const uploadSingle = { code: 200, success: true, msg: 'successful', data: null, time: '2024-04-29 08:11:08', fileName: '17143494685302ec06156db9f4170b4635131b49356d6.png', newFileName: '17143494685302ec06156db9f4170b4635131b49356d6.png', originalFilename: 'thumb-1920-1314539.png', url: '/upload/files/2024-04-29/17143494685302ec06156db9f4170b4635131b49356d6.png', size: 951415, }; export const uploadMultiple = { code: 200, success: true, msg: 'successful', data: [ { fileName: '171434954750637f85940e0b245269c8a025b202b5555.png', newFileName: '171434954750637f85940e0b245269c8a025b202b5555.png', originalFilename: 'thumb-1920-1314539.png', url: '/upload/files/2024-04-29/171434954750637f85940e0b245269c8a025b202b5555.png', size: 951415, }, { fileName: '171434954751607c13706343443afa642532dae87a02d.jpeg', newFileName: '171434954751607c13706343443afa642532dae87a02d.jpeg', originalFilename: 'cropped-3840-2160-1328138.jpeg', url: '/upload/files/2024-04-29/171434954751607c13706343443afa642532dae87a02d.jpeg', size: 2563084, }, ], time: '2024-04-29 08:12:27', }; ================================================ FILE: server/src/admin/gen/dto/exucteSqlDto.ts ================================================ import { ApiProperty } from '@nestjs/swagger'; import { IsNotEmpty, IsString } from 'class-validator'; export class excuteSqlDto { @ApiProperty({ description: '执行的sql' }) @IsNotEmpty({ message: 'sql语句不能为空!' }) @IsString({ message: '类型不正确!' }) sql: string; } ================================================ FILE: server/src/admin/gen/dto/queryDatabaseDto.ts ================================================ import { queryDomain } from '@/common/domain/queryDomain'; import { ApiProperty } from '@nestjs/swagger'; export class queryDataBaseDto extends queryDomain { @ApiProperty({ description: '表名称' }) tableName: string | null; @ApiProperty({ description: '表描述' }) tableComment: string | null; } ================================================ FILE: server/src/admin/gen/dto/queryGenTableDto.ts ================================================ import { queryDomain } from '@/common/domain/queryDomain'; import { ApiProperty } from '@nestjs/swagger'; import { IsOptional } from 'class-validator'; export class queryGenTableDto extends queryDomain { @ApiProperty({ description: '表名称',required:false }) @IsOptional() tableName: string | null; @ApiProperty({ description: '表描述',required:false }) @IsOptional() tableComment: string | null; @IsOptional() params: { beginTime: string | null; endTime: string | null; }; } ================================================ FILE: server/src/admin/gen/gen.controller.ts ================================================ import { Body, Controller, Delete, Get, Param, ParseArrayPipe, ParseIntPipe, Post, Put, Query, Res, } from '@nestjs/common'; import { ParseIntArrayPipe } from '@/common/pipe/parse-int-array.pipe'; import Result from '@/common/result/Result'; import { ApiBearerAuth, ApiOperation, ApiTags } from '@nestjs/swagger'; import { queryGenTableDto } from './dto/queryGenTableDto'; import { GenService } from '@/common/service/gen/gen.service'; import { queryDataBaseDto } from './dto/queryDatabaseDto'; import { isNumber } from 'class-validator'; import { Response } from 'express'; import { RequirePermission } from '@/common/decorator/require-premission.decorator'; import { RequireRole } from '@/common/decorator/require-role.decorator'; import { excuteSqlDto } from './dto/exucteSqlDto'; @ApiTags('代码生成') @ApiBearerAuth() @Controller('tool/gen') export class GenController { constructor(private genService: GenService) {} @ApiOperation({ summary: '查询生成表数据' }) @RequirePermission('tool:gen:query') @Get('/list') async listTable(@Query() q: queryGenTableDto) { return Result.TableData(await this.genService.listTable(q)); } @ApiOperation({ summary: '查询db数据库列表' }) @RequirePermission('tool:gen:query') @Get('/db/list') async listDbTable(@Query() q: queryDataBaseDto) { return Result.TableData(await this.genService.listDbTable(q)); } @ApiOperation({ summary: '生成代码 返回压缩包' }) @RequirePermission('tool:gen:code') @Get('/batchGenCode') genCode( @Query('tables', ParseArrayPipe) tables: string[], @Res() res: Response, ) { if (!tables.length || tables.some((v) => typeof v != 'string')) { return Result.BadRequest('参数错误!'); } this.genService.genCode(tables, res); } @ApiOperation({ summary: '修改代码生成信息' }) @RequirePermission('tool:gen:edit') @Put() async updateGenTable(@Body() info) { await this.genService.updateGenTable(info); return Result.ok(); } @ApiOperation({ summary: '导入表' }) @RequirePermission('tool:gen:import') @Post('/importTable') async importTable(@Query('tables', ParseArrayPipe) tables: string[]) { await this.genService.importTable(tables); return Result.ok(); } @ApiOperation({ summary: '执行sql' }) @RequireRole('admin') @Post('/excute') async excuteSql(@Body() excute: excuteSqlDto) { try { await this.genService.excute(excute.sql); return Result.ok(null, '执行成功!'); } catch (error) { console.log(error); return Result.BadRequest('sql执行失败:' + error.message); } } @ApiOperation({ summary: '预览生成代码' }) @RequirePermission('tool:gen:preview') @Get('/preview/:tableId') async previewTable(@Param('tableId', ParseIntPipe) tableId: number) { return Result.ok(await this.genService.previewTable(tableId)); } @ApiOperation({ summary: '生成代码(自定义路径)' }) @RequirePermission('tool:gen:code') @Get('/genCode/:tableNames') // 无用接口 // async genCodeByPath(@Param('tableNames', ParseArrayPipe) tableNames: string[]) { } async genCodeByPath() { return Result.ok(); } @ApiOperation({ summary: '同步数据库' }) @RequirePermission('tool:gen:edit') @Get('synchDb/:tableName') async synchDb(@Param('tableName') tableName: string) { await this.genService.synchDb(tableName); return Result.ok('操作成功'); } @ApiOperation({ summary: '查询表详细信息' }) @RequirePermission('tool:gen:edit') @Get('/:id') async getGenTable(@Param('id') id: string) { const info = isNumber(+id) ? await this.genService.getTableInfoById(+id) : await this.genService.getTableInfoByTableName(id); if (!info) return Result.ok(null); const data = { info, rows: info.columns, tables: [info], }; return Result.ok(data); } @ApiOperation({ summary: '删除表数据' }) @RequirePermission('tool:gen:remove') @Delete('/:ids') async delTable(@Param('ids', ParseIntArrayPipe) ids: number[]) { await this.genService.delTable(ids); return Result.ok(); } } ================================================ FILE: server/src/admin/system/auth/auth.controller.ts ================================================ import { Body, Controller, Get, Headers, Post, Req } from '@nestjs/common'; import { LoginBody } from '@/admin/system/auth/dto/LoginBody'; import { AuthService } from '@/common/service/auth/auth.service'; import Result from '@/common/result/Result'; import { ApiBearerAuth, ApiOperation, ApiTags } from '@nestjs/swagger'; import { Constants } from '@/common/constant/Constants'; import { redisUtils } from '@/common/utils/redisUtils'; import { Throttle } from '@nestjs/throttler'; @ApiTags('Auth') @Controller() export class AuthController { constructor(private authService: AuthService) {} @Throttle({ default: { limit: 8, ttl: 1000 * 60 * 60, }, }) @Post('/login') @ApiOperation({ summary: '登录' }) async login(@Body() loginBody: LoginBody, @Req() req) { const token = await this.authService.login(loginBody, req); return { ...Result.ok(), token, }; } @ApiOperation({ summary: '退出登录' }) @Throttle({ default: { limit: 8, ttl: 1000 * 60 * 60, }, }) @Post('/logout') async logout(@Headers('authorization') token: string) { try { await redisUtils.del(Constants.LOGIN_TOKEN_KEY + token.slice(7)); } catch (error) { } finally { return Result.ok(); } } @ApiOperation({ summary: '获取用户信息,包括权限和角色' }) @ApiBearerAuth() @Get('/getInfo') async getInfo(@Req() req) { const user = await this.authService.getUserInfo(req.userId); return { ...Result.ok(), user, roles: user.roles, permissions: user.permissions, }; } @ApiOperation({ summary: '获取用户能访问的路由' }) @ApiBearerAuth() @Get('/getRouters') async getRouters(@Req() req) { return Result.ok(await this.authService.getRouters(req.userId)); } } ================================================ FILE: server/src/admin/system/auth/dto/LoginBody.ts ================================================ import { ApiProperty } from '@nestjs/swagger'; import { IsNotEmpty, IsOptional, IsString, MinLength } from 'class-validator'; export class LoginBody { @ApiProperty({description: '用户名'}) @IsNotEmpty({ message: '用户名不能为空!' }) @MinLength(4, { message: '用户名格式不正确' }) @IsString() username: string; @ApiProperty({description: '密码'}) @IsNotEmpty({ message: '密码不能为空!' }) @MinLength(5, { message: '密码格式不正确' }) @IsString() password: string; @ApiProperty({description: '验证码', required:false}) @IsString() @IsOptional() code?: string; @IsString() @IsOptional() @ApiProperty({description: '验证码uuid', required:false}) uuid?: string; } ================================================ FILE: server/src/admin/system/config/dto/index.ts ================================================ import { BaseDomain } from '@/common/domain/BaseDomain'; import { ApiProperty } from '@nestjs/swagger'; import { Transform } from 'class-transformer'; import { IsNotEmpty, IsNumber, IsString, IsOptional } from 'class-validator'; import { queryDomain } from '@/common/domain/queryDomain'; /**@description 查询参数配置Dto */ export class QuerySysConfigDto extends queryDomain { @ApiProperty({ description: '参数主键',required:false }) @IsOptional() @Transform((v) => +v.value) @IsNumber() configId: number | null; @ApiProperty({ description: '参数名称',required:false }) @IsOptional() configName: string | null; @ApiProperty({ description: '参数键名',required:false }) @IsOptional() configKey: string | null; @ApiProperty({ description: '参数键值',required:false }) @IsOptional() configValue: string | null; @ApiProperty({ description: '系统内置',required:false }) @IsOptional() configType: string | null; @ApiProperty({ description: '创建者',required:false }) @IsOptional() createBy: string | null; @ApiProperty({ description: '更新者',required:false }) @IsOptional() updateBy: string | null; } /**@description 创建参数配置Dto */ export class CreateSysConfigDto extends BaseDomain { @ApiProperty({ description: '参数名称' }) @IsNotEmpty({ message: '参数名称不能为空' }) @IsString() configName: string; @ApiProperty({ description: '参数键名' }) @IsNotEmpty({ message: '参数键名不能为空' }) @IsString() configKey: string; @ApiProperty({ description: '参数键值' }) @IsNotEmpty({ message: '参数键值不能为空' }) @IsString() configValue: string; @ApiProperty({ description: '系统内置',required:false }) @IsOptional() @IsString() configType?: string; @ApiProperty({ description: '创建者',required:false }) @IsOptional() @IsString() createBy?: string; @ApiProperty({ description: '创建时间',required:false }) @IsOptional() @IsString() createTime?: string; @ApiProperty({ description: '更新者',required:false }) @IsOptional() @IsString() updateBy?: string; @ApiProperty({ description: '更新时间',required:false }) @IsOptional() @IsString() updateTime?: string; @ApiProperty({ description: '备注',required:false }) @IsOptional() @IsString() remark?: string; } /**@description 更新参数配置Dto */ export class UpdateSysConfigDto extends BaseDomain { @ApiProperty({ description: '参数主键' }) @IsNotEmpty({ message: '参数主键不能为空' }) @Transform((v) => +v.value) @IsNumber() configId: number; @ApiProperty({ description: '参数名称' }) @IsNotEmpty({ message: '参数名称不能为空' }) @IsString() configName: string; @ApiProperty({ description: '参数键名' }) @IsNotEmpty({ message: '参数键名不能为空' }) @IsString() configKey: string; @ApiProperty({ description: '参数键值' }) @IsNotEmpty({ message: '参数键值不能为空' }) @IsString() configValue: string; @ApiProperty({ description: '系统内置',required:false }) @IsOptional() @IsString() configType?: string; @ApiProperty({ description: '创建者',required:false }) @IsOptional() @IsString() createBy?: string; @ApiProperty({ description: '创建时间',required:false }) @IsOptional() @IsString() createTime?: string; @ApiProperty({ description: '更新者',required:false }) @IsOptional() @IsString() updateBy?: string; @ApiProperty({ description: '更新时间',required:false }) @IsOptional() @IsString() updateTime?: string; @ApiProperty({ description: '备注',required:false }) @IsOptional() @IsString() remark?: string; } ================================================ FILE: server/src/admin/system/config/service/sys-config.service.ts ================================================ import { Injectable } from '@nestjs/common'; import { PrismaService } from '@/common/service/prisma/prisma.service'; import { Response } from 'express'; import { exportTable } from '@/common/utils'; import { QuerySysConfigDto, CreateSysConfigDto, UpdateSysConfigDto, } from '../dto/index'; import { Prisma } from '@prismaClient'; import { isNotEmpty } from 'class-validator'; import { redisUtils } from '@/common/utils/redisUtils'; import { Constants } from '@/common/constant/Constants'; @Injectable() export class ConfigService { constructor(private prisma: PrismaService) { this.initSysConfigData(); } /**@desc 初始化系统配置到redis缓存 */ async initSysConfigData() { const configData = await this.prisma.sysConfig.findMany({ select: { configKey: true, configValue: true, }, }); for (const item of configData) { await redisUtils.set( Constants.SYS_CONFIG_KEY + item.configKey, item.configValue, ); } console.log('系统配置信息初始化完成!'); } /**@description 查询参数配置所有 */ async selectConfigAll() { return this.prisma.sysConfig.findMany(); } /**@description 分页查询参数配置列表 */ async selectConfigList(q: QuerySysConfigDto) { const queryCondition: Prisma.SysConfigWhereInput = {}; if (isNotEmpty(q['configId'])) { queryCondition.configId = { equals: q.configId, }; } if (isNotEmpty(q['configName'])) { queryCondition.configName = { contains: q.configName, }; } if (isNotEmpty(q['configKey'])) { queryCondition.configKey = { contains: q.configKey, }; } if (isNotEmpty(q['configValue'])) { queryCondition.configValue = { equals: q.configValue, }; } if (isNotEmpty(q['configType'])) { queryCondition.configType = { equals: q.configType, }; } if (isNotEmpty(q['createBy'])) { queryCondition.createBy = { equals: q.createBy, }; } if ( isNotEmpty(q.params.beginCreateTime) && isNotEmpty(q.params.endCreateTime) ) { queryCondition.createTime = { lte: q.params.endCreateTime, gte: q.params.beginCreateTime, }; } if (isNotEmpty(q['updateBy'])) { queryCondition.updateBy = { equals: q.updateBy, }; } if ( isNotEmpty(q.params.beginUpdateTime) && isNotEmpty(q.params.endUpdateTime) ) { queryCondition.updateTime = { lte: q.params.endUpdateTime, gte: q.params.beginUpdateTime, }; } return { rows: await this.prisma.sysConfig.findMany({ skip: (q.pageNum - 1) * q.pageSize, take: q.pageSize, where: queryCondition, }), total: await this.prisma.sysConfig.count({ where: queryCondition, }), }; } /**@description 查询参数配置详情 */ async selectConfigByConfigId(configId: number) { return this.prisma.sysConfig.findUnique({ where: { configId, }, }); } /**@description 新增参数配置 */ async addConfig(sysConfig: CreateSysConfigDto) { //删除掉空值 for (const key in sysConfig) { !isNotEmpty(sysConfig[key]) && delete sysConfig[key]; } const d = await this.prisma.sysConfig.create({ data: sysConfig, }); await redisUtils.set( Constants.SYS_CONFIG_KEY + sysConfig.configKey, sysConfig.configValue, ); return d; } /**@description 修改参数配置 */ async updateConfig(sysConfig: UpdateSysConfigDto) { //删除掉空值 for (const key in sysConfig) { !isNotEmpty(sysConfig[key]) && delete sysConfig[key]; } await this.prisma.sysConfig.update({ where: { configId: sysConfig.configId, }, data: sysConfig, }); await redisUtils.set( Constants.SYS_CONFIG_KEY + sysConfig.configKey, sysConfig.configValue, ); return true; } /**@description 批量删除参数配置 */ async deleteConfigByConfigIds(configIds: number[]) { const r = await this.prisma.sysConfig.deleteMany({ where: { configId: { in: configIds, }, }, }); await this.initSysConfigData(); return r; } /**@description 单个删除参数配置 */ async deleteConfigByConfigId(configId: number) { const r = this.prisma.sysConfig.delete({ where: { configId, }, }); await this.initSysConfigData(); return r; } /**@description 导出参数配置所有数据为xlsx */ async exportConfig(res: Response) { const title = [ '参数主键', '参数名称', '参数键名', '参数键值', '系统内置', '创建者', '创建时间', '更新者', '更新时间', '备注', ]; const data = (await this.prisma.sysConfig.findMany()).map((v) => Object.values(v), ); data.unshift(title); exportTable(data, res); } } ================================================ FILE: server/src/admin/system/config/sys-config.controller.ts ================================================ import { Body, Controller, Delete, Get, Logger, Param, ParseIntPipe, Post, Put, Query, Req, Res, } from '@nestjs/common'; import { ParseIntArrayPipe } from '@/common/pipe/parse-int-array.pipe'; import Result from '@/common/result/Result'; import { ApiBearerAuth, ApiBody, ApiOperation, ApiQuery, ApiResponse, ApiTags, } from '@nestjs/swagger'; import { RequirePermission } from '@/common/decorator/require-premission.decorator'; import { nowDateTime, readJsonFile } from '@/common/utils'; import { ConfigService } from './service/sys-config.service'; import { QuerySysConfigDto, CreateSysConfigDto, UpdateSysConfigDto, } from './dto/index'; import { Response } from 'express'; import { SysConfig } from '@prismaClient'; import { TableDataInfo } from '@/common/domain/TableDataInfo'; import { RequireRole } from '@/common/decorator/require-role.decorator'; import { join } from 'path'; import { writeFileSync } from 'fs'; import { Config } from '@/config'; @ApiTags('参数配置') @ApiBearerAuth() @Controller('system/config') export class SysConfigController { constructor(private configService: ConfigService) { } @ApiOperation({ summary: '获取配置文件列表' }) @Get("/getFileKeys") @RequirePermission("system:serverconfig:menu") getConfigFileKeys() { let map = structuredClone(Config.ConfigFileMap) for (let key in map) { delete map[key].filePath } return Result.ok(map); } @ApiOperation({ summary: '根据key获取配置信息' }) @Get("/getConfigInfo") @RequirePermission("system:serverconfig:menu") getConfigInfo(@Query("key") key: string) { if (key && Config.ConfigFileMap[key]) { return Result.ok(readJsonFile(Config.ConfigFileMap[key].filePath)) } else { } } @ApiOperation({ summary: '更新配置信息' }) @Post("serverConfig") @RequirePermission("system:serverconfig:menu") changeServerConfig(@Body() data, @Query("key") key: string) { if (key in Config.ConfigFileMap) { if (typeof data != "string") { data = JSON.stringify(data, null, 2) } try { JSON.parse(data); } catch (error) { Logger.error("修改配置文件异常:", error?.message); return Result.Error("json格式有误!"); } writeFileSync(Config.ConfigFileMap[key].filePath, data); Logger.log("修改配置文件成功:", key); return Result.ok("修改成功!"); } else { return Result.Error("key不存在!"); } } @ApiOperation({ summary: '查询参数配置列表' }) @ApiResponse({ type: TableDataInfo }) @RequirePermission('system:config:query') @Get('/list') async listConfig( @Query() q: QuerySysConfigDto, ): Promise> { return Result.TableData(await this.configService.selectConfigList(q)); } @ApiOperation({ summary: '导出参数配置xlsx文件' }) @RequirePermission('system:config:export') @Get('/export') async export(@Res() res: Response): Promise { return this.configService.exportConfig(res); } @ApiOperation({ summary: '查询参数配置详细' }) @ApiResponse({ type: Result }) @RequirePermission('system:config:query') @Get('/:configId') async getConfig( @Param('configId', ParseIntPipe) configId: number, ): Promise> { return Result.ok(await this.configService.selectConfigByConfigId(configId)); } @ApiOperation({ summary: '新增参数配置' }) @ApiResponse({ type: Result }) @ApiBody({ type: CreateSysConfigDto }) @RequirePermission('system:config:add') @Post('/') async addConfig( @Body() sysConfig: CreateSysConfigDto, @Req() req, ): Promise> { sysConfig = { ...sysConfig, createTime: nowDateTime(), updateTime: nowDateTime(), createBy: req.user?.userName, updateBy: req.user?.userName, }; return Result.ok(await this.configService.addConfig(sysConfig)); } @ApiOperation({ summary: '修改参数配置' }) @ApiResponse({ type: Result }) @ApiBody({ type: UpdateSysConfigDto }) @RequirePermission('system:config:edit') @Put('/') async updateConfig( @Body() sysConfig: UpdateSysConfigDto, @Req() req, ): Promise> { sysConfig = { ...sysConfig, updateTime: nowDateTime(), updateBy: req.user?.userName, }; await this.configService.updateConfig(sysConfig); return Result.ok('修改成功!'); } @ApiOperation({ summary: '删除参数配置' }) @ApiResponse({ type: Result }) @RequirePermission('system:config:remove') @Delete('/:ids') async delConfig( @Param('ids', ParseIntArrayPipe) configIds: number[], ): Promise> { const { count } = await this.configService.deleteConfigByConfigIds(configIds); return Result.toAjax(count); } } ================================================ FILE: server/src/admin/system/dept/dto/index.ts ================================================ import { BaseDomain } from '@/common/domain/BaseDomain'; import { ApiProperty } from '@nestjs/swagger'; import { Transform } from 'class-transformer'; import { IsNotEmpty, IsNumber, IsString, IsOptional } from 'class-validator'; import { queryDomain } from '@/common/domain/queryDomain'; /**@description 查询部门管理Dto */ export class QuerySysDeptDto extends queryDomain { @ApiProperty({ description: '部门id',required:false }) @IsOptional() @Transform((v) => +v.value) @IsNumber() deptId: number | null; @ApiProperty({ description: '父部门',required:false }) @IsOptional() @Transform((v) => +v.value) @IsNumber() parentId: number | null; @ApiProperty({ description: '祖级列表',required:false }) @IsOptional() ancestors: string | null; @ApiProperty({ description: '部门名称',required:false }) @IsOptional() deptName: string | null; @ApiProperty({ description: '显示顺序',required:false }) @IsOptional() @Transform((v) => +v.value) @IsNumber() orderNum: number | null; @ApiProperty({ description: '负责人',required:false }) @IsOptional() leader: string | null; @ApiProperty({ description: '联系电话',required:false }) @IsOptional() phone: string | null; @ApiProperty({ description: '邮箱',required:false }) @IsOptional() email: string | null; @ApiProperty({ description: '部门状态(0停用,1正常)',required:false }) @IsOptional() status: string | null; @ApiProperty({ description: '创建者',required:false }) @IsOptional() createBy: string | null; @ApiProperty({ description: '更新者',required:false }) @IsOptional() updateBy: string | null; } /**@description 创建部门管理Dto */ export class CreateSysDeptDto extends BaseDomain { @ApiProperty({ description: '父部门' }) @IsNotEmpty({ message: '父部门不能为空' }) @Transform((v) => +v.value) @IsNumber() parentId: number; @ApiProperty({ description: '祖级列表',required:false }) @IsOptional() @IsString() ancestors?: string; @ApiProperty({ description: '部门名称' }) @IsNotEmpty({ message: '部门名称不能为空' }) @IsString() deptName: string; @ApiProperty({ description: '显示顺序' }) @IsNotEmpty({ message: '显示顺序不能为空' }) @Transform((v) => +v.value) @IsNumber() orderNum: number; @ApiProperty({ description: '负责人',required:false }) @IsOptional() @IsString() leader?: string; @ApiProperty({ description: '联系电话',required:false }) @IsOptional() @IsString() phone?: string; @ApiProperty({ description: '邮箱',required:false }) @IsOptional() @IsString() email?: string; @ApiProperty({ description: '部门状态(0停用,1正常)',required:false }) @IsOptional() @IsString() status?: string; @ApiProperty({ description: '创建者',required:false }) @IsOptional() @IsString() createBy?: string; @ApiProperty({ description: '创建时间',required:false }) @IsOptional() @IsString() createTime?: string; @ApiProperty({ description: '更新者',required:false }) @IsOptional() @IsString() updateBy?: string; @ApiProperty({ description: '更新时间',required:false }) @IsOptional() @IsString() updateTime?: string; } /**@description 更新部门管理Dto */ export class UpdateSysDeptDto extends BaseDomain { @ApiProperty({ description: '部门id' }) @IsNotEmpty({ message: '部门id不能为空' }) @Transform((v) => +v.value) @IsNumber() deptId: number; @ApiProperty({ description: '祖级列表',required:false }) @IsOptional() @IsString() ancestors?: string; @ApiProperty({ description: '部门名称' }) @IsNotEmpty({ message: '部门名称不能为空' }) @IsString() deptName: string; @ApiProperty({ description: '显示顺序' }) @IsNotEmpty({ message: '显示顺序不能为空' }) @Transform((v) => +v.value) @IsNumber() orderNum: number; @ApiProperty({ description: '负责人',required:false }) @IsOptional() @IsString() leader?: string; @ApiProperty({ description: '联系电话',required:false }) @IsOptional() @IsString() phone?: string; @ApiProperty({ description: '邮箱',required:false }) @IsOptional() @IsString() email?: string; @ApiProperty({ description: '部门状态(0停用,1正常)',required:false }) @IsOptional() @IsString() status?: string; @ApiProperty({ description: '创建者',required:false }) @IsOptional() @IsString() createBy?: string; @ApiProperty({ description: '创建时间',required:false }) @IsOptional() @IsString() createTime?: string; @ApiProperty({ description: '更新者',required:false }) @IsOptional() @IsString() updateBy?: string; @ApiProperty({ description: '更新时间',required:false }) @IsOptional() @IsString() updateTime?: string; } ================================================ FILE: server/src/admin/system/dept/service/sys-dept.service.ts ================================================ import { Injectable } from '@nestjs/common'; import { PrismaService } from '@/common/service/prisma/prisma.service'; import { Response } from 'express'; import { exportTable, tree } from '@/common/utils'; import { QuerySysDeptDto, CreateSysDeptDto, UpdateSysDeptDto, } from '../dto/index'; import { Prisma } from '@prismaClient'; import { isNotEmpty } from 'class-validator'; import * as assert from 'assert'; @Injectable() export class DeptService { constructor(private prisma: PrismaService) {} /**@description 分页查询部门管理列表 */ async selectDeptList(q: QuerySysDeptDto) { const queryCondition: Prisma.SysDeptWhereInput = {}; if (isNotEmpty(q['deptId'])) { queryCondition.deptId = { equals: q.deptId, }; } if (isNotEmpty(q['parentId'])) { queryCondition.parentId = { equals: q.parentId, }; } if (isNotEmpty(q['ancestors'])) { queryCondition.ancestors = { equals: q.ancestors, }; } if (isNotEmpty(q['deptName'])) { queryCondition.deptName = { contains: q.deptName, }; } if (isNotEmpty(q['orderNum'])) { queryCondition.orderNum = { equals: q.orderNum, }; } if (isNotEmpty(q['leader'])) { queryCondition.leader = { equals: q.leader, }; } if (isNotEmpty(q['phone'])) { queryCondition.phone = { equals: q.phone, }; } if (isNotEmpty(q['email'])) { queryCondition.email = { equals: q.email, }; } if (isNotEmpty(q['status'])) { queryCondition.status = { equals: q.status, }; } if (isNotEmpty(q['createBy'])) { queryCondition.createBy = { equals: q.createBy, }; } if ( isNotEmpty(q.params.beginCreateTime) && isNotEmpty(q.params.endCreateTime) ) { queryCondition.createTime = { lte: q.params.endCreateTime, gte: q.params.beginCreateTime, }; } if (isNotEmpty(q['updateBy'])) { queryCondition.updateBy = { equals: q.updateBy, }; } if ( isNotEmpty(q.params.beginUpdateTime) && isNotEmpty(q.params.endUpdateTime) ) { queryCondition.updateTime = { lte: q.params.endUpdateTime, gte: q.params.beginUpdateTime, }; } return await this.prisma.sysDept.findMany({ where: queryCondition, }); } /**@description 分页查询部门管理列表 */ async listDeptExcludeChild(deptId: number) { return this.prisma.sysDept.findMany({ where: { deptId: { not: deptId, }, }, orderBy: { orderNum: 'asc', }, }); } /**@description 查询部门管理详情 */ async selectDeptByDeptId(deptId: number) { return this.prisma.sysDept.findUnique({ where: { deptId, }, }); } /**@description 新增部门管理 */ async addDept(sysDept: CreateSysDeptDto) { //删除掉空值 for (const key in sysDept) { !isNotEmpty(sysDept[key]) && delete sysDept[key]; } return await this.prisma.sysDept.create({ data: sysDept, }); } /**@description 修改部门管理 */ async updateDept(sysDept: UpdateSysDeptDto) { //删除掉空值 for (const key in sysDept) { !isNotEmpty(sysDept[key]) && delete sysDept[key]; } return await this.prisma.sysDept.update({ where: { deptId: sysDept.deptId, }, data: sysDept, }); } /**@description 批量删除部门管理 */ async deleteDeptByDeptIds(deptIds: number[]) { const dept = await this.prisma.sysDept.findFirst({ where: { parentId: { in: deptIds, }, }, }); assert(!dept, '存在子部门,不允许删除!'); const dept1 = await this.prisma.sysRoleDept.findFirst({ where: { deptId: { in: deptIds } }, }); assert(!dept1, '部门已分配,不允许删除!'); const dept2 = await this.prisma.sysUser.findFirst({ where: { deptId: { in: deptIds } }, }); assert(!dept2, '部门已分配,不允许删除!'); return this.prisma.sysDept.deleteMany({ where: { deptId: { in: deptIds, }, }, }); } /**@description 单个删除部门管理 */ async deleteDeptByDeptId(deptId: number) { const dept = await this.prisma.sysDept.findFirst({ where: { parentId: deptId, }, }); assert(!dept, '存在子部门,不允许删除!'); const dept1 = await this.prisma.sysRoleDept.findFirst({ where: { deptId }, }); assert(!dept1, '部门已分配,不允许删除!'); const dept2 = await this.prisma.sysUser.findFirst({ where: { deptId } }); assert(!dept2, '部门已分配,不允许删除!'); return this.prisma.sysDept.deleteMany({ where: { deptId, }, }); } /**@description 导出部门管理所有数据为xlsx */ async exportDept(res: Response) { const title = [ '部门id', '父部门', '祖级列表', '部门名称', '显示顺序', '负责人', '联系电话', '邮箱', '部门状态(0停用,1正常)', '删除标志(0删除,1存在 )', '创建者', '创建时间', '更新者', '更新时间', ]; const data = (await this.prisma.sysDept.findMany()).map((v) => Object.values(v), ); data.unshift(title); exportTable(data, res); } async getDeptTree() { return tree( (await this.prisma.sysDept.findMany()).map((v) => ({ id: v.deptId, pid: v.parentId, label: v.deptName, })), ); } } ================================================ FILE: server/src/admin/system/dept/sys-dept.controller.ts ================================================ import { Body, Controller, Delete, Get, Param, ParseIntPipe, Post, Put, Query, Req, Res, } from '@nestjs/common'; import { ParseIntArrayPipe } from '@/common/pipe/parse-int-array.pipe'; import Result from '@/common/result/Result'; import { ApiBearerAuth, ApiBody, ApiOperation, ApiQuery, ApiResponse, ApiTags, } from '@nestjs/swagger'; import { RequirePermission } from '@/common/decorator/require-premission.decorator'; import { nowDateTime } from '@/common/utils'; import { DeptService } from './service/sys-dept.service'; import { QuerySysDeptDto, CreateSysDeptDto, UpdateSysDeptDto, } from './dto/index'; import { Response } from 'express'; import { SysDept } from '@prismaClient'; @ApiBearerAuth() @ApiTags('部门管理') @Controller('system/dept') export class SysDeptController { constructor(private deptService: DeptService) {} @ApiOperation({ summary: '查询部门管理列表' }) @ApiResponse({ type: Result }) @RequirePermission('system:dept:query') @Get('/list') async listDept(@Query() q: QuerySysDeptDto): Promise> { return Result.ok(await this.deptService.selectDeptList(q)); } @ApiOperation({ summary: '查询部门列表(排除节点)' }) @ApiResponse({ type: Result }) @RequirePermission('system:dept:query') @Get('list/exclude/:deptId') async listDeptExcludeChild( @Param('deptId', ParseIntPipe) deptId: number, ): Promise> { return Result.ok(await this.deptService.listDeptExcludeChild(deptId)); } @ApiOperation({ summary: '导出部门管理xlsx文件' }) @RequirePermission('system:dept:export') @Get('/export') async export(@Res() res: Response): Promise { return this.deptService.exportDept(res); } @ApiOperation({ summary: '查询部门管理详细' }) @ApiResponse({ type: Result }) @RequirePermission('system:dept:query') @Get('/:deptId') async getDept( @Param('deptId', ParseIntPipe) deptId: number, ): Promise> { return Result.ok(await this.deptService.selectDeptByDeptId(deptId)); } @ApiOperation({ summary: '新增部门管理' }) @ApiResponse({ type: Result }) @ApiBody({ type: CreateSysDeptDto }) @RequirePermission('system:dept:add') @Post('/') async addDept( @Body() sysDept: CreateSysDeptDto, @Req() req, ): Promise> { sysDept = { ...sysDept, createTime: nowDateTime(), updateTime: nowDateTime(), createBy: req.user?.userName, updateBy: req.user?.userName, }; return Result.ok(await this.deptService.addDept(sysDept)); } @ApiOperation({ summary: '修改部门管理' }) @ApiResponse({ type: Result }) @ApiBody({ type: UpdateSysDeptDto }) @RequirePermission('system:dept:edit') @Put('/') async updateDept( @Body() sysDept: UpdateSysDeptDto, @Req() req, ): Promise> { sysDept = { ...sysDept, updateTime: nowDateTime(), updateBy: req.user?.userName, }; await this.deptService.updateDept(sysDept); return Result.ok('修改成功!'); } @ApiOperation({ summary: '删除部门管理' }) @ApiResponse({ type: Result }) @RequirePermission('system:dept:remove') @Delete('/:ids') async delDept( @Param('ids', ParseIntArrayPipe) deptIds: number[], ): Promise> { const { count } = await this.deptService.deleteDeptByDeptIds(deptIds); return Result.toAjax(count); } } ================================================ FILE: server/src/admin/system/dict-data/dict-data.controller.ts ================================================ import { ParseIntArrayPipe } from '@/common/pipe/parse-int-array.pipe'; import { Controller, Get, Post, Put, Delete, Query, Body, Param, ParseIntPipe, Inject, Req, Res, } from '@nestjs/common'; import { ApiBearerAuth, ApiOperation, ApiTags } from '@nestjs/swagger'; import { queryDictDataDto } from './dto/queryDictDataDto'; import { SysDictDataService } from './service/sys-dict-data.service'; import Result from '@/common/result/Result'; import { CreateDictDataDto } from './dto/createDictDataDto'; import { nowDateTime } from '@/common/utils'; import { updateDictDataDto } from './dto/updateDictDataDto'; import { Response } from 'express'; @ApiTags('字典数据') @ApiBearerAuth() @Controller('/system/dict/data') export class DictDataController { @Inject() dictDataService: SysDictDataService; @ApiOperation({ summary: '查询字典数据列表' }) @Get('list') async listData(@Query() q: queryDictDataDto) { return Result.TableData(await this.dictDataService.selectDictDataList(q)); } @ApiOperation({ summary: '导出xlsx文件' }) @Get('export') async export(@Res() res: Response) { this.dictDataService.exportDictData(res); } @Get('/type/:type') @ApiOperation({ summary: '根据字典类型查询字典数据信息' }) async getDicts(@Param('type') type: string) { if (!type) return Result.Validation('请传入字典类型'); return Result.ok( (await this.dictDataService.selectDictDataByDictType(type)) || [], ); } @Get(':id') @ApiOperation({ summary: '查询字典数据详细' }) async getData(@Param('id', ParseIntPipe) id: number) { return Result.ok(await this.dictDataService.selectDictDataDetail(id)); } @ApiOperation({ summary: '新增字典数据' }) @Post() async addData(@Body() dictData: CreateDictDataDto, @Req() req) { dictData.createTime = nowDateTime(); dictData.updateTime = nowDateTime(); dictData.createBy = req.user.userName; dictData.updateBy = req.user.userName; await this.dictDataService.addDictData(dictData); return Result.ok('新增成功!'); } @ApiOperation({ summary: '修改字典数据' }) @Put() async updateData(@Body() dictData: updateDictDataDto, @Req() req) { dictData.updateTime = nowDateTime(); dictData.updateBy = req.user.userName; await this.dictDataService.updateDictData(dictData); return Result.ok('修改成功!'); } @ApiOperation({ summary: '删除字典数据' }) @Delete(':dictCodes') async delData(@Param('dictCodes', ParseIntArrayPipe) dictCodes: number[]) { const { count } = await this.dictDataService.deleteDictData(dictCodes); return Result.toAjax(count); } } ================================================ FILE: server/src/admin/system/dict-data/dto/createDictDataDto.ts ================================================ import { BaseDomain } from '@/common/domain/BaseDomain'; import { ApiProperty } from '@nestjs/swagger'; import { Transform } from 'class-transformer'; import { IsNotEmpty, IsNumber, IsOptional, IsString } from 'class-validator'; export class CreateDictDataDto extends BaseDomain { @ApiProperty({ description: '字典类型' }) @IsNotEmpty({ message: '字典类型不能为空' }) @IsString() dictType: string; @ApiProperty({ description: '数据标签' }) @IsNotEmpty({ message: '数据标签不能为空' }) @IsString() dictLabel: string; @ApiProperty({ description: '数据键值' }) @IsNotEmpty({ message: '数据键值不能为空' }) @IsString() dictValue?: string; @ApiProperty({ description: '样式属性',required:false }) @IsOptional() cssClass?: string; @ApiProperty({ description: '回显样式',required:false }) @IsOptional() listClass?: string; @ApiProperty({ description: '显示排序' }) @IsNotEmpty({ message: '排序值不能为空' }) @Transform((v) => +v.value) @IsNumber() dictSort: number; @ApiProperty({ description: '字典状态(0停用,1正常)',required:false }) @IsOptional() status?: string = '1'; } ================================================ FILE: server/src/admin/system/dict-data/dto/queryDictDataDto.ts ================================================ import { queryDomain } from '@/common/domain/queryDomain'; import { ApiProperty } from '@nestjs/swagger'; import { IsOptional, IsString } from 'class-validator'; export class queryDictDataDto extends queryDomain { @ApiProperty({ description: '字典标签',required:false }) @IsString() @IsOptional() dictLabel?: string | null; @ApiProperty({ description: '字典名称',required:false }) @IsString() @IsOptional() dictType?: string | null; @ApiProperty({ description: '数据状态',required:false }) @IsString() @IsOptional() status?: string | null; } ================================================ FILE: server/src/admin/system/dict-data/dto/updateDictDataDto.ts ================================================ import { BaseDomain } from '@/common/domain/BaseDomain'; import { ApiProperty } from '@nestjs/swagger'; import { Transform } from 'class-transformer'; import { IsNotEmpty, IsNumber, IsOptional, IsString } from 'class-validator'; export class updateDictDataDto extends BaseDomain { @IsNotEmpty({ message: '字典数据id不能为空!' }) @Transform((v) => +v.value) @IsNumber() dictCode: number; @ApiProperty({ description: '字典类型' }) @IsNotEmpty({ message: '字典类型不能为空' }) @IsString() dictType: string; @ApiProperty({ description: '数据标签' }) @IsNotEmpty({ message: '数据标签不能为空' }) @IsString() dictLabel: string; @ApiProperty({ description: '数据键值' }) @IsNotEmpty({ message: '数据键值不能为空' }) @IsString() dictValue?: string; @ApiProperty({ description: '样式属性',required:false }) @IsOptional() cssClass?: string; @ApiProperty({ description: '回显样式',required:false }) @IsOptional() listClass?: string; @ApiProperty({ description: '显示排序' }) @IsNotEmpty({ message: '排序值不能为空' }) @Transform((v) => +v.value) @IsNumber() dictSort: number; @ApiProperty({ description: '字典状态(0停用,1正常)',required:false }) @IsOptional() status?: string = '1'; } ================================================ FILE: server/src/admin/system/dict-data/service/sys-dict-data.service.ts ================================================ import { Injectable, OnModuleInit } from '@nestjs/common'; import { PrismaService } from '@/common/service/prisma/prisma.service'; import { groupBy } from 'lodash'; import { redisUtils } from '@/common/utils/redisUtils'; import { Constants } from '@/common/constant/Constants'; import { queryDictDataDto } from '@/admin/system/dict-data/dto/queryDictDataDto'; import { Prisma } from '@prismaClient'; import { isNotEmpty } from 'class-validator'; import { CreateDictDataDto } from '@/admin/system/dict-data/dto/createDictDataDto'; import { updateDictDataDto } from '@/admin/system/dict-data/dto/updateDictDataDto'; import { exportTable } from '@/common/utils'; import { Response } from 'express'; @Injectable() export class SysDictDataService implements OnModuleInit { constructor(private prisma: PrismaService) {} onModuleInit() { this.initSysDictData(); } //初始化字典数据 async initSysDictData() { const dictData = groupBy( await this.prisma.sysDictData.findMany(), 'dictType', ); for (const dictKey in dictData) { await redisUtils.set( Constants.SYS_DICT_KEY + dictKey, JSON.stringify(dictData[dictKey], null, 2), ); } console.log('字典信息初始化完毕!'); } //根据字典类型更新redis字典数据 async updateCache(dictType: string) { const dictDatas = await this.prisma.sysDictData.findMany({ where: { dictType, }, }); return await redisUtils.set( Constants.SYS_DICT_KEY + dictType, JSON.stringify(dictDatas, null, 2), ); } //查询字典数据列表 async selectDictDataList(q: queryDictDataDto) { const queryCondition: Prisma.SysDictDataWhereInput = {}; if (isNotEmpty(q.dictType)) { queryCondition.dictType = { equals: q.dictType, }; } if (isNotEmpty(q.dictLabel)) { queryCondition.dictLabel = { contains: q.dictLabel, }; } if (isNotEmpty(q.status)) { queryCondition.status = { equals: q.status, }; } return { rows: await this.prisma.sysDictData.findMany({ skip: (q.pageNum - 1) * q.pageSize, take: q.pageSize, where: queryCondition, orderBy: { dictSort: 'asc', }, }), total: await this.prisma.sysDictData.count({ where: queryCondition, }), }; } //查询所有数据 async selectAllDictData() { return await this.prisma.sysDictData.findMany(); } //查询字典数据详细 async selectDictDataDetail(dictCode: number) { return this.prisma.sysDictData.findUnique({ where: { dictCode: dictCode, }, }); } //根据字典类型查询字典数据信息 async selectDictDataByDictType(dictType: string) { return JSON.parse( (await redisUtils.get(Constants.SYS_DICT_KEY + dictType)) || null, ); } //新增字典数据 async addDictData(dictData: CreateDictDataDto) { const res = await this.prisma.sysDictData.create({ data: dictData, }); await this.updateCache(dictData.dictType); return res; } //修改字典数据 async updateDictData(dictData: updateDictDataDto) { const res = await this.prisma.sysDictData.update({ where: { dictCode: dictData.dictCode, }, data: dictData, }); await this.updateCache(dictData.dictType); return res; } //删除字典数据 async deleteDictData(dictCodes: number[]) { const dictType = ( await this.prisma.sysDictData.findFirst({ select: { dictType: true, }, where: { dictCode: dictCodes[0], }, }) ).dictType; const res = await this.prisma.sysDictData.deleteMany({ where: { dictCode: { in: dictCodes, }, }, }); await this.updateCache(dictType); return res; } //导出xlsx文件 async exportDictData(res: Response) { const title = [ '字典编码', '字典排序', '字典标签', '字典键值', '字典类型', '样式属性', '表格回显样式', '是否默认', '状态', '创建者', '创建时间', '更新者', '更新时间', '备注', ]; const data = (await this.prisma.sysDictData.findMany()).map((v) => Object.values(v), ); data.unshift(title); exportTable(data, res); } } ================================================ FILE: server/src/admin/system/dict-type/dict-type.controller.ts ================================================ import { ParseIntArrayPipe } from '@/common/pipe/parse-int-array.pipe'; import { Controller, Get, Req, Post, Put, Delete, Query, Body, Param, ParseIntPipe, Inject, Res, } from '@nestjs/common'; import { ApiBearerAuth, ApiOperation, ApiTags } from '@nestjs/swagger'; import { queryDictTypeDto } from './dto/queryDictTypeDto'; import Result from '@/common/result/Result'; import { SysDictTypeService } from './service/sys-dict-type.service'; import { CreateDictTypeDto } from './dto/createDictTypeDto'; import { updateDictTypeDto } from './dto/updateDictTypeDto'; import { nowDateTime } from '@/common/utils'; import { RequirePermission } from '@/common/decorator/require-premission.decorator'; import { Response } from 'express'; @ApiTags('字典类型') @ApiBearerAuth() @Controller('/system/dict/type') export class DictTypeController { @Inject() private readonly dictTypeService: SysDictTypeService; @ApiOperation({ summary: '查询字典类型列表' }) @RequirePermission('system:dict:query') @Get('list') async listType(@Query() q: queryDictTypeDto) { return Result.TableData(await this.dictTypeService.selectDictTypeList(q)); } @ApiOperation({ summary: '获取字典选择框列表' }) @Get('optionselect') async optionselect() { return Result.ok(await this.dictTypeService.selectAllDictType()); } @ApiOperation({ summary: '导出xlsx文件' }) @Get('export') async export(@Res() res: Response) { this.dictTypeService.exportDictType(res); } @Get(':id') @ApiOperation({ summary: '查询字典类型详细' }) async getType(@Param('id', ParseIntPipe) id: number) { return Result.ok(await this.dictTypeService.selectDictTypeDetail(id)); } @ApiOperation({ summary: '新增字典类型' }) @Post() async addType(@Body() dictType: CreateDictTypeDto, @Req() req) { dictType = { ...dictType, createTime: nowDateTime(), updateTime: nowDateTime(), createBy: req.user?.userName, updateBy: req.user?.userName, }; await this.dictTypeService.addDictType(dictType); return Result.ok('新增成功!'); } @ApiOperation({ summary: '修改字典类型' }) @Put() async updateType(@Body() dictType: updateDictTypeDto, @Req() req) { dictType = { ...dictType, updateTime: nowDateTime(), updateBy: req.user?.userName, }; await this.dictTypeService.updateDictType(dictType); // 更新后刷新缓存 await this.dictTypeService.refreshDictCache(); return Result.ok('修改成功!'); } @ApiOperation({ summary: '刷新字典缓存' }) @Delete('refreshCache') async refreshCache() { await this.dictTypeService.refreshDictCache(); return Result.ok(); } @ApiOperation({ summary: '删除字典类型' }) @Delete('/:ids') async delType(@Param('ids', ParseIntArrayPipe) ids: number[]) { const { count } = await this.dictTypeService.deleteDictType(ids); return Result.toAjax(count); } } ================================================ FILE: server/src/admin/system/dict-type/dto/createDictTypeDto.ts ================================================ import { BaseDomain } from '@/common/domain/BaseDomain'; import { ApiProperty } from '@nestjs/swagger'; import { IsNotEmpty, IsOptional, IsString } from 'class-validator'; export class CreateDictTypeDto extends BaseDomain { @ApiProperty({ description: '字典名称' }) @IsNotEmpty({ message: '字典名称不能为空' }) @IsString() dictName: string; @ApiProperty({ description: '字典类型' }) @IsNotEmpty({ message: '字典类型不能为空' }) @IsString() dictType: string; @ApiProperty({ description: '字典状态(0停用,1正常)',required:false }) @IsOptional() status?: string = '1'; } ================================================ FILE: server/src/admin/system/dict-type/dto/queryDictTypeDto.ts ================================================ import { queryDomain } from '@/common/domain/queryDomain'; import { ApiProperty } from '@nestjs/swagger'; import { IsOptional, IsString } from 'class-validator'; export class queryDictTypeDto extends queryDomain { @ApiProperty({ description: '字典名称',required:false }) @IsString() @IsOptional() dictName?: string | null; @ApiProperty({ description: '字典类型',required:false }) @IsString() @IsOptional() dictType?: string | null; @ApiProperty({ description: '字典状态',required:false }) @IsString() @IsOptional() status?: string | null; @ApiProperty({ description: '附加参数',required:false }) @IsOptional() params: { beginTime: string | null; endTime: string | null; }; } ================================================ FILE: server/src/admin/system/dict-type/dto/updateDictTypeDto.ts ================================================ import { BaseDomain } from '@/common/domain/BaseDomain'; import { ApiProperty } from '@nestjs/swagger'; import { IsNotEmpty, IsNumber, IsOptional, IsString } from 'class-validator'; export class updateDictTypeDto extends BaseDomain { @ApiProperty({ description: '字典Id' }) @IsNotEmpty({ message: '字典Id不能为空' }) @IsNumber() dictId: number; @ApiProperty({ description: '字典名称' }) @IsNotEmpty({ message: '字典名称不能为空' }) @IsString() dictName: string; @ApiProperty({ description: '字典类型' }) @IsNotEmpty({ message: '字典类型不能为空' }) @IsString() dictType: string; @ApiProperty({ description: '字典状态(0停用,1正常)',required:false }) @IsOptional() status?: string = '1'; } ================================================ FILE: server/src/admin/system/dict-type/service/sys-dict-type.service.ts ================================================ import { Injectable } from '@nestjs/common'; import { PrismaService } from '@/common/service/prisma/prisma.service'; import { queryDictTypeDto } from '@/admin/system/dict-type/dto/queryDictTypeDto'; import { Prisma } from '@prismaClient'; import { isNotEmpty } from 'class-validator'; import { CreateDictTypeDto } from '@/admin/system/dict-type/dto/createDictTypeDto'; import { updateDictTypeDto } from '@/admin/system/dict-type/dto/updateDictTypeDto'; import { SysDictDataService } from '../../dict-data/service/sys-dict-data.service'; import { ValidationException } from '@/common/exception/ValidationException'; import { Response } from 'express'; import { exportTable } from '@/common/utils'; import { redisUtils } from '@/common/utils/redisUtils'; import { Constants } from '@/common/constant/Constants'; @Injectable() export class SysDictTypeService { constructor( private prisma: PrismaService, private dictDataService: SysDictDataService, ) {} //查询字典类型列表 async selectDictTypeList(q: queryDictTypeDto) { const queryCondition: Prisma.SysDictTypeWhereInput = {}; if (isNotEmpty(q.dictType)) { queryCondition.dictType = { contains: q.dictType, }; } if (isNotEmpty(q.dictName)) { queryCondition.dictName = { contains: q.dictName, }; } if (isNotEmpty(q.status)) { queryCondition.status = { equals: q.status, }; } if (isNotEmpty(q.params?.beginTime) && isNotEmpty(q.params?.endTime)) { queryCondition.createTime = { gte: q.params.beginTime, lte: q.params.endTime, }; } return { rows: await this.prisma.sysDictType.findMany({ skip: (q.pageNum - 1) * q.pageSize, take: q.pageSize, where: queryCondition, }), total: await this.prisma.sysDictType.count({ where: queryCondition, }), }; } //查询所有数据 async selectAllDictType() { return this.prisma.sysDictType.findMany(); } //查询字典类型详细 async selectDictTypeDetail(dictId: number) { return await this.prisma.sysDictType.findUnique({ where: { dictId, }, }); } //新增字典类型 async addDictType(dictType: CreateDictTypeDto) { const res = await this.prisma.sysDictType.create({ data: dictType, }); await redisUtils.set( Constants.SYS_DICT_KEY + dictType.dictType, JSON.stringify([], null, 2), ); return res; } //修改字典类型 async updateDictType(dictType: updateDictTypeDto) { const old = await this.prisma.sysDictType.findUnique({ where: { dictId: dictType.dictId, }, include: { dictDatas: true, }, }); if (!old) return { count: 0 }; return this.prisma.$transaction(async (db) => { //如果修改了dictType我们需要同步修改dictDatas中的dictType if (old.dictType !== dictType.dictType) { await db.sysDictData.updateMany({ where: { dictType: old.dictType, }, data: { dictType: dictType.dictType, }, }); } const res = await db.sysDictType.update({ where: { dictId: dictType.dictId, }, data: dictType, }); await this.dictDataService.updateCache(dictType.dictType); return res; }); } //删除字典类型 async deleteDictType(dictIds: number[]) { const dictTypes = new Set(); for (const id of dictIds) { const r = await this.prisma.sysDictType.findUnique({ where: { dictId: id, }, include: { dictDatas: true, }, }); //如果当前字典类型里面存有子数据,不能删除 if (r?.dictDatas?.length) { throw new ValidationException('当前字典类型下有子数据,不能删除'); } dictTypes.add(Constants.SYS_DICT_KEY + r.dictType); } const res = await this.prisma.sysDictType.deleteMany({ where: { dictId: { in: dictIds, }, }, }); for (const k of dictTypes) { await redisUtils.del(k); } return res; } //刷新字典缓存 async refreshDictCache() { return await this.dictDataService.initSysDictData(); } //导出字典类型为xlsx async exportDictType(res: Response) { const title = [ '字典主键', '字典名称', '字典类型', '状态', '创建者', '创建时间', '更新者', '更新时间', '备注', ]; const data = (await this.prisma.sysDictType.findMany()).map((v) => Object.values(v), ); data.unshift(title); exportTable(data, res); } } ================================================ FILE: server/src/admin/system/logininfor/dto/index.ts ================================================ import { ApiProperty } from '@nestjs/swagger'; import { Transform } from 'class-transformer'; import { IsNotEmpty, IsNumber, IsString, IsOptional } from 'class-validator'; import { queryDomain } from '@/common/domain/queryDomain'; /**@description 查询登录日志Dto */ export class QuerySysLogininforDto extends queryDomain { @ApiProperty({ description: '用户账号',required:false }) @IsOptional() userName: string | null; @ApiProperty({ description: '登录IP地址',required:false }) @IsOptional() ipaddr: string | null; @ApiProperty({ description: '登录地点',required:false }) @IsOptional() loginLocation: string | null; @ApiProperty({ description: '浏览器类型',required:false }) @IsOptional() browser: string | null; @ApiProperty({ description: '操作系统',required:false }) @IsOptional() os: string | null; @ApiProperty({ description: '登录状态(0失败,1成功)',required:false }) @IsOptional() status: string | null; @ApiProperty({ description: '提示消息',required:false }) @IsOptional() msg: string | null; @ApiProperty({ description: '登录时间排序 descending|ascending',required:false }) @IsOptional() isAsc: string | null; } /**@description 创建登录日志Dto */ export class CreateSysLogininforDto { @ApiProperty({ description: '用户账号',required:false }) @IsOptional() @IsString() userName?: string; @ApiProperty({ description: '登录IP地址',required:false }) @IsOptional() @IsString() ipaddr?: string; @ApiProperty({ description: '登录地点',required:false }) @IsOptional() @IsString() loginLocation?: string; @ApiProperty({ description: '浏览器类型',required:false }) @IsOptional() @IsString() browser?: string; @ApiProperty({ description: '操作系统',required:false }) @IsOptional() @IsString() os?: string; @ApiProperty({ description: '登录状态(0失败,1成功)',required:false }) @IsOptional() @IsString() status?: string; @ApiProperty({ description: '提示消息',required:false }) @IsOptional() @IsString() msg?: string; @ApiProperty({ description: '访问时间',required:false }) @IsOptional() @IsString() loginTime?: string; } /**@description 更新登录日志Dto */ export class UpdateSysLogininforDto { @ApiProperty({ description: '访问ID' }) @IsNotEmpty({ message: '访问ID不能为空' }) @Transform((v) => +v.value) @IsNumber() infoId: number; @ApiProperty({ description: '用户账号',required:false }) @IsOptional() @IsString() userName?: string; @ApiProperty({ description: '登录IP地址',required:false }) @IsOptional() @IsString() ipaddr?: string; @ApiProperty({ description: '登录地点',required:false }) @IsOptional() @IsString() loginLocation?: string; @ApiProperty({ description: '浏览器类型',required:false }) @IsOptional() @IsString() browser?: string; @ApiProperty({ description: '操作系统',required:false }) @IsOptional() @IsString() os?: string; @ApiProperty({ description: '登录状态(0失败,1成功)',required:false }) @IsOptional() @IsString() status?: string; @ApiProperty({ description: '提示消息',required:false }) @IsOptional() @IsString() msg?: string; @ApiProperty({ description: '访问时间',required:false }) @IsOptional() @IsString() loginTime?: string; } ================================================ FILE: server/src/admin/system/logininfor/service/sys-logininfor.service.ts ================================================ import { Injectable } from '@nestjs/common'; import { PrismaService } from '@/common/service/prisma/prisma.service'; import { Response } from 'express'; import { exportTable } from '@/common/utils'; import { QuerySysLogininforDto, CreateSysLogininforDto, UpdateSysLogininforDto, } from '../dto/index'; import { Prisma } from '@prismaClient'; import { isNotEmpty } from 'class-validator'; @Injectable() export class LogininforService { constructor(private prisma: PrismaService) {} /**@description 查询登录日志所有 */ async selectLogininforAll() { return this.prisma.sysLogininfor.findMany(); } /**@description 分页查询登录日志列表 */ async selectLogininforList(q: QuerySysLogininforDto) { const queryCondition: Prisma.SysLogininforWhereInput = {}; const order: 'asc' | 'desc' = q.isAsc === 'ascending' ? 'asc' : 'desc'; if (isNotEmpty(q['userName'])) { queryCondition.userName = { contains: q.userName, }; } if (isNotEmpty(q['ipaddr'])) { queryCondition.ipaddr = { contains: q.ipaddr, }; } if (isNotEmpty(q['loginLocation'])) { queryCondition.loginLocation = { equals: q.loginLocation, }; } if (isNotEmpty(q['browser'])) { queryCondition.browser = { equals: q.browser, }; } if (isNotEmpty(q['os'])) { queryCondition.os = { equals: q.os, }; } if (isNotEmpty(q['status'])) { queryCondition.status = { equals: q.status, }; } if (isNotEmpty(q['msg'])) { queryCondition.msg = { equals: q.msg, }; } if ( isNotEmpty(q.params.beginLoginTime) && isNotEmpty(q.params.endLoginTime) ) { queryCondition.loginTime = { lte: q.params.endLoginTime, gte: q.params.beginLoginTime, }; } return { rows: await this.prisma.sysLogininfor.findMany({ skip: (q.pageNum - 1) * q.pageSize, take: q.pageSize, orderBy: { loginTime: order, }, where: queryCondition, }), total: await this.prisma.sysLogininfor.count({ where: queryCondition, }), }; } /**@description 查询登录日志详情 */ async selectLogininforByInfoId(infoId: number) { return this.prisma.sysLogininfor.findUnique({ where: { infoId, }, }); } /**@description 新增登录日志 */ async addLogininfor(sysLogininfor: CreateSysLogininforDto) { //删除掉空值 for (const key in sysLogininfor) { !isNotEmpty(sysLogininfor[key]) && delete sysLogininfor[key]; } return await this.prisma.sysLogininfor.create({ data: sysLogininfor, }); } /**@description 修改登录日志 */ async updateLogininfor(sysLogininfor: UpdateSysLogininforDto) { //删除掉空值 for (const key in sysLogininfor) { !isNotEmpty(sysLogininfor[key]) && delete sysLogininfor[key]; } return await this.prisma.sysLogininfor.update({ where: { infoId: sysLogininfor.infoId, }, data: sysLogininfor, }); } /** @description 清空所有 */ async clear() { return this.prisma.sysLogininfor.deleteMany(); } /**@description 批量删除登录日志 */ async deleteLogininforByInfoIds(infoIds: number[]) { return this.prisma.sysLogininfor.deleteMany({ where: { infoId: { in: infoIds, }, }, }); } /**@description 单个删除登录日志 */ async deleteLogininforByInfoId(infoId: number) { return this.prisma.sysLogininfor.delete({ where: { infoId, }, }); } /**@description 导出登录日志所有数据为xlsx */ async exportLogininfor(res: Response) { const title = [ '访问ID', '用户账号', '登录IP地址', '登录地点', '浏览器类型', '操作系统', '登录状态(0失败,1成功)', '提示消息', '访问时间', ]; const data = (await this.prisma.sysLogininfor.findMany()).map((v) => Object.values(v), ); data.unshift(title); exportTable(data, res); } } ================================================ FILE: server/src/admin/system/logininfor/sys-logininfor.controller.ts ================================================ import { Body, Controller, Delete, Get, Param, ParseIntPipe, Post, Put, Query, Res, } from '@nestjs/common'; import { ParseIntArrayPipe } from '@/common/pipe/parse-int-array.pipe'; import Result from '@/common/result/Result'; import { ApiBearerAuth, ApiBody, ApiOperation, ApiQuery, ApiResponse, ApiTags, } from '@nestjs/swagger'; import { RequirePermission } from '@/common/decorator/require-premission.decorator'; import { LogininforService } from './service/sys-logininfor.service'; import { QuerySysLogininforDto, CreateSysLogininforDto, UpdateSysLogininforDto, } from './dto/index'; import { Response } from 'express'; import { SysLogininfor } from '@prismaClient'; import { TableDataInfo } from '@/common/domain/TableDataInfo'; @ApiTags('登录日志') @ApiBearerAuth() @Controller('monitor/logininfor') export class SysLogininforController { constructor(private logininforService: LogininforService) {} @ApiOperation({ summary: '查询登录日志列表' }) @ApiResponse({ type: TableDataInfo }) @RequirePermission('monitor:logininfor:query') @Get('/list') async listLogininfor( @Query() q: QuerySysLogininforDto, ): Promise> { return Result.TableData( await this.logininforService.selectLogininforList(q), ); } @ApiOperation({ summary: '清空登录日志' }) @Delete('/clean') async clearInfo(): Promise> { await this.logininforService.clear(); return Result.ok(); } @ApiOperation({ summary: '导出登录日志xlsx文件' }) @RequirePermission('monitor:logininfor:export') @Get('/export') async export(@Res() res: Response): Promise { return this.logininforService.exportLogininfor(res); } @ApiOperation({ summary: '查询登录日志详细' }) @ApiResponse({ type: Result }) @RequirePermission('monitor:logininfor:query') @Get('/:infoId') async getLogininfor( @Param('infoId', ParseIntPipe) infoId: number, ): Promise> { return Result.ok( await this.logininforService.selectLogininforByInfoId(infoId), ); } @ApiOperation({ summary: '新增登录日志' }) @ApiResponse({ type: Result }) @ApiBody({ type: CreateSysLogininforDto }) @RequirePermission('monitor:logininfor:add') @Post('/') async addLogininfor( @Body() sysLogininfor: CreateSysLogininforDto, ): Promise> { return Result.ok(await this.logininforService.addLogininfor(sysLogininfor)); } @ApiOperation({ summary: '修改登录日志' }) @ApiResponse({ type: Result }) @ApiBody({ type: UpdateSysLogininforDto }) @RequirePermission('monitor:logininfor:edit') @Put('/') async updateLogininfor( @Body() sysLogininfor: UpdateSysLogininforDto, ): Promise> { await this.logininforService.updateLogininfor(sysLogininfor); return Result.ok('修改成功!'); } @ApiOperation({ summary: '删除登录日志' }) @ApiResponse({ type: Result }) @RequirePermission('monitor:logininfor:remove') @Delete('/:ids') async delLogininfor( @Param('ids', ParseIntArrayPipe) infoIds: number[], ): Promise> { const { count } = await this.logininforService.deleteLogininforByInfoIds(infoIds); return Result.toAjax(count); } } ================================================ FILE: server/src/admin/system/menu/dto/index.ts ================================================ import { BaseDomain } from '@/common/domain/BaseDomain'; import { ApiProperty } from '@nestjs/swagger'; import { Transform } from 'class-transformer'; import { IsNotEmpty, IsNumber, IsString, IsOptional } from 'class-validator'; import { queryDomain } from '@/common/domain/queryDomain'; /**@description 查询菜单管理Dto */ export class QuerySysMenuDto extends queryDomain { @ApiProperty({ description: '菜单名称',required:false }) @IsOptional() menuName: string | null; @ApiProperty({ description: '显示顺序',required:false }) @IsOptional() @Transform((v) => +v.value) @IsNumber() orderNum: number | null; @ApiProperty({ description: '路由地址',required:false }) @IsOptional() path: string | null; @ApiProperty({ description: '组件路径',required:false }) @IsOptional() component: string | null; @ApiProperty({ description: '路由参数',required:false }) @IsOptional() query: string | null; @ApiProperty({ description: '是否为外链(0否 1是)',required:false }) @IsOptional() @Transform((v) => +v.value) @IsNumber() isFrame: number | null; @ApiProperty({ description: '是否缓存(0不缓存 1缓存)',required:false }) @IsOptional() @Transform((v) => +v.value) @IsNumber() isCache: number | null; @ApiProperty({ description: '菜单类型(M目录 C菜单 F按钮)',required:false }) @IsOptional() menuType: string | null; @ApiProperty({ description: '菜单状态(0隐藏 1显示)',required:false }) @IsOptional() visible: string | null; @ApiProperty({ description: '菜单状态(0停用 1正常)',required:false }) @IsOptional() status: string | null; @ApiProperty({ description: '权限标识',required:false }) @IsOptional() perms: string | null; @ApiProperty({ description: '菜单图标',required:false }) @IsOptional() icon: string | null; } /**@description 创建菜单管理Dto */ export class CreateSysMenuDto extends BaseDomain { @ApiProperty({ description: '菜单名称' }) @IsNotEmpty({ message: '菜单名称不能为空' }) @IsString() menuName: string; @ApiProperty({ description: '父菜单ID',required:false }) @IsOptional() @Transform((v) => +v.value) @IsNumber() parentId?: number; @ApiProperty({ description: '显示顺序' }) @IsNotEmpty({ message: '显示顺序不能为空' }) @Transform((v) => +v.value) @IsNumber() orderNum: number; @ApiProperty({ description: '路由地址' }) @IsNotEmpty({ message: '路由地址不能为空' }) @IsString() path: string; @ApiProperty({ description: '组件路径',required:false }) @IsOptional() @IsString() component?: string; @ApiProperty({ description: '路由参数',required:false }) @IsOptional() @IsString() query?: string; @ApiProperty({ description: '是否为外链(0否 1是)',required:false }) @IsOptional() @Transform((v) => +v.value) @IsNumber() isFrame?: number; @ApiProperty({ description: '是否缓存(0不缓存 1缓存)',required:false }) @IsOptional() @Transform((v) => +v.value) @IsNumber() isCache?: number; @ApiProperty({ description: '菜单类型(M目录 C菜单 F按钮)',required:false }) @IsOptional() @IsString() menuType?: string; @ApiProperty({ description: '菜单状态(0隐藏 1显示)',required:false }) @IsOptional() @IsString() visible?: string; @ApiProperty({ description: '菜单状态(0停用 1正常)',required:false }) @IsOptional() @IsString() status?: string; @ApiProperty({ description: '权限标识',required:false }) @IsOptional() @IsString() perms?: string; @ApiProperty({ description: '菜单图标',required:false }) @IsOptional() @IsString() icon?: string; @ApiProperty({ description: '创建者',required:false }) @IsOptional() @IsString() createBy?: string; @ApiProperty({ description: '创建时间',required:false }) @IsOptional() @IsString() createTime?: string; @ApiProperty({ description: '更新者',required:false }) @IsOptional() @IsString() updateBy?: string; @ApiProperty({ description: '更新时间',required:false }) @IsOptional() @IsString() updateTime?: string; @ApiProperty({ description: '备注',required:false }) @IsOptional() @IsString() remark?: string; } /**@description 更新菜单管理Dto */ export class UpdateSysMenuDto extends BaseDomain { @ApiProperty({ description: '菜单ID' }) @IsNotEmpty({ message: '菜单ID不能为空' }) @Transform((v) => +v.value) @IsNumber() menuId: number; @ApiProperty({ description: '菜单名称' }) @IsNotEmpty({ message: '菜单名称不能为空' }) @IsString() menuName: string; @ApiProperty({ description: '父菜单ID',required:false }) @IsOptional() @Transform((v) => +v.value) @IsNumber() parentId?: number; @ApiProperty({ description: '显示顺序' }) @IsNotEmpty({ message: '显示顺序不能为空' }) @Transform((v) => +v.value) @IsNumber() orderNum: number; @ApiProperty({ description: '路由地址' }) @IsNotEmpty({ message: '路由地址不能为空' }) @IsString() path: string; @ApiProperty({ description: '组件路径',required:false }) @IsOptional() @IsString() component?: string; @ApiProperty({ description: '路由参数',required:false }) @IsOptional() @IsString() query?: string; @ApiProperty({ description: '是否为外链(0否 1是)',required:false }) @IsOptional() @Transform((v) => +v.value) @IsNumber() isFrame?: number; @ApiProperty({ description: '是否缓存(0不缓存 1缓存)',required:false }) @IsOptional() @Transform((v) => +v.value) @IsNumber() isCache?: number; @ApiProperty({ description: '菜单类型(M目录 C菜单 F按钮)',required:false }) @IsOptional() @IsString() menuType?: string; @ApiProperty({ description: '菜单状态(0隐藏 1显示)',required:false }) @IsOptional() @IsString() visible?: string; @ApiProperty({ description: '菜单状态(0停用 1正常)',required:false }) @IsOptional() @IsString() status?: string; @ApiProperty({ description: '权限标识',required:false }) @IsOptional() @IsString() perms?: string; @ApiProperty({ description: '菜单图标',required:false }) @IsOptional() @IsString() icon?: string; @ApiProperty({ description: '创建者',required:false }) @IsOptional() @IsString() createBy?: string; @ApiProperty({ description: '创建时间',required:false }) @IsOptional() @IsString() createTime?: string; @ApiProperty({ description: '更新者',required:false }) @IsOptional() @IsString() updateBy?: string; @ApiProperty({ description: '更新时间',required:false }) @IsOptional() @IsString() updateTime?: string; @ApiProperty({ description: '备注',required:false }) @IsOptional() @IsString() remark?: string; } ================================================ FILE: server/src/admin/system/menu/dto/queryMenuDto.ts ================================================ import { ApiProperty } from '@nestjs/swagger'; export class queryMenuDto { @ApiProperty({ description: '菜单名称' }) menuName: string | null; @ApiProperty({ description: '菜单状态' }) status: string | null; } ================================================ FILE: server/src/admin/system/menu/service/sys-menu.service.ts ================================================ import { Injectable } from '@nestjs/common'; import { PrismaService } from '@/common/service/prisma/prisma.service'; import { Response } from 'express'; import { exportTable, tree } from '@/common/utils'; import { QuerySysMenuDto, CreateSysMenuDto, UpdateSysMenuDto, } from '../dto/index'; import { Prisma } from '@prismaClient'; import { isNotEmpty } from 'class-validator'; import * as assert from 'assert'; @Injectable() export class MenuService { constructor(private prisma: PrismaService) {} /**@description 查询菜单管理所有 */ async selectMenuAll() { return this.prisma.sysMenu.findMany(); } /**@description 查询菜单管理列表 */ async selectMenuList(q: QuerySysMenuDto) { const queryCondition: Prisma.SysMenuWhereInput = {}; if (isNotEmpty(q['menuName'])) { queryCondition.menuName = { contains: q.menuName, }; } if (isNotEmpty(q['orderNum'])) { queryCondition.orderNum = { equals: q.orderNum, }; } if (isNotEmpty(q['path'])) { queryCondition.path = { equals: q.path, }; } if (isNotEmpty(q['component'])) { queryCondition.component = { equals: q.component, }; } if (isNotEmpty(q['query'])) { queryCondition.query = { equals: q.query, }; } if (isNotEmpty(q['isFrame'])) { queryCondition.isFrame = { equals: q.isFrame, }; } if (isNotEmpty(q['isCache'])) { queryCondition.isCache = { equals: q.isCache, }; } if (isNotEmpty(q['menuType'])) { queryCondition.menuType = { equals: q.menuType, }; } if (isNotEmpty(q['visible'])) { queryCondition.visible = { equals: q.visible, }; } if (isNotEmpty(q['status'])) { queryCondition.status = { equals: q.status, }; } if (isNotEmpty(q['perms'])) { queryCondition.perms = { equals: q.perms, }; } if (isNotEmpty(q['icon'])) { queryCondition.icon = { equals: q.icon, }; } return this.prisma.sysMenu.findMany({ where: queryCondition, orderBy: { orderNum: 'asc', }, }); } /**@description 查询菜单管理详情 */ async selectMenuByMenuId(menuId: number) { return this.prisma.sysMenu.findUnique({ where: { menuId, }, }); } /**@description 新增菜单管理 */ async addMenu(sysMenu: CreateSysMenuDto) { //删除掉空值 for (const key in sysMenu) { !isNotEmpty(sysMenu[key]) && delete sysMenu[key]; } return await this.prisma.sysMenu.create({ data: sysMenu, }); } /**@description 修改菜单管理 */ async updateMenu(sysMenu: UpdateSysMenuDto) { //删除掉空值 for (const key in sysMenu) { !isNotEmpty(sysMenu[key]) && delete sysMenu[key]; } return await this.prisma.sysMenu.update({ where: { menuId: sysMenu.menuId, }, data: sysMenu, }); } /**@description 批量删除菜单管理 */ async deleteMenuByMenuIds(menuIds: number[]) { const menu = await this.prisma.sysMenu.findFirst({ where: { parentId: { in: menuIds, }, menuType: { in: ['M', 'C'], }, }, }); assert(!menu, '存在子菜单,不允许删除!'); const menu1 = await this.prisma.sysRoleMenu.findFirst({ where: { menuId: { in: menuIds } }, }); assert(!menu1, '菜单已被分配,不允许删除!'); return this.prisma.sysMenu.deleteMany({ where: { OR: [ { menuId: { in: menuIds }, }, { menuType: 'F', parentId: { in: menuIds }, }, ], }, }); } /**@description 单个删除菜单管理 */ async deleteMenuByMenuId(menuId: number) { const menu = await this.prisma.sysMenu.findFirst({ where: { parentId: menuId, menuType: { in: ['M', 'C'], }, }, }); assert(!menu, '存在子菜单,不允许删除!'); const menu1 = await this.prisma.sysRoleMenu.findFirst({ where: { menuId }, }); assert(!menu1, '菜单已被分配,不允许删除!'); return this.prisma.sysMenu.deleteMany({ where: { OR: [ { menuId, }, { menuType: 'F', parentId: menuId, }, ], }, }); } /**@description 导出菜单管理所有数据为xlsx */ async exportMenu(res: Response) { const title = [ '菜单ID', '菜单名称', '父菜单ID', '显示顺序', '路由地址', '组件路径', '路由参数', '是否为外链(0否 1是)', '是否缓存(0不缓存 1缓存)', '菜单类型(M目录 C菜单 F按钮)', '菜单状态(0隐藏 1显示)', '菜单状态(0停用 1正常)', '权限标识', '菜单图标', '创建者', '创建时间', '更新者', '更新时间', '备注', ]; const data = (await this.prisma.sysMenu.findMany()).map((v) => Object.values(v), ); data.unshift(title); exportTable(data, res); } async selectMenuTree() { const menus = tree( (await this.prisma.sysMenu.findMany()).map((v) => ({ id: v.menuId, label: v.menuName, pid: v.parentId, })), ); return menus; } async roleMenuTreeselect(roleId: number) { const menus = await this.selectMenuTree(); const checkedKeys = ( await this.prisma.sysRoleMenu.findMany({ where: { roleId } }) ).map((v) => v.menuId); return { menus, checkedKeys }; } } ================================================ FILE: server/src/admin/system/menu/sys-menu.controller.ts ================================================ import { Body, Controller, Delete, Get, Param, ParseIntPipe, Post, Put, Query, Req, Res, } from '@nestjs/common'; import { ParseIntArrayPipe } from '@/common/pipe/parse-int-array.pipe'; import Result from '@/common/result/Result'; import { ApiBearerAuth, ApiBody, ApiOperation, ApiQuery, ApiResponse, ApiTags, } from '@nestjs/swagger'; import { RequirePermission } from '@/common/decorator/require-premission.decorator'; import { nowDateTime } from '@/common/utils'; import { MenuService } from './service/sys-menu.service'; import { QuerySysMenuDto, CreateSysMenuDto, UpdateSysMenuDto, } from './dto/index'; import { Response } from 'express'; import { SysMenu } from '@prismaClient'; @ApiTags('菜单管理') @ApiBearerAuth() @Controller('system/menu') export class SysMenuController { constructor(private menuService: MenuService) {} @ApiOperation({ summary: '获取树形菜单选项' }) @RequirePermission('system:menu:query') @Get('/treeselect') async listMenuTree() { return Result.ok(await this.menuService.selectMenuTree()); } @ApiOperation({ summary: '获取树形菜单选项' }) @RequirePermission('system:menu:edit') @Get('/roleMenuTreeselect/:menuId') async roleMenuTreeselect(@Param('menuId', ParseIntPipe) menuId: number) { return { ...Result.ok(), ...(await this.menuService.roleMenuTreeselect(menuId)), }; } @ApiOperation({ summary: '查询菜单管理列表' }) @ApiResponse({ type: Result }) @RequirePermission('system:menu:query') @Get('/list') async listMenu(@Query() q: QuerySysMenuDto): Promise> { return Result.ok(await this.menuService.selectMenuList(q)); } @ApiOperation({ summary: '导出菜单管理xlsx文件' }) @RequirePermission('system:menu:export') @Get('/export') async export(@Res() res: Response): Promise { return this.menuService.exportMenu(res); } @ApiOperation({ summary: '查询菜单管理详细' }) @ApiResponse({ type: Result }) @RequirePermission('system:menu:query') @Get('/:menuId') async getMenu( @Param('menuId', ParseIntPipe) menuId: number, ): Promise> { return Result.ok(await this.menuService.selectMenuByMenuId(menuId)); } @ApiOperation({ summary: '新增菜单管理' }) @ApiResponse({ type: Result }) @ApiBody({ type: CreateSysMenuDto }) @RequirePermission('system:menu:add') @Post('/') async addMenu( @Body() sysMenu: CreateSysMenuDto, @Req() req, ): Promise> { sysMenu = { ...sysMenu, createTime: nowDateTime(), updateTime: nowDateTime(), createBy: req.user?.userName, updateBy: req.user?.userName, }; return Result.ok(await this.menuService.addMenu(sysMenu)); } @ApiOperation({ summary: '修改菜单管理' }) @ApiResponse({ type: Result }) @ApiBody({ type: UpdateSysMenuDto }) @RequirePermission('system:menu:edit') @Put('/') async updateMenu( @Body() sysMenu: UpdateSysMenuDto, @Req() req, ): Promise> { sysMenu = { ...sysMenu, updateTime: nowDateTime(), updateBy: req.user?.userName, }; await this.menuService.updateMenu(sysMenu); return Result.ok('修改成功!'); } @ApiOperation({ summary: '删除菜单管理' }) @ApiResponse({ type: Result }) @RequirePermission('system:menu:remove') @Delete('/:ids') async delMenu( @Param('ids', ParseIntArrayPipe) menuIds: number[], ): Promise> { const { count } = await this.menuService.deleteMenuByMenuIds(menuIds); return Result.toAjax(count); } } ================================================ FILE: server/src/admin/system/monitor/monitor.controller.ts ================================================ import { Constants } from '@/common/constant/Constants'; import Result from '@/common/result/Result'; import { RequirePermission } from '@/common/decorator/require-premission.decorator'; import { redisUtils } from '@/common/utils/redisUtils'; import { getServerInfo } from '@/common/utils/systemInfo'; import { Controller, Delete, Get, Param, ParseArrayPipe, Query, } from '@nestjs/common'; import { ApiBearerAuth, ApiOperation, ApiTags } from '@nestjs/swagger'; import { Throttle } from '@nestjs/throttler'; @ApiTags('系统监控') @ApiBearerAuth() @Controller('/monitor') export class monitorController { constructor() {} @ApiOperation({ summary: '获取redis信息' }) @Throttle({ default: { limit: 10, ttl: 1000 * 60, }, }) @Get('/cache') async getCacheInfo() { return Result.ok(await redisUtils.getRedisInfo()); } @ApiOperation({ summary: '获取服务器信息' }) @Throttle({ default: { limit: 10, ttl: 1000 * 60, }, }) @Get('/server') async getInfo() { return Result.ok(await getServerInfo()); } @ApiOperation({ summary: '获取在线用户信息' }) @Throttle({ default: { limit: 20, ttl: 1000 * 60, }, }) @RequirePermission('monitor:online:query') @Get('/online/list') async getOnlineList(@Query() { ipaddr = '', userName = '' }) { const tokens = await redisUtils.scanStream(Constants.LOGIN_TOKEN_KEY + '*'); if (!tokens.length) { return Result.TableData({ rows: [], total: 0, }); } let userList = (await redisUtils.mget(tokens)).map((v) => JSON.parse(v)); userList = userList.filter( (v) => v.loginLocation.includes(ipaddr) && v.userName.includes(userName), ); userList.sort((a, b) => +new Date(b.loginTime) - +new Date(a.loginTime)); return Result.TableData({ rows: userList, total: userList.length, }); } @ApiOperation({ summary: '强退用户' }) @Throttle({ default: { limit: 20, ttl: 1000 * 60, }, }) @RequirePermission('monitor:online:batchLogout') @Delete('/online/:tokenId') async forceLogout(@Param('tokenId', ParseArrayPipe) tokenIds: string[]) { for (const tokenId of tokenIds) { const user = JSON.parse( (await redisUtils.get(Constants.LOGIN_TOKEN_KEY + tokenId)) || null, ); if (user) { //不可强退超级管理员 if (user.userId === 1) return Result.Error('不可强退超级管理员!'); await redisUtils.del(Constants.LOGIN_TOKEN_KEY + tokenId); } } return Result.ok('操作成功!'); } } ================================================ FILE: server/src/admin/system/notice/dto/index.ts ================================================ import { BaseDomain } from '@/common/domain/BaseDomain'; import { ApiProperty } from '@nestjs/swagger'; import { Transform } from 'class-transformer'; import { IsNotEmpty, IsNumber, IsString, IsOptional } from 'class-validator'; import { queryDomain } from '@/common/domain/queryDomain'; /**@description 查询通知公告表Dto */ export class QuerySysNoticeDto extends queryDomain { @ApiProperty({ description: '公告标题',required:false }) @IsOptional() noticeTitle: string | null; @ApiProperty({ description: '公告类型(1通知 2公告)',required:false }) @IsOptional() noticeType: string | null; @ApiProperty({ description: '公告状态(0关闭 1正常)',required:false }) @IsOptional() status: string | null; } /**@description 创建通知公告表Dto */ export class CreateSysNoticeDto extends BaseDomain { @ApiProperty({ description: '公告标题' }) @IsNotEmpty({ message: '公告标题不能为空' }) @IsString() noticeTitle: string; @ApiProperty({ description: '公告类型(1通知 2公告)' }) @IsNotEmpty({ message: '公告类型(1通知 2公告)不能为空' }) @IsString() noticeType: string; @ApiProperty({ description: '公告内容',required:false }) @IsOptional() @IsString() noticeContent?: string; @ApiProperty({ description: '公告状态(0关闭 1正常)',required:false }) @IsOptional() @IsString() status?: string; @ApiProperty({ description: '创建者',required:false }) @IsOptional() @IsString() createBy?: string; @ApiProperty({ description: '创建时间',required:false }) @IsOptional() @IsString() createTime?: string; @ApiProperty({ description: '更新者',required:false }) @IsOptional() @IsString() updateBy?: string; @ApiProperty({ description: '更新时间',required:false }) @IsOptional() @IsString() updateTime?: string; @ApiProperty({ description: '备注',required:false }) @IsOptional() @IsString() remark?: string; } /**@description 更新通知公告表Dto */ export class UpdateSysNoticeDto extends BaseDomain { @ApiProperty({ description: '公告ID' }) @IsNotEmpty({ message: '公告ID不能为空' }) @Transform((v) => +v.value) @IsNumber() noticeId: number; @ApiProperty({ description: '公告标题' }) @IsNotEmpty({ message: '公告标题不能为空' }) @IsString() noticeTitle: string; @ApiProperty({ description: '公告类型(1通知 2公告)' }) @IsNotEmpty({ message: '公告类型(1通知 2公告)不能为空' }) @IsString() noticeType: string; @ApiProperty({ description: '公告内容',required:false }) @IsOptional() @IsString() noticeContent?: string; @ApiProperty({ description: '公告状态(0关闭 1正常)',required:false }) @IsOptional() @IsString() status?: string; @ApiProperty({ description: '创建者',required:false }) @IsOptional() @IsString() createBy?: string; @ApiProperty({ description: '创建时间',required:false }) @IsOptional() @IsString() createTime?: string; @ApiProperty({ description: '更新者',required:false }) @IsOptional() @IsString() updateBy?: string; @ApiProperty({ description: '更新时间',required:false }) @IsOptional() @IsString() updateTime?: string; @ApiProperty({ description: '备注',required:false }) @IsOptional() @IsString() remark?: string; } ================================================ FILE: server/src/admin/system/notice/service/sys-notice.service.ts ================================================ import { Injectable } from '@nestjs/common'; import { PrismaService } from '@/common/service/prisma/prisma.service'; import { Response } from 'express'; import { exportTable } from '@/common/utils'; import { QuerySysNoticeDto, CreateSysNoticeDto, UpdateSysNoticeDto, } from '../dto/index'; import { Prisma } from '@prismaClient'; import { isNotEmpty } from 'class-validator'; @Injectable() export class NoticeService { constructor(private prisma: PrismaService) {} /**@description 查询通知公告表所有 */ async selectNoticeAll() { return this.prisma.sysNotice.findMany(); } /**@description 分页查询通知公告表列表 */ async selectNoticeList(q: QuerySysNoticeDto) { const queryCondition: Prisma.SysNoticeWhereInput = {}; if (isNotEmpty(q['noticeTitle'])) { queryCondition.noticeTitle = { equals: q.noticeTitle, }; } if (isNotEmpty(q['noticeType'])) { queryCondition.noticeType = { equals: q.noticeType, }; } if (isNotEmpty(q['status'])) { queryCondition.status = { equals: q.status, }; } return { rows: await this.prisma.sysNotice.findMany({ skip: (q.pageNum - 1) * q.pageSize, take: q.pageSize, where: queryCondition, }), total: await this.prisma.sysNotice.count({ where: queryCondition, }), }; } /**@description 查询通知公告表详情 */ async selectNoticeByNoticeId(noticeId: number) { return this.prisma.sysNotice.findUnique({ where: { noticeId, }, }); } /**@description 新增通知公告表 */ async addNotice(sysNotice: CreateSysNoticeDto) { //删除掉空值 for (const key in sysNotice) { !isNotEmpty(sysNotice[key]) && delete sysNotice[key]; } return await this.prisma.sysNotice.create({ data: sysNotice, }); } /**@description 修改通知公告表 */ async updateNotice(sysNotice: UpdateSysNoticeDto) { //删除掉空值 for (const key in sysNotice) { !isNotEmpty(sysNotice[key]) && delete sysNotice[key]; } return await this.prisma.sysNotice.update({ where: { noticeId: sysNotice.noticeId, }, data: sysNotice, }); } /**@description 批量删除通知公告表 */ async deleteNoticeByNoticeIds(noticeIds: number[]) { return this.prisma.sysNotice.deleteMany({ where: { noticeId: { in: noticeIds, }, }, }); } /**@description 单个删除通知公告表 */ async deleteNoticeByNoticeId(noticeId: number) { return this.prisma.sysNotice.delete({ where: { noticeId, }, }); } /**@description 导出通知公告表所有数据为xlsx */ async exportNotice(res: Response) { const title = [ '公告ID', '公告标题', '公告类型(1通知 2公告)', '公告内容', '公告状态(0关闭 1正常)', '创建者', '创建时间', '更新者', '更新时间', '备注', ]; const data = (await this.prisma.sysNotice.findMany()).map((v) => Object.values(v), ); data.unshift(title); exportTable(data, res); } } ================================================ FILE: server/src/admin/system/notice/sys-notice.controller.ts ================================================ import { Body, Controller, Delete, Get, Param, ParseIntPipe, Post, Put, Query, Req, Res, } from '@nestjs/common'; import { ParseIntArrayPipe } from '@/common/pipe/parse-int-array.pipe'; import Result from '@/common/result/Result'; import { ApiBearerAuth, ApiBody, ApiOperation, ApiQuery, ApiResponse, ApiTags, } from '@nestjs/swagger'; import { RequirePermission } from '@/common/decorator/require-premission.decorator'; import { nowDateTime } from '@/common/utils'; import { NoticeService } from './service/sys-notice.service'; import { QuerySysNoticeDto, CreateSysNoticeDto, UpdateSysNoticeDto, } from './dto/index'; import { Response } from 'express'; import { SysNotice } from '@prismaClient'; import { TableDataInfo } from '@/common/domain/TableDataInfo'; @ApiTags('通知公告表') @ApiBearerAuth() @Controller('system/notice') export class SysNoticeController { constructor(private noticeService: NoticeService) {} @ApiOperation({ summary: '查询通知公告表列表' }) @ApiResponse({ type: TableDataInfo }) @RequirePermission('system:notice:query') @Get('/list') async listNotice( @Query() q: QuerySysNoticeDto, ): Promise> { return Result.TableData(await this.noticeService.selectNoticeList(q)); } @ApiOperation({ summary: '导出通知公告表xlsx文件' }) @RequirePermission('system:notice:export') @Get('/export') async export(@Res() res: Response): Promise { return this.noticeService.exportNotice(res); } @ApiOperation({ summary: '查询通知公告表详细' }) @ApiResponse({ type: Result }) @RequirePermission('system:notice:query') @Get('/:noticeId') async getNotice( @Param('noticeId', ParseIntPipe) noticeId: number, ): Promise> { return Result.ok(await this.noticeService.selectNoticeByNoticeId(noticeId)); } @ApiOperation({ summary: '新增通知公告表' }) @ApiResponse({ type: Result }) @ApiBody({ type: CreateSysNoticeDto }) @RequirePermission('system:notice:add') @Post('/') async addNotice( @Body() sysNotice: CreateSysNoticeDto, @Req() req, ): Promise> { sysNotice = { ...sysNotice, createTime: nowDateTime(), updateTime: nowDateTime(), createBy: req.user?.userName, updateBy: req.user?.userName, }; return Result.ok(await this.noticeService.addNotice(sysNotice)); } @ApiOperation({ summary: '修改通知公告表' }) @ApiResponse({ type: Result }) @ApiBody({ type: UpdateSysNoticeDto }) @RequirePermission('system:notice:edit') @Put('/') async updateNotice( @Body() sysNotice: UpdateSysNoticeDto, @Req() req, ): Promise> { sysNotice = { ...sysNotice, updateTime: nowDateTime(), updateBy: req.user?.userName, }; await this.noticeService.updateNotice(sysNotice); return Result.ok('修改成功!'); } @ApiOperation({ summary: '删除通知公告表' }) @ApiResponse({ type: Result }) @RequirePermission('system:notice:remove') @Delete('/:ids') async delNotice( @Param('ids', ParseIntArrayPipe) noticeIds: number[], ): Promise> { const { count } = await this.noticeService.deleteNoticeByNoticeIds(noticeIds); return Result.toAjax(count); } } ================================================ FILE: server/src/admin/system/post/dto/index.ts ================================================ import { BaseDomain } from '@/common/domain/BaseDomain'; import { ApiProperty } from '@nestjs/swagger'; import { Transform } from 'class-transformer'; import { IsNotEmpty, IsNumber, IsString, IsOptional } from 'class-validator'; import { queryDomain } from '@/common/domain/queryDomain'; /**@description 查询岗位信息表Dto */ export class QuerySysPostDto extends queryDomain { @ApiProperty({ description: '岗位编码',required:false }) @IsOptional() postCode: string | null; @ApiProperty({ description: '岗位名称',required:false }) @IsOptional() postName: string | null; @ApiProperty({ description: '显示顺序',required:false }) @IsOptional() @Transform((v) => +v.value) @IsNumber() postSort: number | null; @ApiProperty({ description: '状态(0停用 1正常)',required:false }) @IsOptional() status: string | null; } /**@description 创建岗位信息表Dto */ export class CreateSysPostDto extends BaseDomain { @ApiProperty({ description: '岗位编码' }) @IsNotEmpty({ message: '岗位编码不能为空' }) @IsString() postCode: string; @ApiProperty({ description: '岗位名称' }) @IsNotEmpty({ message: '岗位名称不能为空' }) @IsString() postName: string; @ApiProperty({ description: '显示顺序' }) @IsNotEmpty({ message: '显示顺序不能为空' }) @Transform((v) => +v.value) @IsNumber() postSort: number; @ApiProperty({ description: '状态(0停用 1正常)' }) @IsNotEmpty({ message: '状态(0停用 1正常)不能为空' }) @IsString() status: string; @ApiProperty({ description: '创建者',required:false }) @IsOptional() @IsString() createBy?: string; @ApiProperty({ description: '创建时间',required:false }) @IsOptional() @IsString() createTime?: string; @ApiProperty({ description: '更新者',required:false }) @IsOptional() @IsString() updateBy?: string; @ApiProperty({ description: '更新时间',required:false }) @IsOptional() @IsString() updateTime?: string; @ApiProperty({ description: '备注',required:false }) @IsOptional() @IsString() remark?: string; } /**@description 更新岗位信息表Dto */ export class UpdateSysPostDto extends BaseDomain { @ApiProperty({ description: '岗位ID' }) @IsNotEmpty({ message: '岗位ID不能为空' }) @Transform((v) => +v.value) @IsNumber() postId: number; @ApiProperty({ description: '岗位编码' }) @IsNotEmpty({ message: '岗位编码不能为空' }) @IsString() postCode: string; @ApiProperty({ description: '岗位名称' }) @IsNotEmpty({ message: '岗位名称不能为空' }) @IsString() postName: string; @ApiProperty({ description: '显示顺序' }) @IsNotEmpty({ message: '显示顺序不能为空' }) @Transform((v) => +v.value) @IsNumber() postSort: number; @ApiProperty({ description: '状态(0停用 1正常)' }) @IsNotEmpty({ message: '状态(0停用 1正常)不能为空' }) @IsString() status: string; @ApiProperty({ description: '更新者',required:false }) @IsOptional() @IsString() updateBy?: string; @ApiProperty({ description: '更新时间',required:false }) @IsOptional() @IsString() updateTime?: string; @ApiProperty({ description: '备注',required:false }) @IsOptional() @IsString() remark?: string; } ================================================ FILE: server/src/admin/system/post/service/sys-post.service.ts ================================================ import { Injectable } from '@nestjs/common'; import { PrismaService } from '@/common/service/prisma/prisma.service'; import { Response } from 'express'; import { exportTable } from '@/common/utils'; import { QuerySysPostDto, CreateSysPostDto, UpdateSysPostDto, } from '../dto/index'; import { Prisma } from '@prismaClient'; import { isNotEmpty } from 'class-validator'; import * as assert from 'assert'; @Injectable() export class PostService { constructor(private prisma: PrismaService) {} /**@description 查询岗位信息表所有 */ async selectPostAll() { return this.prisma.sysPost.findMany(); } /**@description 分页查询岗位信息表列表 */ async selectPostList(q: QuerySysPostDto) { const queryCondition: Prisma.SysPostWhereInput = {}; if (isNotEmpty(q['postCode'])) { queryCondition.postCode = { equals: q.postCode, }; } if (isNotEmpty(q['postName'])) { queryCondition.postName = { contains: q.postName, }; } if (isNotEmpty(q['postSort'])) { queryCondition.postSort = { equals: q.postSort, }; } if (isNotEmpty(q['status'])) { queryCondition.status = { equals: q.status, }; } if ( isNotEmpty(q.params.beginCreateTime) && isNotEmpty(q.params.endCreateTime) ) { queryCondition.createTime = { lte: q.params.endCreateTime, gte: q.params.beginCreateTime, }; } if ( isNotEmpty(q.params.beginUpdateTime) && isNotEmpty(q.params.endUpdateTime) ) { queryCondition.updateTime = { lte: q.params.endUpdateTime, gte: q.params.beginUpdateTime, }; } return { rows: await this.prisma.sysPost.findMany({ skip: (q.pageNum - 1) * q.pageSize, take: q.pageSize, where: queryCondition, }), total: await this.prisma.sysPost.count({ where: queryCondition, }), }; } /**@description 查询岗位信息表详情 */ async selectPostByPostId(postId: number) { return this.prisma.sysPost.findUnique({ where: { postId, }, }); } /**@description 新增岗位信息表 */ async addPost(sysPost: CreateSysPostDto) { //删除掉空值 for (const key in sysPost) { !isNotEmpty(sysPost[key]) && delete sysPost[key]; } return await this.prisma.sysPost.create({ data: sysPost, }); } /**@description 修改岗位信息表 */ async updatePost(sysPost: UpdateSysPostDto) { //删除掉空值 for (const key in sysPost) { !isNotEmpty(sysPost[key]) && delete sysPost[key]; } return await this.prisma.sysPost.update({ where: { postId: sysPost.postId, }, data: sysPost, }); } /**@description 批量删除岗位信息表 */ async deletePostByPostIds(postIds: number[]) { const post = await this.prisma.sysUserPost.findFirst({ where: { postId: { in: postIds, }, }, }); assert(!post, '岗位已被分配,不允许删除!'); return this.prisma.sysPost.deleteMany({ where: { postId: { in: postIds, }, }, }); } /**@description 单个删除岗位信息表 */ async deletePostByPostId(postId: number) { const post = await this.prisma.sysUserPost.findFirst({ where: { postId, }, }); assert(!post, '岗位已被分配,不允许删除!'); return this.prisma.sysPost.delete({ where: { postId, }, }); } /**@description 导出岗位信息表所有数据为xlsx */ async exportPost(res: Response) { const title = [ '岗位ID', '岗位编码', '岗位名称', '显示顺序', '状态(0停用 1正常)', '创建者', '创建时间', '更新者', '更新时间', '备注', ]; const data = (await this.prisma.sysPost.findMany()).map((v) => Object.values(v), ); data.unshift(title); exportTable(data, res); } } ================================================ FILE: server/src/admin/system/post/sys-post.controller.ts ================================================ import { Body, Controller, Delete, Get, Param, ParseIntPipe, Post, Put, Query, Req, Res, } from '@nestjs/common'; import { ParseIntArrayPipe } from '@/common/pipe/parse-int-array.pipe'; import Result from '@/common/result/Result'; import { ApiBearerAuth, ApiBody, ApiOperation, ApiQuery, ApiResponse, ApiTags, } from '@nestjs/swagger'; import { RequirePermission } from '@/common/decorator/require-premission.decorator'; import { nowDateTime } from '@/common/utils'; import { PostService } from './service/sys-post.service'; import { QuerySysPostDto, CreateSysPostDto, UpdateSysPostDto, } from './dto/index'; import { Response } from 'express'; import { SysPost } from '@prismaClient'; import { TableDataInfo } from '@/common/domain/TableDataInfo'; @ApiTags('岗位信息表') @ApiBearerAuth() @Controller('system/post') export class SysPostController { constructor(private postService: PostService) {} @ApiOperation({ summary: '查询岗位信息表列表' }) @ApiResponse({ type: TableDataInfo }) @RequirePermission('system:post:query') @Get('/list') async listPost(@Query() q: QuerySysPostDto): Promise> { return Result.TableData(await this.postService.selectPostList(q)); } @ApiOperation({ summary: '导出岗位信息表xlsx文件' }) @RequirePermission('system:post:export') @Get('/export') async export(@Res() res: Response): Promise { return this.postService.exportPost(res); } @ApiOperation({ summary: '查询岗位信息表详细' }) @ApiResponse({ type: Result }) @RequirePermission('system:post:query') @Get('/:postId') async getPost( @Param('postId', ParseIntPipe) postId: number, ): Promise> { return Result.ok(await this.postService.selectPostByPostId(postId)); } @ApiOperation({ summary: '新增岗位信息表' }) @ApiResponse({ type: Result }) @ApiBody({ type: CreateSysPostDto }) @RequirePermission('system:post:add') @Post('/') async addPost( @Body() sysPost: CreateSysPostDto, @Req() req, ): Promise> { sysPost = { ...sysPost, createTime: nowDateTime(), updateTime: nowDateTime(), createBy: req.user?.userName, updateBy: req.user?.userName, }; return Result.ok(await this.postService.addPost(sysPost)); } @ApiOperation({ summary: '修改岗位信息表' }) @ApiResponse({ type: Result }) @ApiBody({ type: UpdateSysPostDto }) @RequirePermission('system:post:edit') @Put('/') async updatePost( @Body() sysPost: UpdateSysPostDto, @Req() req, ): Promise> { sysPost = { ...sysPost, updateTime: nowDateTime(), updateBy: req.user?.userName, }; await this.postService.updatePost(sysPost); return Result.ok('修改成功!'); } @ApiOperation({ summary: '删除岗位信息表' }) @ApiResponse({ type: Result }) @RequirePermission('system:post:remove') @Delete('/:ids') async delPost( @Param('ids', ParseIntArrayPipe) postIds: number[], ): Promise> { const { count } = await this.postService.deletePostByPostIds(postIds); return Result.toAjax(count); } } ================================================ FILE: server/src/admin/system/role/dto/index.ts ================================================ import { BaseDomain } from '@/common/domain/BaseDomain'; import { ApiProperty } from '@nestjs/swagger'; import { Transform } from 'class-transformer'; import { IsNotEmpty, IsNumber, IsString, IsOptional, IsArray, } from 'class-validator'; import { queryDomain } from '@/common/domain/queryDomain'; /**@description 查询角色管理Dto */ export class QuerySysRoleDto extends queryDomain { @ApiProperty({ description: '角色名称',required:false }) @IsOptional() roleName: string | null; @ApiProperty({ description: '角色权限字符串',required:false }) @IsOptional() roleKey: string | null; @ApiProperty({ description: '显示顺序',required:false }) @IsOptional() @Transform((v) => +v.value) @IsNumber() roleSort: number | null; @ApiProperty({ description: '数据范围(1:全部数据权限 2:自定数据权限 3:本部门数据权限 4:本部门及以下数据权限 5:仅个人权限)', required:false }) @IsOptional() dataScope: string | null; @ApiProperty({ description: '菜单树选择项是否关联显示',required:false }) @IsOptional() @Transform((v) => +v.value) @IsNumber() menuCheckStrictly: number | null; @ApiProperty({ description: '部门树选择项是否关联显示',required:false }) @IsOptional() @Transform((v) => +v.value) @IsNumber() deptCheckStrictly: number | null; @ApiProperty({ description: '角色状态(0停用 1正常)',required:false }) @IsOptional() status: string | null; } /**@description 创建角色管理Dto */ export class CreateSysRoleDto extends BaseDomain { @ApiProperty({ description: '角色名称' }) @IsNotEmpty({ message: '角色名称不能为空' }) @IsString() roleName: string; @ApiProperty({ description: '角色权限字符串' }) @IsNotEmpty({ message: '角色权限字符串不能为空' }) @IsString() roleKey: string; @ApiProperty({ description: '显示顺序' }) @IsNotEmpty({ message: '显示顺序不能为空' }) @Transform((v) => +v.value) @IsNumber() roleSort: number; @ApiProperty({ description: '数据范围(1:全部数据权限 2:自定数据权限 3:本部门数据权限 4:本部门及以下数据权限)', required:false }) @IsOptional() @IsString() dataScope?: string; @ApiProperty({ description: '菜单树选择项是否关联显示',required:false }) @IsOptional() @Transform((v) => +v.value) @IsNumber() menuCheckStrictly?: number; @ApiProperty({ description: '部门树选择项是否关联显示',required:false }) @IsOptional() @Transform((v) => +v.value) @IsNumber() deptCheckStrictly?: number; @ApiProperty({ description: '角色状态(0停用 1正常)' }) @IsNotEmpty({ message: '角色状态(0停用 1正常)不能为空' }) @IsString() status: string; @ApiProperty({ description: '创建者',required:false }) @IsOptional() @IsString() createBy?: string; @ApiProperty({ description: '创建时间',required:false }) @IsOptional() @IsString() createTime?: string; @ApiProperty({ description: '更新者',required:false }) @IsOptional() @IsString() updateBy?: string; @ApiProperty({ description: '更新时间',required:false }) @IsOptional() @IsString() updateTime?: string; @ApiProperty({ description: '备注',required:false }) @IsOptional() @IsString() remark?: string; @ApiProperty({ description: '菜单权限' }) @IsArray() menuIds: number[]; } /**@description 更新角色管理Dto */ export class UpdateSysRoleDto extends BaseDomain { @ApiProperty({ description: '角色ID' }) @IsNotEmpty({ message: '角色ID不能为空' }) @Transform((v) => +v.value) @IsNumber() roleId: number; @ApiProperty({ description: '角色名称' }) @IsNotEmpty({ message: '角色名称不能为空' }) @IsString() roleName: string; @ApiProperty({ description: '角色权限字符串' }) @IsNotEmpty({ message: '角色权限字符串不能为空' }) @IsString() roleKey: string; @ApiProperty({ description: '显示顺序' }) @IsNotEmpty({ message: '显示顺序不能为空' }) @Transform((v) => +v.value) @IsNumber() roleSort: number; @ApiProperty({ description: '数据范围(1:全部数据权限 2:自定数据权限 3:本部门数据权限 4:本部门及以下数据权限)', required:false }) @IsOptional() @IsString() dataScope?: string; @ApiProperty({ description: '菜单树选择项是否关联显示',required:false }) @IsOptional() @Transform((v) => +v.value) @IsNumber() menuCheckStrictly?: number; @ApiProperty({ description: '部门树选择项是否关联显示',required:false }) @IsOptional() @Transform((v) => +v.value) @IsNumber() deptCheckStrictly?: number; @ApiProperty({ description: '角色状态(0停用 1正常)' }) @IsNotEmpty({ message: '角色状态(0停用 1正常)不能为空' }) @IsString() status: string; @ApiProperty({ description: '创建时间',required:false }) @IsOptional() @IsString() createTime?: string; @ApiProperty({ description: '更新者',required:false }) @IsOptional() @IsString() updateBy?: string; @ApiProperty({ description: '更新时间',required:false }) @IsOptional() @IsString() updateTime?: string; @ApiProperty({ description: '备注',required:false }) @IsOptional() @IsString() remark?: string; @ApiProperty({ description: '菜单权限',required:false }) @IsOptional() @IsArray() menuIds: number[]; @ApiProperty({ description: '部门权限',required:false }) @IsOptional() @IsArray() deptIds: number[]; } /**@description 更新角色状态管理Dto */ export class UpdateSysRoleStatusDto { @ApiProperty({ description: '角色ID' }) @IsNotEmpty({ message: '角色ID不能为空' }) @Transform((v) => +v.value) @IsNumber() roleId?: number; @ApiProperty({ description: '角色状态(0停用 1正常)' }) @IsNotEmpty({ message: '角色状态(0停用 1正常)不能为空' }) @IsString() status: string; } /**@description 查询授权角色用户管理Dto */ export class QueryAllocatedListDto extends queryDomain { @IsNotEmpty({ message: '角色ID不能为空' }) @Transform((v) => +v.value) @IsNumber() roleId: number; @IsOptional() userName?: string; @IsOptional() phoneNumber?: string; } ================================================ FILE: server/src/admin/system/role/service/sys-role.service.ts ================================================ import { Injectable } from '@nestjs/common'; import { PrismaService } from '@/common/service/prisma/prisma.service'; import { Response } from 'express'; import { exportTable } from '@/common/utils'; import { QuerySysRoleDto, CreateSysRoleDto, UpdateSysRoleDto, UpdateSysRoleStatusDto, QueryAllocatedListDto, } from '../dto/index'; import { Prisma } from '@prismaClient'; import { isArray, isNotEmpty } from 'class-validator'; import * as assert from 'assert'; import { AuthService } from '@/common/service/auth/auth.service'; @Injectable() export class RoleService { constructor( private prisma: PrismaService, private authService: AuthService, ) {} /**@description 查询角色管理所有 */ async selectRoleAll() { return this.prisma.sysRole.findMany(); } /**@description 分页查询角色管理列表 */ async selectRoleList(q: QuerySysRoleDto) { const queryCondition: Prisma.SysRoleWhereInput = {}; if (isNotEmpty(q['roleName'])) { queryCondition.roleName = { contains: q.roleName, }; } if (isNotEmpty(q['roleKey'])) { queryCondition.roleKey = { contains: q.roleKey, }; } if (isNotEmpty(q['roleSort'])) { queryCondition.roleSort = { equals: q.roleSort, }; } if (isNotEmpty(q['dataScope'])) { queryCondition.dataScope = { equals: q.dataScope, }; } if (isNotEmpty(q['menuCheckStrictly'])) { queryCondition.menuCheckStrictly = { equals: q.menuCheckStrictly, }; } if (isNotEmpty(q['deptCheckStrictly'])) { queryCondition.deptCheckStrictly = { equals: q.deptCheckStrictly, }; } if (isNotEmpty(q['status'])) { queryCondition.status = { equals: q.status, }; } if ( isNotEmpty(q.params.beginCreateTime) && isNotEmpty(q.params.endCreateTime) ) { queryCondition.createTime = { lte: q.params.endCreateTime, gte: q.params.beginCreateTime, }; } if ( isNotEmpty(q.params.beginUpdateTime) && isNotEmpty(q.params.endUpdateTime) ) { queryCondition.updateTime = { lte: q.params.endUpdateTime, gte: q.params.beginUpdateTime, }; } return { rows: await this.prisma.sysRole.findMany({ skip: (q.pageNum - 1) * q.pageSize, take: q.pageSize, where: queryCondition, }), total: await this.prisma.sysRole.count({ where: queryCondition, }), }; } /**@description 分页查询属于角色的用户列表 */ async allocatedList(q: QueryAllocatedListDto) { const queryCondition: Prisma.SysUserWhereInput = { roles: { some: { roleId: q.roleId, }, }, }; if (isNotEmpty(q.userName)) { queryCondition.userName = { contains: q.userName, }; } if (isNotEmpty(q.phoneNumber)) { queryCondition.phonenumber = { contains: q.phoneNumber, }; } return { rows: await this.prisma.sysUser.findMany({ skip: (q.pageNum - 1) * q.pageSize, take: q.pageSize, where: queryCondition, }), total: await this.prisma.sysUser.count({ where: queryCondition, }), }; } /**@description 分页查询不属于角色的用户列表 */ async unallocatedList(q: QueryAllocatedListDto) { const queryCondition: Prisma.SysUserWhereInput = { roles: { every: { roleId: { not: q.roleId, }, }, }, }; if (isNotEmpty(q.userName)) { queryCondition.userName = { contains: q.userName, }; } if (isNotEmpty(q.phoneNumber)) { queryCondition.phonenumber = { contains: q.phoneNumber, }; } return { rows: await this.prisma.sysUser.findMany({ skip: (q.pageNum - 1) * q.pageSize, take: q.pageSize, where: queryCondition, }), total: await this.prisma.sysUser.count({ where: queryCondition, }), }; } //批量添加授权用户 async addRoleUser(roleId: number, userIds: number[]) { if (!userIds.length) return null; await this.prisma.sysUserRole.createMany({ data: userIds.map((v) => ({ userId: v, roleId, })), }); userIds.forEach((v) => this.authService.refreshUserInfo(v)); return true; } //批量取消授权用户 async cancelRoleUser(roleId: number, userIds: number[]) { if (!userIds.length) return null; await this.prisma.sysUserRole.deleteMany({ where: { roleId, userId: { in: userIds, }, }, }); userIds.forEach((v) => this.authService.refreshUserInfo(v)); return true; } /**@description 查询角色管理详情 */ async selectRoleByRoleId(roleId: number) { return this.prisma.sysRole.findUnique({ where: { roleId, }, }); } /**@description 新增角色管理 */ async addRole(sysRole: CreateSysRoleDto) { //删除掉空值 for (const key in sysRole) { !isNotEmpty(sysRole[key]) && delete sysRole[key]; } return this.prisma.$transaction(async (db) => { const { menuIds, ...role } = sysRole; const addRole = await db.sysRole.create({ data: role, }); if (isArray(menuIds) && menuIds.length) { await db.sysRoleMenu.createMany({ data: menuIds.map((v) => ({ menuId: v, roleId: addRole.roleId })), }); } return addRole; }); } /**@description 修改角色管理 */ async updateRole(sysRole: UpdateSysRoleDto) { //删除掉空值 for (const key in sysRole) { !isNotEmpty(sysRole[key]) && delete sysRole[key]; } return this.prisma.$transaction(async (db) => { const { menuIds, ...role } = sysRole; await db.sysRoleMenu.deleteMany({ where: { roleId: role.roleId } }); const res = await db.sysRole.update({ where: { roleId: role.roleId, }, data: role, }); if (isArray(menuIds) && menuIds.length) { await db.sysRoleMenu.createMany({ data: menuIds.map((v) => ({ menuId: v, roleId: res.roleId })), }); } //更新属于这个角色的用户的缓存信息 { const userIds = [ ...new Set( ( await db.sysUserRole.findMany({ where: { roleId: sysRole.roleId }, }) ).map((v) => v.userId), ), ]; userIds.forEach((userId) => { this.authService.refreshUserInfo(userId); }); } return res; }); } /**@description 批量删除角色管理 */ async deleteRoleByRoleIds(roleIds: number[]) { const userroles = await this.prisma.sysUserRole.findFirst({ where: { roleId: { in: roleIds }, }, }); assert(!userroles, '角色已被分配!'); return this.prisma.$transaction(async (db) => { await db.sysRoleDept.deleteMany({ where: { roleId: { in: roleIds, }, }, }); await db.sysRoleMenu.deleteMany({ where: { roleId: { in: roleIds, }, }, }); return db.sysRole.deleteMany({ where: { roleId: { in: roleIds, }, }, }); }); } /**@description 单个删除角色管理 */ async deleteRoleByRoleId(roleId: number) { const userroles = await this.prisma.sysUserRole.findFirst({ where: { roleId, }, }); assert(!userroles, '角色已被分配!'); return this.prisma.$transaction(async (db) => { await db.sysRoleDept.deleteMany({ where: { roleId, }, }); await db.sysRoleMenu.deleteMany({ where: { roleId, }, }); return db.sysRole.deleteMany({ where: { roleId, }, }); }); } /**@description 导出角色管理所有数据为xlsx */ async exportRole(res: Response) { const title = [ '角色ID', '角色名称', '角色权限字符串', '显示顺序', '数据范围(1:全部数据权限 2:自定数据权限 3:本部门数据权限 4:本部门及以下数据权限)', '菜单树选择项是否关联显示', '部门树选择项是否关联显示', '角色状态(0停用 1正常)', '删除标志(0删除 1存在)', '创建者', '创建时间', '更新者', '更新时间', '备注', ]; const data = (await this.prisma.sysRole.findMany()).map((v) => Object.values(v), ); data.unshift(title); exportTable(data, res); } /**@description 更新角色状态 */ async updateStatus(role: UpdateSysRoleStatusDto) { const res = await this.prisma.sysRole.update({ where: { roleId: role.roleId, }, data: role, }); //更新属于这个角色的用户的缓存信息 { const userIds = [ ...new Set( ( await this.prisma.sysUserRole.findMany({ where: { roleId: role.roleId }, }) ).map((v) => v.userId), ), ]; userIds.forEach((userId) => { this.authService.refreshUserInfo(userId); }); } return res; } /**@description 分配数据权限 */ async dataScope(sysRole: UpdateSysRoleDto) { //删除掉空值 for (const key in sysRole) { !isNotEmpty(sysRole[key]) && delete sysRole[key]; } return this.prisma.$transaction(async (db) => { const { deptIds, ...role } = sysRole; await db.sysRoleDept.deleteMany({ where: { roleId: role.roleId } }); await db.sysRole.update({ where: { roleId: role.roleId, }, data: role, }); if (isArray(deptIds) && deptIds.length) { return await db.sysRoleDept.createMany({ data: deptIds.map((v) => ({ deptId: v, roleId: role.roleId })), }); } }); } } ================================================ FILE: server/src/admin/system/role/sys-role.controller.ts ================================================ import { Body, Controller, Delete, Get, Param, ParseIntPipe, Post, Put, Query, Req, Res, } from '@nestjs/common'; import { ParseIntArrayPipe } from '@/common/pipe/parse-int-array.pipe'; import Result from '@/common/result/Result'; import { ApiBearerAuth, ApiBody, ApiOperation, ApiQuery, ApiResponse, ApiTags, } from '@nestjs/swagger'; import { RequirePermission } from '@/common/decorator/require-premission.decorator'; import { nowDateTime } from '@/common/utils'; import { RoleService } from './service/sys-role.service'; import { QuerySysRoleDto, CreateSysRoleDto, UpdateSysRoleDto, UpdateSysRoleStatusDto, QueryAllocatedListDto, } from './dto/index'; import { Response } from 'express'; import { SysRole } from '@prismaClient'; import { TableDataInfo } from '@/common/domain/TableDataInfo'; import { DeptService } from '../dept/service/sys-dept.service'; import { PrismaService } from '@/common/service/prisma/prisma.service'; import { RequireRole } from '@/common/decorator/require-role.decorator'; @ApiTags('角色管理') @ApiBearerAuth() @Controller('system/role') export class SysRoleController { constructor( private roleService: RoleService, private deptService: DeptService, private prisma: PrismaService, ) {} @ApiOperation({ summary: '查询角色管理列表' }) @ApiResponse({ type: TableDataInfo }) @RequirePermission('system:role:query') @Get('/list') async listRole(@Query() q: QuerySysRoleDto): Promise> { return Result.TableData(await this.roleService.selectRoleList(q)); } @ApiOperation({ summary: '查询属于角色的用户管理列表' }) @RequirePermission('system:role:query') @Get('/authUser/allocatedList') async listAllocatedList(@Query() q: QueryAllocatedListDto) { return Result.TableData(await this.roleService.allocatedList(q)); } @ApiOperation({ summary: '查询不属于角色的用户管理列表' }) @RequirePermission('system:role:query') @Get('authUser/unallocatedList') async listUnallocatedList(@Query() q: QueryAllocatedListDto) { return Result.TableData(await this.roleService.unallocatedList(q)); } @ApiOperation({ summary: '批量添加用户到该角色' }) @RequirePermission('system:role:edit') @Put('authUser/selectAll') async addAllRoleUser( @Query('roleId', ParseIntPipe) roleId: number, @Query('userIds', ParseIntArrayPipe) userIds: number[], ) { await this.roleService.addRoleUser(roleId, userIds); return Result.ok(); } @ApiOperation({ summary: '批量取消用户该角色' }) @RequirePermission('system:role:edit') @Put('authUser/cancelAll') async cancelAllRoleUser( @Query('roleId', ParseIntPipe) roleId: number, @Query('userIds', ParseIntArrayPipe) userIds: number[], ) { await this.roleService.cancelRoleUser(roleId, userIds); return Result.ok(); } @ApiOperation({ summary: '取消单个用户该角色' }) @RequirePermission('system:role:edit') @Put('authUser/cancel') async cancelRoleUser( @Body('roleId', ParseIntPipe) roleId: number, @Body('userId', ParseIntPipe) userIds: number, ) { await this.roleService.cancelRoleUser(roleId, [userIds]); return Result.ok(); } @ApiOperation({ summary: '导出角色管理xlsx文件' }) @RequirePermission('system:role:export') @Get('/export') async export(@Res() res: Response): Promise { return this.roleService.exportRole(res); } @ApiOperation({ summary: '获取部门树' }) @RequirePermission('system:role:edit') @Get('/deptTree/:roleId') async getDeptTrees(@Param('roleId', ParseIntPipe) roleId: number) { const depts = await this.deptService.getDeptTree(); const checkedKeys = ( await this.prisma.sysRoleDept.findMany({ where: { roleId, }, }) ) .map((v) => v.deptId) .filter((v) => !hasChildren(depts, v)); function hasChildren(arr, id) { for (const item of arr) { if (item.id === id) { return item.children.length > 0; } else { const r = hasChildren(item.children, id); if (r !== null) return r; } } return null; } return { ...Result.ok(), depts, checkedKeys, }; } @ApiOperation({ summary: '查询角色管理详细' }) @ApiResponse({ type: Result }) @RequirePermission('system:role:query') @Get('/:roleId') async getRole( @Param('roleId', ParseIntPipe) roleId: number, ): Promise> { return Result.ok(await this.roleService.selectRoleByRoleId(roleId)); } @ApiOperation({ summary: '新增角色管理' }) @ApiResponse({ type: Result }) @ApiBody({ type: CreateSysRoleDto }) @RequirePermission('system:role:add') @Post('/') async addRole( @Body() sysRole: CreateSysRoleDto, @Req() req, ): Promise> { sysRole = { ...sysRole, dataScope: '5', //自定义权限 createTime: nowDateTime(), updateTime: nowDateTime(), createBy: req.user?.userName, updateBy: req.user?.userName, }; return Result.ok(await this.roleService.addRole(sysRole)); } @ApiOperation({ summary: '修改角色管理' }) @ApiResponse({ type: Result }) @ApiBody({ type: UpdateSysRoleDto }) @RequirePermission('system:role:edit') @Put('/') async updateRole( @Body() sysRole: UpdateSysRoleDto, @Req() req, ): Promise> { delete sysRole.dataScope; sysRole = { ...sysRole, updateTime: nowDateTime(), updateBy: req.user?.userName, }; await this.roleService.updateRole(sysRole); return Result.ok('修改成功!'); } @ApiOperation({ summary: '分配用户角色' }) @ApiResponse({ type: Result }) @ApiBody({ type: UpdateSysRoleDto }) @RequireRole('admin') @Put('/dataScope') async dataScope( @Body() sysRole: UpdateSysRoleDto, @Req() req, ): Promise> { sysRole = { ...sysRole, updateTime: nowDateTime(), updateBy: req.user?.userName, }; await this.roleService.dataScope(sysRole); return Result.ok('修改成功!'); } @ApiOperation({ summary: '修改角色状态' }) @ApiResponse({ type: Result }) @ApiBody({ type: UpdateSysRoleDto }) @RequirePermission('system:role:edit') @Put('/changeStatus') async updateRoleStatus( @Body() sysRole: UpdateSysRoleStatusDto, ): Promise> { await this.roleService.updateStatus(sysRole); return Result.ok('修改成功!'); } @ApiOperation({ summary: '删除角色管理' }) @ApiResponse({ type: Result }) @RequirePermission('system:role:remove') @Delete('/:ids') async delRole( @Param('ids', ParseIntArrayPipe) roleIds: number[], ): Promise> { const { count } = await this.roleService.deleteRoleByRoleIds(roleIds); return Result.toAjax(count); } } ================================================ FILE: server/src/admin/system/user/dto/index.ts ================================================ import { BaseDomain } from '@/common/domain/BaseDomain'; import { ApiProperty } from '@nestjs/swagger'; import { Transform } from 'class-transformer'; import { IsNotEmpty, IsNumber, IsString, IsOptional, MinLength, } from 'class-validator'; import { queryDomain } from '@/common/domain/queryDomain'; /**@description 查询用户管理Dto */ export class QuerySysUserDto extends queryDomain { @ApiProperty({ description: '部门ID',required:false }) @IsOptional() @Transform((v) => +v.value) @IsNumber() deptId: number | null; @ApiProperty({ description: '用户账号',required:false }) @IsOptional() userName: string | null; @ApiProperty({ description: '用户昵称',required:false }) @IsOptional() nickName: string | null; @ApiProperty({ description: '用户类型(00系统用户)',required:false }) @IsOptional() userType: string | null; @ApiProperty({ description: '用户邮箱',required:false }) @IsOptional() email: string | null; @ApiProperty({ description: '手机号码',required:false }) @IsOptional() phonenumber: string | null; @ApiProperty({ description: '用户性别(0男 1女 2未知)',required:false }) @IsOptional() sex: string | null; @ApiProperty({ description: '头像地址',required:false }) @IsOptional() avatar: string | null; @ApiProperty({ description: '密码',required:false }) @IsOptional() password: string | null; @ApiProperty({ description: '帐号状态(0停用,1正常 )',required:false }) @IsOptional() status: string | null; @ApiProperty({ description: '最后登录IP',required:false }) @IsOptional() loginIp: string | null; } /**@description 创建用户管理Dto */ export class CreateSysUserDto extends BaseDomain { @ApiProperty({ description: '部门ID',required:false }) @IsOptional() @Transform((v) => +v.value) @IsNumber() deptId?: number; @ApiProperty({ description: '用户账号' }) @IsNotEmpty({ message: '用户账号不能为空' }) @IsString() userName: string; @ApiProperty({ description: '用户昵称' }) @IsNotEmpty({ message: '用户昵称不能为空' }) @IsString() nickName: string; @ApiProperty({ description: '用户类型(00系统用户)',required:false }) @IsOptional() @IsString() userType?: string; @ApiProperty({ description: '用户邮箱',required:false }) @IsOptional() @IsString() email?: string; @ApiProperty({ description: '手机号码',required:false }) @IsOptional() @IsString() phonenumber?: string; @ApiProperty({ description: '用户性别(0男 1女 2未知)',required:false }) @IsOptional() @IsString() sex?: string; @ApiProperty({ description: '头像地址',required:false }) @IsOptional() @IsString() avatar?: string; @ApiProperty({ description: '密码',required:false }) @IsOptional() @IsString() password?: string; @ApiProperty({ description: '帐号状态(0停用,1正常 )',required:false }) @IsOptional() @IsString() status?: string; @ApiProperty({ description: '最后登录IP',required:false }) @IsOptional() @IsString() loginIp?: string; @ApiProperty({ description: '最后登录时间',required:false }) @IsOptional() @IsString() loginDate?: string; @ApiProperty({ description: '创建者',required:false }) @IsOptional() @IsString() createBy?: string; @ApiProperty({ description: '创建时间',required:false }) @IsOptional() @IsString() createTime?: string; @ApiProperty({ description: '更新者',required:false }) @IsOptional() @IsString() updateBy?: string; @ApiProperty({ description: '更新时间',required:false }) @IsOptional() @IsString() updateTime?: string; @ApiProperty({ description: '备注',required:false }) @IsOptional() @IsString() remark?: string; @ApiProperty({ description: '角色ids',required:false }) @IsOptional() roleIds?: number[]; @ApiProperty({ description: '部门ids',required:false }) @IsOptional() postIds?: number[]; } /**@description 更新用户管理Dto */ export class UpdateSysUserDto extends BaseDomain { @ApiProperty({ description: '用户ID' }) @IsNotEmpty({ message: '用户ID不能为空' }) @Transform((v) => +v.value) @IsNumber() userId: number; @ApiProperty({ description: '用户账号' }) @IsNotEmpty({ message: '用户账号不能为空' }) @IsString() userName: string; @ApiProperty({ description: '用户昵称' }) @IsNotEmpty({ message: '用户昵称不能为空' }) @IsString() nickName: string; @ApiProperty({ description: '用户类型(00系统用户)',required:false }) @IsOptional() @IsString() userType?: string; @ApiProperty({ description: '用户邮箱',required:false }) @IsOptional() @IsString() email?: string; @ApiProperty({ description: '手机号码',required:false }) @IsOptional() @IsString() phonenumber?: string; @ApiProperty({ description: '用户性别(0男 1女 2未知)',required:false }) @IsOptional() @IsString() sex?: string; @ApiProperty({ description: '头像地址',required:false }) @IsOptional() @IsString() avatar?: string; @ApiProperty({ description: '帐号状态(0停用,1正常 )',required:false }) @IsOptional() @IsString() status?: string; @ApiProperty({ description: '最后登录IP',required:false }) @IsOptional() @IsString() loginIp?: string; @ApiProperty({ description: '最后登录时间',required:false }) @IsOptional() @IsString() loginDate?: string; @ApiProperty({ description: '更新者',required:false }) @IsOptional() @IsString() updateBy?: string; @ApiProperty({ description: '更新时间',required:false }) @IsOptional() @IsString() updateTime?: string; @ApiProperty({ description: '备注',required:false }) @IsOptional() @IsString() remark?: string; @ApiProperty({ description: '角色ids',required:false }) @IsOptional() roleIds?: number[]; @ApiProperty({ description: '部门ids',required:false }) @IsOptional() postIds?: number[]; } /**@description 更新用户状态 */ export class UpdateSysUserStatusDto extends BaseDomain { @ApiProperty({ description: '用户ID' }) @IsNotEmpty({ message: '用户ID不能为空' }) @Transform((v) => +v.value) @IsNumber() userId?: number; @ApiProperty({ description: '帐号状态(0停用,1正常 )',required:false }) @IsOptional() @IsNotEmpty({ message: '请传入状态' }) status?: string; } /**@description 重置密码 */ export class resetPasswordDto extends BaseDomain { @ApiProperty({ description: '用户ID' }) @IsNotEmpty({ message: '用户ID不能为空' }) @Transform((v) => +v.value) @IsNumber() userId?: number; @ApiProperty({ description: '密码' }) @IsNotEmpty({ message: '密码不能为空' }) @MinLength(6, { message: '密码长度不能小于6' }) @IsString() password?: string; } /**@description 修改用户个人信息 */ export class updateProfileDto { @ApiProperty({ description: '用户昵称' }) @IsNotEmpty({ message: '用户昵称不能为空' }) @IsString() nickName: string; @ApiProperty({ description: '用户邮箱' }) @IsNotEmpty({ message: '邮箱不能为空' }) @IsString() email?: string; @ApiProperty({ description: '手机号码' }) @IsNotEmpty({ message: '手机号码不能为空' }) @IsString() phonenumber?: string; @ApiProperty({ description: '用户性别(0男 1女 2未知)',required:false }) @IsOptional() @IsString() sex?: string; } ================================================ FILE: server/src/admin/system/user/service/sys-user.service.ts ================================================ import { Injectable } from '@nestjs/common'; import { PrismaService } from '@/common/service/prisma/prisma.service'; import { Response } from 'express'; import { exportTable } from '@/common/utils'; import { QuerySysUserDto, CreateSysUserDto, UpdateSysUserDto, resetPasswordDto, UpdateSysUserStatusDto, updateProfileDto, } from '../dto/index'; import { Prisma } from '@prismaClient'; import { isNotEmpty } from 'class-validator'; import * as assert from 'assert'; import { AuthService } from '@/common/service/auth/auth.service'; import { isArray } from 'lodash'; import Result from '@/common/result/Result'; import { redisUtils } from '@/common/utils/redisUtils'; import { Constants } from '@/common/constant/Constants'; @Injectable() export class UserService { constructor( private prisma: PrismaService, private authService: AuthService, ) {} /**@description 查询用户所有 */ async selectUserAll() { return this.prisma.sysUser.findMany(); } /**@description 分页查询用户列表 */ async selectUserList(q: QuerySysUserDto) { const queryCondition: Prisma.SysUserWhereInput = {}; if (isNotEmpty(q['deptId'])) { queryCondition.deptId = { equals: q.deptId, }; } if (isNotEmpty(q['userName'])) { queryCondition.userName = { contains: q.userName, }; } if (isNotEmpty(q['nickName'])) { queryCondition.nickName = { contains: q.nickName, }; } if (isNotEmpty(q['userType'])) { queryCondition.userType = { equals: q.userType, }; } if (isNotEmpty(q['email'])) { queryCondition.email = { contains: q.email, }; } if (isNotEmpty(q['phonenumber'])) { queryCondition.phonenumber = { contains: q.phonenumber, }; } if (isNotEmpty(q['sex'])) { queryCondition.sex = { equals: q.sex, }; } if (isNotEmpty(q['avatar'])) { queryCondition.avatar = { equals: q.avatar, }; } if (isNotEmpty(q['password'])) { queryCondition.password = { equals: q.password, }; } if (isNotEmpty(q['status'])) { queryCondition.status = { equals: q.status, }; } if (isNotEmpty(q['loginIp'])) { queryCondition.loginIp = { equals: q.loginIp, }; } if ( isNotEmpty(q.params.beginLoginDate) && isNotEmpty(q.params.endLoginDate) ) { queryCondition.loginDate = { lte: q.params.endLoginDate, gte: q.params.beginLoginDate, }; } if ( isNotEmpty(q.params.beginCreateTime) && isNotEmpty(q.params.endCreateTime) ) { queryCondition.createTime = { lte: q.params.endCreateTime, gte: q.params.beginCreateTime, }; } if ( isNotEmpty(q.params.beginUpdateTime) && isNotEmpty(q.params.endUpdateTime) ) { queryCondition.updateTime = { lte: q.params.endUpdateTime, gte: q.params.beginUpdateTime, }; } return { rows: await this.prisma.sysUser.findMany({ skip: (q.pageNum - 1) * q.pageSize, take: q.pageSize, where: queryCondition, include: { dept: true, }, }), total: await this.prisma.sysUser.count({ where: queryCondition, }), }; } /**@description 查询用户详情 */ async selectUserByUserId(userId: number) { return this.prisma.sysUser.findUnique({ where: { userId, }, include: { roles: true, posts: true, }, }); } /**@description 新增用户 */ async addUser(sysUser: CreateSysUserDto) { sysUser.password = this.authService.encrypt(sysUser.password); const { roleIds, postIds, ...user } = sysUser; //删除掉空值 for (const key in sysUser) { !isNotEmpty(sysUser[key]) && delete sysUser[key]; } return this.prisma.$transaction(async (db) => { //更新用户信息 const addUser = await db.sysUser.create({ data: user, }); const { userId } = addUser; //添加用户的部门和角色 if (isArray(roleIds) && roleIds.length) { await db.sysUserRole.createMany({ data: roleIds.map((v) => ({ userId, roleId: v })), }); } if (isArray(postIds) && postIds.length) { await db.sysUserPost.createMany({ data: postIds.map((v) => ({ userId, postId: v, })), }); } return addUser; }); } /**@description 修改用户 */ async updateUser(sysUser: UpdateSysUserDto) { const { roleIds, postIds, ...user } = sysUser; //删除掉空值 for (const key in sysUser) { !isNotEmpty(sysUser[key]) && delete sysUser[key]; } await this.prisma.$transaction(async (db) => { //删除用户的部门和角色 { await db.sysUserPost.deleteMany({ where: { userId: sysUser.userId, }, }); await db.sysUserRole.deleteMany({ where: { userId: sysUser.userId, }, }); } //添加用户的部门和角色 if (isArray(roleIds) && roleIds.length) { await db.sysUserRole.createMany({ data: roleIds.map((v) => ({ userId: sysUser.userId, roleId: v, })), }); } if (isArray(postIds) && postIds.length) { await db.sysUserPost.createMany({ data: postIds.map((v) => ({ userId: sysUser.userId, postId: v, })), }); } //更新用户信息 return await db.sysUser.update({ where: { userId: sysUser.userId, }, data: user, }); }); //如果为禁用状态,我们把用户的token删除,禁用账户! if (sysUser.status === '0') { await redisUtils.del(Constants.LOGIN_TOKEN_KEY + sysUser.userId); } return Result.ok(); } /**@description 修改用户密码 */ async resetPassword(sysUser: resetPasswordDto) { sysUser.password = this.authService.encrypt(sysUser.password); //删除掉空值 const res = await this.prisma.sysUser.update({ where: { userId: sysUser.userId, }, data: { password: sysUser.password, }, }); await redisUtils.del(Constants.LOGIN_TOKEN_KEY + sysUser.userId); return res; } /**@description 修改用户状态 */ async updateStatus(sysUser: UpdateSysUserStatusDto) { const res = await this.prisma.sysUser.update({ where: { userId: sysUser.userId, }, data: { status: sysUser.status, }, }); //如果为禁用状态,我们把用户的token删除,禁用账户! if (sysUser.status === '0') { await redisUtils.del(Constants.LOGIN_TOKEN_KEY + sysUser.userId); } return res; } /**@description 批量删除用户 */ async deleteUserByUserIds(userIds: number[]) { return this.prisma.$transaction(async (db) => { await db.sysUserPost.deleteMany({ where: { userId: { in: userIds, }, }, }); await db.sysUserRole.deleteMany({ where: { userId: { in: userIds, }, }, }); const res = await db.sysUser.deleteMany({ where: { userId: { in: userIds, }, }, }); //清空用户的登录token for (const id of userIds) { await redisUtils.del(Constants.LOGIN_TOKEN_KEY + id); } return res; }); } /**@description 单个删除用户 */ async deleteUserByUserId(userId: number) { return this.prisma.$transaction(async (db) => { await db.sysUserPost.deleteMany({ where: { userId, }, }); await db.sysUserRole.deleteMany({ where: { userId, }, }); const res = await db.sysUser.delete({ where: { userId, }, }); await redisUtils.del(Constants.LOGIN_TOKEN_KEY + userId); return res; }); } /**@description 导出用户所有数据为xlsx */ async exportUser(res: Response) { const title = [ '用户ID', '部门ID', '用户账号', '用户昵称', '用户类型(00系统用户)', '用户邮箱', '手机号码', '用户性别(0男 1女 2未知)', '头像地址', '密码', '帐号状态(0停用,1正常 )', '删除标志(0删除,1可用)', '最后登录IP', '最后登录时间', '创建者', '创建时间', '更新者', '更新时间', '备注', ]; const data = (await this.selectUserAll()).map((v) => Object.values(v)); data.unshift(title); exportTable(data, res); } /** * @description 查询授权角色 */ async getAuthRole(userId: number) { const user = await this.prisma.sysUser.findUnique({ where: { userId, }, include: { dept: true, roles: { include: { role: true, }, }, }, }); return { ...user, roles: user.roles.map((v) => v.role), }; } /** * @description 保存授权角色 */ async updateAuthRole(userId: number, roleIds: number[]) { await this.prisma.$transaction(async (db) => { await db.sysUserRole.deleteMany({ where: { userId, }, }); await db.sysUserRole.createMany({ data: roleIds.map((roleId) => ({ userId, roleId, })), }); }); return this.authService.refreshUserInfo(userId); } /** * @description 查询用户个人信息 */ async getUserProfile(userId) { const user = await this.prisma.sysUser.findUnique({ where: { userId, }, include: { dept: true, posts: { include: { post: true, }, }, roles: { include: { role: true, }, }, }, }); return { ...user, roleGroup: user.roles.map((v) => v.role.roleName).join(','), postGroup: user.posts.map((v) => v.post.postName).join(','), }; } /** * @description 修改用户个人信息 */ async updateUserProfile(userId: number, user: updateProfileDto) { await this.prisma.sysUser.update({ where: { userId, }, data: user, }); return this.authService.refreshUserInfo(userId); } /** 修改头像 */ async updateAvatar(userId: number, avatar: string) { await this.prisma.sysUser.update({ where: { userId, }, data: { avatar, }, }); return this.authService.refreshUserInfo(userId); } /** 修改密码 */ async updateUserPwd( userId: number, oldPassword: string, newPassword: string, ) { assert(isNotEmpty(oldPassword) && isNotEmpty(newPassword), '请检查参数!'); assert(oldPassword.length > 5 && newPassword.length > 5, '请检查参数!'); const user = await this.prisma.sysUser.findUnique({ where: { userId, }, }); assert( this.authService.encrypt(oldPassword) === user.password, '验证失败:旧密码不正确!', ); const res = await this.prisma.sysUser.update({ where: { userId, }, data: { password: this.authService.encrypt(newPassword), }, }); await redisUtils.del(Constants.LOGIN_TOKEN_KEY + userId); return res; } } ================================================ FILE: server/src/admin/system/user/sys-user.controller.ts ================================================ import { BadRequestException, Body, Controller, Delete, Get, Param, ParseIntPipe, Post, Put, Query, Req, Res, UploadedFile, UseInterceptors, } from '@nestjs/common'; import { ParseIntArrayPipe } from '@/common/pipe/parse-int-array.pipe'; import Result from '@/common/result/Result'; import { ApiBearerAuth, ApiBody, ApiOperation, ApiQuery, ApiResponse, ApiTags, } from '@nestjs/swagger'; import { RequirePermission } from '@/common/decorator/require-premission.decorator'; import { nowDateTime, tree } from '@/common/utils'; import { UserService } from './service/sys-user.service'; import { QuerySysUserDto, CreateSysUserDto, UpdateSysUserDto, resetPasswordDto, UpdateSysUserStatusDto, updateProfileDto, } from './dto/index'; import { Response } from 'express'; import { SysDept, SysUser } from '@prismaClient'; import { TableDataInfo } from '@/common/domain/TableDataInfo'; import { QuerySysDeptDto } from '../dept/dto'; import { DeptService } from '../dept/service/sys-dept.service'; import { RequireRole } from '@/common/decorator/require-role.decorator'; import { PrismaService } from '@/common/service/prisma/prisma.service'; import { getFilePath, uploadAvatarConfig, } from '@/admin/common/upload/config/uploadConfig'; import { FileInterceptor } from '@nestjs/platform-express'; @ApiTags('用户管理') @ApiBearerAuth() @Controller('system/user') export class SysUserController { constructor( private userService: UserService, private deptService: DeptService, private prisma: PrismaService, ) {} @ApiOperation({ summary: '获取岗位和角色选择' }) @RequirePermission('system:user:add') @Get('/') async getRolePost() { const roles = await this.prisma.sysRole.findMany({ where: { roleId: { not: 1 } }, }); const posts = await this.prisma.sysPost.findMany(); return { ...Result.ok(), roles, posts, }; } @ApiOperation({ summary: '查询用户管理列表' }) @ApiResponse({ type: TableDataInfo }) @RequirePermission('system:user:query') @Get('/list') async listUser(@Query() q: QuerySysUserDto): Promise> { return Result.TableData(await this.userService.selectUserList(q)); } @ApiOperation({ summary: '查询部门列表' }) @ApiResponse({ type: Result }) @RequirePermission('system:dept:query') @Get('/deptTree') async listDept(@Query() q: QuerySysDeptDto): Promise> { const depts = (await this.deptService.selectDeptList(q)).map((v) => ({ ...v, id: v.deptId, label: v.deptName, })); return Result.ok(tree(depts, 'id', 'parentId', 0)); } @ApiOperation({ summary: '导出用户管理xlsx文件' }) @RequirePermission('system:user:export') @Get('/export') async export(@Res() res: Response): Promise { return this.userService.exportUser(res); } @ApiOperation({ summary: '查询授权角色' }) @RequireRole('admin') @Get('/authRole/:userId') async getAuthRole( @Param('userId', ParseIntPipe) userId: number, ): Promise { const userInfo = await this.userService.getAuthRole(userId); const roles = ( await this.prisma.sysRole.findMany({ where: { roleId: { not: 1, }, }, orderBy: { roleSort: 'asc', }, }) ).map((v) => { return { ...v, flag: userInfo.roles.find((z) => z.roleId === v.roleId), }; }); return { ...Result.ok(), user: userInfo, roles, }; } @ApiOperation({ summary: '保存授权角色' }) @RequireRole('admin') @ApiResponse({ type: Result }) @Put('/authRole') async updateAuthRole( @Query('userId', ParseIntPipe) userId: number, @Query('roleIds', ParseIntArrayPipe) roleIds: number[], ): Promise> { await this.userService.updateAuthRole(userId, roleIds); return Result.ok(); } @ApiOperation({ summary: '查询用户信息' }) @Get('/profile') async getUserProfile(@Req() req): Promise { const userInfo = await this.userService.getUserProfile(req.userId); return { ...Result.ok(userInfo), roleGroup: userInfo.roleGroup, postGroup: userInfo.postGroup, }; } @ApiOperation({ summary: '修改用户个人基础信息' }) @Put('/profile') async updateUserProfile( @Req() req, @Body() user: updateProfileDto, ): Promise> { await this.userService.updateUserProfile(req.userId, user); return Result.ok(); } @ApiOperation({ summary: '修改个人密码' }) @Put('/profile/updatePwd') async updateUserPwd( @Req() req, @Query('oldPassword') oldPassword: string, @Query('newPassword') newPassword: string, ): Promise> { await this.userService.updateUserPwd(req.userId, oldPassword, newPassword); return Result.ok(); } /** * @description 用户头像上传 */ @UseInterceptors(FileInterceptor('avatarfile', uploadAvatarConfig)) @Post('/profile/avatar') async updateAvatar(@UploadedFile() file: Express.Multer.File, @Req() req) { const userId = req.userId; if (!file) { return Result.BadRequest('请选择上传图片!'); } const avatar = getFilePath(file); await this.userService.updateAvatar(userId, avatar); return { ...Result.ok(), imgUrl: avatar, }; } @ApiOperation({ summary: '查询用户管理详细' }) @RequirePermission('system:user:query') @Get('/:userId') async getUser(@Param('userId', ParseIntPipe) userId: number): Promise { const user = await this.userService.selectUserByUserId(userId); const roles = await this.prisma.sysRole.findMany({ where: { roleId: { not: 1 } }, }); const posts = await this.prisma.sysPost.findMany(); return { ...Result.ok(user), roles, posts, roleIds: user.roles.map((v) => v.roleId), postIds: user.posts.map((v) => v.postId), }; } @ApiOperation({ summary: '新增用户管理' }) @ApiResponse({ type: Result }) @ApiBody({ type: CreateSysUserDto }) @RequirePermission('system:user:add') @Post('/') async addUser( @Body() sysUser: CreateSysUserDto, @Req() req, ): Promise> { sysUser = { ...sysUser, createTime: nowDateTime(), updateTime: nowDateTime(), createBy: req.user?.userName, updateBy: req.user?.userName, }; //过滤掉设置超级管理员角色 sysUser.roleIds = sysUser.roleIds.filter((v) => v !== 1); return Result.ok(await this.userService.addUser(sysUser)); } @ApiOperation({ summary: '修改用户管理' }) @ApiResponse({ type: Result }) @ApiBody({ type: UpdateSysUserDto }) @RequirePermission('system:user:edit') @Put('/') async updateUser( @Body() sysUser: UpdateSysUserDto, @Req() req, ): Promise> { //不能修改超级管理员 if (sysUser.userId === 1) throw new BadRequestException('非法操作!'); //过滤掉设置超级管理员角色 sysUser.roleIds = sysUser.roleIds.filter((v) => v !== 1); //当前用户不能修改自己的状态 if (sysUser.userId === req.userId) { delete sysUser.status; } sysUser = { ...sysUser, updateTime: nowDateTime(), updateBy: req.user?.userName, }; await this.userService.updateUser(sysUser); return Result.ok('修改成功!'); } @ApiOperation({ summary: '删除用户管理' }) @ApiResponse({ type: Result }) @RequirePermission('system:user:remove') @Delete('/:ids') async delUser( @Req() req, @Param('ids', ParseIntArrayPipe) userIds: number[], ): Promise> { //不能删除自己或者超级管理员的账号 userIds = userIds.filter((v) => v !== 1 && v != req.userId); const { count } = await this.userService.deleteUserByUserIds(userIds); return Result.toAjax(count); } @ApiOperation({ summary: '重置用户密码' }) @ApiResponse({ type: Result }) @ApiBody({ type: resetPasswordDto }) @RequireRole('admin') @Put('/resetPwd') async resetPassword(@Body() sysUser: resetPasswordDto): Promise> { await this.userService.resetPassword(sysUser); return Result.ok('修改成功!'); } @ApiOperation({ summary: '修改用户状态' }) @ApiResponse({ type: Result }) @ApiBody({ type: UpdateSysUserStatusDto }) @RequireRole('admin') @Put('/changeStatus') async updateUserStatus( @Body() sysUser: UpdateSysUserStatusDto, ): Promise> { await this.userService.updateStatus(sysUser); return Result.ok('修改成功!'); } } ================================================ FILE: server/src/app.module.ts ================================================ import { MiddlewareConsumer, Module, NestModule, ValidationError, ValidationPipe, } from '@nestjs/common'; import { AdminModule } from './admin/admin.module'; import { CommonModule } from './common/common.module'; import { AuthMiddleware } from './common/middleware/auth/auth.middleware'; import { AuthService } from './common/service/auth/auth.service'; import { Config } from './config'; import { PermissionGuard } from './common/guard/permission/permission.guard'; import { RoleGuard } from './common/guard/permission/role.guard'; import { APP_FILTER, APP_GUARD, APP_INTERCEPTOR, APP_PIPE } from '@nestjs/core'; import { AssertionErrorFilter, AuthorizationFilter, BadRequestFilter, ForbiddenExceptionFilter, GlobalErrorFilter, MulterErrFilter, NotFoundErrFilter, PayloadTooLargeFilter, ThrottlerExceptionFilter, ValidationExceptionFilter, } from '@/common/filter/global-error.filter'; import { ValidationException } from './common/exception/ValidationException'; import { ThrottlerModule } from '@nestjs/throttler'; import { ThrottlerCustomGuard } from './common/guard/throttler/throttler-custom.guard'; import { RemoveThrottleHeadersInterceptor } from './common/interceptors/remove-throttle-headers.interceptor'; import '@/common/utils/email'; import { ScheduleModule } from '@nestjs/schedule'; import { TasksService } from './schedule'; import { ThrottlerStorageRedisService } from 'nestjs-throttler-storage-redis'; import Result from './common/result/Result'; @Module({ imports: [ AdminModule, CommonModule, ThrottlerModule.forRoot({ throttlers: [ { name: 'default', ttl: Config.rateLimit.ttl, limit: Config.rateLimit.limit, }, ], storage: Config.rateLimit.storage === 'redis' ? new ThrottlerStorageRedisService({ ...Config.redis, disconnectTimeout: 60 * 5 * 1000, }) : null, }), ScheduleModule.forRoot(), ], controllers: [], providers: [ TasksService, AuthService, PermissionGuard, RoleGuard, { provide: APP_GUARD, useClass: ThrottlerCustomGuard, }, { provide: APP_GUARD, useClass: PermissionGuard, }, { provide: APP_GUARD, useClass: RoleGuard, }, { provide: APP_FILTER, useClass: GlobalErrorFilter, }, { provide: APP_FILTER, useClass: BadRequestFilter, }, { provide: APP_FILTER, useClass: ThrottlerExceptionFilter, }, { provide: APP_FILTER, useClass: PayloadTooLargeFilter, }, { provide: APP_FILTER, useClass: AuthorizationFilter, }, { provide: APP_FILTER, useClass: ForbiddenExceptionFilter, }, { provide: APP_FILTER, useClass: AssertionErrorFilter, }, { provide: APP_FILTER, useClass: ValidationExceptionFilter, }, { provide: APP_FILTER, useClass: MulterErrFilter, }, { provide: APP_FILTER, useClass: NotFoundErrFilter, }, { provide: APP_PIPE, useFactory() { return new ValidationPipe({ whitelist: true, // 自动剔除非 DTO 类中的字段 // forbidNonWhitelisted: true, // 如果存在非 DTO 类中的字段则抛出异常 exceptionFactory: (errors: ValidationError[]) => { const messages = errors .map((error) => Object.values(error.constraints)) .flat(); return new ValidationException(`参数验证失败: ${messages[0]}`); // return new ValidationException(`参数验证失败: ${messages.join(', ')}`); }, }); }, }, { provide: APP_INTERCEPTOR, useClass: RemoveThrottleHeadersInterceptor, }, ], }) export class AppModule implements NestModule { configure(consumer: MiddlewareConsumer) { const demo:any = (req, res, next) => { if (Config.is_demo && req.method !== "GET") { return res.send(Result.Error("演示模式,不允许操作")); } else { next(); } }; const middlewares = [AuthMiddleware] if (Config.is_demo) { middlewares.push(demo); } consumer .apply(...middlewares) .exclude('/login', '/logout', '/captchaImage') .forRoutes('*'); } } ================================================ FILE: server/src/common/common.module.ts ================================================ import { Global, Module } from '@nestjs/common'; import { PrismaService } from './service/prisma/prisma.service'; import { AuthService } from './service/auth/auth.service'; import { GenService } from './service/gen/gen.service'; @Global() @Module({ providers: [PrismaService, AuthService, GenService], exports: [PrismaService, AuthService], imports: [], }) export class CommonModule {} ================================================ FILE: server/src/common/constant/Constants.ts ================================================ /** * 通用常量信息 */ export class Constants { /** * UTF-8 字符集 */ public static readonly UTF8: string = 'UTF-8'; /** * GBK 字符集 */ public static readonly GBK: string = 'GBK'; /** * http请求 */ public static readonly HTTP: string = 'http://'; /** * https请求 */ public static readonly HTTPS: string = 'https://'; /** * 通用成功标识 */ public static readonly SUCCESS: string = '0'; /** * 通用失败标识 */ public static readonly FAIL: string = '1'; /** * 登录成功 */ public static readonly LOGIN_SUCCESS: string = 'Success'; /** * 注销 */ public static readonly LOGOUT: string = 'Logout'; /** * 登录失败 */ public static readonly LOGIN_FAIL: string = 'Error'; /** * 验证码 redis key */ public static readonly CAPTCHA_CODE_KEY: string = 'captcha_codes:'; /** * 登录用户 redis key */ public static readonly LOGIN_TOKEN_KEY: string = 'login_tokens:'; /** * 缓存用户信息 redis key */ public static readonly LOGIN_CACHE_TOKEN_KEY: string = 'login_cache_tokens:'; /** * 防重提交 redis key */ public static readonly REPEAT_SUBMIT_KEY: string = 'repeat_submit:'; /** * 验证码有效期(分钟) */ public static readonly CAPTCHA_EXPIRATION: number = 2; /** * 令牌 */ public static readonly TOKEN: string = 'token'; /** * 令牌前缀 */ public static readonly TOKEN_PREFIX: string = 'Bearer '; /** * 登录用户 key */ public static readonly LOGIN_USER_KEY: string = 'login_user_key'; /** * 用户ID */ public static readonly JWT_USERID: string = 'userid'; /** * 用户名称 */ public static readonly JWT_USERNAME: string = 'sub'; /** * 用户头像 */ public static readonly JWT_AVATAR: string = 'avatar'; /** * 创建时间 */ public static readonly JWT_CREATED: string = 'created'; /** * 参数管理 cache key */ public static readonly SYS_CONFIG_KEY: string = 'sys_config:'; /** * 字典管理 cache key */ public static readonly SYS_DICT_KEY: string = 'sys_dict:'; /** * 文件访问前缀 */ public static readonly FILE_PREFIX: string = '/upload'; } ================================================ FILE: server/src/common/constant/GenConstants.ts ================================================ /** * GenConstants类 */ export class GenConstants { /** * 单表(增删改查) */ static TPL_CRUD = 'crud'; /** * 树表(增删改查) */ static TPL_TREE = 'tree'; /** * 主子表(增删改查) */ static TPL_SUB = 'sub'; /** * 树编码字段 */ static TREE_CODE = 'treeCode'; /** * 树父编码字段 */ static TREE_PARENT_CODE = 'treeParentCode'; /** * 树名称字段 */ static TREE_NAME = 'treeName'; /** * 上级菜单ID字段 */ static PARENT_MENU_ID = 'parentMenuId'; /** * 上级菜单名称字段 */ static PARENT_MENU_NAME = 'parentMenuName'; /** * 数据库字符串类型 */ static COLUMNTYPE_STR = ['char', 'varchar', 'nvarchar', 'varchar2']; /** * 数据库文本类型 */ static COLUMNTYPE_TEXT = ['tinytext', 'text', 'mediumtext', 'longtext']; /** * 数据库时间类型 */ static COLUMNTYPE_TIME = ['datetime', 'time', 'date', 'timestamp']; /** * 数据库数字类型 */ static COLUMNTYPE_NUMBER = [ 'tinyint', 'smallint', 'mediumint', 'int', 'number', 'integer', 'bit', 'bigint', 'float', 'double', 'decimal', ]; /** * 页面不需要编辑字段 */ static COLUMNNAME_NOT_EDIT = ['id', 'create_by', 'create_time', 'del_flag']; /** * 页面不需要显示的列表字段 */ static COLUMNNAME_NOT_LIST = [ 'id', 'create_by', 'create_time', 'del_flag', 'update_by', 'update_time', ]; /** * 页面不需要查询字段 */ static COLUMNNAME_NOT_QUERY = [ 'id', 'create_by', 'create_time', 'del_flag', 'update_by', 'update_time', 'remark', ]; /** * Entity基类字段 */ static BASE_ENTITY = [ 'createBy', 'createTime', 'updateBy', 'updateTime', 'remark', ]; /** * Tree基类字段 */ static TREE_ENTITY = [ 'parentName', 'parentId', 'orderNum', 'ancestors', 'children', ]; /** * 文本框 */ static HTML_INPUT = 'input'; /** * 文本域 */ static HTML_TEXTAREA = 'textarea'; /** * 下拉框 */ static HTML_SELECT = 'select'; /** * 单选框 */ static HTML_RADIO = 'radio'; /** * 复选框 */ static HTML_CHECKBOX = 'checkbox'; /** * 日期控件 */ static HTML_DATETIME = 'datetime'; /** * 图片上传控件 */ static HTML_IMAGE_UPLOAD = 'imageUpload'; /** * 文件上传控件 */ static HTML_FILE_UPLOAD = 'fileUpload'; /** * 富文本控件 */ static HTML_EDITOR = 'editor'; /** * 字符串类型 */ static TYPE_STRING = 'String'; /** * 数字 */ static TYPE_NUMBER = 'Number'; /** * 整型 */ static TYPE_INTEGER = 'Integer'; /** * 长整型 */ static TYPE_LONG = 'Long'; /** * 浮点型 */ static TYPE_DOUBLE = 'Double'; /** * 高精度计算类型 */ static TYPE_BIGDECIMAL = 'BigDecimal'; /** * 时间类型 */ static TYPE_DATE = 'Date'; /** * 模糊查询 */ static QUERY_LIKE = 'LIKE'; /** * 日期区间查询 */ static QUERY_BETWEEN = 'BETWEEN'; /** * 相等查询 */ static QUERY_EQ = 'EQ'; /** * 需要 */ static REQUIRE = '1'; } ================================================ FILE: server/src/common/constant/HttpStatus.ts ================================================ /** * 返回状态码 */ export enum HttpStatus { /** * 操作成功 */ SUCCESS = 200, /** * 对象创建成功 */ CREATED = 201, /** * 请求已经被接受 */ ACCEPTED = 202, /** * 操作已经执行成功,但是没有返回数据 */ NO_CONTENT = 204, /** * 资源已被移除 */ MOVED_PERM = 301, /** * 重定向 */ SEE_OTHER = 303, /** * 资源没有被修改 */ NOT_MODIFIED = 304, /** * 参数列表错误(缺少,格式不匹配) */ BAD_REQUEST = 400, /** * 未授权 */ UNAUTHORIZED = 401, /** * 访问受限,授权过期 */ FORBIDDEN = 403, /** * 资源,服务未找到 */ NOT_FOUND = 404, /** * 不允许的http方法 */ BAD_METHOD = 405, /** * 资源冲突,或者资源被锁 */ CONFLICT = 409, /** * 不支持的数据,媒体类型 */ UNSUPPORTED_TYPE = 415, /** * 参数验证不通过 */ Validation = 422, /** * 请求频繁 */ FREQUENT_REQUESTS = 429, /** * 系统内部错误 */ ERROR = 500, /** * 接口未实现 */ NOT_IMPLEMENTED = 501, } ================================================ FILE: server/src/common/decorator/require-premission.decorator.ts ================================================ import { SetMetadata } from '@nestjs/common'; export const RequirePermission = (permission: string) => SetMetadata('permission', permission); ================================================ FILE: server/src/common/decorator/require-role.decorator.ts ================================================ import { SetMetadata } from '@nestjs/common'; export const RequireRole = (role: string) => SetMetadata('role', role); ================================================ FILE: server/src/common/decorator/throttle-user.ts ================================================ import { SetMetadata } from '@nestjs/common'; export const THROTTLE_USER_KEY = 'throttleUser'; export const ThrottleUser = () => SetMetadata(THROTTLE_USER_KEY, true); ================================================ FILE: server/src/common/domain/BaseDomain.ts ================================================ import { ApiProperty } from '@nestjs/swagger'; import { IsOptional, IsString } from 'class-validator'; export class BaseDomain { @ApiProperty({ description: '创建者',required:false }) @IsString() @IsOptional() createBy?: string; @ApiProperty({ description: '创建时间',required:false }) @IsString() @IsOptional() createTime?: string; @ApiProperty({ description: '更新者',required:false }) @IsString() @IsOptional() updateBy?: string; @ApiProperty({ description: '更新时间',required:false }) @IsString() @IsOptional() updateTime?: string; @ApiProperty({ description: '备注',required:false }) @IsString() @IsOptional() remark?: string; } ================================================ FILE: server/src/common/domain/PageDomain.ts ================================================ import { ApiProperty } from '@nestjs/swagger'; import { Transform } from 'class-transformer'; import { IsNumber, IsOptional } from 'class-validator'; export class PageDomain { @ApiProperty({ description: '当前页码',required:false }) @IsNumber() @IsOptional() @Transform((v) => +v.value) pageNum: number = 1; @ApiProperty({ description: '每页的数据条目', required:false }) @IsNumber() @IsOptional() @Transform((v) => +v.value) pageSize: number = 10; } ================================================ FILE: server/src/common/domain/TableDataInfo.ts ================================================ import { HttpStatus } from '@/common/constant/HttpStatus'; import { ApiProperty } from '@nestjs/swagger'; export class TableDataInfo { @ApiProperty({ example: 0, description: '总记录数', }) total: number; @ApiProperty({ default: null, description: '列表数据', }) rows: T[]; @ApiProperty({ example: 200, description: '消息状态码', }) code: number; @ApiProperty({ example: '查询成功', description: '消息内容', }) msg: string; constructor(rows: T[], total: number, code?: number, msg?: string) { this.total = total; this.rows = rows; this.code = code || HttpStatus.SUCCESS; this.msg = msg || '查询成功'; } } ================================================ FILE: server/src/common/domain/queryDomain.ts ================================================ import { IsOptional } from 'class-validator'; import { PageDomain } from './PageDomain'; import { ApiProperty } from '@nestjs/swagger'; export class queryDomain extends PageDomain { @ApiProperty({ description: '查询附加参数', required: false }) @IsOptional() params: { [key: string]: any } = {}; } ================================================ FILE: server/src/common/exception/AuthorizationException.ts ================================================ export class AuthorizationException extends Error { constructor(props) { super(props); } } ================================================ FILE: server/src/common/exception/ValidationException.ts ================================================ export class ValidationException extends Error { constructor(props) { super(props); } } ================================================ FILE: server/src/common/filter/global-error.filter.ts ================================================ import * as assert from 'assert'; import { ArgumentsHost, BadRequestException, Catch, ExceptionFilter, ForbiddenException, NotFoundException, PayloadTooLargeException, } from '@nestjs/common'; import { ValidationException } from '@/common/exception/ValidationException'; import Result from '@/common/result/Result'; import { Response } from 'express'; import { AuthorizationException } from '@/common/exception/AuthorizationException'; import { MulterError } from 'multer'; import { ThrottlerException } from '@nestjs/throttler'; /** * @desc 参数验证不通过 */ @Catch(ValidationException) export class ValidationExceptionFilter implements ExceptionFilter { catch(exception: ValidationException, host: ArgumentsHost) { const res = host.switchToHttp().getResponse(); res.send(Result.Validation(exception.message)); } } /** * @desc 断言不通过 */ @Catch(assert.AssertionError) export class AssertionErrorFilter implements ExceptionFilter { catch(exception: assert.AssertionError, host: ArgumentsHost) { const res = host.switchToHttp().getResponse(); res.send(Result.Validation(exception.message)); } } /** * @desc 身份验证不通过 */ @Catch(AuthorizationException) export class AuthorizationFilter implements ExceptionFilter { catch(exception: ValidationException, host: ArgumentsHost) { const res = host.switchToHttp().getResponse(); res.send(Result.Unauthorized(exception.message)); } } /** * @desc 权限不足 */ @Catch(ForbiddenException) export class ForbiddenExceptionFilter implements ExceptionFilter { catch(exception: ForbiddenException, host: ArgumentsHost) { const res = host.switchToHttp().getResponse(); res.send(Result.Forbidden()); } } /** * @desc 资源路径不存在 */ @Catch(NotFoundException) export class NotFoundErrFilter implements ExceptionFilter { catch(exception: NotFoundException, host: ArgumentsHost) { const res = host.switchToHttp().getResponse(); res.send(Result.NotFound()); } } /** * @desc 文件上传失败 */ @Catch(MulterError) export class MulterErrFilter implements ExceptionFilter { catch(exception: MulterError, host: ArgumentsHost) { const res = host.switchToHttp().getResponse(); const errMap = { TypeError: '不允许上传的文件类型!', LIMIT_PART_COUNT: '部件太多', LIMIT_FILE_SIZE: '文件大小不通过', LIMIT_FILE_COUNT: '文件数量不通过', LIMIT_FIELD_KEY: '字段名太长', LIMIT_FIELD_VALUE: '字段值太长', LIMIT_FIELD_COUNT: '字段太多', LIMIT_UNEXPECTED_FILE: '不包含此表单字段', MISSING_FIELD_NAME: '字段名缺失', }; res.send( Result.BadRequest( '文件上传失败:' + (errMap?.[exception?.code] || exception?.message), ), ); } } /** * @desc 文件大小超出限制 */ @Catch(PayloadTooLargeException) export class PayloadTooLargeFilter implements ExceptionFilter { catch(exception: PayloadTooLargeException, host: ArgumentsHost) { const res = host.switchToHttp().getResponse(); res.send(Result.BadRequest('文件大小超出限制!')); } } /** * @desc badRquest错误处理 */ @Catch(BadRequestException) export class BadRequestFilter implements ExceptionFilter { catch(exception: BadRequestException, host: ArgumentsHost) { const res = host.switchToHttp().getResponse(); console.log(exception); res.send(Result.BadRequest(exception.message)); } } /** * @desc ratelimit处理 */ @Catch(ThrottlerException) export class ThrottlerExceptionFilter implements ExceptionFilter { catch(exception: ThrottlerException, host: ArgumentsHost) { const res = host.switchToHttp().getResponse(); res.send(Result.Error('您的ip访问频繁,请稍后重试!', 429)); } } /** * @desc 全局错误处理 */ @Catch() export class GlobalErrorFilter implements ExceptionFilter { catch(exception: any, host: ArgumentsHost) { const res = host.switchToHttp().getResponse(); console.log(exception); res.send(Result.Error('error')); } } ================================================ FILE: server/src/common/guard/permission/permission.guard.ts ================================================ import { CanActivate, ExecutionContext, Injectable } from '@nestjs/common'; import { Observable } from 'rxjs'; import { Reflector } from '@nestjs/core'; import { AuthService } from '@/common/service/auth/auth.service'; @Injectable() export class PermissionGuard implements CanActivate { constructor( private reflector: Reflector, private authService: AuthService, ) {} canActivate( context: ExecutionContext, ): boolean | Promise | Observable { const req = context.switchToHttp().getRequest(); const prem = this.reflector.getAllAndOverride('permission', [ context.getClass(), context.getHandler(), ]); //不需要鉴权 if (prem === undefined) return true; //调用鉴权 return this.authService.hasPermission(prem, req.userId); } } ================================================ FILE: server/src/common/guard/permission/role.guard.ts ================================================ import { CanActivate, ExecutionContext, Injectable } from '@nestjs/common'; import { Observable } from 'rxjs'; import { Reflector } from '@nestjs/core'; import { AuthService } from '@/common/service/auth/auth.service'; @Injectable() export class RoleGuard implements CanActivate { constructor( private authService: AuthService, private reflector: Reflector, ) {} canActivate( context: ExecutionContext, ): boolean | Promise | Observable { const req = context.switchToHttp().getRequest(); const role = this.reflector.getAllAndOverride('role', [ context.getClass(), context.getHandler(), ]); //不需要鉴权 if (role === undefined) return true; //调用鉴权 return this.authService.hasRole(role, req.userId); } } ================================================ FILE: server/src/common/guard/throttler/throttler-custom.guard.ts ================================================ import { ThrottlerGuard } from '@nestjs/throttler'; import { ExecutionContext, Inject, Injectable } from '@nestjs/common'; import { Reflector } from '@nestjs/core'; import { THROTTLE_USER_KEY } from '@/common/decorator/throttle-user'; @Injectable() export class ThrottlerCustomGuard extends ThrottlerGuard { @Inject() protected reflector: Reflector; protected generateKey( context: ExecutionContext, suffix: string, name: string, ): string { const req = context.switchToHttp().getRequest(); const isThrottleUser = this.reflector.getAllAndOverride( THROTTLE_USER_KEY, [context.getClass(), context.getHandler()], ); return isThrottleUser && req.userId !== undefined ? `rate-limit:${context.getClass().name}-${context.getHandler().name}-${name}-user-${req.userId}` : `rate-limit:${context.getClass().name}-${context.getHandler().name}-${name}-ip-${req.ips.length ? req.ips[0] : req.ip}`; } } ================================================ FILE: server/src/common/interceptors/remove-throttle-headers.interceptor.ts ================================================ import { CallHandler, ExecutionContext, Injectable, NestInterceptor, } from '@nestjs/common'; import { Observable } from 'rxjs'; @Injectable() export class RemoveThrottleHeadersInterceptor implements NestInterceptor { intercept(context: ExecutionContext, next: CallHandler): Observable { const response = context.switchToHttp().getResponse(); response.removeHeader('X-RateLimit-Limit'); response.removeHeader('X-RateLimit-Remaining'); response.removeHeader('X-RateLimit-Reset'); response.removeHeader('Retry-After'); return next.handle(); } } ================================================ FILE: server/src/common/middleware/auth/auth.middleware.ts ================================================ /* eslint-disable @typescript-eslint/ban-ts-comment */ import { Constants } from '@/common/constant/Constants'; import { AuthorizationException } from '@/common/exception/AuthorizationException'; import { AuthService } from '@/common/service/auth/auth.service'; import { redisUtils } from '@/common/utils/redisUtils'; import { Injectable, NestMiddleware } from '@nestjs/common'; import { Request, Response } from 'express'; @Injectable() export class AuthMiddleware implements NestMiddleware { constructor(private authService: AuthService) {} async use(req: Request, res: Response, next: () => void) { let token = req.headers['authorization']; if (!token || token.length < 20 || !token.startsWith('Bearer ')) { throw new AuthorizationException('无效的token!'); } token = token.slice(7); try { const { userId, tokenId } = (await this.authService.verifyToken( token, )) as { userId: number; tokenId: string }; if (!(await redisUtils.get(Constants.LOGIN_TOKEN_KEY + tokenId))) throw new AuthorizationException('无效的token!'); const userInfo = JSON.parse( (await redisUtils.get(Constants.LOGIN_CACHE_TOKEN_KEY + userId)) || null, ); if (!userInfo) throw new AuthorizationException('无效的token!'); //@ts-ignore req.userId = userId; //@ts-ignore req.token = token; //@ts-ignore req.user = userInfo; next(); } catch (error) { throw new AuthorizationException('无效的token!'); } } } ================================================ FILE: server/src/common/pipe/parse-int-array.pipe.ts ================================================ import { ValidationException } from '@/common/exception/ValidationException'; import { PipeTransform, Injectable } from '@nestjs/common'; @Injectable() export class ParseIntArrayPipe implements PipeTransform { transform(value: string): number[] { // 将字符串按逗号分割成数组 const array = value .split(',') .filter((v) => v !== '') .map((item) => parseInt(item.trim(), 10)); // 检查是否所有元素都成功转换为数字 if (array.some(Number.isNaN)) { throw new ValidationException('参数不正确'); } return array; } } ================================================ FILE: server/src/common/pipe/validation.pipe.ts ================================================ import { ArgumentMetadata, Injectable, PipeTransform } from '@nestjs/common'; import { plainToClass } from 'class-transformer'; import { validate } from 'class-validator'; import { ValidationException } from '@/common/exception/ValidationException'; @Injectable() export class ValidationPipe implements PipeTransform { async transform(value: any, { metatype }: ArgumentMetadata) { if (!metatype || !this.toValidate(metatype)) { return value; } const object = plainToClass(metatype, value); const errors = await validate(object, {}); if (errors.length > 0) { const error = Object.values(errors[0].constraints)[0]; throw new ValidationException(error); } return object; } private toValidate(metatype: Function): boolean { const types: Function[] = [String, Boolean, Number, Array, Object]; return !types.includes(metatype); } } ================================================ FILE: server/src/common/prisma-client/default.d.ts ================================================ export * from './index' ================================================ FILE: server/src/common/prisma-client/default.js ================================================ module.exports = { ...require('.') } ================================================ FILE: server/src/common/prisma-client/edge.d.ts ================================================ export * from './default' ================================================ FILE: server/src/common/prisma-client/edge.js ================================================ Object.defineProperty(exports, "__esModule", { value: true }); const { PrismaClientKnownRequestError, PrismaClientUnknownRequestError, PrismaClientRustPanicError, PrismaClientInitializationError, PrismaClientValidationError, NotFoundError, getPrismaClient, sqltag, empty, join, raw, Decimal, Debug, objectEnumValues, makeStrictEnum, Extensions, warnOnce, defineDmmfProperty, Public, getRuntime } = require('./runtime/edge.js') const Prisma = {} exports.Prisma = Prisma exports.$Enums = {} /** * Prisma Client JS version: 5.15.0 * Query Engine version: 12e25d8d06f6ea5a0252864dd9a03b1bb51f3022 */ Prisma.prismaVersion = { client: "5.15.0", engine: "12e25d8d06f6ea5a0252864dd9a03b1bb51f3022" } Prisma.PrismaClientKnownRequestError = PrismaClientKnownRequestError; Prisma.PrismaClientUnknownRequestError = PrismaClientUnknownRequestError Prisma.PrismaClientRustPanicError = PrismaClientRustPanicError Prisma.PrismaClientInitializationError = PrismaClientInitializationError Prisma.PrismaClientValidationError = PrismaClientValidationError Prisma.NotFoundError = NotFoundError Prisma.Decimal = Decimal /** * Re-export of sql-template-tag */ Prisma.sql = sqltag Prisma.empty = empty Prisma.join = join Prisma.raw = raw Prisma.validator = Public.validator /** * Extensions */ Prisma.getExtensionContext = Extensions.getExtensionContext Prisma.defineExtension = Extensions.defineExtension /** * Shorthand utilities for JSON filtering */ Prisma.DbNull = objectEnumValues.instances.DbNull Prisma.JsonNull = objectEnumValues.instances.JsonNull Prisma.AnyNull = objectEnumValues.instances.AnyNull Prisma.NullTypes = { DbNull: objectEnumValues.classes.DbNull, JsonNull: objectEnumValues.classes.JsonNull, AnyNull: objectEnumValues.classes.AnyNull } /** * Enums */ exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ ReadUncommitted: 'ReadUncommitted', ReadCommitted: 'ReadCommitted', RepeatableRead: 'RepeatableRead', Serializable: 'Serializable' }); exports.Prisma.GenTableScalarFieldEnum = { tableId: 'tableId', tableName: 'tableName', tableComment: 'tableComment', subTableName: 'subTableName', subTableFkName: 'subTableFkName', className: 'className', tplCategory: 'tplCategory', tplWebType: 'tplWebType', packageName: 'packageName', moduleName: 'moduleName', businessName: 'businessName', functionName: 'functionName', functionAuthor: 'functionAuthor', genType: 'genType', genPath: 'genPath', options: 'options', createBy: 'createBy', createTime: 'createTime', updateBy: 'updateBy', updateTime: 'updateTime', remark: 'remark' }; exports.Prisma.RelationLoadStrategy = { query: 'query', join: 'join' }; exports.Prisma.GenTableColumnScalarFieldEnum = { columnId: 'columnId', tableId: 'tableId', columnName: 'columnName', columnComment: 'columnComment', columnType: 'columnType', javaType: 'javaType', javaField: 'javaField', isPk: 'isPk', isIncrement: 'isIncrement', isRequired: 'isRequired', isInsert: 'isInsert', isEdit: 'isEdit', isList: 'isList', isQuery: 'isQuery', queryType: 'queryType', htmlType: 'htmlType', dictType: 'dictType', sort: 'sort', createBy: 'createBy', createTime: 'createTime', updateBy: 'updateBy', updateTime: 'updateTime' }; exports.Prisma.SysConfigScalarFieldEnum = { configId: 'configId', configName: 'configName', configKey: 'configKey', configValue: 'configValue', configType: 'configType', createBy: 'createBy', createTime: 'createTime', updateBy: 'updateBy', updateTime: 'updateTime', remark: 'remark' }; exports.Prisma.SysDeptScalarFieldEnum = { deptId: 'deptId', parentId: 'parentId', ancestors: 'ancestors', deptName: 'deptName', orderNum: 'orderNum', leader: 'leader', phone: 'phone', email: 'email', status: 'status', createBy: 'createBy', createTime: 'createTime', updateBy: 'updateBy', updateTime: 'updateTime' }; exports.Prisma.SysDictDataScalarFieldEnum = { dictCode: 'dictCode', dictSort: 'dictSort', dictLabel: 'dictLabel', dictValue: 'dictValue', dictType: 'dictType', cssClass: 'cssClass', listClass: 'listClass', isDefault: 'isDefault', status: 'status', createBy: 'createBy', createTime: 'createTime', updateBy: 'updateBy', updateTime: 'updateTime', remark: 'remark' }; exports.Prisma.SysDictTypeScalarFieldEnum = { dictId: 'dictId', dictName: 'dictName', dictType: 'dictType', status: 'status', createBy: 'createBy', createTime: 'createTime', updateBy: 'updateBy', updateTime: 'updateTime', remark: 'remark' }; exports.Prisma.SysLogininforScalarFieldEnum = { infoId: 'infoId', userName: 'userName', ipaddr: 'ipaddr', loginLocation: 'loginLocation', browser: 'browser', os: 'os', status: 'status', msg: 'msg', loginTime: 'loginTime' }; exports.Prisma.SysMenuScalarFieldEnum = { menuId: 'menuId', menuName: 'menuName', parentId: 'parentId', orderNum: 'orderNum', path: 'path', component: 'component', query: 'query', isFrame: 'isFrame', isCache: 'isCache', menuType: 'menuType', visible: 'visible', status: 'status', perms: 'perms', icon: 'icon', createBy: 'createBy', createTime: 'createTime', updateBy: 'updateBy', updateTime: 'updateTime', remark: 'remark' }; exports.Prisma.SysNoticeScalarFieldEnum = { noticeId: 'noticeId', noticeTitle: 'noticeTitle', noticeType: 'noticeType', noticeContent: 'noticeContent', status: 'status', createBy: 'createBy', createTime: 'createTime', updateBy: 'updateBy', updateTime: 'updateTime', remark: 'remark' }; exports.Prisma.SysPostScalarFieldEnum = { postId: 'postId', postCode: 'postCode', postName: 'postName', postSort: 'postSort', status: 'status', createBy: 'createBy', createTime: 'createTime', updateBy: 'updateBy', updateTime: 'updateTime', remark: 'remark' }; exports.Prisma.SysUserPostScalarFieldEnum = { userId: 'userId', postId: 'postId' }; exports.Prisma.SysRoleDeptScalarFieldEnum = { roleId: 'roleId', deptId: 'deptId' }; exports.Prisma.SysRoleMenuScalarFieldEnum = { roleId: 'roleId', menuId: 'menuId' }; exports.Prisma.SysUserScalarFieldEnum = { userId: 'userId', deptId: 'deptId', userName: 'userName', nickName: 'nickName', userType: 'userType', email: 'email', phonenumber: 'phonenumber', sex: 'sex', avatar: 'avatar', password: 'password', status: 'status', loginIp: 'loginIp', loginDate: 'loginDate', createBy: 'createBy', createTime: 'createTime', updateBy: 'updateBy', updateTime: 'updateTime', remark: 'remark' }; exports.Prisma.SysRoleScalarFieldEnum = { roleId: 'roleId', roleName: 'roleName', roleKey: 'roleKey', roleSort: 'roleSort', dataScope: 'dataScope', menuCheckStrictly: 'menuCheckStrictly', deptCheckStrictly: 'deptCheckStrictly', status: 'status', createBy: 'createBy', createTime: 'createTime', updateBy: 'updateBy', updateTime: 'updateTime', remark: 'remark' }; exports.Prisma.SysUserRoleScalarFieldEnum = { userId: 'userId', roleId: 'roleId' }; exports.Prisma.SortOrder = { asc: 'asc', desc: 'desc' }; exports.Prisma.NullsOrder = { first: 'first', last: 'last' }; exports.Prisma.ModelName = { GenTable: 'GenTable', GenTableColumn: 'GenTableColumn', SysConfig: 'SysConfig', SysDept: 'SysDept', SysDictData: 'SysDictData', SysDictType: 'SysDictType', SysLogininfor: 'SysLogininfor', SysMenu: 'SysMenu', SysNotice: 'SysNotice', SysPost: 'SysPost', SysUserPost: 'SysUserPost', SysRoleDept: 'SysRoleDept', SysRoleMenu: 'SysRoleMenu', SysUser: 'SysUser', SysRole: 'SysRole', SysUserRole: 'SysUserRole' }; /** * Create the Client */ const config = { "generator": { "name": "client", "provider": { "fromEnvVar": null, "value": "prisma-client-js" }, "output": { "value": "/Users/carole/project/carole-admin/server/src/common/prisma-client", "fromEnvVar": null }, "config": { "engineType": "library" }, "binaryTargets": [ { "fromEnvVar": null, "value": "darwin", "native": true } ], "previewFeatures": [ "views", "relationJoins", "prismaSchemaFolder", "omitApi" ], "isCustomOutput": true }, "relativeEnvPaths": { "rootEnvPath": null, "schemaEnvPath": "../../.env" }, "relativePath": "../..", "clientVersion": "5.15.0", "engineVersion": "12e25d8d06f6ea5a0252864dd9a03b1bb51f3022", "datasourceNames": [ "db" ], "activeProvider": "mysql", "postinstall": true, "inlineDatasources": { "db": { "url": { "fromEnvVar": "DATABASE_URL", "value": null } } }, "inlineSchema": "model GenTable {\n tableId Int @id @default(autoincrement()) @map(\"table_id\") @db.UnsignedInt\n tableName String? @default(\"\") @map(\"table_name\") @db.VarChar(200)\n tableComment String? @default(\"\") @map(\"table_comment\") @db.VarChar(500)\n subTableName String? @map(\"sub_table_name\") @db.VarChar(64)\n subTableFkName String? @map(\"sub_table_fk_name\") @db.VarChar(64)\n className String? @default(\"\") @map(\"class_name\") @db.VarChar(100)\n tplCategory String? @default(\"crud\") @map(\"tpl_category\") @db.VarChar(200)\n tplWebType String? @default(\"\") @map(\"tpl_web_type\") @db.VarChar(30)\n packageName String? @map(\"package_name\") @db.VarChar(100)\n moduleName String? @map(\"module_name\") @db.VarChar(30)\n businessName String? @map(\"business_name\") @db.VarChar(30)\n functionName String? @map(\"function_name\") @db.VarChar(50)\n functionAuthor String? @map(\"function_author\") @db.VarChar(50)\n genType String? @default(\"0\") @map(\"gen_type\") @db.Char(1)\n genPath String? @default(\"/\") @map(\"gen_path\") @db.VarChar(200)\n options String? @map(\"options\") @db.VarChar(1000)\n createBy String? @default(\"\") @map(\"create_by\") @db.VarChar(64)\n createTime String? @map(\"create_time\") @db.VarChar(25)\n updateBy String? @default(\"\") @map(\"update_by\") @db.VarChar(64)\n updateTime String? @map(\"update_time\") @db.VarChar(25)\n remark String? @db.VarChar(500)\n tableColumns GenTableColumn[]\n\n @@map(\"gen_table\")\n}\n\nmodel GenTableColumn {\n columnId Int @id @default(autoincrement()) @map(\"column_id\") @db.UnsignedInt\n tableId Int? @map(\"table_id\") @db.UnsignedInt\n columnName String? @map(\"column_name\") @db.VarChar(200)\n columnComment String? @map(\"column_comment\") @db.VarChar(500)\n columnType String? @map(\"column_type\") @db.VarChar(100)\n javaType String? @map(\"java_type\") @db.VarChar(500)\n javaField String? @map(\"java_field\") @db.VarChar(200)\n isPk String? @map(\"is_pk\") @db.Char(1)\n isIncrement String? @map(\"is_increment\") @db.Char(1)\n isRequired String? @map(\"is_required\") @db.Char(1)\n isInsert String? @map(\"is_insert\") @db.Char(1)\n isEdit String? @map(\"is_edit\") @db.Char(1)\n isList String? @map(\"is_list\") @db.Char(1)\n isQuery String? @map(\"is_query\") @db.Char(1)\n queryType String? @default(\"EQ\") @map(\"query_type\") @db.VarChar(200)\n htmlType String? @map(\"html_type\") @db.VarChar(200)\n dictType String? @default(\"\") @map(\"dict_type\") @db.VarChar(200)\n sort Int? @map(\"sort\")\n createBy String? @default(\"\") @map(\"create_by\") @db.VarChar(64)\n createTime String? @map(\"create_time\") @db.VarChar(25)\n updateBy String? @default(\"\") @map(\"update_by\") @db.VarChar(64)\n updateTime String? @map(\"update_time\") @db.VarChar(25)\n table GenTable? @relation(fields: [tableId], references: [tableId])\n\n @@index([tableId])\n @@map(\"gen_table_column\")\n}\n\nmodel SysConfig {\n configId Int @id @default(autoincrement()) @map(\"config_id\")\n configName String? @default(\"\") @map(\"config_name\") @db.VarChar(100)\n configKey String? @default(\"\") @map(\"config_key\") @db.VarChar(100)\n configValue String? @default(\"\") @map(\"config_value\") @db.VarChar(500)\n configType String? @default(\"N\") @map(\"config_type\") @db.Char(1)\n createBy String? @default(\"\") @map(\"create_by\") @db.VarChar(64)\n createTime String? @map(\"create_time\") @db.VarChar(25)\n updateBy String? @default(\"\") @map(\"update_by\") @db.VarChar(64)\n updateTime String? @map(\"update_time\") @db.VarChar(25)\n remark String? @map(\"remark\") @db.VarChar(500)\n\n @@map(\"sys_config\")\n}\n\nmodel SysDept {\n deptId Int @id @default(autoincrement()) @map(\"dept_id\") @db.UnsignedInt\n parentId Int? @default(0) @map(\"parent_id\") @db.UnsignedInt\n ancestors String? @default(\"\") @map(\"ancestors\") @db.VarChar(50)\n deptName String? @default(\"\") @map(\"dept_name\") @db.VarChar(30)\n orderNum Int? @default(0) @map(\"order_num\")\n leader String? @map(\"leader\") @db.VarChar(20)\n phone String? @map(\"phone\") @db.VarChar(11)\n email String? @map(\"email\") @db.VarChar(50)\n status String? @default(\"1\") @map(\"status\") @db.Char(1)\n createBy String? @default(\"\") @map(\"create_by\") @db.VarChar(64)\n createTime String? @map(\"create_time\") @db.VarChar(25)\n updateBy String? @default(\"\") @map(\"update_by\") @db.VarChar(64)\n updateTime String? @map(\"update_time\") @db.VarChar(25)\n users SysUser[]\n roles SysRoleDept[]\n\n @@map(\"sys_dept\")\n}\n\nmodel SysDictData {\n dictCode Int @id @default(autoincrement()) @map(\"dict_code\") @db.UnsignedInt\n dictSort Int? @default(0) @map(\"dict_sort\")\n dictLabel String? @default(\"\") @map(\"dict_label\") @db.VarChar(100)\n dictValue String? @default(\"\") @map(\"dict_value\") @db.VarChar(100)\n dictType String? @default(\"\") @map(\"dict_type\") @db.VarChar(100)\n cssClass String? @map(\"css_class\") @db.VarChar(100)\n listClass String? @map(\"list_class\") @db.VarChar(100)\n isDefault String? @default(\"N\") @map(\"is_default\") @db.Char(1)\n status String? @default(\"1\") @map(\"status\") @db.Char(1)\n createBy String? @default(\"\") @map(\"create_by\") @db.VarChar(64)\n createTime String? @map(\"create_time\") @db.VarChar(25)\n updateBy String? @default(\"\") @map(\"update_by\") @db.VarChar(64)\n updateTime String? @map(\"update_time\") @db.VarChar(25)\n remark String? @map(\"remark\") @db.VarChar(500)\n sysDictType SysDictType? @relation(fields: [dictType], references: [dictType])\n\n @@index([dictType])\n @@map(\"sys_dict_data\")\n}\n\nmodel SysDictType {\n dictId Int @id @default(autoincrement()) @map(\"dict_id\") @db.UnsignedInt\n dictName String? @default(\"\") @map(\"dict_name\") @db.VarChar(100)\n dictType String? @unique(map: \"dict_type\") @default(\"\") @map(\"dict_type\") @db.VarChar(100)\n status String? @default(\"1\") @map(\"status\") @db.Char(1)\n createBy String? @default(\"\") @map(\"create_by\") @db.VarChar(64)\n createTime String? @map(\"create_time\") @db.VarChar(25)\n updateBy String? @default(\"\") @map(\"update_by\") @db.VarChar(64)\n updateTime String? @map(\"update_time\") @db.VarChar(25)\n remark String? @map(\"remark\") @db.VarChar(500)\n dictDatas SysDictData[]\n\n @@map(\"sys_dict_type\")\n}\n\nmodel SysLogininfor {\n infoId Int @id @default(autoincrement()) @map(\"info_id\") @db.UnsignedInt\n userName String? @default(\"\") @map(\"user_name\") @db.VarChar(50)\n ipaddr String? @default(\"\") @map(\"ipaddr\") @db.VarChar(128)\n loginLocation String? @default(\"\") @map(\"login_location\") @db.VarChar(255)\n browser String? @default(\"\") @map(\"browser\") @db.VarChar(50)\n os String? @default(\"\") @map(\"os\") @db.VarChar(50)\n status String? @default(\"1\") @map(\"status\") @db.Char(1)\n msg String? @default(\"\") @map(\"msg\") @db.VarChar(255)\n loginTime String? @map(\"login_time\") @db.VarChar(25)\n\n @@index([loginTime], map: \"idx_sys_logininfor_lt\")\n @@index([status], map: \"idx_sys_logininfor_s\")\n @@map(\"sys_logininfor\")\n}\n\nmodel SysMenu {\n menuId Int @id @default(autoincrement()) @map(\"menu_id\") @db.UnsignedInt\n menuName String @map(\"menu_name\") @db.VarChar(50)\n parentId Int? @default(0) @map(\"parent_id\") @db.UnsignedInt\n orderNum Int? @default(0) @map(\"order_num\")\n path String? @default(\"\") @map(\"path\") @db.VarChar(200)\n component String? @map(\"component\") @db.VarChar(255)\n query String? @map(\"query\") @db.VarChar(255)\n isFrame Int? @default(0) @map(\"is_frame\")\n isCache Int? @default(1) @map(\"is_cache\")\n menuType String? @default(\"\") @map(\"menu_type\") @db.Char(1)\n visible String? @default(\"1\") @map(\"visible\") @db.Char(1)\n status String? @default(\"1\") @map(\"status\") @db.Char(1)\n perms String? @map(\"perms\") @db.VarChar(100)\n icon String? @default(\"#\") @map(\"icon\") @db.VarChar(100)\n createBy String? @default(\"\") @map(\"create_by\") @db.VarChar(64)\n createTime String? @map(\"create_time\") @db.VarChar(25)\n updateBy String? @default(\"\") @map(\"update_by\") @db.VarChar(64)\n updateTime String? @map(\"update_time\") @db.VarChar(25)\n remark String? @default(\"\") @map(\"remark\") @db.VarChar(500)\n roles SysRoleMenu[]\n\n @@map(\"sys_menu\")\n}\n\nmodel SysNotice {\n noticeId Int @id @default(autoincrement()) @map(\"notice_id\")\n noticeTitle String @map(\"notice_title\") @db.VarChar(50)\n noticeType String @map(\"notice_type\") @db.Char(1)\n noticeContent String? @map(\"notice_content\") @db.MediumText\n status String? @default(\"1\") @map(\"status\") @db.Char(1)\n createBy String? @default(\"\") @map(\"create_by\") @db.VarChar(64)\n createTime String? @map(\"create_time\") @db.VarChar(25)\n updateBy String? @default(\"\") @map(\"update_by\") @db.VarChar(64)\n updateTime String? @map(\"update_time\") @db.VarChar(25)\n remark String? @map(\"remark\") @db.VarChar(255)\n\n @@map(\"sys_notice\")\n}\n\nmodel SysPost {\n postId Int @id @default(autoincrement()) @map(\"post_id\") @db.UnsignedInt\n postCode String @map(\"post_code\") @db.VarChar(64)\n postName String @map(\"post_name\") @db.VarChar(50)\n postSort Int @map(\"post_sort\")\n status String @default(\"1\") @map(\"status\") @db.Char(1)\n createBy String? @default(\"\") @map(\"create_by\") @db.VarChar(64)\n createTime String? @map(\"create_time\") @db.VarChar(25)\n updateBy String? @default(\"\") @map(\"update_by\") @db.VarChar(64)\n updateTime String? @map(\"update_time\") @db.VarChar(25)\n remark String? @map(\"remark\") @db.VarChar(500)\n users SysUserPost[]\n\n @@map(\"sys_post\")\n}\n\nmodel SysUserPost {\n userId Int @map(\"user_id\") @db.UnsignedInt\n postId Int @map(\"post_id\") @db.UnsignedInt\n user SysUser @relation(fields: [userId], references: [userId])\n post SysPost @relation(fields: [postId], references: [postId])\n\n @@id([userId, postId])\n @@index([postId])\n @@map(\"sys_user_post\")\n}\n\nmodel SysRoleDept {\n roleId Int @map(\"role_id\") @db.UnsignedInt\n deptId Int @map(\"dept_id\") @db.UnsignedInt\n role SysRole @relation(fields: [roleId], references: [roleId])\n dept SysDept @relation(fields: [deptId], references: [deptId])\n\n @@id([roleId, deptId])\n @@index([deptId])\n @@map(\"sys_role_dept\")\n}\n\nmodel SysRoleMenu {\n roleId Int @map(\"role_id\") @db.UnsignedInt\n menuId Int @map(\"menu_id\") @db.UnsignedInt\n menu SysMenu @relation(fields: [menuId], references: [menuId])\n role SysRole @relation(fields: [roleId], references: [roleId])\n\n @@id([roleId, menuId])\n @@index([menuId])\n @@map(\"sys_role_menu\")\n}\n\nmodel SysUser {\n userId Int @id @default(autoincrement()) @map(\"user_id\") @db.UnsignedInt\n deptId Int? @map(\"dept_id\") @db.UnsignedInt\n userName String @map(\"user_name\") @db.VarChar(30)\n nickName String @map(\"nick_name\") @db.VarChar(30)\n userType String? @default(\"00\") @map(\"user_type\") @db.VarChar(2)\n email String? @default(\"\") @map(\"email\") @db.VarChar(50)\n phonenumber String? @default(\"\") @map(\"phonenumber\") @db.VarChar(11)\n sex String? @default(\"0\") @map(\"sex\") @db.Char(1)\n avatar String? @default(\"\") @map(\"avatar\") @db.VarChar(100)\n password String? @default(\"\") @map(\"password\") @db.VarChar(100)\n status String? @default(\"1\") @map(\"status\") @db.Char(1)\n loginIp String? @default(\"\") @map(\"login_ip\") @db.VarChar(128)\n loginDate String? @map(\"login_date\") @db.VarChar(25)\n createBy String? @default(\"\") @map(\"create_by\") @db.VarChar(64)\n createTime String? @map(\"create_time\") @db.VarChar(25)\n updateBy String? @default(\"\") @map(\"update_by\") @db.VarChar(64)\n updateTime String? @map(\"update_time\") @db.VarChar(25)\n remark String? @map(\"remark\") @db.VarChar(500)\n dept SysDept? @relation(fields: [deptId], references: [deptId])\n roles SysUserRole[]\n posts SysUserPost[]\n\n @@index([deptId])\n @@map(\"sys_user\")\n}\n\nmodel SysRole {\n roleId Int @id @default(autoincrement()) @map(\"role_id\") @db.UnsignedInt\n roleName String @map(\"role_name\") @db.VarChar(30)\n roleKey String @map(\"role_key\") @db.VarChar(100)\n roleSort Int @map(\"role_sort\")\n dataScope String? @default(\"5\") @map(\"data_scope\") @db.Char(1)\n menuCheckStrictly Int? @default(1) @map(\"menu_check_strictly\") @db.TinyInt\n deptCheckStrictly Int? @default(1) @map(\"dept_check_strictly\") @db.TinyInt\n status String @default(\"1\") @map(\"status\") @db.Char(1)\n createBy String? @default(\"\") @map(\"create_by\") @db.VarChar(64)\n createTime String? @map(\"create_time\") @db.VarChar(25)\n updateBy String? @default(\"\") @map(\"update_by\") @db.VarChar(64)\n updateTime String? @map(\"update_time\") @db.VarChar(25)\n remark String? @map(\"remark\") @db.VarChar(500)\n users SysUserRole[]\n menus SysRoleMenu[]\n depts SysRoleDept[]\n\n @@map(\"sys_role\")\n}\n\nmodel SysUserRole {\n userId Int @map(\"user_id\") @db.UnsignedInt\n roleId Int @map(\"role_id\") @db.UnsignedInt\n user SysUser @relation(fields: [userId], references: [userId])\n role SysRole @relation(fields: [roleId], references: [roleId])\n\n @@id([userId, roleId])\n @@index([roleId])\n @@map(\"sys_user_role\")\n}\n\ngenerator client {\n provider = \"prisma-client-js\"\n output = \"./common/prisma-client\"\n previewFeatures = [\"views\", \"relationJoins\", \"prismaSchemaFolder\", \"omitApi\"]\n //这里可以指定平台引擎,native就是当前系统, 如果需要其他系统的自行添加,或者到目标系统执行npx prisma generate\n binaryTargets = [\"native\"]\n // binaryTargets = [\"native\", \"windows\", \"linux-musl\",\"debian-openssl-3.0.x\",\"darwin\",\"darwin-arm64\"]\n}\n\ndatasource db {\n provider = \"mysql\"\n url = env(\"DATABASE_URL\")\n relationMode = \"prisma\"\n}\n", "inlineSchemaHash": "0b0d574d7aafbd1cd7ba47583488b808df1af0e6a2ca704e20a74708d2aad32a", "copyEngine": true } config.dirname = '/' config.runtimeDataModel = JSON.parse("{\"models\":{\"GenTable\":{\"dbName\":\"gen_table\",\"fields\":[{\"name\":\"tableId\",\"dbName\":\"table_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"tableName\",\"dbName\":\"table_name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"tableComment\",\"dbName\":\"table_comment\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"subTableName\",\"dbName\":\"sub_table_name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"subTableFkName\",\"dbName\":\"sub_table_fk_name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"className\",\"dbName\":\"class_name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"tplCategory\",\"dbName\":\"tpl_category\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"crud\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"tplWebType\",\"dbName\":\"tpl_web_type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"packageName\",\"dbName\":\"package_name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"moduleName\",\"dbName\":\"module_name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"businessName\",\"dbName\":\"business_name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"functionName\",\"dbName\":\"function_name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"functionAuthor\",\"dbName\":\"function_author\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"genType\",\"dbName\":\"gen_type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"0\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"genPath\",\"dbName\":\"gen_path\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"/\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"options\",\"dbName\":\"options\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createBy\",\"dbName\":\"create_by\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createTime\",\"dbName\":\"create_time\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updateBy\",\"dbName\":\"update_by\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updateTime\",\"dbName\":\"update_time\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"remark\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"tableColumns\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"GenTableColumn\",\"relationName\":\"GenTableToGenTableColumn\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"GenTableColumn\":{\"dbName\":\"gen_table_column\",\"fields\":[{\"name\":\"columnId\",\"dbName\":\"column_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"tableId\",\"dbName\":\"table_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"columnName\",\"dbName\":\"column_name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"columnComment\",\"dbName\":\"column_comment\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"columnType\",\"dbName\":\"column_type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"javaType\",\"dbName\":\"java_type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"javaField\",\"dbName\":\"java_field\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isPk\",\"dbName\":\"is_pk\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isIncrement\",\"dbName\":\"is_increment\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isRequired\",\"dbName\":\"is_required\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isInsert\",\"dbName\":\"is_insert\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isEdit\",\"dbName\":\"is_edit\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isList\",\"dbName\":\"is_list\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isQuery\",\"dbName\":\"is_query\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"queryType\",\"dbName\":\"query_type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"EQ\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"htmlType\",\"dbName\":\"html_type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"dictType\",\"dbName\":\"dict_type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sort\",\"dbName\":\"sort\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createBy\",\"dbName\":\"create_by\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createTime\",\"dbName\":\"create_time\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updateBy\",\"dbName\":\"update_by\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updateTime\",\"dbName\":\"update_time\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"table\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"GenTable\",\"relationName\":\"GenTableToGenTableColumn\",\"relationFromFields\":[\"tableId\"],\"relationToFields\":[\"tableId\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"SysConfig\":{\"dbName\":\"sys_config\",\"fields\":[{\"name\":\"configId\",\"dbName\":\"config_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"configName\",\"dbName\":\"config_name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"configKey\",\"dbName\":\"config_key\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"configValue\",\"dbName\":\"config_value\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"configType\",\"dbName\":\"config_type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"N\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createBy\",\"dbName\":\"create_by\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createTime\",\"dbName\":\"create_time\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updateBy\",\"dbName\":\"update_by\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updateTime\",\"dbName\":\"update_time\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"remark\",\"dbName\":\"remark\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"SysDept\":{\"dbName\":\"sys_dept\",\"fields\":[{\"name\":\"deptId\",\"dbName\":\"dept_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"parentId\",\"dbName\":\"parent_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"ancestors\",\"dbName\":\"ancestors\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"deptName\",\"dbName\":\"dept_name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"orderNum\",\"dbName\":\"order_num\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"leader\",\"dbName\":\"leader\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"phone\",\"dbName\":\"phone\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"email\",\"dbName\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"dbName\":\"status\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"1\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createBy\",\"dbName\":\"create_by\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createTime\",\"dbName\":\"create_time\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updateBy\",\"dbName\":\"update_by\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updateTime\",\"dbName\":\"update_time\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"users\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SysUser\",\"relationName\":\"SysDeptToSysUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"roles\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SysRoleDept\",\"relationName\":\"SysDeptToSysRoleDept\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"SysDictData\":{\"dbName\":\"sys_dict_data\",\"fields\":[{\"name\":\"dictCode\",\"dbName\":\"dict_code\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"dictSort\",\"dbName\":\"dict_sort\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"dictLabel\",\"dbName\":\"dict_label\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"dictValue\",\"dbName\":\"dict_value\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"dictType\",\"dbName\":\"dict_type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"cssClass\",\"dbName\":\"css_class\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"listClass\",\"dbName\":\"list_class\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isDefault\",\"dbName\":\"is_default\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"N\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"dbName\":\"status\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"1\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createBy\",\"dbName\":\"create_by\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createTime\",\"dbName\":\"create_time\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updateBy\",\"dbName\":\"update_by\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updateTime\",\"dbName\":\"update_time\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"remark\",\"dbName\":\"remark\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sysDictType\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SysDictType\",\"relationName\":\"SysDictDataToSysDictType\",\"relationFromFields\":[\"dictType\"],\"relationToFields\":[\"dictType\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"SysDictType\":{\"dbName\":\"sys_dict_type\",\"fields\":[{\"name\":\"dictId\",\"dbName\":\"dict_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"dictName\",\"dbName\":\"dict_name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"dictType\",\"dbName\":\"dict_type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"dbName\":\"status\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"1\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createBy\",\"dbName\":\"create_by\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createTime\",\"dbName\":\"create_time\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updateBy\",\"dbName\":\"update_by\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updateTime\",\"dbName\":\"update_time\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"remark\",\"dbName\":\"remark\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"dictDatas\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SysDictData\",\"relationName\":\"SysDictDataToSysDictType\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"SysLogininfor\":{\"dbName\":\"sys_logininfor\",\"fields\":[{\"name\":\"infoId\",\"dbName\":\"info_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userName\",\"dbName\":\"user_name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"ipaddr\",\"dbName\":\"ipaddr\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"loginLocation\",\"dbName\":\"login_location\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"browser\",\"dbName\":\"browser\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"os\",\"dbName\":\"os\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"dbName\":\"status\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"1\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"msg\",\"dbName\":\"msg\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"loginTime\",\"dbName\":\"login_time\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"SysMenu\":{\"dbName\":\"sys_menu\",\"fields\":[{\"name\":\"menuId\",\"dbName\":\"menu_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"menuName\",\"dbName\":\"menu_name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"parentId\",\"dbName\":\"parent_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"orderNum\",\"dbName\":\"order_num\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"path\",\"dbName\":\"path\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"component\",\"dbName\":\"component\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"query\",\"dbName\":\"query\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isFrame\",\"dbName\":\"is_frame\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isCache\",\"dbName\":\"is_cache\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":1,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"menuType\",\"dbName\":\"menu_type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"visible\",\"dbName\":\"visible\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"1\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"dbName\":\"status\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"1\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"perms\",\"dbName\":\"perms\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"icon\",\"dbName\":\"icon\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"#\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createBy\",\"dbName\":\"create_by\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createTime\",\"dbName\":\"create_time\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updateBy\",\"dbName\":\"update_by\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updateTime\",\"dbName\":\"update_time\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"remark\",\"dbName\":\"remark\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"roles\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SysRoleMenu\",\"relationName\":\"SysMenuToSysRoleMenu\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"SysNotice\":{\"dbName\":\"sys_notice\",\"fields\":[{\"name\":\"noticeId\",\"dbName\":\"notice_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"noticeTitle\",\"dbName\":\"notice_title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"noticeType\",\"dbName\":\"notice_type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"noticeContent\",\"dbName\":\"notice_content\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"dbName\":\"status\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"1\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createBy\",\"dbName\":\"create_by\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createTime\",\"dbName\":\"create_time\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updateBy\",\"dbName\":\"update_by\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updateTime\",\"dbName\":\"update_time\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"remark\",\"dbName\":\"remark\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"SysPost\":{\"dbName\":\"sys_post\",\"fields\":[{\"name\":\"postId\",\"dbName\":\"post_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"postCode\",\"dbName\":\"post_code\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"postName\",\"dbName\":\"post_name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"postSort\",\"dbName\":\"post_sort\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"dbName\":\"status\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"1\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createBy\",\"dbName\":\"create_by\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createTime\",\"dbName\":\"create_time\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updateBy\",\"dbName\":\"update_by\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updateTime\",\"dbName\":\"update_time\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"remark\",\"dbName\":\"remark\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"users\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SysUserPost\",\"relationName\":\"SysPostToSysUserPost\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"SysUserPost\":{\"dbName\":\"sys_user_post\",\"fields\":[{\"name\":\"userId\",\"dbName\":\"user_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"postId\",\"dbName\":\"post_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SysUser\",\"relationName\":\"SysUserToSysUserPost\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"userId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"post\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SysPost\",\"relationName\":\"SysPostToSysUserPost\",\"relationFromFields\":[\"postId\"],\"relationToFields\":[\"postId\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":{\"name\":null,\"fields\":[\"userId\",\"postId\"]},\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"SysRoleDept\":{\"dbName\":\"sys_role_dept\",\"fields\":[{\"name\":\"roleId\",\"dbName\":\"role_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"deptId\",\"dbName\":\"dept_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"role\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SysRole\",\"relationName\":\"SysRoleToSysRoleDept\",\"relationFromFields\":[\"roleId\"],\"relationToFields\":[\"roleId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"dept\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SysDept\",\"relationName\":\"SysDeptToSysRoleDept\",\"relationFromFields\":[\"deptId\"],\"relationToFields\":[\"deptId\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":{\"name\":null,\"fields\":[\"roleId\",\"deptId\"]},\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"SysRoleMenu\":{\"dbName\":\"sys_role_menu\",\"fields\":[{\"name\":\"roleId\",\"dbName\":\"role_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"menuId\",\"dbName\":\"menu_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"menu\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SysMenu\",\"relationName\":\"SysMenuToSysRoleMenu\",\"relationFromFields\":[\"menuId\"],\"relationToFields\":[\"menuId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"role\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SysRole\",\"relationName\":\"SysRoleToSysRoleMenu\",\"relationFromFields\":[\"roleId\"],\"relationToFields\":[\"roleId\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":{\"name\":null,\"fields\":[\"roleId\",\"menuId\"]},\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"SysUser\":{\"dbName\":\"sys_user\",\"fields\":[{\"name\":\"userId\",\"dbName\":\"user_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"deptId\",\"dbName\":\"dept_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userName\",\"dbName\":\"user_name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"nickName\",\"dbName\":\"nick_name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userType\",\"dbName\":\"user_type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"00\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"email\",\"dbName\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"phonenumber\",\"dbName\":\"phonenumber\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sex\",\"dbName\":\"sex\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"0\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"avatar\",\"dbName\":\"avatar\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"password\",\"dbName\":\"password\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"dbName\":\"status\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"1\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"loginIp\",\"dbName\":\"login_ip\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"loginDate\",\"dbName\":\"login_date\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createBy\",\"dbName\":\"create_by\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createTime\",\"dbName\":\"create_time\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updateBy\",\"dbName\":\"update_by\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updateTime\",\"dbName\":\"update_time\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"remark\",\"dbName\":\"remark\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"dept\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SysDept\",\"relationName\":\"SysDeptToSysUser\",\"relationFromFields\":[\"deptId\"],\"relationToFields\":[\"deptId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"roles\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SysUserRole\",\"relationName\":\"SysUserToSysUserRole\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"posts\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SysUserPost\",\"relationName\":\"SysUserToSysUserPost\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"SysRole\":{\"dbName\":\"sys_role\",\"fields\":[{\"name\":\"roleId\",\"dbName\":\"role_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"roleName\",\"dbName\":\"role_name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"roleKey\",\"dbName\":\"role_key\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"roleSort\",\"dbName\":\"role_sort\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"dataScope\",\"dbName\":\"data_scope\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"5\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"menuCheckStrictly\",\"dbName\":\"menu_check_strictly\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":1,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"deptCheckStrictly\",\"dbName\":\"dept_check_strictly\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":1,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"dbName\":\"status\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"1\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createBy\",\"dbName\":\"create_by\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createTime\",\"dbName\":\"create_time\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updateBy\",\"dbName\":\"update_by\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updateTime\",\"dbName\":\"update_time\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"remark\",\"dbName\":\"remark\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"users\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SysUserRole\",\"relationName\":\"SysRoleToSysUserRole\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"menus\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SysRoleMenu\",\"relationName\":\"SysRoleToSysRoleMenu\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"depts\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SysRoleDept\",\"relationName\":\"SysRoleToSysRoleDept\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"SysUserRole\":{\"dbName\":\"sys_user_role\",\"fields\":[{\"name\":\"userId\",\"dbName\":\"user_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"roleId\",\"dbName\":\"role_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SysUser\",\"relationName\":\"SysUserToSysUserRole\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"userId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"role\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SysRole\",\"relationName\":\"SysRoleToSysUserRole\",\"relationFromFields\":[\"roleId\"],\"relationToFields\":[\"roleId\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":{\"name\":null,\"fields\":[\"userId\",\"roleId\"]},\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false}},\"enums\":{},\"types\":{}}") defineDmmfProperty(exports.Prisma, config.runtimeDataModel) config.engineWasm = undefined config.injectableEdgeEnv = () => ({ parsed: { DATABASE_URL: typeof globalThis !== 'undefined' && globalThis['DATABASE_URL'] || typeof process !== 'undefined' && process.env && process.env.DATABASE_URL || undefined } }) if (typeof globalThis !== 'undefined' && globalThis['DEBUG'] || typeof process !== 'undefined' && process.env && process.env.DEBUG || undefined) { Debug.enable(typeof globalThis !== 'undefined' && globalThis['DEBUG'] || typeof process !== 'undefined' && process.env && process.env.DEBUG || undefined) } const PrismaClient = getPrismaClient(config) exports.PrismaClient = PrismaClient Object.assign(exports, Prisma) ================================================ FILE: server/src/common/prisma-client/index-browser.js ================================================ Object.defineProperty(exports, "__esModule", { value: true }); const { Decimal, objectEnumValues, makeStrictEnum, Public, getRuntime, } = require('./runtime/index-browser.js') const Prisma = {} exports.Prisma = Prisma exports.$Enums = {} /** * Prisma Client JS version: 5.15.0 * Query Engine version: 12e25d8d06f6ea5a0252864dd9a03b1bb51f3022 */ Prisma.prismaVersion = { client: "5.15.0", engine: "12e25d8d06f6ea5a0252864dd9a03b1bb51f3022" } Prisma.PrismaClientKnownRequestError = () => { const runtimeName = getRuntime().prettyName; throw new Error(`PrismaClientKnownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, )}; Prisma.PrismaClientUnknownRequestError = () => { const runtimeName = getRuntime().prettyName; throw new Error(`PrismaClientUnknownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, )} Prisma.PrismaClientRustPanicError = () => { const runtimeName = getRuntime().prettyName; throw new Error(`PrismaClientRustPanicError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, )} Prisma.PrismaClientInitializationError = () => { const runtimeName = getRuntime().prettyName; throw new Error(`PrismaClientInitializationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, )} Prisma.PrismaClientValidationError = () => { const runtimeName = getRuntime().prettyName; throw new Error(`PrismaClientValidationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, )} Prisma.NotFoundError = () => { const runtimeName = getRuntime().prettyName; throw new Error(`NotFoundError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, )} Prisma.Decimal = Decimal /** * Re-export of sql-template-tag */ Prisma.sql = () => { const runtimeName = getRuntime().prettyName; throw new Error(`sqltag is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, )} Prisma.empty = () => { const runtimeName = getRuntime().prettyName; throw new Error(`empty is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, )} Prisma.join = () => { const runtimeName = getRuntime().prettyName; throw new Error(`join is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, )} Prisma.raw = () => { const runtimeName = getRuntime().prettyName; throw new Error(`raw is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, )} Prisma.validator = Public.validator /** * Extensions */ Prisma.getExtensionContext = () => { const runtimeName = getRuntime().prettyName; throw new Error(`Extensions.getExtensionContext is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, )} Prisma.defineExtension = () => { const runtimeName = getRuntime().prettyName; throw new Error(`Extensions.defineExtension is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, )} /** * Shorthand utilities for JSON filtering */ Prisma.DbNull = objectEnumValues.instances.DbNull Prisma.JsonNull = objectEnumValues.instances.JsonNull Prisma.AnyNull = objectEnumValues.instances.AnyNull Prisma.NullTypes = { DbNull: objectEnumValues.classes.DbNull, JsonNull: objectEnumValues.classes.JsonNull, AnyNull: objectEnumValues.classes.AnyNull } /** * Enums */ exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ ReadUncommitted: 'ReadUncommitted', ReadCommitted: 'ReadCommitted', RepeatableRead: 'RepeatableRead', Serializable: 'Serializable' }); exports.Prisma.GenTableScalarFieldEnum = { tableId: 'tableId', tableName: 'tableName', tableComment: 'tableComment', subTableName: 'subTableName', subTableFkName: 'subTableFkName', className: 'className', tplCategory: 'tplCategory', tplWebType: 'tplWebType', packageName: 'packageName', moduleName: 'moduleName', businessName: 'businessName', functionName: 'functionName', functionAuthor: 'functionAuthor', genType: 'genType', genPath: 'genPath', options: 'options', createBy: 'createBy', createTime: 'createTime', updateBy: 'updateBy', updateTime: 'updateTime', remark: 'remark' }; exports.Prisma.RelationLoadStrategy = { query: 'query', join: 'join' }; exports.Prisma.GenTableColumnScalarFieldEnum = { columnId: 'columnId', tableId: 'tableId', columnName: 'columnName', columnComment: 'columnComment', columnType: 'columnType', javaType: 'javaType', javaField: 'javaField', isPk: 'isPk', isIncrement: 'isIncrement', isRequired: 'isRequired', isInsert: 'isInsert', isEdit: 'isEdit', isList: 'isList', isQuery: 'isQuery', queryType: 'queryType', htmlType: 'htmlType', dictType: 'dictType', sort: 'sort', createBy: 'createBy', createTime: 'createTime', updateBy: 'updateBy', updateTime: 'updateTime' }; exports.Prisma.SysConfigScalarFieldEnum = { configId: 'configId', configName: 'configName', configKey: 'configKey', configValue: 'configValue', configType: 'configType', createBy: 'createBy', createTime: 'createTime', updateBy: 'updateBy', updateTime: 'updateTime', remark: 'remark' }; exports.Prisma.SysDeptScalarFieldEnum = { deptId: 'deptId', parentId: 'parentId', ancestors: 'ancestors', deptName: 'deptName', orderNum: 'orderNum', leader: 'leader', phone: 'phone', email: 'email', status: 'status', createBy: 'createBy', createTime: 'createTime', updateBy: 'updateBy', updateTime: 'updateTime' }; exports.Prisma.SysDictDataScalarFieldEnum = { dictCode: 'dictCode', dictSort: 'dictSort', dictLabel: 'dictLabel', dictValue: 'dictValue', dictType: 'dictType', cssClass: 'cssClass', listClass: 'listClass', isDefault: 'isDefault', status: 'status', createBy: 'createBy', createTime: 'createTime', updateBy: 'updateBy', updateTime: 'updateTime', remark: 'remark' }; exports.Prisma.SysDictTypeScalarFieldEnum = { dictId: 'dictId', dictName: 'dictName', dictType: 'dictType', status: 'status', createBy: 'createBy', createTime: 'createTime', updateBy: 'updateBy', updateTime: 'updateTime', remark: 'remark' }; exports.Prisma.SysLogininforScalarFieldEnum = { infoId: 'infoId', userName: 'userName', ipaddr: 'ipaddr', loginLocation: 'loginLocation', browser: 'browser', os: 'os', status: 'status', msg: 'msg', loginTime: 'loginTime' }; exports.Prisma.SysMenuScalarFieldEnum = { menuId: 'menuId', menuName: 'menuName', parentId: 'parentId', orderNum: 'orderNum', path: 'path', component: 'component', query: 'query', isFrame: 'isFrame', isCache: 'isCache', menuType: 'menuType', visible: 'visible', status: 'status', perms: 'perms', icon: 'icon', createBy: 'createBy', createTime: 'createTime', updateBy: 'updateBy', updateTime: 'updateTime', remark: 'remark' }; exports.Prisma.SysNoticeScalarFieldEnum = { noticeId: 'noticeId', noticeTitle: 'noticeTitle', noticeType: 'noticeType', noticeContent: 'noticeContent', status: 'status', createBy: 'createBy', createTime: 'createTime', updateBy: 'updateBy', updateTime: 'updateTime', remark: 'remark' }; exports.Prisma.SysPostScalarFieldEnum = { postId: 'postId', postCode: 'postCode', postName: 'postName', postSort: 'postSort', status: 'status', createBy: 'createBy', createTime: 'createTime', updateBy: 'updateBy', updateTime: 'updateTime', remark: 'remark' }; exports.Prisma.SysUserPostScalarFieldEnum = { userId: 'userId', postId: 'postId' }; exports.Prisma.SysRoleDeptScalarFieldEnum = { roleId: 'roleId', deptId: 'deptId' }; exports.Prisma.SysRoleMenuScalarFieldEnum = { roleId: 'roleId', menuId: 'menuId' }; exports.Prisma.SysUserScalarFieldEnum = { userId: 'userId', deptId: 'deptId', userName: 'userName', nickName: 'nickName', userType: 'userType', email: 'email', phonenumber: 'phonenumber', sex: 'sex', avatar: 'avatar', password: 'password', status: 'status', loginIp: 'loginIp', loginDate: 'loginDate', createBy: 'createBy', createTime: 'createTime', updateBy: 'updateBy', updateTime: 'updateTime', remark: 'remark' }; exports.Prisma.SysRoleScalarFieldEnum = { roleId: 'roleId', roleName: 'roleName', roleKey: 'roleKey', roleSort: 'roleSort', dataScope: 'dataScope', menuCheckStrictly: 'menuCheckStrictly', deptCheckStrictly: 'deptCheckStrictly', status: 'status', createBy: 'createBy', createTime: 'createTime', updateBy: 'updateBy', updateTime: 'updateTime', remark: 'remark' }; exports.Prisma.SysUserRoleScalarFieldEnum = { userId: 'userId', roleId: 'roleId' }; exports.Prisma.SortOrder = { asc: 'asc', desc: 'desc' }; exports.Prisma.NullsOrder = { first: 'first', last: 'last' }; exports.Prisma.ModelName = { GenTable: 'GenTable', GenTableColumn: 'GenTableColumn', SysConfig: 'SysConfig', SysDept: 'SysDept', SysDictData: 'SysDictData', SysDictType: 'SysDictType', SysLogininfor: 'SysLogininfor', SysMenu: 'SysMenu', SysNotice: 'SysNotice', SysPost: 'SysPost', SysUserPost: 'SysUserPost', SysRoleDept: 'SysRoleDept', SysRoleMenu: 'SysRoleMenu', SysUser: 'SysUser', SysRole: 'SysRole', SysUserRole: 'SysUserRole' }; /** * This is a stub Prisma Client that will error at runtime if called. */ class PrismaClient { constructor() { return new Proxy(this, { get(target, prop) { let message const runtime = getRuntime() if (runtime.isEdge) { message = `PrismaClient is not configured to run in ${runtime.prettyName}. In order to run Prisma Client on edge runtime, either: - Use Prisma Accelerate: https://pris.ly/d/accelerate - Use Driver Adapters: https://pris.ly/d/driver-adapters `; } else { message = 'PrismaClient is unable to run in this browser environment, or has been bundled for the browser (running in `' + runtime.prettyName + '`).' } message += ` If this is unexpected, please open an issue: https://pris.ly/prisma-prisma-bug-report` throw new Error(message) } }) } } exports.PrismaClient = PrismaClient Object.assign(exports, Prisma) ================================================ FILE: server/src/common/prisma-client/index.d.ts ================================================ /** * Client **/ import * as runtime from './runtime/library.js'; import $Types = runtime.Types // general types import $Public = runtime.Types.Public import $Utils = runtime.Types.Utils import $Extensions = runtime.Types.Extensions import $Result = runtime.Types.Result export type PrismaPromise = $Public.PrismaPromise /** * Model GenTable * */ export type GenTable = $Result.DefaultSelection /** * Model GenTableColumn * */ export type GenTableColumn = $Result.DefaultSelection /** * Model SysConfig * */ export type SysConfig = $Result.DefaultSelection /** * Model SysDept * */ export type SysDept = $Result.DefaultSelection /** * Model SysDictData * */ export type SysDictData = $Result.DefaultSelection /** * Model SysDictType * */ export type SysDictType = $Result.DefaultSelection /** * Model SysLogininfor * */ export type SysLogininfor = $Result.DefaultSelection /** * Model SysMenu * */ export type SysMenu = $Result.DefaultSelection /** * Model SysNotice * */ export type SysNotice = $Result.DefaultSelection /** * Model SysPost * */ export type SysPost = $Result.DefaultSelection /** * Model SysUserPost * */ export type SysUserPost = $Result.DefaultSelection /** * Model SysRoleDept * */ export type SysRoleDept = $Result.DefaultSelection /** * Model SysRoleMenu * */ export type SysRoleMenu = $Result.DefaultSelection /** * Model SysUser * */ export type SysUser = $Result.DefaultSelection /** * Model SysRole * */ export type SysRole = $Result.DefaultSelection /** * Model SysUserRole * */ export type SysUserRole = $Result.DefaultSelection /** * ## Prisma Client ʲˢ * * Type-safe database client for TypeScript & Node.js * @example * ``` * const prisma = new PrismaClient() * // Fetch zero or more GenTables * const genTables = await prisma.genTable.findMany() * ``` * * * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client). */ export class PrismaClient< T extends Prisma.PrismaClientOptions = Prisma.PrismaClientOptions, U = 'log' extends keyof T ? T['log'] extends Array ? Prisma.GetEvents : never : never, ExtArgs extends $Extensions.InternalArgs = $Extensions.DefaultArgs > { [K: symbol]: { types: Prisma.TypeMap['other'] } /** * ## Prisma Client ʲˢ * * Type-safe database client for TypeScript & Node.js * @example * ``` * const prisma = new PrismaClient() * // Fetch zero or more GenTables * const genTables = await prisma.genTable.findMany() * ``` * * * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client). */ constructor(optionsArg ?: Prisma.Subset); $on(eventType: V, callback: (event: V extends 'query' ? Prisma.QueryEvent : Prisma.LogEvent) => void): void; /** * Connect with the database */ $connect(): $Utils.JsPromise; /** * Disconnect from the database */ $disconnect(): $Utils.JsPromise; /** * Add a middleware * @deprecated since 4.16.0. For new code, prefer client extensions instead. * @see https://pris.ly/d/extensions */ $use(cb: Prisma.Middleware): void /** * Executes a prepared raw query and returns the number of affected rows. * @example * ``` * const result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};` * ``` * * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). */ $executeRaw(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise; /** * Executes a raw query and returns the number of affected rows. * Susceptible to SQL injections, see documentation. * @example * ``` * const result = await prisma.$executeRawUnsafe('UPDATE User SET cool = $1 WHERE email = $2 ;', true, 'user@email.com') * ``` * * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). */ $executeRawUnsafe(query: string, ...values: any[]): Prisma.PrismaPromise; /** * Performs a prepared raw query and returns the `SELECT` data. * @example * ``` * const result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};` * ``` * * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). */ $queryRaw(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise; /** * Performs a raw query and returns the `SELECT` data. * Susceptible to SQL injections, see documentation. * @example * ``` * const result = await prisma.$queryRawUnsafe('SELECT * FROM User WHERE id = $1 OR email = $2;', 1, 'user@email.com') * ``` * * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/raw-database-access). */ $queryRawUnsafe(query: string, ...values: any[]): Prisma.PrismaPromise; /** * Allows the running of a sequence of read/write operations that are guaranteed to either succeed or fail as a whole. * @example * ``` * const [george, bob, alice] = await prisma.$transaction([ * prisma.user.create({ data: { name: 'George' } }), * prisma.user.create({ data: { name: 'Bob' } }), * prisma.user.create({ data: { name: 'Alice' } }), * ]) * ``` * * Read more in our [docs](https://www.prisma.io/docs/concepts/components/prisma-client/transactions). */ $transaction

[]>(arg: [...P], options?: { isolationLevel?: Prisma.TransactionIsolationLevel }): $Utils.JsPromise> $transaction(fn: (prisma: Omit) => $Utils.JsPromise, options?: { maxWait?: number, timeout?: number, isolationLevel?: Prisma.TransactionIsolationLevel }): $Utils.JsPromise $extends: $Extensions.ExtendsHook<'extends', Prisma.TypeMapCb, ExtArgs> /** * `prisma.genTable`: Exposes CRUD operations for the **GenTable** model. * Example usage: * ```ts * // Fetch zero or more GenTables * const genTables = await prisma.genTable.findMany() * ``` */ get genTable(): Prisma.GenTableDelegate; /** * `prisma.genTableColumn`: Exposes CRUD operations for the **GenTableColumn** model. * Example usage: * ```ts * // Fetch zero or more GenTableColumns * const genTableColumns = await prisma.genTableColumn.findMany() * ``` */ get genTableColumn(): Prisma.GenTableColumnDelegate; /** * `prisma.sysConfig`: Exposes CRUD operations for the **SysConfig** model. * Example usage: * ```ts * // Fetch zero or more SysConfigs * const sysConfigs = await prisma.sysConfig.findMany() * ``` */ get sysConfig(): Prisma.SysConfigDelegate; /** * `prisma.sysDept`: Exposes CRUD operations for the **SysDept** model. * Example usage: * ```ts * // Fetch zero or more SysDepts * const sysDepts = await prisma.sysDept.findMany() * ``` */ get sysDept(): Prisma.SysDeptDelegate; /** * `prisma.sysDictData`: Exposes CRUD operations for the **SysDictData** model. * Example usage: * ```ts * // Fetch zero or more SysDictData * const sysDictData = await prisma.sysDictData.findMany() * ``` */ get sysDictData(): Prisma.SysDictDataDelegate; /** * `prisma.sysDictType`: Exposes CRUD operations for the **SysDictType** model. * Example usage: * ```ts * // Fetch zero or more SysDictTypes * const sysDictTypes = await prisma.sysDictType.findMany() * ``` */ get sysDictType(): Prisma.SysDictTypeDelegate; /** * `prisma.sysLogininfor`: Exposes CRUD operations for the **SysLogininfor** model. * Example usage: * ```ts * // Fetch zero or more SysLogininfors * const sysLogininfors = await prisma.sysLogininfor.findMany() * ``` */ get sysLogininfor(): Prisma.SysLogininforDelegate; /** * `prisma.sysMenu`: Exposes CRUD operations for the **SysMenu** model. * Example usage: * ```ts * // Fetch zero or more SysMenus * const sysMenus = await prisma.sysMenu.findMany() * ``` */ get sysMenu(): Prisma.SysMenuDelegate; /** * `prisma.sysNotice`: Exposes CRUD operations for the **SysNotice** model. * Example usage: * ```ts * // Fetch zero or more SysNotices * const sysNotices = await prisma.sysNotice.findMany() * ``` */ get sysNotice(): Prisma.SysNoticeDelegate; /** * `prisma.sysPost`: Exposes CRUD operations for the **SysPost** model. * Example usage: * ```ts * // Fetch zero or more SysPosts * const sysPosts = await prisma.sysPost.findMany() * ``` */ get sysPost(): Prisma.SysPostDelegate; /** * `prisma.sysUserPost`: Exposes CRUD operations for the **SysUserPost** model. * Example usage: * ```ts * // Fetch zero or more SysUserPosts * const sysUserPosts = await prisma.sysUserPost.findMany() * ``` */ get sysUserPost(): Prisma.SysUserPostDelegate; /** * `prisma.sysRoleDept`: Exposes CRUD operations for the **SysRoleDept** model. * Example usage: * ```ts * // Fetch zero or more SysRoleDepts * const sysRoleDepts = await prisma.sysRoleDept.findMany() * ``` */ get sysRoleDept(): Prisma.SysRoleDeptDelegate; /** * `prisma.sysRoleMenu`: Exposes CRUD operations for the **SysRoleMenu** model. * Example usage: * ```ts * // Fetch zero or more SysRoleMenus * const sysRoleMenus = await prisma.sysRoleMenu.findMany() * ``` */ get sysRoleMenu(): Prisma.SysRoleMenuDelegate; /** * `prisma.sysUser`: Exposes CRUD operations for the **SysUser** model. * Example usage: * ```ts * // Fetch zero or more SysUsers * const sysUsers = await prisma.sysUser.findMany() * ``` */ get sysUser(): Prisma.SysUserDelegate; /** * `prisma.sysRole`: Exposes CRUD operations for the **SysRole** model. * Example usage: * ```ts * // Fetch zero or more SysRoles * const sysRoles = await prisma.sysRole.findMany() * ``` */ get sysRole(): Prisma.SysRoleDelegate; /** * `prisma.sysUserRole`: Exposes CRUD operations for the **SysUserRole** model. * Example usage: * ```ts * // Fetch zero or more SysUserRoles * const sysUserRoles = await prisma.sysUserRole.findMany() * ``` */ get sysUserRole(): Prisma.SysUserRoleDelegate; } export namespace Prisma { export import DMMF = runtime.DMMF export type PrismaPromise = $Public.PrismaPromise /** * Validator */ export import validator = runtime.Public.validator /** * Prisma Errors */ export import PrismaClientKnownRequestError = runtime.PrismaClientKnownRequestError export import PrismaClientUnknownRequestError = runtime.PrismaClientUnknownRequestError export import PrismaClientRustPanicError = runtime.PrismaClientRustPanicError export import PrismaClientInitializationError = runtime.PrismaClientInitializationError export import PrismaClientValidationError = runtime.PrismaClientValidationError export import NotFoundError = runtime.NotFoundError /** * Re-export of sql-template-tag */ export import sql = runtime.sqltag export import empty = runtime.empty export import join = runtime.join export import raw = runtime.raw export import Sql = runtime.Sql /** * Decimal.js */ export import Decimal = runtime.Decimal export type DecimalJsLike = runtime.DecimalJsLike /** * Metrics */ export type Metrics = runtime.Metrics export type Metric = runtime.Metric export type MetricHistogram = runtime.MetricHistogram export type MetricHistogramBucket = runtime.MetricHistogramBucket /** * Extensions */ export import Extension = $Extensions.UserArgs export import getExtensionContext = runtime.Extensions.getExtensionContext export import Args = $Public.Args export import Payload = $Public.Payload export import Result = $Public.Result export import Exact = $Public.Exact /** * Prisma Client JS version: 5.15.0 * Query Engine version: 12e25d8d06f6ea5a0252864dd9a03b1bb51f3022 */ export type PrismaVersion = { client: string } export const prismaVersion: PrismaVersion /** * Utility Types */ /** * From https://github.com/sindresorhus/type-fest/ * Matches a JSON object. * This type can be useful to enforce some input to be JSON-compatible or as a super-type to be extended from. */ export type JsonObject = {[Key in string]?: JsonValue} /** * From https://github.com/sindresorhus/type-fest/ * Matches a JSON array. */ export interface JsonArray extends Array {} /** * From https://github.com/sindresorhus/type-fest/ * Matches any valid JSON value. */ export type JsonValue = string | number | boolean | JsonObject | JsonArray | null /** * Matches a JSON object. * Unlike `JsonObject`, this type allows undefined and read-only properties. */ export type InputJsonObject = {readonly [Key in string]?: InputJsonValue | null} /** * Matches a JSON array. * Unlike `JsonArray`, readonly arrays are assignable to this type. */ export interface InputJsonArray extends ReadonlyArray {} /** * Matches any valid value that can be used as an input for operations like * create and update as the value of a JSON field. Unlike `JsonValue`, this * type allows read-only arrays and read-only object properties and disallows * `null` at the top level. * * `null` cannot be used as the value of a JSON field because its meaning * would be ambiguous. Use `Prisma.JsonNull` to store the JSON null value or * `Prisma.DbNull` to clear the JSON value and set the field to the database * NULL value instead. * * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-by-null-values */ export type InputJsonValue = string | number | boolean | InputJsonObject | InputJsonArray | { toJSON(): unknown } /** * Types of the values used to represent different kinds of `null` values when working with JSON fields. * * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field */ namespace NullTypes { /** * Type of `Prisma.DbNull`. * * You cannot use other instances of this class. Please use the `Prisma.DbNull` value. * * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field */ class DbNull { private DbNull: never private constructor() } /** * Type of `Prisma.JsonNull`. * * You cannot use other instances of this class. Please use the `Prisma.JsonNull` value. * * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field */ class JsonNull { private JsonNull: never private constructor() } /** * Type of `Prisma.AnyNull`. * * You cannot use other instances of this class. Please use the `Prisma.AnyNull` value. * * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field */ class AnyNull { private AnyNull: never private constructor() } } /** * Helper for filtering JSON entries that have `null` on the database (empty on the db) * * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field */ export const DbNull: NullTypes.DbNull /** * Helper for filtering JSON entries that have JSON `null` values (not empty on the db) * * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field */ export const JsonNull: NullTypes.JsonNull /** * Helper for filtering JSON entries that are `Prisma.DbNull` or `Prisma.JsonNull` * * @see https://www.prisma.io/docs/concepts/components/prisma-client/working-with-fields/working-with-json-fields#filtering-on-a-json-field */ export const AnyNull: NullTypes.AnyNull type SelectAndInclude = { select: any include: any } type SelectAndOmit = { select: any omit: any } /** * Get the type of the value, that the Promise holds. */ export type PromiseType> = T extends PromiseLike ? U : T; /** * Get the return type of a function which returns a Promise. */ export type PromiseReturnType $Utils.JsPromise> = PromiseType> /** * From T, pick a set of properties whose keys are in the union K */ type Prisma__Pick = { [P in K]: T[P]; }; export type Enumerable = T | Array; export type RequiredKeys = { [K in keyof T]-?: {} extends Prisma__Pick ? never : K }[keyof T] export type TruthyKeys = keyof { [K in keyof T as T[K] extends false | undefined | null ? never : K]: K } export type TrueKeys = TruthyKeys>> /** * Subset * @desc From `T` pick properties that exist in `U`. Simple version of Intersection */ export type Subset = { [key in keyof T]: key extends keyof U ? T[key] : never; }; /** * SelectSubset * @desc From `T` pick properties that exist in `U`. Simple version of Intersection. * Additionally, it validates, if both select and include are present. If the case, it errors. */ export type SelectSubset = { [key in keyof T]: key extends keyof U ? T[key] : never } & (T extends SelectAndInclude ? 'Please either choose `select` or `include`.' : T extends SelectAndOmit ? 'Please either choose `select` or `omit`.' : {}) /** * Subset + Intersection * @desc From `T` pick properties that exist in `U` and intersect `K` */ export type SubsetIntersection = { [key in keyof T]: key extends keyof U ? T[key] : never } & K type Without = { [P in Exclude]?: never }; /** * XOR is needed to have a real mutually exclusive union type * https://stackoverflow.com/questions/42123407/does-typescript-support-mutually-exclusive-types */ type XOR = T extends object ? U extends object ? (Without & U) | (Without & T) : U : T /** * Is T a Record? */ type IsObject = T extends Array ? False : T extends Date ? False : T extends Uint8Array ? False : T extends BigInt ? False : T extends object ? True : False /** * If it's T[], return T */ export type UnEnumerate = T extends Array ? U : T /** * From ts-toolbelt */ type __Either = Omit & { // Merge all but K [P in K]: Prisma__Pick // With K possibilities }[K] type EitherStrict = Strict<__Either> type EitherLoose = ComputeRaw<__Either> type _Either< O extends object, K extends Key, strict extends Boolean > = { 1: EitherStrict 0: EitherLoose }[strict] type Either< O extends object, K extends Key, strict extends Boolean = 1 > = O extends unknown ? _Either : never export type Union = any type PatchUndefined = { [K in keyof O]: O[K] extends undefined ? At : O[K] } & {} /** Helper Types for "Merge" **/ export type IntersectOf = ( U extends unknown ? (k: U) => void : never ) extends (k: infer I) => void ? I : never export type Overwrite = { [K in keyof O]: K extends keyof O1 ? O1[K] : O[K]; } & {}; type _Merge = IntersectOf; }>>; type Key = string | number | symbol; type AtBasic = K extends keyof O ? O[K] : never; type AtStrict = O[K & keyof O]; type AtLoose = O extends unknown ? AtStrict : never; export type At = { 1: AtStrict; 0: AtLoose; }[strict]; export type ComputeRaw = A extends Function ? A : { [K in keyof A]: A[K]; } & {}; export type OptionalFlat = { [K in keyof O]?: O[K]; } & {}; type _Record = { [P in K]: T; }; // cause typescript not to expand types and preserve names type NoExpand = T extends unknown ? T : never; // this type assumes the passed object is entirely optional type AtLeast = NoExpand< O extends unknown ? | (K extends keyof O ? { [P in K]: O[P] } & O : O) | {[P in keyof O as P extends K ? K : never]-?: O[P]} & O : never>; type _Strict = U extends unknown ? U & OptionalFlat<_Record, keyof U>, never>> : never; export type Strict = ComputeRaw<_Strict>; /** End Helper Types for "Merge" **/ export type Merge = ComputeRaw<_Merge>>; /** A [[Boolean]] */ export type Boolean = True | False // /** // 1 // */ export type True = 1 /** 0 */ export type False = 0 export type Not = { 0: 1 1: 0 }[B] export type Extends = [A1] extends [never] ? 0 // anything `never` is false : A1 extends A2 ? 1 : 0 export type Has = Not< Extends, U1> > export type Or = { 0: { 0: 0 1: 1 } 1: { 0: 1 1: 1 } }[B1][B2] export type Keys = U extends unknown ? keyof U : never type Cast = A extends B ? A : B; export const type: unique symbol; /** * Used by group by */ export type GetScalarType = O extends object ? { [P in keyof T]: P extends keyof O ? O[P] : never } : never type FieldPaths< T, U = Omit > = IsObject extends True ? U : T type GetHavingFields = { [K in keyof T]: Or< Or, Extends<'AND', K>>, Extends<'NOT', K> > extends True ? // infer is only needed to not hit TS limit // based on the brilliant idea of Pierre-Antoine Mills // https://github.com/microsoft/TypeScript/issues/30188#issuecomment-478938437 T[K] extends infer TK ? GetHavingFields extends object ? Merge> : never> : never : {} extends FieldPaths ? never : K }[keyof T] /** * Convert tuple to union */ type _TupleToUnion = T extends (infer E)[] ? E : never type TupleToUnion = _TupleToUnion type MaybeTupleToUnion = T extends any[] ? TupleToUnion : T /** * Like `Pick`, but additionally can also accept an array of keys */ type PickEnumerable | keyof T> = Prisma__Pick> /** * Exclude all keys with underscores */ type ExcludeUnderscoreKeys = T extends `_${string}` ? never : T export type FieldRef = runtime.FieldRef type FieldRefInputType = Model extends never ? never : FieldRef export const ModelName: { GenTable: 'GenTable', GenTableColumn: 'GenTableColumn', SysConfig: 'SysConfig', SysDept: 'SysDept', SysDictData: 'SysDictData', SysDictType: 'SysDictType', SysLogininfor: 'SysLogininfor', SysMenu: 'SysMenu', SysNotice: 'SysNotice', SysPost: 'SysPost', SysUserPost: 'SysUserPost', SysRoleDept: 'SysRoleDept', SysRoleMenu: 'SysRoleMenu', SysUser: 'SysUser', SysRole: 'SysRole', SysUserRole: 'SysUserRole' }; export type ModelName = (typeof ModelName)[keyof typeof ModelName] export type Datasources = { db?: Datasource } interface TypeMapCb extends $Utils.Fn<{extArgs: $Extensions.InternalArgs}, $Utils.Record> { returns: Prisma.TypeMap } export type TypeMap = { meta: { modelProps: 'genTable' | 'genTableColumn' | 'sysConfig' | 'sysDept' | 'sysDictData' | 'sysDictType' | 'sysLogininfor' | 'sysMenu' | 'sysNotice' | 'sysPost' | 'sysUserPost' | 'sysRoleDept' | 'sysRoleMenu' | 'sysUser' | 'sysRole' | 'sysUserRole' txIsolationLevel: Prisma.TransactionIsolationLevel }, model: { GenTable: { payload: Prisma.$GenTablePayload fields: Prisma.GenTableFieldRefs operations: { findUnique: { args: Prisma.GenTableFindUniqueArgs, result: $Utils.PayloadToResult | null } findUniqueOrThrow: { args: Prisma.GenTableFindUniqueOrThrowArgs, result: $Utils.PayloadToResult } findFirst: { args: Prisma.GenTableFindFirstArgs, result: $Utils.PayloadToResult | null } findFirstOrThrow: { args: Prisma.GenTableFindFirstOrThrowArgs, result: $Utils.PayloadToResult } findMany: { args: Prisma.GenTableFindManyArgs, result: $Utils.PayloadToResult[] } create: { args: Prisma.GenTableCreateArgs, result: $Utils.PayloadToResult } createMany: { args: Prisma.GenTableCreateManyArgs, result: Prisma.BatchPayload } delete: { args: Prisma.GenTableDeleteArgs, result: $Utils.PayloadToResult } update: { args: Prisma.GenTableUpdateArgs, result: $Utils.PayloadToResult } deleteMany: { args: Prisma.GenTableDeleteManyArgs, result: Prisma.BatchPayload } updateMany: { args: Prisma.GenTableUpdateManyArgs, result: Prisma.BatchPayload } upsert: { args: Prisma.GenTableUpsertArgs, result: $Utils.PayloadToResult } aggregate: { args: Prisma.GenTableAggregateArgs, result: $Utils.Optional } groupBy: { args: Prisma.GenTableGroupByArgs, result: $Utils.Optional[] } count: { args: Prisma.GenTableCountArgs, result: $Utils.Optional | number } } } GenTableColumn: { payload: Prisma.$GenTableColumnPayload fields: Prisma.GenTableColumnFieldRefs operations: { findUnique: { args: Prisma.GenTableColumnFindUniqueArgs, result: $Utils.PayloadToResult | null } findUniqueOrThrow: { args: Prisma.GenTableColumnFindUniqueOrThrowArgs, result: $Utils.PayloadToResult } findFirst: { args: Prisma.GenTableColumnFindFirstArgs, result: $Utils.PayloadToResult | null } findFirstOrThrow: { args: Prisma.GenTableColumnFindFirstOrThrowArgs, result: $Utils.PayloadToResult } findMany: { args: Prisma.GenTableColumnFindManyArgs, result: $Utils.PayloadToResult[] } create: { args: Prisma.GenTableColumnCreateArgs, result: $Utils.PayloadToResult } createMany: { args: Prisma.GenTableColumnCreateManyArgs, result: Prisma.BatchPayload } delete: { args: Prisma.GenTableColumnDeleteArgs, result: $Utils.PayloadToResult } update: { args: Prisma.GenTableColumnUpdateArgs, result: $Utils.PayloadToResult } deleteMany: { args: Prisma.GenTableColumnDeleteManyArgs, result: Prisma.BatchPayload } updateMany: { args: Prisma.GenTableColumnUpdateManyArgs, result: Prisma.BatchPayload } upsert: { args: Prisma.GenTableColumnUpsertArgs, result: $Utils.PayloadToResult } aggregate: { args: Prisma.GenTableColumnAggregateArgs, result: $Utils.Optional } groupBy: { args: Prisma.GenTableColumnGroupByArgs, result: $Utils.Optional[] } count: { args: Prisma.GenTableColumnCountArgs, result: $Utils.Optional | number } } } SysConfig: { payload: Prisma.$SysConfigPayload fields: Prisma.SysConfigFieldRefs operations: { findUnique: { args: Prisma.SysConfigFindUniqueArgs, result: $Utils.PayloadToResult | null } findUniqueOrThrow: { args: Prisma.SysConfigFindUniqueOrThrowArgs, result: $Utils.PayloadToResult } findFirst: { args: Prisma.SysConfigFindFirstArgs, result: $Utils.PayloadToResult | null } findFirstOrThrow: { args: Prisma.SysConfigFindFirstOrThrowArgs, result: $Utils.PayloadToResult } findMany: { args: Prisma.SysConfigFindManyArgs, result: $Utils.PayloadToResult[] } create: { args: Prisma.SysConfigCreateArgs, result: $Utils.PayloadToResult } createMany: { args: Prisma.SysConfigCreateManyArgs, result: Prisma.BatchPayload } delete: { args: Prisma.SysConfigDeleteArgs, result: $Utils.PayloadToResult } update: { args: Prisma.SysConfigUpdateArgs, result: $Utils.PayloadToResult } deleteMany: { args: Prisma.SysConfigDeleteManyArgs, result: Prisma.BatchPayload } updateMany: { args: Prisma.SysConfigUpdateManyArgs, result: Prisma.BatchPayload } upsert: { args: Prisma.SysConfigUpsertArgs, result: $Utils.PayloadToResult } aggregate: { args: Prisma.SysConfigAggregateArgs, result: $Utils.Optional } groupBy: { args: Prisma.SysConfigGroupByArgs, result: $Utils.Optional[] } count: { args: Prisma.SysConfigCountArgs, result: $Utils.Optional | number } } } SysDept: { payload: Prisma.$SysDeptPayload fields: Prisma.SysDeptFieldRefs operations: { findUnique: { args: Prisma.SysDeptFindUniqueArgs, result: $Utils.PayloadToResult | null } findUniqueOrThrow: { args: Prisma.SysDeptFindUniqueOrThrowArgs, result: $Utils.PayloadToResult } findFirst: { args: Prisma.SysDeptFindFirstArgs, result: $Utils.PayloadToResult | null } findFirstOrThrow: { args: Prisma.SysDeptFindFirstOrThrowArgs, result: $Utils.PayloadToResult } findMany: { args: Prisma.SysDeptFindManyArgs, result: $Utils.PayloadToResult[] } create: { args: Prisma.SysDeptCreateArgs, result: $Utils.PayloadToResult } createMany: { args: Prisma.SysDeptCreateManyArgs, result: Prisma.BatchPayload } delete: { args: Prisma.SysDeptDeleteArgs, result: $Utils.PayloadToResult } update: { args: Prisma.SysDeptUpdateArgs, result: $Utils.PayloadToResult } deleteMany: { args: Prisma.SysDeptDeleteManyArgs, result: Prisma.BatchPayload } updateMany: { args: Prisma.SysDeptUpdateManyArgs, result: Prisma.BatchPayload } upsert: { args: Prisma.SysDeptUpsertArgs, result: $Utils.PayloadToResult } aggregate: { args: Prisma.SysDeptAggregateArgs, result: $Utils.Optional } groupBy: { args: Prisma.SysDeptGroupByArgs, result: $Utils.Optional[] } count: { args: Prisma.SysDeptCountArgs, result: $Utils.Optional | number } } } SysDictData: { payload: Prisma.$SysDictDataPayload fields: Prisma.SysDictDataFieldRefs operations: { findUnique: { args: Prisma.SysDictDataFindUniqueArgs, result: $Utils.PayloadToResult | null } findUniqueOrThrow: { args: Prisma.SysDictDataFindUniqueOrThrowArgs, result: $Utils.PayloadToResult } findFirst: { args: Prisma.SysDictDataFindFirstArgs, result: $Utils.PayloadToResult | null } findFirstOrThrow: { args: Prisma.SysDictDataFindFirstOrThrowArgs, result: $Utils.PayloadToResult } findMany: { args: Prisma.SysDictDataFindManyArgs, result: $Utils.PayloadToResult[] } create: { args: Prisma.SysDictDataCreateArgs, result: $Utils.PayloadToResult } createMany: { args: Prisma.SysDictDataCreateManyArgs, result: Prisma.BatchPayload } delete: { args: Prisma.SysDictDataDeleteArgs, result: $Utils.PayloadToResult } update: { args: Prisma.SysDictDataUpdateArgs, result: $Utils.PayloadToResult } deleteMany: { args: Prisma.SysDictDataDeleteManyArgs, result: Prisma.BatchPayload } updateMany: { args: Prisma.SysDictDataUpdateManyArgs, result: Prisma.BatchPayload } upsert: { args: Prisma.SysDictDataUpsertArgs, result: $Utils.PayloadToResult } aggregate: { args: Prisma.SysDictDataAggregateArgs, result: $Utils.Optional } groupBy: { args: Prisma.SysDictDataGroupByArgs, result: $Utils.Optional[] } count: { args: Prisma.SysDictDataCountArgs, result: $Utils.Optional | number } } } SysDictType: { payload: Prisma.$SysDictTypePayload fields: Prisma.SysDictTypeFieldRefs operations: { findUnique: { args: Prisma.SysDictTypeFindUniqueArgs, result: $Utils.PayloadToResult | null } findUniqueOrThrow: { args: Prisma.SysDictTypeFindUniqueOrThrowArgs, result: $Utils.PayloadToResult } findFirst: { args: Prisma.SysDictTypeFindFirstArgs, result: $Utils.PayloadToResult | null } findFirstOrThrow: { args: Prisma.SysDictTypeFindFirstOrThrowArgs, result: $Utils.PayloadToResult } findMany: { args: Prisma.SysDictTypeFindManyArgs, result: $Utils.PayloadToResult[] } create: { args: Prisma.SysDictTypeCreateArgs, result: $Utils.PayloadToResult } createMany: { args: Prisma.SysDictTypeCreateManyArgs, result: Prisma.BatchPayload } delete: { args: Prisma.SysDictTypeDeleteArgs, result: $Utils.PayloadToResult } update: { args: Prisma.SysDictTypeUpdateArgs, result: $Utils.PayloadToResult } deleteMany: { args: Prisma.SysDictTypeDeleteManyArgs, result: Prisma.BatchPayload } updateMany: { args: Prisma.SysDictTypeUpdateManyArgs, result: Prisma.BatchPayload } upsert: { args: Prisma.SysDictTypeUpsertArgs, result: $Utils.PayloadToResult } aggregate: { args: Prisma.SysDictTypeAggregateArgs, result: $Utils.Optional } groupBy: { args: Prisma.SysDictTypeGroupByArgs, result: $Utils.Optional[] } count: { args: Prisma.SysDictTypeCountArgs, result: $Utils.Optional | number } } } SysLogininfor: { payload: Prisma.$SysLogininforPayload fields: Prisma.SysLogininforFieldRefs operations: { findUnique: { args: Prisma.SysLogininforFindUniqueArgs, result: $Utils.PayloadToResult | null } findUniqueOrThrow: { args: Prisma.SysLogininforFindUniqueOrThrowArgs, result: $Utils.PayloadToResult } findFirst: { args: Prisma.SysLogininforFindFirstArgs, result: $Utils.PayloadToResult | null } findFirstOrThrow: { args: Prisma.SysLogininforFindFirstOrThrowArgs, result: $Utils.PayloadToResult } findMany: { args: Prisma.SysLogininforFindManyArgs, result: $Utils.PayloadToResult[] } create: { args: Prisma.SysLogininforCreateArgs, result: $Utils.PayloadToResult } createMany: { args: Prisma.SysLogininforCreateManyArgs, result: Prisma.BatchPayload } delete: { args: Prisma.SysLogininforDeleteArgs, result: $Utils.PayloadToResult } update: { args: Prisma.SysLogininforUpdateArgs, result: $Utils.PayloadToResult } deleteMany: { args: Prisma.SysLogininforDeleteManyArgs, result: Prisma.BatchPayload } updateMany: { args: Prisma.SysLogininforUpdateManyArgs, result: Prisma.BatchPayload } upsert: { args: Prisma.SysLogininforUpsertArgs, result: $Utils.PayloadToResult } aggregate: { args: Prisma.SysLogininforAggregateArgs, result: $Utils.Optional } groupBy: { args: Prisma.SysLogininforGroupByArgs, result: $Utils.Optional[] } count: { args: Prisma.SysLogininforCountArgs, result: $Utils.Optional | number } } } SysMenu: { payload: Prisma.$SysMenuPayload fields: Prisma.SysMenuFieldRefs operations: { findUnique: { args: Prisma.SysMenuFindUniqueArgs, result: $Utils.PayloadToResult | null } findUniqueOrThrow: { args: Prisma.SysMenuFindUniqueOrThrowArgs, result: $Utils.PayloadToResult } findFirst: { args: Prisma.SysMenuFindFirstArgs, result: $Utils.PayloadToResult | null } findFirstOrThrow: { args: Prisma.SysMenuFindFirstOrThrowArgs, result: $Utils.PayloadToResult } findMany: { args: Prisma.SysMenuFindManyArgs, result: $Utils.PayloadToResult[] } create: { args: Prisma.SysMenuCreateArgs, result: $Utils.PayloadToResult } createMany: { args: Prisma.SysMenuCreateManyArgs, result: Prisma.BatchPayload } delete: { args: Prisma.SysMenuDeleteArgs, result: $Utils.PayloadToResult } update: { args: Prisma.SysMenuUpdateArgs, result: $Utils.PayloadToResult } deleteMany: { args: Prisma.SysMenuDeleteManyArgs, result: Prisma.BatchPayload } updateMany: { args: Prisma.SysMenuUpdateManyArgs, result: Prisma.BatchPayload } upsert: { args: Prisma.SysMenuUpsertArgs, result: $Utils.PayloadToResult } aggregate: { args: Prisma.SysMenuAggregateArgs, result: $Utils.Optional } groupBy: { args: Prisma.SysMenuGroupByArgs, result: $Utils.Optional[] } count: { args: Prisma.SysMenuCountArgs, result: $Utils.Optional | number } } } SysNotice: { payload: Prisma.$SysNoticePayload fields: Prisma.SysNoticeFieldRefs operations: { findUnique: { args: Prisma.SysNoticeFindUniqueArgs, result: $Utils.PayloadToResult | null } findUniqueOrThrow: { args: Prisma.SysNoticeFindUniqueOrThrowArgs, result: $Utils.PayloadToResult } findFirst: { args: Prisma.SysNoticeFindFirstArgs, result: $Utils.PayloadToResult | null } findFirstOrThrow: { args: Prisma.SysNoticeFindFirstOrThrowArgs, result: $Utils.PayloadToResult } findMany: { args: Prisma.SysNoticeFindManyArgs, result: $Utils.PayloadToResult[] } create: { args: Prisma.SysNoticeCreateArgs, result: $Utils.PayloadToResult } createMany: { args: Prisma.SysNoticeCreateManyArgs, result: Prisma.BatchPayload } delete: { args: Prisma.SysNoticeDeleteArgs, result: $Utils.PayloadToResult } update: { args: Prisma.SysNoticeUpdateArgs, result: $Utils.PayloadToResult } deleteMany: { args: Prisma.SysNoticeDeleteManyArgs, result: Prisma.BatchPayload } updateMany: { args: Prisma.SysNoticeUpdateManyArgs, result: Prisma.BatchPayload } upsert: { args: Prisma.SysNoticeUpsertArgs, result: $Utils.PayloadToResult } aggregate: { args: Prisma.SysNoticeAggregateArgs, result: $Utils.Optional } groupBy: { args: Prisma.SysNoticeGroupByArgs, result: $Utils.Optional[] } count: { args: Prisma.SysNoticeCountArgs, result: $Utils.Optional | number } } } SysPost: { payload: Prisma.$SysPostPayload fields: Prisma.SysPostFieldRefs operations: { findUnique: { args: Prisma.SysPostFindUniqueArgs, result: $Utils.PayloadToResult | null } findUniqueOrThrow: { args: Prisma.SysPostFindUniqueOrThrowArgs, result: $Utils.PayloadToResult } findFirst: { args: Prisma.SysPostFindFirstArgs, result: $Utils.PayloadToResult | null } findFirstOrThrow: { args: Prisma.SysPostFindFirstOrThrowArgs, result: $Utils.PayloadToResult } findMany: { args: Prisma.SysPostFindManyArgs, result: $Utils.PayloadToResult[] } create: { args: Prisma.SysPostCreateArgs, result: $Utils.PayloadToResult } createMany: { args: Prisma.SysPostCreateManyArgs, result: Prisma.BatchPayload } delete: { args: Prisma.SysPostDeleteArgs, result: $Utils.PayloadToResult } update: { args: Prisma.SysPostUpdateArgs, result: $Utils.PayloadToResult } deleteMany: { args: Prisma.SysPostDeleteManyArgs, result: Prisma.BatchPayload } updateMany: { args: Prisma.SysPostUpdateManyArgs, result: Prisma.BatchPayload } upsert: { args: Prisma.SysPostUpsertArgs, result: $Utils.PayloadToResult } aggregate: { args: Prisma.SysPostAggregateArgs, result: $Utils.Optional } groupBy: { args: Prisma.SysPostGroupByArgs, result: $Utils.Optional[] } count: { args: Prisma.SysPostCountArgs, result: $Utils.Optional | number } } } SysUserPost: { payload: Prisma.$SysUserPostPayload fields: Prisma.SysUserPostFieldRefs operations: { findUnique: { args: Prisma.SysUserPostFindUniqueArgs, result: $Utils.PayloadToResult | null } findUniqueOrThrow: { args: Prisma.SysUserPostFindUniqueOrThrowArgs, result: $Utils.PayloadToResult } findFirst: { args: Prisma.SysUserPostFindFirstArgs, result: $Utils.PayloadToResult | null } findFirstOrThrow: { args: Prisma.SysUserPostFindFirstOrThrowArgs, result: $Utils.PayloadToResult } findMany: { args: Prisma.SysUserPostFindManyArgs, result: $Utils.PayloadToResult[] } create: { args: Prisma.SysUserPostCreateArgs, result: $Utils.PayloadToResult } createMany: { args: Prisma.SysUserPostCreateManyArgs, result: Prisma.BatchPayload } delete: { args: Prisma.SysUserPostDeleteArgs, result: $Utils.PayloadToResult } update: { args: Prisma.SysUserPostUpdateArgs, result: $Utils.PayloadToResult } deleteMany: { args: Prisma.SysUserPostDeleteManyArgs, result: Prisma.BatchPayload } updateMany: { args: Prisma.SysUserPostUpdateManyArgs, result: Prisma.BatchPayload } upsert: { args: Prisma.SysUserPostUpsertArgs, result: $Utils.PayloadToResult } aggregate: { args: Prisma.SysUserPostAggregateArgs, result: $Utils.Optional } groupBy: { args: Prisma.SysUserPostGroupByArgs, result: $Utils.Optional[] } count: { args: Prisma.SysUserPostCountArgs, result: $Utils.Optional | number } } } SysRoleDept: { payload: Prisma.$SysRoleDeptPayload fields: Prisma.SysRoleDeptFieldRefs operations: { findUnique: { args: Prisma.SysRoleDeptFindUniqueArgs, result: $Utils.PayloadToResult | null } findUniqueOrThrow: { args: Prisma.SysRoleDeptFindUniqueOrThrowArgs, result: $Utils.PayloadToResult } findFirst: { args: Prisma.SysRoleDeptFindFirstArgs, result: $Utils.PayloadToResult | null } findFirstOrThrow: { args: Prisma.SysRoleDeptFindFirstOrThrowArgs, result: $Utils.PayloadToResult } findMany: { args: Prisma.SysRoleDeptFindManyArgs, result: $Utils.PayloadToResult[] } create: { args: Prisma.SysRoleDeptCreateArgs, result: $Utils.PayloadToResult } createMany: { args: Prisma.SysRoleDeptCreateManyArgs, result: Prisma.BatchPayload } delete: { args: Prisma.SysRoleDeptDeleteArgs, result: $Utils.PayloadToResult } update: { args: Prisma.SysRoleDeptUpdateArgs, result: $Utils.PayloadToResult } deleteMany: { args: Prisma.SysRoleDeptDeleteManyArgs, result: Prisma.BatchPayload } updateMany: { args: Prisma.SysRoleDeptUpdateManyArgs, result: Prisma.BatchPayload } upsert: { args: Prisma.SysRoleDeptUpsertArgs, result: $Utils.PayloadToResult } aggregate: { args: Prisma.SysRoleDeptAggregateArgs, result: $Utils.Optional } groupBy: { args: Prisma.SysRoleDeptGroupByArgs, result: $Utils.Optional[] } count: { args: Prisma.SysRoleDeptCountArgs, result: $Utils.Optional | number } } } SysRoleMenu: { payload: Prisma.$SysRoleMenuPayload fields: Prisma.SysRoleMenuFieldRefs operations: { findUnique: { args: Prisma.SysRoleMenuFindUniqueArgs, result: $Utils.PayloadToResult | null } findUniqueOrThrow: { args: Prisma.SysRoleMenuFindUniqueOrThrowArgs, result: $Utils.PayloadToResult } findFirst: { args: Prisma.SysRoleMenuFindFirstArgs, result: $Utils.PayloadToResult | null } findFirstOrThrow: { args: Prisma.SysRoleMenuFindFirstOrThrowArgs, result: $Utils.PayloadToResult } findMany: { args: Prisma.SysRoleMenuFindManyArgs, result: $Utils.PayloadToResult[] } create: { args: Prisma.SysRoleMenuCreateArgs, result: $Utils.PayloadToResult } createMany: { args: Prisma.SysRoleMenuCreateManyArgs, result: Prisma.BatchPayload } delete: { args: Prisma.SysRoleMenuDeleteArgs, result: $Utils.PayloadToResult } update: { args: Prisma.SysRoleMenuUpdateArgs, result: $Utils.PayloadToResult } deleteMany: { args: Prisma.SysRoleMenuDeleteManyArgs, result: Prisma.BatchPayload } updateMany: { args: Prisma.SysRoleMenuUpdateManyArgs, result: Prisma.BatchPayload } upsert: { args: Prisma.SysRoleMenuUpsertArgs, result: $Utils.PayloadToResult } aggregate: { args: Prisma.SysRoleMenuAggregateArgs, result: $Utils.Optional } groupBy: { args: Prisma.SysRoleMenuGroupByArgs, result: $Utils.Optional[] } count: { args: Prisma.SysRoleMenuCountArgs, result: $Utils.Optional | number } } } SysUser: { payload: Prisma.$SysUserPayload fields: Prisma.SysUserFieldRefs operations: { findUnique: { args: Prisma.SysUserFindUniqueArgs, result: $Utils.PayloadToResult | null } findUniqueOrThrow: { args: Prisma.SysUserFindUniqueOrThrowArgs, result: $Utils.PayloadToResult } findFirst: { args: Prisma.SysUserFindFirstArgs, result: $Utils.PayloadToResult | null } findFirstOrThrow: { args: Prisma.SysUserFindFirstOrThrowArgs, result: $Utils.PayloadToResult } findMany: { args: Prisma.SysUserFindManyArgs, result: $Utils.PayloadToResult[] } create: { args: Prisma.SysUserCreateArgs, result: $Utils.PayloadToResult } createMany: { args: Prisma.SysUserCreateManyArgs, result: Prisma.BatchPayload } delete: { args: Prisma.SysUserDeleteArgs, result: $Utils.PayloadToResult } update: { args: Prisma.SysUserUpdateArgs, result: $Utils.PayloadToResult } deleteMany: { args: Prisma.SysUserDeleteManyArgs, result: Prisma.BatchPayload } updateMany: { args: Prisma.SysUserUpdateManyArgs, result: Prisma.BatchPayload } upsert: { args: Prisma.SysUserUpsertArgs, result: $Utils.PayloadToResult } aggregate: { args: Prisma.SysUserAggregateArgs, result: $Utils.Optional } groupBy: { args: Prisma.SysUserGroupByArgs, result: $Utils.Optional[] } count: { args: Prisma.SysUserCountArgs, result: $Utils.Optional | number } } } SysRole: { payload: Prisma.$SysRolePayload fields: Prisma.SysRoleFieldRefs operations: { findUnique: { args: Prisma.SysRoleFindUniqueArgs, result: $Utils.PayloadToResult | null } findUniqueOrThrow: { args: Prisma.SysRoleFindUniqueOrThrowArgs, result: $Utils.PayloadToResult } findFirst: { args: Prisma.SysRoleFindFirstArgs, result: $Utils.PayloadToResult | null } findFirstOrThrow: { args: Prisma.SysRoleFindFirstOrThrowArgs, result: $Utils.PayloadToResult } findMany: { args: Prisma.SysRoleFindManyArgs, result: $Utils.PayloadToResult[] } create: { args: Prisma.SysRoleCreateArgs, result: $Utils.PayloadToResult } createMany: { args: Prisma.SysRoleCreateManyArgs, result: Prisma.BatchPayload } delete: { args: Prisma.SysRoleDeleteArgs, result: $Utils.PayloadToResult } update: { args: Prisma.SysRoleUpdateArgs, result: $Utils.PayloadToResult } deleteMany: { args: Prisma.SysRoleDeleteManyArgs, result: Prisma.BatchPayload } updateMany: { args: Prisma.SysRoleUpdateManyArgs, result: Prisma.BatchPayload } upsert: { args: Prisma.SysRoleUpsertArgs, result: $Utils.PayloadToResult } aggregate: { args: Prisma.SysRoleAggregateArgs, result: $Utils.Optional } groupBy: { args: Prisma.SysRoleGroupByArgs, result: $Utils.Optional[] } count: { args: Prisma.SysRoleCountArgs, result: $Utils.Optional | number } } } SysUserRole: { payload: Prisma.$SysUserRolePayload fields: Prisma.SysUserRoleFieldRefs operations: { findUnique: { args: Prisma.SysUserRoleFindUniqueArgs, result: $Utils.PayloadToResult | null } findUniqueOrThrow: { args: Prisma.SysUserRoleFindUniqueOrThrowArgs, result: $Utils.PayloadToResult } findFirst: { args: Prisma.SysUserRoleFindFirstArgs, result: $Utils.PayloadToResult | null } findFirstOrThrow: { args: Prisma.SysUserRoleFindFirstOrThrowArgs, result: $Utils.PayloadToResult } findMany: { args: Prisma.SysUserRoleFindManyArgs, result: $Utils.PayloadToResult[] } create: { args: Prisma.SysUserRoleCreateArgs, result: $Utils.PayloadToResult } createMany: { args: Prisma.SysUserRoleCreateManyArgs, result: Prisma.BatchPayload } delete: { args: Prisma.SysUserRoleDeleteArgs, result: $Utils.PayloadToResult } update: { args: Prisma.SysUserRoleUpdateArgs, result: $Utils.PayloadToResult } deleteMany: { args: Prisma.SysUserRoleDeleteManyArgs, result: Prisma.BatchPayload } updateMany: { args: Prisma.SysUserRoleUpdateManyArgs, result: Prisma.BatchPayload } upsert: { args: Prisma.SysUserRoleUpsertArgs, result: $Utils.PayloadToResult } aggregate: { args: Prisma.SysUserRoleAggregateArgs, result: $Utils.Optional } groupBy: { args: Prisma.SysUserRoleGroupByArgs, result: $Utils.Optional[] } count: { args: Prisma.SysUserRoleCountArgs, result: $Utils.Optional | number } } } } } & { other: { payload: any operations: { $executeRawUnsafe: { args: [query: string, ...values: any[]], result: any } $executeRaw: { args: [query: TemplateStringsArray | Prisma.Sql, ...values: any[]], result: any } $queryRawUnsafe: { args: [query: string, ...values: any[]], result: any } $queryRaw: { args: [query: TemplateStringsArray | Prisma.Sql, ...values: any[]], result: any } } } } export const defineExtension: $Extensions.ExtendsHook<'define', Prisma.TypeMapCb, $Extensions.DefaultArgs> export type DefaultPrismaClient = PrismaClient export type ErrorFormat = 'pretty' | 'colorless' | 'minimal' export interface PrismaClientOptions { /** * Overwrites the datasource url from your schema.prisma file */ datasources?: Datasources /** * Overwrites the datasource url from your schema.prisma file */ datasourceUrl?: string /** * @default "colorless" */ errorFormat?: ErrorFormat /** * @example * ``` * // Defaults to stdout * log: ['query', 'info', 'warn', 'error'] * * // Emit as events * log: [ * { emit: 'stdout', level: 'query' }, * { emit: 'stdout', level: 'info' }, * { emit: 'stdout', level: 'warn' } * { emit: 'stdout', level: 'error' } * ] * ``` * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/logging#the-log-option). */ log?: (LogLevel | LogDefinition)[] /** * The default values for transactionOptions * maxWait ?= 2000 * timeout ?= 5000 */ transactionOptions?: { maxWait?: number timeout?: number isolationLevel?: Prisma.TransactionIsolationLevel } } /* Types for Logging */ export type LogLevel = 'info' | 'query' | 'warn' | 'error' export type LogDefinition = { level: LogLevel emit: 'stdout' | 'event' } export type GetLogType = T extends LogDefinition ? T['emit'] extends 'event' ? T['level'] : never : never export type GetEvents = T extends Array ? GetLogType | GetLogType | GetLogType | GetLogType : never export type QueryEvent = { timestamp: Date query: string params: string duration: number target: string } export type LogEvent = { timestamp: Date message: string target: string } /* End Types for Logging */ export type PrismaAction = | 'findUnique' | 'findUniqueOrThrow' | 'findMany' | 'findFirst' | 'findFirstOrThrow' | 'create' | 'createMany' | 'createManyAndReturn' | 'update' | 'updateMany' | 'upsert' | 'delete' | 'deleteMany' | 'executeRaw' | 'queryRaw' | 'aggregate' | 'count' | 'runCommandRaw' | 'findRaw' | 'groupBy' /** * These options are being passed into the middleware as "params" */ export type MiddlewareParams = { model?: ModelName action: PrismaAction args: any dataPath: string[] runInTransaction: boolean } /** * The `T` type makes sure, that the `return proceed` is not forgotten in the middleware implementation */ export type Middleware = ( params: MiddlewareParams, next: (params: MiddlewareParams) => $Utils.JsPromise, ) => $Utils.JsPromise // tested in getLogLevel.test.ts export function getLogLevel(log: Array): LogLevel | undefined; /** * `PrismaClient` proxy available in interactive transactions. */ export type TransactionClient = Omit export type Datasource = { url?: string } /** * Count Types */ /** * Count Type GenTableCountOutputType */ export type GenTableCountOutputType = { tableColumns: number } export type GenTableCountOutputTypeSelect = { tableColumns?: boolean | GenTableCountOutputTypeCountTableColumnsArgs } // Custom InputTypes /** * GenTableCountOutputType without action */ export type GenTableCountOutputTypeDefaultArgs = { /** * Select specific fields to fetch from the GenTableCountOutputType */ select?: GenTableCountOutputTypeSelect | null } /** * GenTableCountOutputType without action */ export type GenTableCountOutputTypeCountTableColumnsArgs = { where?: GenTableColumnWhereInput } /** * Count Type SysDeptCountOutputType */ export type SysDeptCountOutputType = { users: number roles: number } export type SysDeptCountOutputTypeSelect = { users?: boolean | SysDeptCountOutputTypeCountUsersArgs roles?: boolean | SysDeptCountOutputTypeCountRolesArgs } // Custom InputTypes /** * SysDeptCountOutputType without action */ export type SysDeptCountOutputTypeDefaultArgs = { /** * Select specific fields to fetch from the SysDeptCountOutputType */ select?: SysDeptCountOutputTypeSelect | null } /** * SysDeptCountOutputType without action */ export type SysDeptCountOutputTypeCountUsersArgs = { where?: SysUserWhereInput } /** * SysDeptCountOutputType without action */ export type SysDeptCountOutputTypeCountRolesArgs = { where?: SysRoleDeptWhereInput } /** * Count Type SysDictTypeCountOutputType */ export type SysDictTypeCountOutputType = { dictDatas: number } export type SysDictTypeCountOutputTypeSelect = { dictDatas?: boolean | SysDictTypeCountOutputTypeCountDictDatasArgs } // Custom InputTypes /** * SysDictTypeCountOutputType without action */ export type SysDictTypeCountOutputTypeDefaultArgs = { /** * Select specific fields to fetch from the SysDictTypeCountOutputType */ select?: SysDictTypeCountOutputTypeSelect | null } /** * SysDictTypeCountOutputType without action */ export type SysDictTypeCountOutputTypeCountDictDatasArgs = { where?: SysDictDataWhereInput } /** * Count Type SysMenuCountOutputType */ export type SysMenuCountOutputType = { roles: number } export type SysMenuCountOutputTypeSelect = { roles?: boolean | SysMenuCountOutputTypeCountRolesArgs } // Custom InputTypes /** * SysMenuCountOutputType without action */ export type SysMenuCountOutputTypeDefaultArgs = { /** * Select specific fields to fetch from the SysMenuCountOutputType */ select?: SysMenuCountOutputTypeSelect | null } /** * SysMenuCountOutputType without action */ export type SysMenuCountOutputTypeCountRolesArgs = { where?: SysRoleMenuWhereInput } /** * Count Type SysPostCountOutputType */ export type SysPostCountOutputType = { users: number } export type SysPostCountOutputTypeSelect = { users?: boolean | SysPostCountOutputTypeCountUsersArgs } // Custom InputTypes /** * SysPostCountOutputType without action */ export type SysPostCountOutputTypeDefaultArgs = { /** * Select specific fields to fetch from the SysPostCountOutputType */ select?: SysPostCountOutputTypeSelect | null } /** * SysPostCountOutputType without action */ export type SysPostCountOutputTypeCountUsersArgs = { where?: SysUserPostWhereInput } /** * Count Type SysUserCountOutputType */ export type SysUserCountOutputType = { roles: number posts: number } export type SysUserCountOutputTypeSelect = { roles?: boolean | SysUserCountOutputTypeCountRolesArgs posts?: boolean | SysUserCountOutputTypeCountPostsArgs } // Custom InputTypes /** * SysUserCountOutputType without action */ export type SysUserCountOutputTypeDefaultArgs = { /** * Select specific fields to fetch from the SysUserCountOutputType */ select?: SysUserCountOutputTypeSelect | null } /** * SysUserCountOutputType without action */ export type SysUserCountOutputTypeCountRolesArgs = { where?: SysUserRoleWhereInput } /** * SysUserCountOutputType without action */ export type SysUserCountOutputTypeCountPostsArgs = { where?: SysUserPostWhereInput } /** * Count Type SysRoleCountOutputType */ export type SysRoleCountOutputType = { users: number menus: number depts: number } export type SysRoleCountOutputTypeSelect = { users?: boolean | SysRoleCountOutputTypeCountUsersArgs menus?: boolean | SysRoleCountOutputTypeCountMenusArgs depts?: boolean | SysRoleCountOutputTypeCountDeptsArgs } // Custom InputTypes /** * SysRoleCountOutputType without action */ export type SysRoleCountOutputTypeDefaultArgs = { /** * Select specific fields to fetch from the SysRoleCountOutputType */ select?: SysRoleCountOutputTypeSelect | null } /** * SysRoleCountOutputType without action */ export type SysRoleCountOutputTypeCountUsersArgs = { where?: SysUserRoleWhereInput } /** * SysRoleCountOutputType without action */ export type SysRoleCountOutputTypeCountMenusArgs = { where?: SysRoleMenuWhereInput } /** * SysRoleCountOutputType without action */ export type SysRoleCountOutputTypeCountDeptsArgs = { where?: SysRoleDeptWhereInput } /** * Models */ /** * Model GenTable */ export type AggregateGenTable = { _count: GenTableCountAggregateOutputType | null _avg: GenTableAvgAggregateOutputType | null _sum: GenTableSumAggregateOutputType | null _min: GenTableMinAggregateOutputType | null _max: GenTableMaxAggregateOutputType | null } export type GenTableAvgAggregateOutputType = { tableId: number | null } export type GenTableSumAggregateOutputType = { tableId: number | null } export type GenTableMinAggregateOutputType = { tableId: number | null tableName: string | null tableComment: string | null subTableName: string | null subTableFkName: string | null className: string | null tplCategory: string | null tplWebType: string | null packageName: string | null moduleName: string | null businessName: string | null functionName: string | null functionAuthor: string | null genType: string | null genPath: string | null options: string | null createBy: string | null createTime: string | null updateBy: string | null updateTime: string | null remark: string | null } export type GenTableMaxAggregateOutputType = { tableId: number | null tableName: string | null tableComment: string | null subTableName: string | null subTableFkName: string | null className: string | null tplCategory: string | null tplWebType: string | null packageName: string | null moduleName: string | null businessName: string | null functionName: string | null functionAuthor: string | null genType: string | null genPath: string | null options: string | null createBy: string | null createTime: string | null updateBy: string | null updateTime: string | null remark: string | null } export type GenTableCountAggregateOutputType = { tableId: number tableName: number tableComment: number subTableName: number subTableFkName: number className: number tplCategory: number tplWebType: number packageName: number moduleName: number businessName: number functionName: number functionAuthor: number genType: number genPath: number options: number createBy: number createTime: number updateBy: number updateTime: number remark: number _all: number } export type GenTableAvgAggregateInputType = { tableId?: true } export type GenTableSumAggregateInputType = { tableId?: true } export type GenTableMinAggregateInputType = { tableId?: true tableName?: true tableComment?: true subTableName?: true subTableFkName?: true className?: true tplCategory?: true tplWebType?: true packageName?: true moduleName?: true businessName?: true functionName?: true functionAuthor?: true genType?: true genPath?: true options?: true createBy?: true createTime?: true updateBy?: true updateTime?: true remark?: true } export type GenTableMaxAggregateInputType = { tableId?: true tableName?: true tableComment?: true subTableName?: true subTableFkName?: true className?: true tplCategory?: true tplWebType?: true packageName?: true moduleName?: true businessName?: true functionName?: true functionAuthor?: true genType?: true genPath?: true options?: true createBy?: true createTime?: true updateBy?: true updateTime?: true remark?: true } export type GenTableCountAggregateInputType = { tableId?: true tableName?: true tableComment?: true subTableName?: true subTableFkName?: true className?: true tplCategory?: true tplWebType?: true packageName?: true moduleName?: true businessName?: true functionName?: true functionAuthor?: true genType?: true genPath?: true options?: true createBy?: true createTime?: true updateBy?: true updateTime?: true remark?: true _all?: true } export type GenTableAggregateArgs = { /** * Filter which GenTable to aggregate. */ where?: GenTableWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of GenTables to fetch. */ orderBy?: GenTableOrderByWithRelationInput | GenTableOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the start position */ cursor?: GenTableWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` GenTables from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` GenTables. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Count returned GenTables **/ _count?: true | GenTableCountAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to average **/ _avg?: GenTableAvgAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to sum **/ _sum?: GenTableSumAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the minimum value **/ _min?: GenTableMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the maximum value **/ _max?: GenTableMaxAggregateInputType } export type GetGenTableAggregateType = { [P in keyof T & keyof AggregateGenTable]: P extends '_count' | 'count' ? T[P] extends true ? number : GetScalarType : GetScalarType } export type GenTableGroupByArgs = { where?: GenTableWhereInput orderBy?: GenTableOrderByWithAggregationInput | GenTableOrderByWithAggregationInput[] by: GenTableScalarFieldEnum[] | GenTableScalarFieldEnum having?: GenTableScalarWhereWithAggregatesInput take?: number skip?: number _count?: GenTableCountAggregateInputType | true _avg?: GenTableAvgAggregateInputType _sum?: GenTableSumAggregateInputType _min?: GenTableMinAggregateInputType _max?: GenTableMaxAggregateInputType } export type GenTableGroupByOutputType = { tableId: number tableName: string | null tableComment: string | null subTableName: string | null subTableFkName: string | null className: string | null tplCategory: string | null tplWebType: string | null packageName: string | null moduleName: string | null businessName: string | null functionName: string | null functionAuthor: string | null genType: string | null genPath: string | null options: string | null createBy: string | null createTime: string | null updateBy: string | null updateTime: string | null remark: string | null _count: GenTableCountAggregateOutputType | null _avg: GenTableAvgAggregateOutputType | null _sum: GenTableSumAggregateOutputType | null _min: GenTableMinAggregateOutputType | null _max: GenTableMaxAggregateOutputType | null } type GetGenTableGroupByPayload = Prisma.PrismaPromise< Array< PickEnumerable & { [P in ((keyof T) & (keyof GenTableGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : GetScalarType : GetScalarType } > > export type GenTableSelect = $Extensions.GetSelect<{ tableId?: boolean tableName?: boolean tableComment?: boolean subTableName?: boolean subTableFkName?: boolean className?: boolean tplCategory?: boolean tplWebType?: boolean packageName?: boolean moduleName?: boolean businessName?: boolean functionName?: boolean functionAuthor?: boolean genType?: boolean genPath?: boolean options?: boolean createBy?: boolean createTime?: boolean updateBy?: boolean updateTime?: boolean remark?: boolean tableColumns?: boolean | GenTable$tableColumnsArgs _count?: boolean | GenTableCountOutputTypeDefaultArgs }, ExtArgs["result"]["genTable"]> export type GenTableSelectScalar = { tableId?: boolean tableName?: boolean tableComment?: boolean subTableName?: boolean subTableFkName?: boolean className?: boolean tplCategory?: boolean tplWebType?: boolean packageName?: boolean moduleName?: boolean businessName?: boolean functionName?: boolean functionAuthor?: boolean genType?: boolean genPath?: boolean options?: boolean createBy?: boolean createTime?: boolean updateBy?: boolean updateTime?: boolean remark?: boolean } export type GenTableOmit = $Extensions.GetOmit<"tableId" | "tableName" | "tableComment" | "subTableName" | "subTableFkName" | "className" | "tplCategory" | "tplWebType" | "packageName" | "moduleName" | "businessName" | "functionName" | "functionAuthor" | "genType" | "genPath" | "options" | "createBy" | "createTime" | "updateBy" | "updateTime" | "remark", ExtArgs["result"]["genTable"]> export type GenTableInclude = { tableColumns?: boolean | GenTable$tableColumnsArgs _count?: boolean | GenTableCountOutputTypeDefaultArgs } export type $GenTablePayload = { name: "GenTable" objects: { tableColumns: Prisma.$GenTableColumnPayload[] } scalars: $Extensions.GetPayloadResult<{ tableId: number tableName: string | null tableComment: string | null subTableName: string | null subTableFkName: string | null className: string | null tplCategory: string | null tplWebType: string | null packageName: string | null moduleName: string | null businessName: string | null functionName: string | null functionAuthor: string | null genType: string | null genPath: string | null options: string | null createBy: string | null createTime: string | null updateBy: string | null updateTime: string | null remark: string | null }, ExtArgs["result"]["genTable"]> composites: {} } type GenTableGetPayload = $Result.GetResult type GenTableCountArgs = Omit & { select?: GenTableCountAggregateInputType | true } export interface GenTableDelegate { [K: symbol]: { types: Prisma.TypeMap['model']['GenTable'], meta: { name: 'GenTable' } } /** * Find zero or one GenTable that matches the filter. * @param {GenTableFindUniqueArgs} args - Arguments to find a GenTable * @example * // Get one GenTable * const genTable = await prisma.genTable.findUnique({ * where: { * // ... provide filter here * } * }) **/ findUnique>( args: SelectSubset> ): Prisma__GenTableClient<$Result.GetResult, T, 'findUnique'> | null, null, ExtArgs> /** * Find one GenTable that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. * @param {GenTableFindUniqueOrThrowArgs} args - Arguments to find a GenTable * @example * // Get one GenTable * const genTable = await prisma.genTable.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) **/ findUniqueOrThrow>( args?: SelectSubset> ): Prisma__GenTableClient<$Result.GetResult, T, 'findUniqueOrThrow'>, never, ExtArgs> /** * Find the first GenTable that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {GenTableFindFirstArgs} args - Arguments to find a GenTable * @example * // Get one GenTable * const genTable = await prisma.genTable.findFirst({ * where: { * // ... provide filter here * } * }) **/ findFirst>( args?: SelectSubset> ): Prisma__GenTableClient<$Result.GetResult, T, 'findFirst'> | null, null, ExtArgs> /** * Find the first GenTable that matches the filter or * throw `PrismaKnownClientError` with `P2025` code if no matches were found. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {GenTableFindFirstOrThrowArgs} args - Arguments to find a GenTable * @example * // Get one GenTable * const genTable = await prisma.genTable.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) **/ findFirstOrThrow>( args?: SelectSubset> ): Prisma__GenTableClient<$Result.GetResult, T, 'findFirstOrThrow'>, never, ExtArgs> /** * Find zero or more GenTables that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {GenTableFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all GenTables * const genTables = await prisma.genTable.findMany() * * // Get first 10 GenTables * const genTables = await prisma.genTable.findMany({ take: 10 }) * * // Only select the `tableId` * const genTableWithTableIdOnly = await prisma.genTable.findMany({ select: { tableId: true } }) * **/ findMany>( args?: SelectSubset> ): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'>> /** * Create a GenTable. * @param {GenTableCreateArgs} args - Arguments to create a GenTable. * @example * // Create one GenTable * const GenTable = await prisma.genTable.create({ * data: { * // ... data to create a GenTable * } * }) * **/ create>( args: SelectSubset> ): Prisma__GenTableClient<$Result.GetResult, T, 'create'>, never, ExtArgs> /** * Create many GenTables. * @param {GenTableCreateManyArgs} args - Arguments to create many GenTables. * @example * // Create many GenTables * const genTable = await prisma.genTable.createMany({ * data: [ * // ... provide data here * ] * }) * **/ createMany>( args?: SelectSubset> ): Prisma.PrismaPromise /** * Delete a GenTable. * @param {GenTableDeleteArgs} args - Arguments to delete one GenTable. * @example * // Delete one GenTable * const GenTable = await prisma.genTable.delete({ * where: { * // ... filter to delete one GenTable * } * }) * **/ delete>( args: SelectSubset> ): Prisma__GenTableClient<$Result.GetResult, T, 'delete'>, never, ExtArgs> /** * Update one GenTable. * @param {GenTableUpdateArgs} args - Arguments to update one GenTable. * @example * // Update one GenTable * const genTable = await prisma.genTable.update({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * **/ update>( args: SelectSubset> ): Prisma__GenTableClient<$Result.GetResult, T, 'update'>, never, ExtArgs> /** * Delete zero or more GenTables. * @param {GenTableDeleteManyArgs} args - Arguments to filter GenTables to delete. * @example * // Delete a few GenTables * const { count } = await prisma.genTable.deleteMany({ * where: { * // ... provide filter here * } * }) * **/ deleteMany>( args?: SelectSubset> ): Prisma.PrismaPromise /** * Update zero or more GenTables. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {GenTableUpdateManyArgs} args - Arguments to update one or more rows. * @example * // Update many GenTables * const genTable = await prisma.genTable.updateMany({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * **/ updateMany>( args: SelectSubset> ): Prisma.PrismaPromise /** * Create or update one GenTable. * @param {GenTableUpsertArgs} args - Arguments to update or create a GenTable. * @example * // Update or create a GenTable * const genTable = await prisma.genTable.upsert({ * create: { * // ... data to create a GenTable * }, * update: { * // ... in case it already exists, update * }, * where: { * // ... the filter for the GenTable we want to update * } * }) **/ upsert>( args: SelectSubset> ): Prisma__GenTableClient<$Result.GetResult, T, 'upsert'>, never, ExtArgs> /** * Count the number of GenTables. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {GenTableCountArgs} args - Arguments to filter GenTables to count. * @example * // Count the number of GenTables * const count = await prisma.genTable.count({ * where: { * // ... the filter for the GenTables we want to count * } * }) **/ count( args?: Subset, ): Prisma.PrismaPromise< T extends $Utils.Record<'select', any> ? T['select'] extends true ? number : GetScalarType : number > /** * Allows you to perform aggregations operations on a GenTable. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {GenTableAggregateArgs} args - Select which aggregations you would like to apply and on what fields. * @example * // Ordered by age ascending * // Where email contains prisma.io * // Limited to the 10 users * const aggregations = await prisma.user.aggregate({ * _avg: { * age: true, * }, * where: { * email: { * contains: "prisma.io", * }, * }, * orderBy: { * age: "asc", * }, * take: 10, * }) **/ aggregate(args: Subset): Prisma.PrismaPromise> /** * Group by GenTable. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {GenTableGroupByArgs} args - Group by arguments. * @example * // Group by city, order by createdAt, get count * const result = await prisma.user.groupBy({ * by: ['city', 'createdAt'], * orderBy: { * createdAt: true * }, * _count: { * _all: true * }, * }) * **/ groupBy< T extends GenTableGroupByArgs, HasSelectOrTake extends Or< Extends<'skip', Keys>, Extends<'take', Keys> >, OrderByArg extends True extends HasSelectOrTake ? { orderBy: GenTableGroupByArgs['orderBy'] } : { orderBy?: GenTableGroupByArgs['orderBy'] }, OrderFields extends ExcludeUnderscoreKeys>>, ByFields extends MaybeTupleToUnion, ByValid extends Has, HavingFields extends GetHavingFields, HavingValid extends Has, ByEmpty extends T['by'] extends never[] ? True : False, InputErrors extends ByEmpty extends True ? `Error: "by" must not be empty.` : HavingValid extends False ? { [P in HavingFields]: P extends ByFields ? never : P extends string ? `Error: Field "${P}" used in "having" needs to be provided in "by".` : [ Error, 'Field ', P, ` in "having" needs to be provided in "by"`, ] }[HavingFields] : 'take' extends Keys ? 'orderBy' extends Keys ? ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] : 'Error: If you provide "take", you also need to provide "orderBy"' : 'skip' extends Keys ? 'orderBy' extends Keys ? ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] : 'Error: If you provide "skip", you also need to provide "orderBy"' : ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetGenTableGroupByPayload : Prisma.PrismaPromise /** * Fields of the GenTable model */ readonly fields: GenTableFieldRefs; } /** * The delegate class that acts as a "Promise-like" for GenTable. * Why is this prefixed with `Prisma__`? * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ export interface Prisma__GenTableClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: 'PrismaPromise'; tableColumns = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'> | Null>; /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of which ever callback is executed. */ then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise; /** * Attaches a callback for only the rejection of the Promise. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of the callback. */ catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise; /** * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The * resolved value cannot be modified from the callback. * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). * @returns A Promise for the completion of the callback. */ finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise; } /** * Fields of the GenTable model */ interface GenTableFieldRefs { readonly tableId: FieldRef<"GenTable", 'Int'> readonly tableName: FieldRef<"GenTable", 'String'> readonly tableComment: FieldRef<"GenTable", 'String'> readonly subTableName: FieldRef<"GenTable", 'String'> readonly subTableFkName: FieldRef<"GenTable", 'String'> readonly className: FieldRef<"GenTable", 'String'> readonly tplCategory: FieldRef<"GenTable", 'String'> readonly tplWebType: FieldRef<"GenTable", 'String'> readonly packageName: FieldRef<"GenTable", 'String'> readonly moduleName: FieldRef<"GenTable", 'String'> readonly businessName: FieldRef<"GenTable", 'String'> readonly functionName: FieldRef<"GenTable", 'String'> readonly functionAuthor: FieldRef<"GenTable", 'String'> readonly genType: FieldRef<"GenTable", 'String'> readonly genPath: FieldRef<"GenTable", 'String'> readonly options: FieldRef<"GenTable", 'String'> readonly createBy: FieldRef<"GenTable", 'String'> readonly createTime: FieldRef<"GenTable", 'String'> readonly updateBy: FieldRef<"GenTable", 'String'> readonly updateTime: FieldRef<"GenTable", 'String'> readonly remark: FieldRef<"GenTable", 'String'> } // Custom InputTypes /** * GenTable findUnique */ export type GenTableFindUniqueArgs = { /** * Select specific fields to fetch from the GenTable */ select?: GenTableSelect | null /** * Omit specific fields from the GenTable */ omit?: GenTableOmit | null /** * Choose, which related nodes to fetch as well */ include?: GenTableInclude | null /** * Filter, which GenTable to fetch. */ where: GenTableWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * GenTable findUniqueOrThrow */ export type GenTableFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the GenTable */ select?: GenTableSelect | null /** * Omit specific fields from the GenTable */ omit?: GenTableOmit | null /** * Choose, which related nodes to fetch as well */ include?: GenTableInclude | null /** * Filter, which GenTable to fetch. */ where: GenTableWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * GenTable findFirst */ export type GenTableFindFirstArgs = { /** * Select specific fields to fetch from the GenTable */ select?: GenTableSelect | null /** * Omit specific fields from the GenTable */ omit?: GenTableOmit | null /** * Choose, which related nodes to fetch as well */ include?: GenTableInclude | null /** * Filter, which GenTable to fetch. */ where?: GenTableWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of GenTables to fetch. */ orderBy?: GenTableOrderByWithRelationInput | GenTableOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for GenTables. */ cursor?: GenTableWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` GenTables from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` GenTables. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of GenTables. */ distinct?: GenTableScalarFieldEnum | GenTableScalarFieldEnum[] relationLoadStrategy?: RelationLoadStrategy } /** * GenTable findFirstOrThrow */ export type GenTableFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the GenTable */ select?: GenTableSelect | null /** * Omit specific fields from the GenTable */ omit?: GenTableOmit | null /** * Choose, which related nodes to fetch as well */ include?: GenTableInclude | null /** * Filter, which GenTable to fetch. */ where?: GenTableWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of GenTables to fetch. */ orderBy?: GenTableOrderByWithRelationInput | GenTableOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for GenTables. */ cursor?: GenTableWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` GenTables from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` GenTables. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of GenTables. */ distinct?: GenTableScalarFieldEnum | GenTableScalarFieldEnum[] relationLoadStrategy?: RelationLoadStrategy } /** * GenTable findMany */ export type GenTableFindManyArgs = { /** * Select specific fields to fetch from the GenTable */ select?: GenTableSelect | null /** * Omit specific fields from the GenTable */ omit?: GenTableOmit | null /** * Choose, which related nodes to fetch as well */ include?: GenTableInclude | null /** * Filter, which GenTables to fetch. */ where?: GenTableWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of GenTables to fetch. */ orderBy?: GenTableOrderByWithRelationInput | GenTableOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for listing GenTables. */ cursor?: GenTableWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` GenTables from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` GenTables. */ skip?: number distinct?: GenTableScalarFieldEnum | GenTableScalarFieldEnum[] relationLoadStrategy?: RelationLoadStrategy } /** * GenTable create */ export type GenTableCreateArgs = { /** * Select specific fields to fetch from the GenTable */ select?: GenTableSelect | null /** * Omit specific fields from the GenTable */ omit?: GenTableOmit | null /** * Choose, which related nodes to fetch as well */ include?: GenTableInclude | null /** * The data needed to create a GenTable. */ data?: XOR relationLoadStrategy?: RelationLoadStrategy } /** * GenTable createMany */ export type GenTableCreateManyArgs = { /** * The data used to create many GenTables. */ data: GenTableCreateManyInput | GenTableCreateManyInput[] skipDuplicates?: boolean } /** * GenTable update */ export type GenTableUpdateArgs = { /** * Select specific fields to fetch from the GenTable */ select?: GenTableSelect | null /** * Omit specific fields from the GenTable */ omit?: GenTableOmit | null /** * Choose, which related nodes to fetch as well */ include?: GenTableInclude | null /** * The data needed to update a GenTable. */ data: XOR /** * Choose, which GenTable to update. */ where: GenTableWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * GenTable updateMany */ export type GenTableUpdateManyArgs = { /** * The data used to update GenTables. */ data: XOR /** * Filter which GenTables to update */ where?: GenTableWhereInput } /** * GenTable upsert */ export type GenTableUpsertArgs = { /** * Select specific fields to fetch from the GenTable */ select?: GenTableSelect | null /** * Omit specific fields from the GenTable */ omit?: GenTableOmit | null /** * Choose, which related nodes to fetch as well */ include?: GenTableInclude | null /** * The filter to search for the GenTable to update in case it exists. */ where: GenTableWhereUniqueInput /** * In case the GenTable found by the `where` argument doesn't exist, create a new GenTable with this data. */ create: XOR /** * In case the GenTable was found with the provided `where` argument, update it with this data. */ update: XOR relationLoadStrategy?: RelationLoadStrategy } /** * GenTable delete */ export type GenTableDeleteArgs = { /** * Select specific fields to fetch from the GenTable */ select?: GenTableSelect | null /** * Omit specific fields from the GenTable */ omit?: GenTableOmit | null /** * Choose, which related nodes to fetch as well */ include?: GenTableInclude | null /** * Filter which GenTable to delete. */ where: GenTableWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * GenTable deleteMany */ export type GenTableDeleteManyArgs = { /** * Filter which GenTables to delete */ where?: GenTableWhereInput } /** * GenTable.tableColumns */ export type GenTable$tableColumnsArgs = { /** * Select specific fields to fetch from the GenTableColumn */ select?: GenTableColumnSelect | null /** * Omit specific fields from the GenTableColumn */ omit?: GenTableColumnOmit | null /** * Choose, which related nodes to fetch as well */ include?: GenTableColumnInclude | null where?: GenTableColumnWhereInput orderBy?: GenTableColumnOrderByWithRelationInput | GenTableColumnOrderByWithRelationInput[] cursor?: GenTableColumnWhereUniqueInput take?: number skip?: number distinct?: GenTableColumnScalarFieldEnum | GenTableColumnScalarFieldEnum[] } /** * GenTable without action */ export type GenTableDefaultArgs = { /** * Select specific fields to fetch from the GenTable */ select?: GenTableSelect | null /** * Omit specific fields from the GenTable */ omit?: GenTableOmit | null /** * Choose, which related nodes to fetch as well */ include?: GenTableInclude | null } /** * Model GenTableColumn */ export type AggregateGenTableColumn = { _count: GenTableColumnCountAggregateOutputType | null _avg: GenTableColumnAvgAggregateOutputType | null _sum: GenTableColumnSumAggregateOutputType | null _min: GenTableColumnMinAggregateOutputType | null _max: GenTableColumnMaxAggregateOutputType | null } export type GenTableColumnAvgAggregateOutputType = { columnId: number | null tableId: number | null sort: number | null } export type GenTableColumnSumAggregateOutputType = { columnId: number | null tableId: number | null sort: number | null } export type GenTableColumnMinAggregateOutputType = { columnId: number | null tableId: number | null columnName: string | null columnComment: string | null columnType: string | null javaType: string | null javaField: string | null isPk: string | null isIncrement: string | null isRequired: string | null isInsert: string | null isEdit: string | null isList: string | null isQuery: string | null queryType: string | null htmlType: string | null dictType: string | null sort: number | null createBy: string | null createTime: string | null updateBy: string | null updateTime: string | null } export type GenTableColumnMaxAggregateOutputType = { columnId: number | null tableId: number | null columnName: string | null columnComment: string | null columnType: string | null javaType: string | null javaField: string | null isPk: string | null isIncrement: string | null isRequired: string | null isInsert: string | null isEdit: string | null isList: string | null isQuery: string | null queryType: string | null htmlType: string | null dictType: string | null sort: number | null createBy: string | null createTime: string | null updateBy: string | null updateTime: string | null } export type GenTableColumnCountAggregateOutputType = { columnId: number tableId: number columnName: number columnComment: number columnType: number javaType: number javaField: number isPk: number isIncrement: number isRequired: number isInsert: number isEdit: number isList: number isQuery: number queryType: number htmlType: number dictType: number sort: number createBy: number createTime: number updateBy: number updateTime: number _all: number } export type GenTableColumnAvgAggregateInputType = { columnId?: true tableId?: true sort?: true } export type GenTableColumnSumAggregateInputType = { columnId?: true tableId?: true sort?: true } export type GenTableColumnMinAggregateInputType = { columnId?: true tableId?: true columnName?: true columnComment?: true columnType?: true javaType?: true javaField?: true isPk?: true isIncrement?: true isRequired?: true isInsert?: true isEdit?: true isList?: true isQuery?: true queryType?: true htmlType?: true dictType?: true sort?: true createBy?: true createTime?: true updateBy?: true updateTime?: true } export type GenTableColumnMaxAggregateInputType = { columnId?: true tableId?: true columnName?: true columnComment?: true columnType?: true javaType?: true javaField?: true isPk?: true isIncrement?: true isRequired?: true isInsert?: true isEdit?: true isList?: true isQuery?: true queryType?: true htmlType?: true dictType?: true sort?: true createBy?: true createTime?: true updateBy?: true updateTime?: true } export type GenTableColumnCountAggregateInputType = { columnId?: true tableId?: true columnName?: true columnComment?: true columnType?: true javaType?: true javaField?: true isPk?: true isIncrement?: true isRequired?: true isInsert?: true isEdit?: true isList?: true isQuery?: true queryType?: true htmlType?: true dictType?: true sort?: true createBy?: true createTime?: true updateBy?: true updateTime?: true _all?: true } export type GenTableColumnAggregateArgs = { /** * Filter which GenTableColumn to aggregate. */ where?: GenTableColumnWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of GenTableColumns to fetch. */ orderBy?: GenTableColumnOrderByWithRelationInput | GenTableColumnOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the start position */ cursor?: GenTableColumnWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` GenTableColumns from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` GenTableColumns. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Count returned GenTableColumns **/ _count?: true | GenTableColumnCountAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to average **/ _avg?: GenTableColumnAvgAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to sum **/ _sum?: GenTableColumnSumAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the minimum value **/ _min?: GenTableColumnMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the maximum value **/ _max?: GenTableColumnMaxAggregateInputType } export type GetGenTableColumnAggregateType = { [P in keyof T & keyof AggregateGenTableColumn]: P extends '_count' | 'count' ? T[P] extends true ? number : GetScalarType : GetScalarType } export type GenTableColumnGroupByArgs = { where?: GenTableColumnWhereInput orderBy?: GenTableColumnOrderByWithAggregationInput | GenTableColumnOrderByWithAggregationInput[] by: GenTableColumnScalarFieldEnum[] | GenTableColumnScalarFieldEnum having?: GenTableColumnScalarWhereWithAggregatesInput take?: number skip?: number _count?: GenTableColumnCountAggregateInputType | true _avg?: GenTableColumnAvgAggregateInputType _sum?: GenTableColumnSumAggregateInputType _min?: GenTableColumnMinAggregateInputType _max?: GenTableColumnMaxAggregateInputType } export type GenTableColumnGroupByOutputType = { columnId: number tableId: number | null columnName: string | null columnComment: string | null columnType: string | null javaType: string | null javaField: string | null isPk: string | null isIncrement: string | null isRequired: string | null isInsert: string | null isEdit: string | null isList: string | null isQuery: string | null queryType: string | null htmlType: string | null dictType: string | null sort: number | null createBy: string | null createTime: string | null updateBy: string | null updateTime: string | null _count: GenTableColumnCountAggregateOutputType | null _avg: GenTableColumnAvgAggregateOutputType | null _sum: GenTableColumnSumAggregateOutputType | null _min: GenTableColumnMinAggregateOutputType | null _max: GenTableColumnMaxAggregateOutputType | null } type GetGenTableColumnGroupByPayload = Prisma.PrismaPromise< Array< PickEnumerable & { [P in ((keyof T) & (keyof GenTableColumnGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : GetScalarType : GetScalarType } > > export type GenTableColumnSelect = $Extensions.GetSelect<{ columnId?: boolean tableId?: boolean columnName?: boolean columnComment?: boolean columnType?: boolean javaType?: boolean javaField?: boolean isPk?: boolean isIncrement?: boolean isRequired?: boolean isInsert?: boolean isEdit?: boolean isList?: boolean isQuery?: boolean queryType?: boolean htmlType?: boolean dictType?: boolean sort?: boolean createBy?: boolean createTime?: boolean updateBy?: boolean updateTime?: boolean table?: boolean | GenTableColumn$tableArgs }, ExtArgs["result"]["genTableColumn"]> export type GenTableColumnSelectScalar = { columnId?: boolean tableId?: boolean columnName?: boolean columnComment?: boolean columnType?: boolean javaType?: boolean javaField?: boolean isPk?: boolean isIncrement?: boolean isRequired?: boolean isInsert?: boolean isEdit?: boolean isList?: boolean isQuery?: boolean queryType?: boolean htmlType?: boolean dictType?: boolean sort?: boolean createBy?: boolean createTime?: boolean updateBy?: boolean updateTime?: boolean } export type GenTableColumnOmit = $Extensions.GetOmit<"columnId" | "tableId" | "columnName" | "columnComment" | "columnType" | "javaType" | "javaField" | "isPk" | "isIncrement" | "isRequired" | "isInsert" | "isEdit" | "isList" | "isQuery" | "queryType" | "htmlType" | "dictType" | "sort" | "createBy" | "createTime" | "updateBy" | "updateTime", ExtArgs["result"]["genTableColumn"]> export type GenTableColumnInclude = { table?: boolean | GenTableColumn$tableArgs } export type $GenTableColumnPayload = { name: "GenTableColumn" objects: { table: Prisma.$GenTablePayload | null } scalars: $Extensions.GetPayloadResult<{ columnId: number tableId: number | null columnName: string | null columnComment: string | null columnType: string | null javaType: string | null javaField: string | null isPk: string | null isIncrement: string | null isRequired: string | null isInsert: string | null isEdit: string | null isList: string | null isQuery: string | null queryType: string | null htmlType: string | null dictType: string | null sort: number | null createBy: string | null createTime: string | null updateBy: string | null updateTime: string | null }, ExtArgs["result"]["genTableColumn"]> composites: {} } type GenTableColumnGetPayload = $Result.GetResult type GenTableColumnCountArgs = Omit & { select?: GenTableColumnCountAggregateInputType | true } export interface GenTableColumnDelegate { [K: symbol]: { types: Prisma.TypeMap['model']['GenTableColumn'], meta: { name: 'GenTableColumn' } } /** * Find zero or one GenTableColumn that matches the filter. * @param {GenTableColumnFindUniqueArgs} args - Arguments to find a GenTableColumn * @example * // Get one GenTableColumn * const genTableColumn = await prisma.genTableColumn.findUnique({ * where: { * // ... provide filter here * } * }) **/ findUnique>( args: SelectSubset> ): Prisma__GenTableColumnClient<$Result.GetResult, T, 'findUnique'> | null, null, ExtArgs> /** * Find one GenTableColumn that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. * @param {GenTableColumnFindUniqueOrThrowArgs} args - Arguments to find a GenTableColumn * @example * // Get one GenTableColumn * const genTableColumn = await prisma.genTableColumn.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) **/ findUniqueOrThrow>( args?: SelectSubset> ): Prisma__GenTableColumnClient<$Result.GetResult, T, 'findUniqueOrThrow'>, never, ExtArgs> /** * Find the first GenTableColumn that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {GenTableColumnFindFirstArgs} args - Arguments to find a GenTableColumn * @example * // Get one GenTableColumn * const genTableColumn = await prisma.genTableColumn.findFirst({ * where: { * // ... provide filter here * } * }) **/ findFirst>( args?: SelectSubset> ): Prisma__GenTableColumnClient<$Result.GetResult, T, 'findFirst'> | null, null, ExtArgs> /** * Find the first GenTableColumn that matches the filter or * throw `PrismaKnownClientError` with `P2025` code if no matches were found. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {GenTableColumnFindFirstOrThrowArgs} args - Arguments to find a GenTableColumn * @example * // Get one GenTableColumn * const genTableColumn = await prisma.genTableColumn.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) **/ findFirstOrThrow>( args?: SelectSubset> ): Prisma__GenTableColumnClient<$Result.GetResult, T, 'findFirstOrThrow'>, never, ExtArgs> /** * Find zero or more GenTableColumns that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {GenTableColumnFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all GenTableColumns * const genTableColumns = await prisma.genTableColumn.findMany() * * // Get first 10 GenTableColumns * const genTableColumns = await prisma.genTableColumn.findMany({ take: 10 }) * * // Only select the `columnId` * const genTableColumnWithColumnIdOnly = await prisma.genTableColumn.findMany({ select: { columnId: true } }) * **/ findMany>( args?: SelectSubset> ): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'>> /** * Create a GenTableColumn. * @param {GenTableColumnCreateArgs} args - Arguments to create a GenTableColumn. * @example * // Create one GenTableColumn * const GenTableColumn = await prisma.genTableColumn.create({ * data: { * // ... data to create a GenTableColumn * } * }) * **/ create>( args: SelectSubset> ): Prisma__GenTableColumnClient<$Result.GetResult, T, 'create'>, never, ExtArgs> /** * Create many GenTableColumns. * @param {GenTableColumnCreateManyArgs} args - Arguments to create many GenTableColumns. * @example * // Create many GenTableColumns * const genTableColumn = await prisma.genTableColumn.createMany({ * data: [ * // ... provide data here * ] * }) * **/ createMany>( args?: SelectSubset> ): Prisma.PrismaPromise /** * Delete a GenTableColumn. * @param {GenTableColumnDeleteArgs} args - Arguments to delete one GenTableColumn. * @example * // Delete one GenTableColumn * const GenTableColumn = await prisma.genTableColumn.delete({ * where: { * // ... filter to delete one GenTableColumn * } * }) * **/ delete>( args: SelectSubset> ): Prisma__GenTableColumnClient<$Result.GetResult, T, 'delete'>, never, ExtArgs> /** * Update one GenTableColumn. * @param {GenTableColumnUpdateArgs} args - Arguments to update one GenTableColumn. * @example * // Update one GenTableColumn * const genTableColumn = await prisma.genTableColumn.update({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * **/ update>( args: SelectSubset> ): Prisma__GenTableColumnClient<$Result.GetResult, T, 'update'>, never, ExtArgs> /** * Delete zero or more GenTableColumns. * @param {GenTableColumnDeleteManyArgs} args - Arguments to filter GenTableColumns to delete. * @example * // Delete a few GenTableColumns * const { count } = await prisma.genTableColumn.deleteMany({ * where: { * // ... provide filter here * } * }) * **/ deleteMany>( args?: SelectSubset> ): Prisma.PrismaPromise /** * Update zero or more GenTableColumns. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {GenTableColumnUpdateManyArgs} args - Arguments to update one or more rows. * @example * // Update many GenTableColumns * const genTableColumn = await prisma.genTableColumn.updateMany({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * **/ updateMany>( args: SelectSubset> ): Prisma.PrismaPromise /** * Create or update one GenTableColumn. * @param {GenTableColumnUpsertArgs} args - Arguments to update or create a GenTableColumn. * @example * // Update or create a GenTableColumn * const genTableColumn = await prisma.genTableColumn.upsert({ * create: { * // ... data to create a GenTableColumn * }, * update: { * // ... in case it already exists, update * }, * where: { * // ... the filter for the GenTableColumn we want to update * } * }) **/ upsert>( args: SelectSubset> ): Prisma__GenTableColumnClient<$Result.GetResult, T, 'upsert'>, never, ExtArgs> /** * Count the number of GenTableColumns. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {GenTableColumnCountArgs} args - Arguments to filter GenTableColumns to count. * @example * // Count the number of GenTableColumns * const count = await prisma.genTableColumn.count({ * where: { * // ... the filter for the GenTableColumns we want to count * } * }) **/ count( args?: Subset, ): Prisma.PrismaPromise< T extends $Utils.Record<'select', any> ? T['select'] extends true ? number : GetScalarType : number > /** * Allows you to perform aggregations operations on a GenTableColumn. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {GenTableColumnAggregateArgs} args - Select which aggregations you would like to apply and on what fields. * @example * // Ordered by age ascending * // Where email contains prisma.io * // Limited to the 10 users * const aggregations = await prisma.user.aggregate({ * _avg: { * age: true, * }, * where: { * email: { * contains: "prisma.io", * }, * }, * orderBy: { * age: "asc", * }, * take: 10, * }) **/ aggregate(args: Subset): Prisma.PrismaPromise> /** * Group by GenTableColumn. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {GenTableColumnGroupByArgs} args - Group by arguments. * @example * // Group by city, order by createdAt, get count * const result = await prisma.user.groupBy({ * by: ['city', 'createdAt'], * orderBy: { * createdAt: true * }, * _count: { * _all: true * }, * }) * **/ groupBy< T extends GenTableColumnGroupByArgs, HasSelectOrTake extends Or< Extends<'skip', Keys>, Extends<'take', Keys> >, OrderByArg extends True extends HasSelectOrTake ? { orderBy: GenTableColumnGroupByArgs['orderBy'] } : { orderBy?: GenTableColumnGroupByArgs['orderBy'] }, OrderFields extends ExcludeUnderscoreKeys>>, ByFields extends MaybeTupleToUnion, ByValid extends Has, HavingFields extends GetHavingFields, HavingValid extends Has, ByEmpty extends T['by'] extends never[] ? True : False, InputErrors extends ByEmpty extends True ? `Error: "by" must not be empty.` : HavingValid extends False ? { [P in HavingFields]: P extends ByFields ? never : P extends string ? `Error: Field "${P}" used in "having" needs to be provided in "by".` : [ Error, 'Field ', P, ` in "having" needs to be provided in "by"`, ] }[HavingFields] : 'take' extends Keys ? 'orderBy' extends Keys ? ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] : 'Error: If you provide "take", you also need to provide "orderBy"' : 'skip' extends Keys ? 'orderBy' extends Keys ? ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] : 'Error: If you provide "skip", you also need to provide "orderBy"' : ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetGenTableColumnGroupByPayload : Prisma.PrismaPromise /** * Fields of the GenTableColumn model */ readonly fields: GenTableColumnFieldRefs; } /** * The delegate class that acts as a "Promise-like" for GenTableColumn. * Why is this prefixed with `Prisma__`? * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ export interface Prisma__GenTableColumnClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: 'PrismaPromise'; table = {}>(args?: Subset>): Prisma__GenTableClient<$Result.GetResult, T, 'findUniqueOrThrow'> | null, null, ExtArgs>; /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of which ever callback is executed. */ then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise; /** * Attaches a callback for only the rejection of the Promise. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of the callback. */ catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise; /** * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The * resolved value cannot be modified from the callback. * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). * @returns A Promise for the completion of the callback. */ finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise; } /** * Fields of the GenTableColumn model */ interface GenTableColumnFieldRefs { readonly columnId: FieldRef<"GenTableColumn", 'Int'> readonly tableId: FieldRef<"GenTableColumn", 'Int'> readonly columnName: FieldRef<"GenTableColumn", 'String'> readonly columnComment: FieldRef<"GenTableColumn", 'String'> readonly columnType: FieldRef<"GenTableColumn", 'String'> readonly javaType: FieldRef<"GenTableColumn", 'String'> readonly javaField: FieldRef<"GenTableColumn", 'String'> readonly isPk: FieldRef<"GenTableColumn", 'String'> readonly isIncrement: FieldRef<"GenTableColumn", 'String'> readonly isRequired: FieldRef<"GenTableColumn", 'String'> readonly isInsert: FieldRef<"GenTableColumn", 'String'> readonly isEdit: FieldRef<"GenTableColumn", 'String'> readonly isList: FieldRef<"GenTableColumn", 'String'> readonly isQuery: FieldRef<"GenTableColumn", 'String'> readonly queryType: FieldRef<"GenTableColumn", 'String'> readonly htmlType: FieldRef<"GenTableColumn", 'String'> readonly dictType: FieldRef<"GenTableColumn", 'String'> readonly sort: FieldRef<"GenTableColumn", 'Int'> readonly createBy: FieldRef<"GenTableColumn", 'String'> readonly createTime: FieldRef<"GenTableColumn", 'String'> readonly updateBy: FieldRef<"GenTableColumn", 'String'> readonly updateTime: FieldRef<"GenTableColumn", 'String'> } // Custom InputTypes /** * GenTableColumn findUnique */ export type GenTableColumnFindUniqueArgs = { /** * Select specific fields to fetch from the GenTableColumn */ select?: GenTableColumnSelect | null /** * Omit specific fields from the GenTableColumn */ omit?: GenTableColumnOmit | null /** * Choose, which related nodes to fetch as well */ include?: GenTableColumnInclude | null /** * Filter, which GenTableColumn to fetch. */ where: GenTableColumnWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * GenTableColumn findUniqueOrThrow */ export type GenTableColumnFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the GenTableColumn */ select?: GenTableColumnSelect | null /** * Omit specific fields from the GenTableColumn */ omit?: GenTableColumnOmit | null /** * Choose, which related nodes to fetch as well */ include?: GenTableColumnInclude | null /** * Filter, which GenTableColumn to fetch. */ where: GenTableColumnWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * GenTableColumn findFirst */ export type GenTableColumnFindFirstArgs = { /** * Select specific fields to fetch from the GenTableColumn */ select?: GenTableColumnSelect | null /** * Omit specific fields from the GenTableColumn */ omit?: GenTableColumnOmit | null /** * Choose, which related nodes to fetch as well */ include?: GenTableColumnInclude | null /** * Filter, which GenTableColumn to fetch. */ where?: GenTableColumnWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of GenTableColumns to fetch. */ orderBy?: GenTableColumnOrderByWithRelationInput | GenTableColumnOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for GenTableColumns. */ cursor?: GenTableColumnWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` GenTableColumns from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` GenTableColumns. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of GenTableColumns. */ distinct?: GenTableColumnScalarFieldEnum | GenTableColumnScalarFieldEnum[] relationLoadStrategy?: RelationLoadStrategy } /** * GenTableColumn findFirstOrThrow */ export type GenTableColumnFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the GenTableColumn */ select?: GenTableColumnSelect | null /** * Omit specific fields from the GenTableColumn */ omit?: GenTableColumnOmit | null /** * Choose, which related nodes to fetch as well */ include?: GenTableColumnInclude | null /** * Filter, which GenTableColumn to fetch. */ where?: GenTableColumnWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of GenTableColumns to fetch. */ orderBy?: GenTableColumnOrderByWithRelationInput | GenTableColumnOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for GenTableColumns. */ cursor?: GenTableColumnWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` GenTableColumns from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` GenTableColumns. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of GenTableColumns. */ distinct?: GenTableColumnScalarFieldEnum | GenTableColumnScalarFieldEnum[] relationLoadStrategy?: RelationLoadStrategy } /** * GenTableColumn findMany */ export type GenTableColumnFindManyArgs = { /** * Select specific fields to fetch from the GenTableColumn */ select?: GenTableColumnSelect | null /** * Omit specific fields from the GenTableColumn */ omit?: GenTableColumnOmit | null /** * Choose, which related nodes to fetch as well */ include?: GenTableColumnInclude | null /** * Filter, which GenTableColumns to fetch. */ where?: GenTableColumnWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of GenTableColumns to fetch. */ orderBy?: GenTableColumnOrderByWithRelationInput | GenTableColumnOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for listing GenTableColumns. */ cursor?: GenTableColumnWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` GenTableColumns from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` GenTableColumns. */ skip?: number distinct?: GenTableColumnScalarFieldEnum | GenTableColumnScalarFieldEnum[] relationLoadStrategy?: RelationLoadStrategy } /** * GenTableColumn create */ export type GenTableColumnCreateArgs = { /** * Select specific fields to fetch from the GenTableColumn */ select?: GenTableColumnSelect | null /** * Omit specific fields from the GenTableColumn */ omit?: GenTableColumnOmit | null /** * Choose, which related nodes to fetch as well */ include?: GenTableColumnInclude | null /** * The data needed to create a GenTableColumn. */ data?: XOR relationLoadStrategy?: RelationLoadStrategy } /** * GenTableColumn createMany */ export type GenTableColumnCreateManyArgs = { /** * The data used to create many GenTableColumns. */ data: GenTableColumnCreateManyInput | GenTableColumnCreateManyInput[] skipDuplicates?: boolean } /** * GenTableColumn update */ export type GenTableColumnUpdateArgs = { /** * Select specific fields to fetch from the GenTableColumn */ select?: GenTableColumnSelect | null /** * Omit specific fields from the GenTableColumn */ omit?: GenTableColumnOmit | null /** * Choose, which related nodes to fetch as well */ include?: GenTableColumnInclude | null /** * The data needed to update a GenTableColumn. */ data: XOR /** * Choose, which GenTableColumn to update. */ where: GenTableColumnWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * GenTableColumn updateMany */ export type GenTableColumnUpdateManyArgs = { /** * The data used to update GenTableColumns. */ data: XOR /** * Filter which GenTableColumns to update */ where?: GenTableColumnWhereInput } /** * GenTableColumn upsert */ export type GenTableColumnUpsertArgs = { /** * Select specific fields to fetch from the GenTableColumn */ select?: GenTableColumnSelect | null /** * Omit specific fields from the GenTableColumn */ omit?: GenTableColumnOmit | null /** * Choose, which related nodes to fetch as well */ include?: GenTableColumnInclude | null /** * The filter to search for the GenTableColumn to update in case it exists. */ where: GenTableColumnWhereUniqueInput /** * In case the GenTableColumn found by the `where` argument doesn't exist, create a new GenTableColumn with this data. */ create: XOR /** * In case the GenTableColumn was found with the provided `where` argument, update it with this data. */ update: XOR relationLoadStrategy?: RelationLoadStrategy } /** * GenTableColumn delete */ export type GenTableColumnDeleteArgs = { /** * Select specific fields to fetch from the GenTableColumn */ select?: GenTableColumnSelect | null /** * Omit specific fields from the GenTableColumn */ omit?: GenTableColumnOmit | null /** * Choose, which related nodes to fetch as well */ include?: GenTableColumnInclude | null /** * Filter which GenTableColumn to delete. */ where: GenTableColumnWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * GenTableColumn deleteMany */ export type GenTableColumnDeleteManyArgs = { /** * Filter which GenTableColumns to delete */ where?: GenTableColumnWhereInput } /** * GenTableColumn.table */ export type GenTableColumn$tableArgs = { /** * Select specific fields to fetch from the GenTable */ select?: GenTableSelect | null /** * Omit specific fields from the GenTable */ omit?: GenTableOmit | null /** * Choose, which related nodes to fetch as well */ include?: GenTableInclude | null where?: GenTableWhereInput } /** * GenTableColumn without action */ export type GenTableColumnDefaultArgs = { /** * Select specific fields to fetch from the GenTableColumn */ select?: GenTableColumnSelect | null /** * Omit specific fields from the GenTableColumn */ omit?: GenTableColumnOmit | null /** * Choose, which related nodes to fetch as well */ include?: GenTableColumnInclude | null } /** * Model SysConfig */ export type AggregateSysConfig = { _count: SysConfigCountAggregateOutputType | null _avg: SysConfigAvgAggregateOutputType | null _sum: SysConfigSumAggregateOutputType | null _min: SysConfigMinAggregateOutputType | null _max: SysConfigMaxAggregateOutputType | null } export type SysConfigAvgAggregateOutputType = { configId: number | null } export type SysConfigSumAggregateOutputType = { configId: number | null } export type SysConfigMinAggregateOutputType = { configId: number | null configName: string | null configKey: string | null configValue: string | null configType: string | null createBy: string | null createTime: string | null updateBy: string | null updateTime: string | null remark: string | null } export type SysConfigMaxAggregateOutputType = { configId: number | null configName: string | null configKey: string | null configValue: string | null configType: string | null createBy: string | null createTime: string | null updateBy: string | null updateTime: string | null remark: string | null } export type SysConfigCountAggregateOutputType = { configId: number configName: number configKey: number configValue: number configType: number createBy: number createTime: number updateBy: number updateTime: number remark: number _all: number } export type SysConfigAvgAggregateInputType = { configId?: true } export type SysConfigSumAggregateInputType = { configId?: true } export type SysConfigMinAggregateInputType = { configId?: true configName?: true configKey?: true configValue?: true configType?: true createBy?: true createTime?: true updateBy?: true updateTime?: true remark?: true } export type SysConfigMaxAggregateInputType = { configId?: true configName?: true configKey?: true configValue?: true configType?: true createBy?: true createTime?: true updateBy?: true updateTime?: true remark?: true } export type SysConfigCountAggregateInputType = { configId?: true configName?: true configKey?: true configValue?: true configType?: true createBy?: true createTime?: true updateBy?: true updateTime?: true remark?: true _all?: true } export type SysConfigAggregateArgs = { /** * Filter which SysConfig to aggregate. */ where?: SysConfigWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of SysConfigs to fetch. */ orderBy?: SysConfigOrderByWithRelationInput | SysConfigOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the start position */ cursor?: SysConfigWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` SysConfigs from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` SysConfigs. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Count returned SysConfigs **/ _count?: true | SysConfigCountAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to average **/ _avg?: SysConfigAvgAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to sum **/ _sum?: SysConfigSumAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the minimum value **/ _min?: SysConfigMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the maximum value **/ _max?: SysConfigMaxAggregateInputType } export type GetSysConfigAggregateType = { [P in keyof T & keyof AggregateSysConfig]: P extends '_count' | 'count' ? T[P] extends true ? number : GetScalarType : GetScalarType } export type SysConfigGroupByArgs = { where?: SysConfigWhereInput orderBy?: SysConfigOrderByWithAggregationInput | SysConfigOrderByWithAggregationInput[] by: SysConfigScalarFieldEnum[] | SysConfigScalarFieldEnum having?: SysConfigScalarWhereWithAggregatesInput take?: number skip?: number _count?: SysConfigCountAggregateInputType | true _avg?: SysConfigAvgAggregateInputType _sum?: SysConfigSumAggregateInputType _min?: SysConfigMinAggregateInputType _max?: SysConfigMaxAggregateInputType } export type SysConfigGroupByOutputType = { configId: number configName: string | null configKey: string | null configValue: string | null configType: string | null createBy: string | null createTime: string | null updateBy: string | null updateTime: string | null remark: string | null _count: SysConfigCountAggregateOutputType | null _avg: SysConfigAvgAggregateOutputType | null _sum: SysConfigSumAggregateOutputType | null _min: SysConfigMinAggregateOutputType | null _max: SysConfigMaxAggregateOutputType | null } type GetSysConfigGroupByPayload = Prisma.PrismaPromise< Array< PickEnumerable & { [P in ((keyof T) & (keyof SysConfigGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : GetScalarType : GetScalarType } > > export type SysConfigSelect = $Extensions.GetSelect<{ configId?: boolean configName?: boolean configKey?: boolean configValue?: boolean configType?: boolean createBy?: boolean createTime?: boolean updateBy?: boolean updateTime?: boolean remark?: boolean }, ExtArgs["result"]["sysConfig"]> export type SysConfigSelectScalar = { configId?: boolean configName?: boolean configKey?: boolean configValue?: boolean configType?: boolean createBy?: boolean createTime?: boolean updateBy?: boolean updateTime?: boolean remark?: boolean } export type SysConfigOmit = $Extensions.GetOmit<"configId" | "configName" | "configKey" | "configValue" | "configType" | "createBy" | "createTime" | "updateBy" | "updateTime" | "remark", ExtArgs["result"]["sysConfig"]> export type $SysConfigPayload = { name: "SysConfig" objects: {} scalars: $Extensions.GetPayloadResult<{ configId: number configName: string | null configKey: string | null configValue: string | null configType: string | null createBy: string | null createTime: string | null updateBy: string | null updateTime: string | null remark: string | null }, ExtArgs["result"]["sysConfig"]> composites: {} } type SysConfigGetPayload = $Result.GetResult type SysConfigCountArgs = Omit & { select?: SysConfigCountAggregateInputType | true } export interface SysConfigDelegate { [K: symbol]: { types: Prisma.TypeMap['model']['SysConfig'], meta: { name: 'SysConfig' } } /** * Find zero or one SysConfig that matches the filter. * @param {SysConfigFindUniqueArgs} args - Arguments to find a SysConfig * @example * // Get one SysConfig * const sysConfig = await prisma.sysConfig.findUnique({ * where: { * // ... provide filter here * } * }) **/ findUnique>( args: SelectSubset> ): Prisma__SysConfigClient<$Result.GetResult, T, 'findUnique'> | null, null, ExtArgs> /** * Find one SysConfig that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. * @param {SysConfigFindUniqueOrThrowArgs} args - Arguments to find a SysConfig * @example * // Get one SysConfig * const sysConfig = await prisma.sysConfig.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) **/ findUniqueOrThrow>( args?: SelectSubset> ): Prisma__SysConfigClient<$Result.GetResult, T, 'findUniqueOrThrow'>, never, ExtArgs> /** * Find the first SysConfig that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysConfigFindFirstArgs} args - Arguments to find a SysConfig * @example * // Get one SysConfig * const sysConfig = await prisma.sysConfig.findFirst({ * where: { * // ... provide filter here * } * }) **/ findFirst>( args?: SelectSubset> ): Prisma__SysConfigClient<$Result.GetResult, T, 'findFirst'> | null, null, ExtArgs> /** * Find the first SysConfig that matches the filter or * throw `PrismaKnownClientError` with `P2025` code if no matches were found. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysConfigFindFirstOrThrowArgs} args - Arguments to find a SysConfig * @example * // Get one SysConfig * const sysConfig = await prisma.sysConfig.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) **/ findFirstOrThrow>( args?: SelectSubset> ): Prisma__SysConfigClient<$Result.GetResult, T, 'findFirstOrThrow'>, never, ExtArgs> /** * Find zero or more SysConfigs that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysConfigFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all SysConfigs * const sysConfigs = await prisma.sysConfig.findMany() * * // Get first 10 SysConfigs * const sysConfigs = await prisma.sysConfig.findMany({ take: 10 }) * * // Only select the `configId` * const sysConfigWithConfigIdOnly = await prisma.sysConfig.findMany({ select: { configId: true } }) * **/ findMany>( args?: SelectSubset> ): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'>> /** * Create a SysConfig. * @param {SysConfigCreateArgs} args - Arguments to create a SysConfig. * @example * // Create one SysConfig * const SysConfig = await prisma.sysConfig.create({ * data: { * // ... data to create a SysConfig * } * }) * **/ create>( args: SelectSubset> ): Prisma__SysConfigClient<$Result.GetResult, T, 'create'>, never, ExtArgs> /** * Create many SysConfigs. * @param {SysConfigCreateManyArgs} args - Arguments to create many SysConfigs. * @example * // Create many SysConfigs * const sysConfig = await prisma.sysConfig.createMany({ * data: [ * // ... provide data here * ] * }) * **/ createMany>( args?: SelectSubset> ): Prisma.PrismaPromise /** * Delete a SysConfig. * @param {SysConfigDeleteArgs} args - Arguments to delete one SysConfig. * @example * // Delete one SysConfig * const SysConfig = await prisma.sysConfig.delete({ * where: { * // ... filter to delete one SysConfig * } * }) * **/ delete>( args: SelectSubset> ): Prisma__SysConfigClient<$Result.GetResult, T, 'delete'>, never, ExtArgs> /** * Update one SysConfig. * @param {SysConfigUpdateArgs} args - Arguments to update one SysConfig. * @example * // Update one SysConfig * const sysConfig = await prisma.sysConfig.update({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * **/ update>( args: SelectSubset> ): Prisma__SysConfigClient<$Result.GetResult, T, 'update'>, never, ExtArgs> /** * Delete zero or more SysConfigs. * @param {SysConfigDeleteManyArgs} args - Arguments to filter SysConfigs to delete. * @example * // Delete a few SysConfigs * const { count } = await prisma.sysConfig.deleteMany({ * where: { * // ... provide filter here * } * }) * **/ deleteMany>( args?: SelectSubset> ): Prisma.PrismaPromise /** * Update zero or more SysConfigs. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysConfigUpdateManyArgs} args - Arguments to update one or more rows. * @example * // Update many SysConfigs * const sysConfig = await prisma.sysConfig.updateMany({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * **/ updateMany>( args: SelectSubset> ): Prisma.PrismaPromise /** * Create or update one SysConfig. * @param {SysConfigUpsertArgs} args - Arguments to update or create a SysConfig. * @example * // Update or create a SysConfig * const sysConfig = await prisma.sysConfig.upsert({ * create: { * // ... data to create a SysConfig * }, * update: { * // ... in case it already exists, update * }, * where: { * // ... the filter for the SysConfig we want to update * } * }) **/ upsert>( args: SelectSubset> ): Prisma__SysConfigClient<$Result.GetResult, T, 'upsert'>, never, ExtArgs> /** * Count the number of SysConfigs. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysConfigCountArgs} args - Arguments to filter SysConfigs to count. * @example * // Count the number of SysConfigs * const count = await prisma.sysConfig.count({ * where: { * // ... the filter for the SysConfigs we want to count * } * }) **/ count( args?: Subset, ): Prisma.PrismaPromise< T extends $Utils.Record<'select', any> ? T['select'] extends true ? number : GetScalarType : number > /** * Allows you to perform aggregations operations on a SysConfig. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysConfigAggregateArgs} args - Select which aggregations you would like to apply and on what fields. * @example * // Ordered by age ascending * // Where email contains prisma.io * // Limited to the 10 users * const aggregations = await prisma.user.aggregate({ * _avg: { * age: true, * }, * where: { * email: { * contains: "prisma.io", * }, * }, * orderBy: { * age: "asc", * }, * take: 10, * }) **/ aggregate(args: Subset): Prisma.PrismaPromise> /** * Group by SysConfig. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysConfigGroupByArgs} args - Group by arguments. * @example * // Group by city, order by createdAt, get count * const result = await prisma.user.groupBy({ * by: ['city', 'createdAt'], * orderBy: { * createdAt: true * }, * _count: { * _all: true * }, * }) * **/ groupBy< T extends SysConfigGroupByArgs, HasSelectOrTake extends Or< Extends<'skip', Keys>, Extends<'take', Keys> >, OrderByArg extends True extends HasSelectOrTake ? { orderBy: SysConfigGroupByArgs['orderBy'] } : { orderBy?: SysConfigGroupByArgs['orderBy'] }, OrderFields extends ExcludeUnderscoreKeys>>, ByFields extends MaybeTupleToUnion, ByValid extends Has, HavingFields extends GetHavingFields, HavingValid extends Has, ByEmpty extends T['by'] extends never[] ? True : False, InputErrors extends ByEmpty extends True ? `Error: "by" must not be empty.` : HavingValid extends False ? { [P in HavingFields]: P extends ByFields ? never : P extends string ? `Error: Field "${P}" used in "having" needs to be provided in "by".` : [ Error, 'Field ', P, ` in "having" needs to be provided in "by"`, ] }[HavingFields] : 'take' extends Keys ? 'orderBy' extends Keys ? ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] : 'Error: If you provide "take", you also need to provide "orderBy"' : 'skip' extends Keys ? 'orderBy' extends Keys ? ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] : 'Error: If you provide "skip", you also need to provide "orderBy"' : ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetSysConfigGroupByPayload : Prisma.PrismaPromise /** * Fields of the SysConfig model */ readonly fields: SysConfigFieldRefs; } /** * The delegate class that acts as a "Promise-like" for SysConfig. * Why is this prefixed with `Prisma__`? * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ export interface Prisma__SysConfigClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: 'PrismaPromise'; /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of which ever callback is executed. */ then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise; /** * Attaches a callback for only the rejection of the Promise. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of the callback. */ catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise; /** * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The * resolved value cannot be modified from the callback. * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). * @returns A Promise for the completion of the callback. */ finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise; } /** * Fields of the SysConfig model */ interface SysConfigFieldRefs { readonly configId: FieldRef<"SysConfig", 'Int'> readonly configName: FieldRef<"SysConfig", 'String'> readonly configKey: FieldRef<"SysConfig", 'String'> readonly configValue: FieldRef<"SysConfig", 'String'> readonly configType: FieldRef<"SysConfig", 'String'> readonly createBy: FieldRef<"SysConfig", 'String'> readonly createTime: FieldRef<"SysConfig", 'String'> readonly updateBy: FieldRef<"SysConfig", 'String'> readonly updateTime: FieldRef<"SysConfig", 'String'> readonly remark: FieldRef<"SysConfig", 'String'> } // Custom InputTypes /** * SysConfig findUnique */ export type SysConfigFindUniqueArgs = { /** * Select specific fields to fetch from the SysConfig */ select?: SysConfigSelect | null /** * Omit specific fields from the SysConfig */ omit?: SysConfigOmit | null /** * Filter, which SysConfig to fetch. */ where: SysConfigWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * SysConfig findUniqueOrThrow */ export type SysConfigFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the SysConfig */ select?: SysConfigSelect | null /** * Omit specific fields from the SysConfig */ omit?: SysConfigOmit | null /** * Filter, which SysConfig to fetch. */ where: SysConfigWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * SysConfig findFirst */ export type SysConfigFindFirstArgs = { /** * Select specific fields to fetch from the SysConfig */ select?: SysConfigSelect | null /** * Omit specific fields from the SysConfig */ omit?: SysConfigOmit | null /** * Filter, which SysConfig to fetch. */ where?: SysConfigWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of SysConfigs to fetch. */ orderBy?: SysConfigOrderByWithRelationInput | SysConfigOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for SysConfigs. */ cursor?: SysConfigWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` SysConfigs from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` SysConfigs. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of SysConfigs. */ distinct?: SysConfigScalarFieldEnum | SysConfigScalarFieldEnum[] relationLoadStrategy?: RelationLoadStrategy } /** * SysConfig findFirstOrThrow */ export type SysConfigFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the SysConfig */ select?: SysConfigSelect | null /** * Omit specific fields from the SysConfig */ omit?: SysConfigOmit | null /** * Filter, which SysConfig to fetch. */ where?: SysConfigWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of SysConfigs to fetch. */ orderBy?: SysConfigOrderByWithRelationInput | SysConfigOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for SysConfigs. */ cursor?: SysConfigWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` SysConfigs from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` SysConfigs. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of SysConfigs. */ distinct?: SysConfigScalarFieldEnum | SysConfigScalarFieldEnum[] relationLoadStrategy?: RelationLoadStrategy } /** * SysConfig findMany */ export type SysConfigFindManyArgs = { /** * Select specific fields to fetch from the SysConfig */ select?: SysConfigSelect | null /** * Omit specific fields from the SysConfig */ omit?: SysConfigOmit | null /** * Filter, which SysConfigs to fetch. */ where?: SysConfigWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of SysConfigs to fetch. */ orderBy?: SysConfigOrderByWithRelationInput | SysConfigOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for listing SysConfigs. */ cursor?: SysConfigWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` SysConfigs from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` SysConfigs. */ skip?: number distinct?: SysConfigScalarFieldEnum | SysConfigScalarFieldEnum[] relationLoadStrategy?: RelationLoadStrategy } /** * SysConfig create */ export type SysConfigCreateArgs = { /** * Select specific fields to fetch from the SysConfig */ select?: SysConfigSelect | null /** * Omit specific fields from the SysConfig */ omit?: SysConfigOmit | null /** * The data needed to create a SysConfig. */ data?: XOR relationLoadStrategy?: RelationLoadStrategy } /** * SysConfig createMany */ export type SysConfigCreateManyArgs = { /** * The data used to create many SysConfigs. */ data: SysConfigCreateManyInput | SysConfigCreateManyInput[] skipDuplicates?: boolean } /** * SysConfig update */ export type SysConfigUpdateArgs = { /** * Select specific fields to fetch from the SysConfig */ select?: SysConfigSelect | null /** * Omit specific fields from the SysConfig */ omit?: SysConfigOmit | null /** * The data needed to update a SysConfig. */ data: XOR /** * Choose, which SysConfig to update. */ where: SysConfigWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * SysConfig updateMany */ export type SysConfigUpdateManyArgs = { /** * The data used to update SysConfigs. */ data: XOR /** * Filter which SysConfigs to update */ where?: SysConfigWhereInput } /** * SysConfig upsert */ export type SysConfigUpsertArgs = { /** * Select specific fields to fetch from the SysConfig */ select?: SysConfigSelect | null /** * Omit specific fields from the SysConfig */ omit?: SysConfigOmit | null /** * The filter to search for the SysConfig to update in case it exists. */ where: SysConfigWhereUniqueInput /** * In case the SysConfig found by the `where` argument doesn't exist, create a new SysConfig with this data. */ create: XOR /** * In case the SysConfig was found with the provided `where` argument, update it with this data. */ update: XOR relationLoadStrategy?: RelationLoadStrategy } /** * SysConfig delete */ export type SysConfigDeleteArgs = { /** * Select specific fields to fetch from the SysConfig */ select?: SysConfigSelect | null /** * Omit specific fields from the SysConfig */ omit?: SysConfigOmit | null /** * Filter which SysConfig to delete. */ where: SysConfigWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * SysConfig deleteMany */ export type SysConfigDeleteManyArgs = { /** * Filter which SysConfigs to delete */ where?: SysConfigWhereInput } /** * SysConfig without action */ export type SysConfigDefaultArgs = { /** * Select specific fields to fetch from the SysConfig */ select?: SysConfigSelect | null /** * Omit specific fields from the SysConfig */ omit?: SysConfigOmit | null } /** * Model SysDept */ export type AggregateSysDept = { _count: SysDeptCountAggregateOutputType | null _avg: SysDeptAvgAggregateOutputType | null _sum: SysDeptSumAggregateOutputType | null _min: SysDeptMinAggregateOutputType | null _max: SysDeptMaxAggregateOutputType | null } export type SysDeptAvgAggregateOutputType = { deptId: number | null parentId: number | null orderNum: number | null } export type SysDeptSumAggregateOutputType = { deptId: number | null parentId: number | null orderNum: number | null } export type SysDeptMinAggregateOutputType = { deptId: number | null parentId: number | null ancestors: string | null deptName: string | null orderNum: number | null leader: string | null phone: string | null email: string | null status: string | null createBy: string | null createTime: string | null updateBy: string | null updateTime: string | null } export type SysDeptMaxAggregateOutputType = { deptId: number | null parentId: number | null ancestors: string | null deptName: string | null orderNum: number | null leader: string | null phone: string | null email: string | null status: string | null createBy: string | null createTime: string | null updateBy: string | null updateTime: string | null } export type SysDeptCountAggregateOutputType = { deptId: number parentId: number ancestors: number deptName: number orderNum: number leader: number phone: number email: number status: number createBy: number createTime: number updateBy: number updateTime: number _all: number } export type SysDeptAvgAggregateInputType = { deptId?: true parentId?: true orderNum?: true } export type SysDeptSumAggregateInputType = { deptId?: true parentId?: true orderNum?: true } export type SysDeptMinAggregateInputType = { deptId?: true parentId?: true ancestors?: true deptName?: true orderNum?: true leader?: true phone?: true email?: true status?: true createBy?: true createTime?: true updateBy?: true updateTime?: true } export type SysDeptMaxAggregateInputType = { deptId?: true parentId?: true ancestors?: true deptName?: true orderNum?: true leader?: true phone?: true email?: true status?: true createBy?: true createTime?: true updateBy?: true updateTime?: true } export type SysDeptCountAggregateInputType = { deptId?: true parentId?: true ancestors?: true deptName?: true orderNum?: true leader?: true phone?: true email?: true status?: true createBy?: true createTime?: true updateBy?: true updateTime?: true _all?: true } export type SysDeptAggregateArgs = { /** * Filter which SysDept to aggregate. */ where?: SysDeptWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of SysDepts to fetch. */ orderBy?: SysDeptOrderByWithRelationInput | SysDeptOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the start position */ cursor?: SysDeptWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` SysDepts from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` SysDepts. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Count returned SysDepts **/ _count?: true | SysDeptCountAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to average **/ _avg?: SysDeptAvgAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to sum **/ _sum?: SysDeptSumAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the minimum value **/ _min?: SysDeptMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the maximum value **/ _max?: SysDeptMaxAggregateInputType } export type GetSysDeptAggregateType = { [P in keyof T & keyof AggregateSysDept]: P extends '_count' | 'count' ? T[P] extends true ? number : GetScalarType : GetScalarType } export type SysDeptGroupByArgs = { where?: SysDeptWhereInput orderBy?: SysDeptOrderByWithAggregationInput | SysDeptOrderByWithAggregationInput[] by: SysDeptScalarFieldEnum[] | SysDeptScalarFieldEnum having?: SysDeptScalarWhereWithAggregatesInput take?: number skip?: number _count?: SysDeptCountAggregateInputType | true _avg?: SysDeptAvgAggregateInputType _sum?: SysDeptSumAggregateInputType _min?: SysDeptMinAggregateInputType _max?: SysDeptMaxAggregateInputType } export type SysDeptGroupByOutputType = { deptId: number parentId: number | null ancestors: string | null deptName: string | null orderNum: number | null leader: string | null phone: string | null email: string | null status: string | null createBy: string | null createTime: string | null updateBy: string | null updateTime: string | null _count: SysDeptCountAggregateOutputType | null _avg: SysDeptAvgAggregateOutputType | null _sum: SysDeptSumAggregateOutputType | null _min: SysDeptMinAggregateOutputType | null _max: SysDeptMaxAggregateOutputType | null } type GetSysDeptGroupByPayload = Prisma.PrismaPromise< Array< PickEnumerable & { [P in ((keyof T) & (keyof SysDeptGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : GetScalarType : GetScalarType } > > export type SysDeptSelect = $Extensions.GetSelect<{ deptId?: boolean parentId?: boolean ancestors?: boolean deptName?: boolean orderNum?: boolean leader?: boolean phone?: boolean email?: boolean status?: boolean createBy?: boolean createTime?: boolean updateBy?: boolean updateTime?: boolean users?: boolean | SysDept$usersArgs roles?: boolean | SysDept$rolesArgs _count?: boolean | SysDeptCountOutputTypeDefaultArgs }, ExtArgs["result"]["sysDept"]> export type SysDeptSelectScalar = { deptId?: boolean parentId?: boolean ancestors?: boolean deptName?: boolean orderNum?: boolean leader?: boolean phone?: boolean email?: boolean status?: boolean createBy?: boolean createTime?: boolean updateBy?: boolean updateTime?: boolean } export type SysDeptOmit = $Extensions.GetOmit<"deptId" | "parentId" | "ancestors" | "deptName" | "orderNum" | "leader" | "phone" | "email" | "status" | "createBy" | "createTime" | "updateBy" | "updateTime", ExtArgs["result"]["sysDept"]> export type SysDeptInclude = { users?: boolean | SysDept$usersArgs roles?: boolean | SysDept$rolesArgs _count?: boolean | SysDeptCountOutputTypeDefaultArgs } export type $SysDeptPayload = { name: "SysDept" objects: { users: Prisma.$SysUserPayload[] roles: Prisma.$SysRoleDeptPayload[] } scalars: $Extensions.GetPayloadResult<{ deptId: number parentId: number | null ancestors: string | null deptName: string | null orderNum: number | null leader: string | null phone: string | null email: string | null status: string | null createBy: string | null createTime: string | null updateBy: string | null updateTime: string | null }, ExtArgs["result"]["sysDept"]> composites: {} } type SysDeptGetPayload = $Result.GetResult type SysDeptCountArgs = Omit & { select?: SysDeptCountAggregateInputType | true } export interface SysDeptDelegate { [K: symbol]: { types: Prisma.TypeMap['model']['SysDept'], meta: { name: 'SysDept' } } /** * Find zero or one SysDept that matches the filter. * @param {SysDeptFindUniqueArgs} args - Arguments to find a SysDept * @example * // Get one SysDept * const sysDept = await prisma.sysDept.findUnique({ * where: { * // ... provide filter here * } * }) **/ findUnique>( args: SelectSubset> ): Prisma__SysDeptClient<$Result.GetResult, T, 'findUnique'> | null, null, ExtArgs> /** * Find one SysDept that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. * @param {SysDeptFindUniqueOrThrowArgs} args - Arguments to find a SysDept * @example * // Get one SysDept * const sysDept = await prisma.sysDept.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) **/ findUniqueOrThrow>( args?: SelectSubset> ): Prisma__SysDeptClient<$Result.GetResult, T, 'findUniqueOrThrow'>, never, ExtArgs> /** * Find the first SysDept that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysDeptFindFirstArgs} args - Arguments to find a SysDept * @example * // Get one SysDept * const sysDept = await prisma.sysDept.findFirst({ * where: { * // ... provide filter here * } * }) **/ findFirst>( args?: SelectSubset> ): Prisma__SysDeptClient<$Result.GetResult, T, 'findFirst'> | null, null, ExtArgs> /** * Find the first SysDept that matches the filter or * throw `PrismaKnownClientError` with `P2025` code if no matches were found. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysDeptFindFirstOrThrowArgs} args - Arguments to find a SysDept * @example * // Get one SysDept * const sysDept = await prisma.sysDept.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) **/ findFirstOrThrow>( args?: SelectSubset> ): Prisma__SysDeptClient<$Result.GetResult, T, 'findFirstOrThrow'>, never, ExtArgs> /** * Find zero or more SysDepts that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysDeptFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all SysDepts * const sysDepts = await prisma.sysDept.findMany() * * // Get first 10 SysDepts * const sysDepts = await prisma.sysDept.findMany({ take: 10 }) * * // Only select the `deptId` * const sysDeptWithDeptIdOnly = await prisma.sysDept.findMany({ select: { deptId: true } }) * **/ findMany>( args?: SelectSubset> ): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'>> /** * Create a SysDept. * @param {SysDeptCreateArgs} args - Arguments to create a SysDept. * @example * // Create one SysDept * const SysDept = await prisma.sysDept.create({ * data: { * // ... data to create a SysDept * } * }) * **/ create>( args: SelectSubset> ): Prisma__SysDeptClient<$Result.GetResult, T, 'create'>, never, ExtArgs> /** * Create many SysDepts. * @param {SysDeptCreateManyArgs} args - Arguments to create many SysDepts. * @example * // Create many SysDepts * const sysDept = await prisma.sysDept.createMany({ * data: [ * // ... provide data here * ] * }) * **/ createMany>( args?: SelectSubset> ): Prisma.PrismaPromise /** * Delete a SysDept. * @param {SysDeptDeleteArgs} args - Arguments to delete one SysDept. * @example * // Delete one SysDept * const SysDept = await prisma.sysDept.delete({ * where: { * // ... filter to delete one SysDept * } * }) * **/ delete>( args: SelectSubset> ): Prisma__SysDeptClient<$Result.GetResult, T, 'delete'>, never, ExtArgs> /** * Update one SysDept. * @param {SysDeptUpdateArgs} args - Arguments to update one SysDept. * @example * // Update one SysDept * const sysDept = await prisma.sysDept.update({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * **/ update>( args: SelectSubset> ): Prisma__SysDeptClient<$Result.GetResult, T, 'update'>, never, ExtArgs> /** * Delete zero or more SysDepts. * @param {SysDeptDeleteManyArgs} args - Arguments to filter SysDepts to delete. * @example * // Delete a few SysDepts * const { count } = await prisma.sysDept.deleteMany({ * where: { * // ... provide filter here * } * }) * **/ deleteMany>( args?: SelectSubset> ): Prisma.PrismaPromise /** * Update zero or more SysDepts. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysDeptUpdateManyArgs} args - Arguments to update one or more rows. * @example * // Update many SysDepts * const sysDept = await prisma.sysDept.updateMany({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * **/ updateMany>( args: SelectSubset> ): Prisma.PrismaPromise /** * Create or update one SysDept. * @param {SysDeptUpsertArgs} args - Arguments to update or create a SysDept. * @example * // Update or create a SysDept * const sysDept = await prisma.sysDept.upsert({ * create: { * // ... data to create a SysDept * }, * update: { * // ... in case it already exists, update * }, * where: { * // ... the filter for the SysDept we want to update * } * }) **/ upsert>( args: SelectSubset> ): Prisma__SysDeptClient<$Result.GetResult, T, 'upsert'>, never, ExtArgs> /** * Count the number of SysDepts. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysDeptCountArgs} args - Arguments to filter SysDepts to count. * @example * // Count the number of SysDepts * const count = await prisma.sysDept.count({ * where: { * // ... the filter for the SysDepts we want to count * } * }) **/ count( args?: Subset, ): Prisma.PrismaPromise< T extends $Utils.Record<'select', any> ? T['select'] extends true ? number : GetScalarType : number > /** * Allows you to perform aggregations operations on a SysDept. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysDeptAggregateArgs} args - Select which aggregations you would like to apply and on what fields. * @example * // Ordered by age ascending * // Where email contains prisma.io * // Limited to the 10 users * const aggregations = await prisma.user.aggregate({ * _avg: { * age: true, * }, * where: { * email: { * contains: "prisma.io", * }, * }, * orderBy: { * age: "asc", * }, * take: 10, * }) **/ aggregate(args: Subset): Prisma.PrismaPromise> /** * Group by SysDept. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysDeptGroupByArgs} args - Group by arguments. * @example * // Group by city, order by createdAt, get count * const result = await prisma.user.groupBy({ * by: ['city', 'createdAt'], * orderBy: { * createdAt: true * }, * _count: { * _all: true * }, * }) * **/ groupBy< T extends SysDeptGroupByArgs, HasSelectOrTake extends Or< Extends<'skip', Keys>, Extends<'take', Keys> >, OrderByArg extends True extends HasSelectOrTake ? { orderBy: SysDeptGroupByArgs['orderBy'] } : { orderBy?: SysDeptGroupByArgs['orderBy'] }, OrderFields extends ExcludeUnderscoreKeys>>, ByFields extends MaybeTupleToUnion, ByValid extends Has, HavingFields extends GetHavingFields, HavingValid extends Has, ByEmpty extends T['by'] extends never[] ? True : False, InputErrors extends ByEmpty extends True ? `Error: "by" must not be empty.` : HavingValid extends False ? { [P in HavingFields]: P extends ByFields ? never : P extends string ? `Error: Field "${P}" used in "having" needs to be provided in "by".` : [ Error, 'Field ', P, ` in "having" needs to be provided in "by"`, ] }[HavingFields] : 'take' extends Keys ? 'orderBy' extends Keys ? ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] : 'Error: If you provide "take", you also need to provide "orderBy"' : 'skip' extends Keys ? 'orderBy' extends Keys ? ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] : 'Error: If you provide "skip", you also need to provide "orderBy"' : ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetSysDeptGroupByPayload : Prisma.PrismaPromise /** * Fields of the SysDept model */ readonly fields: SysDeptFieldRefs; } /** * The delegate class that acts as a "Promise-like" for SysDept. * Why is this prefixed with `Prisma__`? * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ export interface Prisma__SysDeptClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: 'PrismaPromise'; users = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'> | Null>; roles = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'> | Null>; /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of which ever callback is executed. */ then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise; /** * Attaches a callback for only the rejection of the Promise. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of the callback. */ catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise; /** * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The * resolved value cannot be modified from the callback. * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). * @returns A Promise for the completion of the callback. */ finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise; } /** * Fields of the SysDept model */ interface SysDeptFieldRefs { readonly deptId: FieldRef<"SysDept", 'Int'> readonly parentId: FieldRef<"SysDept", 'Int'> readonly ancestors: FieldRef<"SysDept", 'String'> readonly deptName: FieldRef<"SysDept", 'String'> readonly orderNum: FieldRef<"SysDept", 'Int'> readonly leader: FieldRef<"SysDept", 'String'> readonly phone: FieldRef<"SysDept", 'String'> readonly email: FieldRef<"SysDept", 'String'> readonly status: FieldRef<"SysDept", 'String'> readonly createBy: FieldRef<"SysDept", 'String'> readonly createTime: FieldRef<"SysDept", 'String'> readonly updateBy: FieldRef<"SysDept", 'String'> readonly updateTime: FieldRef<"SysDept", 'String'> } // Custom InputTypes /** * SysDept findUnique */ export type SysDeptFindUniqueArgs = { /** * Select specific fields to fetch from the SysDept */ select?: SysDeptSelect | null /** * Omit specific fields from the SysDept */ omit?: SysDeptOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysDeptInclude | null /** * Filter, which SysDept to fetch. */ where: SysDeptWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * SysDept findUniqueOrThrow */ export type SysDeptFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the SysDept */ select?: SysDeptSelect | null /** * Omit specific fields from the SysDept */ omit?: SysDeptOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysDeptInclude | null /** * Filter, which SysDept to fetch. */ where: SysDeptWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * SysDept findFirst */ export type SysDeptFindFirstArgs = { /** * Select specific fields to fetch from the SysDept */ select?: SysDeptSelect | null /** * Omit specific fields from the SysDept */ omit?: SysDeptOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysDeptInclude | null /** * Filter, which SysDept to fetch. */ where?: SysDeptWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of SysDepts to fetch. */ orderBy?: SysDeptOrderByWithRelationInput | SysDeptOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for SysDepts. */ cursor?: SysDeptWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` SysDepts from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` SysDepts. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of SysDepts. */ distinct?: SysDeptScalarFieldEnum | SysDeptScalarFieldEnum[] relationLoadStrategy?: RelationLoadStrategy } /** * SysDept findFirstOrThrow */ export type SysDeptFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the SysDept */ select?: SysDeptSelect | null /** * Omit specific fields from the SysDept */ omit?: SysDeptOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysDeptInclude | null /** * Filter, which SysDept to fetch. */ where?: SysDeptWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of SysDepts to fetch. */ orderBy?: SysDeptOrderByWithRelationInput | SysDeptOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for SysDepts. */ cursor?: SysDeptWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` SysDepts from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` SysDepts. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of SysDepts. */ distinct?: SysDeptScalarFieldEnum | SysDeptScalarFieldEnum[] relationLoadStrategy?: RelationLoadStrategy } /** * SysDept findMany */ export type SysDeptFindManyArgs = { /** * Select specific fields to fetch from the SysDept */ select?: SysDeptSelect | null /** * Omit specific fields from the SysDept */ omit?: SysDeptOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysDeptInclude | null /** * Filter, which SysDepts to fetch. */ where?: SysDeptWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of SysDepts to fetch. */ orderBy?: SysDeptOrderByWithRelationInput | SysDeptOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for listing SysDepts. */ cursor?: SysDeptWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` SysDepts from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` SysDepts. */ skip?: number distinct?: SysDeptScalarFieldEnum | SysDeptScalarFieldEnum[] relationLoadStrategy?: RelationLoadStrategy } /** * SysDept create */ export type SysDeptCreateArgs = { /** * Select specific fields to fetch from the SysDept */ select?: SysDeptSelect | null /** * Omit specific fields from the SysDept */ omit?: SysDeptOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysDeptInclude | null /** * The data needed to create a SysDept. */ data?: XOR relationLoadStrategy?: RelationLoadStrategy } /** * SysDept createMany */ export type SysDeptCreateManyArgs = { /** * The data used to create many SysDepts. */ data: SysDeptCreateManyInput | SysDeptCreateManyInput[] skipDuplicates?: boolean } /** * SysDept update */ export type SysDeptUpdateArgs = { /** * Select specific fields to fetch from the SysDept */ select?: SysDeptSelect | null /** * Omit specific fields from the SysDept */ omit?: SysDeptOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysDeptInclude | null /** * The data needed to update a SysDept. */ data: XOR /** * Choose, which SysDept to update. */ where: SysDeptWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * SysDept updateMany */ export type SysDeptUpdateManyArgs = { /** * The data used to update SysDepts. */ data: XOR /** * Filter which SysDepts to update */ where?: SysDeptWhereInput } /** * SysDept upsert */ export type SysDeptUpsertArgs = { /** * Select specific fields to fetch from the SysDept */ select?: SysDeptSelect | null /** * Omit specific fields from the SysDept */ omit?: SysDeptOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysDeptInclude | null /** * The filter to search for the SysDept to update in case it exists. */ where: SysDeptWhereUniqueInput /** * In case the SysDept found by the `where` argument doesn't exist, create a new SysDept with this data. */ create: XOR /** * In case the SysDept was found with the provided `where` argument, update it with this data. */ update: XOR relationLoadStrategy?: RelationLoadStrategy } /** * SysDept delete */ export type SysDeptDeleteArgs = { /** * Select specific fields to fetch from the SysDept */ select?: SysDeptSelect | null /** * Omit specific fields from the SysDept */ omit?: SysDeptOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysDeptInclude | null /** * Filter which SysDept to delete. */ where: SysDeptWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * SysDept deleteMany */ export type SysDeptDeleteManyArgs = { /** * Filter which SysDepts to delete */ where?: SysDeptWhereInput } /** * SysDept.users */ export type SysDept$usersArgs = { /** * Select specific fields to fetch from the SysUser */ select?: SysUserSelect | null /** * Omit specific fields from the SysUser */ omit?: SysUserOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysUserInclude | null where?: SysUserWhereInput orderBy?: SysUserOrderByWithRelationInput | SysUserOrderByWithRelationInput[] cursor?: SysUserWhereUniqueInput take?: number skip?: number distinct?: SysUserScalarFieldEnum | SysUserScalarFieldEnum[] } /** * SysDept.roles */ export type SysDept$rolesArgs = { /** * Select specific fields to fetch from the SysRoleDept */ select?: SysRoleDeptSelect | null /** * Omit specific fields from the SysRoleDept */ omit?: SysRoleDeptOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysRoleDeptInclude | null where?: SysRoleDeptWhereInput orderBy?: SysRoleDeptOrderByWithRelationInput | SysRoleDeptOrderByWithRelationInput[] cursor?: SysRoleDeptWhereUniqueInput take?: number skip?: number distinct?: SysRoleDeptScalarFieldEnum | SysRoleDeptScalarFieldEnum[] } /** * SysDept without action */ export type SysDeptDefaultArgs = { /** * Select specific fields to fetch from the SysDept */ select?: SysDeptSelect | null /** * Omit specific fields from the SysDept */ omit?: SysDeptOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysDeptInclude | null } /** * Model SysDictData */ export type AggregateSysDictData = { _count: SysDictDataCountAggregateOutputType | null _avg: SysDictDataAvgAggregateOutputType | null _sum: SysDictDataSumAggregateOutputType | null _min: SysDictDataMinAggregateOutputType | null _max: SysDictDataMaxAggregateOutputType | null } export type SysDictDataAvgAggregateOutputType = { dictCode: number | null dictSort: number | null } export type SysDictDataSumAggregateOutputType = { dictCode: number | null dictSort: number | null } export type SysDictDataMinAggregateOutputType = { dictCode: number | null dictSort: number | null dictLabel: string | null dictValue: string | null dictType: string | null cssClass: string | null listClass: string | null isDefault: string | null status: string | null createBy: string | null createTime: string | null updateBy: string | null updateTime: string | null remark: string | null } export type SysDictDataMaxAggregateOutputType = { dictCode: number | null dictSort: number | null dictLabel: string | null dictValue: string | null dictType: string | null cssClass: string | null listClass: string | null isDefault: string | null status: string | null createBy: string | null createTime: string | null updateBy: string | null updateTime: string | null remark: string | null } export type SysDictDataCountAggregateOutputType = { dictCode: number dictSort: number dictLabel: number dictValue: number dictType: number cssClass: number listClass: number isDefault: number status: number createBy: number createTime: number updateBy: number updateTime: number remark: number _all: number } export type SysDictDataAvgAggregateInputType = { dictCode?: true dictSort?: true } export type SysDictDataSumAggregateInputType = { dictCode?: true dictSort?: true } export type SysDictDataMinAggregateInputType = { dictCode?: true dictSort?: true dictLabel?: true dictValue?: true dictType?: true cssClass?: true listClass?: true isDefault?: true status?: true createBy?: true createTime?: true updateBy?: true updateTime?: true remark?: true } export type SysDictDataMaxAggregateInputType = { dictCode?: true dictSort?: true dictLabel?: true dictValue?: true dictType?: true cssClass?: true listClass?: true isDefault?: true status?: true createBy?: true createTime?: true updateBy?: true updateTime?: true remark?: true } export type SysDictDataCountAggregateInputType = { dictCode?: true dictSort?: true dictLabel?: true dictValue?: true dictType?: true cssClass?: true listClass?: true isDefault?: true status?: true createBy?: true createTime?: true updateBy?: true updateTime?: true remark?: true _all?: true } export type SysDictDataAggregateArgs = { /** * Filter which SysDictData to aggregate. */ where?: SysDictDataWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of SysDictData to fetch. */ orderBy?: SysDictDataOrderByWithRelationInput | SysDictDataOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the start position */ cursor?: SysDictDataWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` SysDictData from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` SysDictData. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Count returned SysDictData **/ _count?: true | SysDictDataCountAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to average **/ _avg?: SysDictDataAvgAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to sum **/ _sum?: SysDictDataSumAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the minimum value **/ _min?: SysDictDataMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the maximum value **/ _max?: SysDictDataMaxAggregateInputType } export type GetSysDictDataAggregateType = { [P in keyof T & keyof AggregateSysDictData]: P extends '_count' | 'count' ? T[P] extends true ? number : GetScalarType : GetScalarType } export type SysDictDataGroupByArgs = { where?: SysDictDataWhereInput orderBy?: SysDictDataOrderByWithAggregationInput | SysDictDataOrderByWithAggregationInput[] by: SysDictDataScalarFieldEnum[] | SysDictDataScalarFieldEnum having?: SysDictDataScalarWhereWithAggregatesInput take?: number skip?: number _count?: SysDictDataCountAggregateInputType | true _avg?: SysDictDataAvgAggregateInputType _sum?: SysDictDataSumAggregateInputType _min?: SysDictDataMinAggregateInputType _max?: SysDictDataMaxAggregateInputType } export type SysDictDataGroupByOutputType = { dictCode: number dictSort: number | null dictLabel: string | null dictValue: string | null dictType: string | null cssClass: string | null listClass: string | null isDefault: string | null status: string | null createBy: string | null createTime: string | null updateBy: string | null updateTime: string | null remark: string | null _count: SysDictDataCountAggregateOutputType | null _avg: SysDictDataAvgAggregateOutputType | null _sum: SysDictDataSumAggregateOutputType | null _min: SysDictDataMinAggregateOutputType | null _max: SysDictDataMaxAggregateOutputType | null } type GetSysDictDataGroupByPayload = Prisma.PrismaPromise< Array< PickEnumerable & { [P in ((keyof T) & (keyof SysDictDataGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : GetScalarType : GetScalarType } > > export type SysDictDataSelect = $Extensions.GetSelect<{ dictCode?: boolean dictSort?: boolean dictLabel?: boolean dictValue?: boolean dictType?: boolean cssClass?: boolean listClass?: boolean isDefault?: boolean status?: boolean createBy?: boolean createTime?: boolean updateBy?: boolean updateTime?: boolean remark?: boolean sysDictType?: boolean | SysDictData$sysDictTypeArgs }, ExtArgs["result"]["sysDictData"]> export type SysDictDataSelectScalar = { dictCode?: boolean dictSort?: boolean dictLabel?: boolean dictValue?: boolean dictType?: boolean cssClass?: boolean listClass?: boolean isDefault?: boolean status?: boolean createBy?: boolean createTime?: boolean updateBy?: boolean updateTime?: boolean remark?: boolean } export type SysDictDataOmit = $Extensions.GetOmit<"dictCode" | "dictSort" | "dictLabel" | "dictValue" | "dictType" | "cssClass" | "listClass" | "isDefault" | "status" | "createBy" | "createTime" | "updateBy" | "updateTime" | "remark", ExtArgs["result"]["sysDictData"]> export type SysDictDataInclude = { sysDictType?: boolean | SysDictData$sysDictTypeArgs } export type $SysDictDataPayload = { name: "SysDictData" objects: { sysDictType: Prisma.$SysDictTypePayload | null } scalars: $Extensions.GetPayloadResult<{ dictCode: number dictSort: number | null dictLabel: string | null dictValue: string | null dictType: string | null cssClass: string | null listClass: string | null isDefault: string | null status: string | null createBy: string | null createTime: string | null updateBy: string | null updateTime: string | null remark: string | null }, ExtArgs["result"]["sysDictData"]> composites: {} } type SysDictDataGetPayload = $Result.GetResult type SysDictDataCountArgs = Omit & { select?: SysDictDataCountAggregateInputType | true } export interface SysDictDataDelegate { [K: symbol]: { types: Prisma.TypeMap['model']['SysDictData'], meta: { name: 'SysDictData' } } /** * Find zero or one SysDictData that matches the filter. * @param {SysDictDataFindUniqueArgs} args - Arguments to find a SysDictData * @example * // Get one SysDictData * const sysDictData = await prisma.sysDictData.findUnique({ * where: { * // ... provide filter here * } * }) **/ findUnique>( args: SelectSubset> ): Prisma__SysDictDataClient<$Result.GetResult, T, 'findUnique'> | null, null, ExtArgs> /** * Find one SysDictData that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. * @param {SysDictDataFindUniqueOrThrowArgs} args - Arguments to find a SysDictData * @example * // Get one SysDictData * const sysDictData = await prisma.sysDictData.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) **/ findUniqueOrThrow>( args?: SelectSubset> ): Prisma__SysDictDataClient<$Result.GetResult, T, 'findUniqueOrThrow'>, never, ExtArgs> /** * Find the first SysDictData that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysDictDataFindFirstArgs} args - Arguments to find a SysDictData * @example * // Get one SysDictData * const sysDictData = await prisma.sysDictData.findFirst({ * where: { * // ... provide filter here * } * }) **/ findFirst>( args?: SelectSubset> ): Prisma__SysDictDataClient<$Result.GetResult, T, 'findFirst'> | null, null, ExtArgs> /** * Find the first SysDictData that matches the filter or * throw `PrismaKnownClientError` with `P2025` code if no matches were found. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysDictDataFindFirstOrThrowArgs} args - Arguments to find a SysDictData * @example * // Get one SysDictData * const sysDictData = await prisma.sysDictData.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) **/ findFirstOrThrow>( args?: SelectSubset> ): Prisma__SysDictDataClient<$Result.GetResult, T, 'findFirstOrThrow'>, never, ExtArgs> /** * Find zero or more SysDictData that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysDictDataFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all SysDictData * const sysDictData = await prisma.sysDictData.findMany() * * // Get first 10 SysDictData * const sysDictData = await prisma.sysDictData.findMany({ take: 10 }) * * // Only select the `dictCode` * const sysDictDataWithDictCodeOnly = await prisma.sysDictData.findMany({ select: { dictCode: true } }) * **/ findMany>( args?: SelectSubset> ): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'>> /** * Create a SysDictData. * @param {SysDictDataCreateArgs} args - Arguments to create a SysDictData. * @example * // Create one SysDictData * const SysDictData = await prisma.sysDictData.create({ * data: { * // ... data to create a SysDictData * } * }) * **/ create>( args: SelectSubset> ): Prisma__SysDictDataClient<$Result.GetResult, T, 'create'>, never, ExtArgs> /** * Create many SysDictData. * @param {SysDictDataCreateManyArgs} args - Arguments to create many SysDictData. * @example * // Create many SysDictData * const sysDictData = await prisma.sysDictData.createMany({ * data: [ * // ... provide data here * ] * }) * **/ createMany>( args?: SelectSubset> ): Prisma.PrismaPromise /** * Delete a SysDictData. * @param {SysDictDataDeleteArgs} args - Arguments to delete one SysDictData. * @example * // Delete one SysDictData * const SysDictData = await prisma.sysDictData.delete({ * where: { * // ... filter to delete one SysDictData * } * }) * **/ delete>( args: SelectSubset> ): Prisma__SysDictDataClient<$Result.GetResult, T, 'delete'>, never, ExtArgs> /** * Update one SysDictData. * @param {SysDictDataUpdateArgs} args - Arguments to update one SysDictData. * @example * // Update one SysDictData * const sysDictData = await prisma.sysDictData.update({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * **/ update>( args: SelectSubset> ): Prisma__SysDictDataClient<$Result.GetResult, T, 'update'>, never, ExtArgs> /** * Delete zero or more SysDictData. * @param {SysDictDataDeleteManyArgs} args - Arguments to filter SysDictData to delete. * @example * // Delete a few SysDictData * const { count } = await prisma.sysDictData.deleteMany({ * where: { * // ... provide filter here * } * }) * **/ deleteMany>( args?: SelectSubset> ): Prisma.PrismaPromise /** * Update zero or more SysDictData. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysDictDataUpdateManyArgs} args - Arguments to update one or more rows. * @example * // Update many SysDictData * const sysDictData = await prisma.sysDictData.updateMany({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * **/ updateMany>( args: SelectSubset> ): Prisma.PrismaPromise /** * Create or update one SysDictData. * @param {SysDictDataUpsertArgs} args - Arguments to update or create a SysDictData. * @example * // Update or create a SysDictData * const sysDictData = await prisma.sysDictData.upsert({ * create: { * // ... data to create a SysDictData * }, * update: { * // ... in case it already exists, update * }, * where: { * // ... the filter for the SysDictData we want to update * } * }) **/ upsert>( args: SelectSubset> ): Prisma__SysDictDataClient<$Result.GetResult, T, 'upsert'>, never, ExtArgs> /** * Count the number of SysDictData. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysDictDataCountArgs} args - Arguments to filter SysDictData to count. * @example * // Count the number of SysDictData * const count = await prisma.sysDictData.count({ * where: { * // ... the filter for the SysDictData we want to count * } * }) **/ count( args?: Subset, ): Prisma.PrismaPromise< T extends $Utils.Record<'select', any> ? T['select'] extends true ? number : GetScalarType : number > /** * Allows you to perform aggregations operations on a SysDictData. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysDictDataAggregateArgs} args - Select which aggregations you would like to apply and on what fields. * @example * // Ordered by age ascending * // Where email contains prisma.io * // Limited to the 10 users * const aggregations = await prisma.user.aggregate({ * _avg: { * age: true, * }, * where: { * email: { * contains: "prisma.io", * }, * }, * orderBy: { * age: "asc", * }, * take: 10, * }) **/ aggregate(args: Subset): Prisma.PrismaPromise> /** * Group by SysDictData. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysDictDataGroupByArgs} args - Group by arguments. * @example * // Group by city, order by createdAt, get count * const result = await prisma.user.groupBy({ * by: ['city', 'createdAt'], * orderBy: { * createdAt: true * }, * _count: { * _all: true * }, * }) * **/ groupBy< T extends SysDictDataGroupByArgs, HasSelectOrTake extends Or< Extends<'skip', Keys>, Extends<'take', Keys> >, OrderByArg extends True extends HasSelectOrTake ? { orderBy: SysDictDataGroupByArgs['orderBy'] } : { orderBy?: SysDictDataGroupByArgs['orderBy'] }, OrderFields extends ExcludeUnderscoreKeys>>, ByFields extends MaybeTupleToUnion, ByValid extends Has, HavingFields extends GetHavingFields, HavingValid extends Has, ByEmpty extends T['by'] extends never[] ? True : False, InputErrors extends ByEmpty extends True ? `Error: "by" must not be empty.` : HavingValid extends False ? { [P in HavingFields]: P extends ByFields ? never : P extends string ? `Error: Field "${P}" used in "having" needs to be provided in "by".` : [ Error, 'Field ', P, ` in "having" needs to be provided in "by"`, ] }[HavingFields] : 'take' extends Keys ? 'orderBy' extends Keys ? ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] : 'Error: If you provide "take", you also need to provide "orderBy"' : 'skip' extends Keys ? 'orderBy' extends Keys ? ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] : 'Error: If you provide "skip", you also need to provide "orderBy"' : ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetSysDictDataGroupByPayload : Prisma.PrismaPromise /** * Fields of the SysDictData model */ readonly fields: SysDictDataFieldRefs; } /** * The delegate class that acts as a "Promise-like" for SysDictData. * Why is this prefixed with `Prisma__`? * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ export interface Prisma__SysDictDataClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: 'PrismaPromise'; sysDictType = {}>(args?: Subset>): Prisma__SysDictTypeClient<$Result.GetResult, T, 'findUniqueOrThrow'> | null, null, ExtArgs>; /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of which ever callback is executed. */ then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise; /** * Attaches a callback for only the rejection of the Promise. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of the callback. */ catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise; /** * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The * resolved value cannot be modified from the callback. * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). * @returns A Promise for the completion of the callback. */ finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise; } /** * Fields of the SysDictData model */ interface SysDictDataFieldRefs { readonly dictCode: FieldRef<"SysDictData", 'Int'> readonly dictSort: FieldRef<"SysDictData", 'Int'> readonly dictLabel: FieldRef<"SysDictData", 'String'> readonly dictValue: FieldRef<"SysDictData", 'String'> readonly dictType: FieldRef<"SysDictData", 'String'> readonly cssClass: FieldRef<"SysDictData", 'String'> readonly listClass: FieldRef<"SysDictData", 'String'> readonly isDefault: FieldRef<"SysDictData", 'String'> readonly status: FieldRef<"SysDictData", 'String'> readonly createBy: FieldRef<"SysDictData", 'String'> readonly createTime: FieldRef<"SysDictData", 'String'> readonly updateBy: FieldRef<"SysDictData", 'String'> readonly updateTime: FieldRef<"SysDictData", 'String'> readonly remark: FieldRef<"SysDictData", 'String'> } // Custom InputTypes /** * SysDictData findUnique */ export type SysDictDataFindUniqueArgs = { /** * Select specific fields to fetch from the SysDictData */ select?: SysDictDataSelect | null /** * Omit specific fields from the SysDictData */ omit?: SysDictDataOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysDictDataInclude | null /** * Filter, which SysDictData to fetch. */ where: SysDictDataWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * SysDictData findUniqueOrThrow */ export type SysDictDataFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the SysDictData */ select?: SysDictDataSelect | null /** * Omit specific fields from the SysDictData */ omit?: SysDictDataOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysDictDataInclude | null /** * Filter, which SysDictData to fetch. */ where: SysDictDataWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * SysDictData findFirst */ export type SysDictDataFindFirstArgs = { /** * Select specific fields to fetch from the SysDictData */ select?: SysDictDataSelect | null /** * Omit specific fields from the SysDictData */ omit?: SysDictDataOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysDictDataInclude | null /** * Filter, which SysDictData to fetch. */ where?: SysDictDataWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of SysDictData to fetch. */ orderBy?: SysDictDataOrderByWithRelationInput | SysDictDataOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for SysDictData. */ cursor?: SysDictDataWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` SysDictData from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` SysDictData. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of SysDictData. */ distinct?: SysDictDataScalarFieldEnum | SysDictDataScalarFieldEnum[] relationLoadStrategy?: RelationLoadStrategy } /** * SysDictData findFirstOrThrow */ export type SysDictDataFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the SysDictData */ select?: SysDictDataSelect | null /** * Omit specific fields from the SysDictData */ omit?: SysDictDataOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysDictDataInclude | null /** * Filter, which SysDictData to fetch. */ where?: SysDictDataWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of SysDictData to fetch. */ orderBy?: SysDictDataOrderByWithRelationInput | SysDictDataOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for SysDictData. */ cursor?: SysDictDataWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` SysDictData from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` SysDictData. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of SysDictData. */ distinct?: SysDictDataScalarFieldEnum | SysDictDataScalarFieldEnum[] relationLoadStrategy?: RelationLoadStrategy } /** * SysDictData findMany */ export type SysDictDataFindManyArgs = { /** * Select specific fields to fetch from the SysDictData */ select?: SysDictDataSelect | null /** * Omit specific fields from the SysDictData */ omit?: SysDictDataOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysDictDataInclude | null /** * Filter, which SysDictData to fetch. */ where?: SysDictDataWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of SysDictData to fetch. */ orderBy?: SysDictDataOrderByWithRelationInput | SysDictDataOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for listing SysDictData. */ cursor?: SysDictDataWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` SysDictData from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` SysDictData. */ skip?: number distinct?: SysDictDataScalarFieldEnum | SysDictDataScalarFieldEnum[] relationLoadStrategy?: RelationLoadStrategy } /** * SysDictData create */ export type SysDictDataCreateArgs = { /** * Select specific fields to fetch from the SysDictData */ select?: SysDictDataSelect | null /** * Omit specific fields from the SysDictData */ omit?: SysDictDataOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysDictDataInclude | null /** * The data needed to create a SysDictData. */ data?: XOR relationLoadStrategy?: RelationLoadStrategy } /** * SysDictData createMany */ export type SysDictDataCreateManyArgs = { /** * The data used to create many SysDictData. */ data: SysDictDataCreateManyInput | SysDictDataCreateManyInput[] skipDuplicates?: boolean } /** * SysDictData update */ export type SysDictDataUpdateArgs = { /** * Select specific fields to fetch from the SysDictData */ select?: SysDictDataSelect | null /** * Omit specific fields from the SysDictData */ omit?: SysDictDataOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysDictDataInclude | null /** * The data needed to update a SysDictData. */ data: XOR /** * Choose, which SysDictData to update. */ where: SysDictDataWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * SysDictData updateMany */ export type SysDictDataUpdateManyArgs = { /** * The data used to update SysDictData. */ data: XOR /** * Filter which SysDictData to update */ where?: SysDictDataWhereInput } /** * SysDictData upsert */ export type SysDictDataUpsertArgs = { /** * Select specific fields to fetch from the SysDictData */ select?: SysDictDataSelect | null /** * Omit specific fields from the SysDictData */ omit?: SysDictDataOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysDictDataInclude | null /** * The filter to search for the SysDictData to update in case it exists. */ where: SysDictDataWhereUniqueInput /** * In case the SysDictData found by the `where` argument doesn't exist, create a new SysDictData with this data. */ create: XOR /** * In case the SysDictData was found with the provided `where` argument, update it with this data. */ update: XOR relationLoadStrategy?: RelationLoadStrategy } /** * SysDictData delete */ export type SysDictDataDeleteArgs = { /** * Select specific fields to fetch from the SysDictData */ select?: SysDictDataSelect | null /** * Omit specific fields from the SysDictData */ omit?: SysDictDataOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysDictDataInclude | null /** * Filter which SysDictData to delete. */ where: SysDictDataWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * SysDictData deleteMany */ export type SysDictDataDeleteManyArgs = { /** * Filter which SysDictData to delete */ where?: SysDictDataWhereInput } /** * SysDictData.sysDictType */ export type SysDictData$sysDictTypeArgs = { /** * Select specific fields to fetch from the SysDictType */ select?: SysDictTypeSelect | null /** * Omit specific fields from the SysDictType */ omit?: SysDictTypeOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysDictTypeInclude | null where?: SysDictTypeWhereInput } /** * SysDictData without action */ export type SysDictDataDefaultArgs = { /** * Select specific fields to fetch from the SysDictData */ select?: SysDictDataSelect | null /** * Omit specific fields from the SysDictData */ omit?: SysDictDataOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysDictDataInclude | null } /** * Model SysDictType */ export type AggregateSysDictType = { _count: SysDictTypeCountAggregateOutputType | null _avg: SysDictTypeAvgAggregateOutputType | null _sum: SysDictTypeSumAggregateOutputType | null _min: SysDictTypeMinAggregateOutputType | null _max: SysDictTypeMaxAggregateOutputType | null } export type SysDictTypeAvgAggregateOutputType = { dictId: number | null } export type SysDictTypeSumAggregateOutputType = { dictId: number | null } export type SysDictTypeMinAggregateOutputType = { dictId: number | null dictName: string | null dictType: string | null status: string | null createBy: string | null createTime: string | null updateBy: string | null updateTime: string | null remark: string | null } export type SysDictTypeMaxAggregateOutputType = { dictId: number | null dictName: string | null dictType: string | null status: string | null createBy: string | null createTime: string | null updateBy: string | null updateTime: string | null remark: string | null } export type SysDictTypeCountAggregateOutputType = { dictId: number dictName: number dictType: number status: number createBy: number createTime: number updateBy: number updateTime: number remark: number _all: number } export type SysDictTypeAvgAggregateInputType = { dictId?: true } export type SysDictTypeSumAggregateInputType = { dictId?: true } export type SysDictTypeMinAggregateInputType = { dictId?: true dictName?: true dictType?: true status?: true createBy?: true createTime?: true updateBy?: true updateTime?: true remark?: true } export type SysDictTypeMaxAggregateInputType = { dictId?: true dictName?: true dictType?: true status?: true createBy?: true createTime?: true updateBy?: true updateTime?: true remark?: true } export type SysDictTypeCountAggregateInputType = { dictId?: true dictName?: true dictType?: true status?: true createBy?: true createTime?: true updateBy?: true updateTime?: true remark?: true _all?: true } export type SysDictTypeAggregateArgs = { /** * Filter which SysDictType to aggregate. */ where?: SysDictTypeWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of SysDictTypes to fetch. */ orderBy?: SysDictTypeOrderByWithRelationInput | SysDictTypeOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the start position */ cursor?: SysDictTypeWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` SysDictTypes from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` SysDictTypes. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Count returned SysDictTypes **/ _count?: true | SysDictTypeCountAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to average **/ _avg?: SysDictTypeAvgAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to sum **/ _sum?: SysDictTypeSumAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the minimum value **/ _min?: SysDictTypeMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the maximum value **/ _max?: SysDictTypeMaxAggregateInputType } export type GetSysDictTypeAggregateType = { [P in keyof T & keyof AggregateSysDictType]: P extends '_count' | 'count' ? T[P] extends true ? number : GetScalarType : GetScalarType } export type SysDictTypeGroupByArgs = { where?: SysDictTypeWhereInput orderBy?: SysDictTypeOrderByWithAggregationInput | SysDictTypeOrderByWithAggregationInput[] by: SysDictTypeScalarFieldEnum[] | SysDictTypeScalarFieldEnum having?: SysDictTypeScalarWhereWithAggregatesInput take?: number skip?: number _count?: SysDictTypeCountAggregateInputType | true _avg?: SysDictTypeAvgAggregateInputType _sum?: SysDictTypeSumAggregateInputType _min?: SysDictTypeMinAggregateInputType _max?: SysDictTypeMaxAggregateInputType } export type SysDictTypeGroupByOutputType = { dictId: number dictName: string | null dictType: string | null status: string | null createBy: string | null createTime: string | null updateBy: string | null updateTime: string | null remark: string | null _count: SysDictTypeCountAggregateOutputType | null _avg: SysDictTypeAvgAggregateOutputType | null _sum: SysDictTypeSumAggregateOutputType | null _min: SysDictTypeMinAggregateOutputType | null _max: SysDictTypeMaxAggregateOutputType | null } type GetSysDictTypeGroupByPayload = Prisma.PrismaPromise< Array< PickEnumerable & { [P in ((keyof T) & (keyof SysDictTypeGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : GetScalarType : GetScalarType } > > export type SysDictTypeSelect = $Extensions.GetSelect<{ dictId?: boolean dictName?: boolean dictType?: boolean status?: boolean createBy?: boolean createTime?: boolean updateBy?: boolean updateTime?: boolean remark?: boolean dictDatas?: boolean | SysDictType$dictDatasArgs _count?: boolean | SysDictTypeCountOutputTypeDefaultArgs }, ExtArgs["result"]["sysDictType"]> export type SysDictTypeSelectScalar = { dictId?: boolean dictName?: boolean dictType?: boolean status?: boolean createBy?: boolean createTime?: boolean updateBy?: boolean updateTime?: boolean remark?: boolean } export type SysDictTypeOmit = $Extensions.GetOmit<"dictId" | "dictName" | "dictType" | "status" | "createBy" | "createTime" | "updateBy" | "updateTime" | "remark", ExtArgs["result"]["sysDictType"]> export type SysDictTypeInclude = { dictDatas?: boolean | SysDictType$dictDatasArgs _count?: boolean | SysDictTypeCountOutputTypeDefaultArgs } export type $SysDictTypePayload = { name: "SysDictType" objects: { dictDatas: Prisma.$SysDictDataPayload[] } scalars: $Extensions.GetPayloadResult<{ dictId: number dictName: string | null dictType: string | null status: string | null createBy: string | null createTime: string | null updateBy: string | null updateTime: string | null remark: string | null }, ExtArgs["result"]["sysDictType"]> composites: {} } type SysDictTypeGetPayload = $Result.GetResult type SysDictTypeCountArgs = Omit & { select?: SysDictTypeCountAggregateInputType | true } export interface SysDictTypeDelegate { [K: symbol]: { types: Prisma.TypeMap['model']['SysDictType'], meta: { name: 'SysDictType' } } /** * Find zero or one SysDictType that matches the filter. * @param {SysDictTypeFindUniqueArgs} args - Arguments to find a SysDictType * @example * // Get one SysDictType * const sysDictType = await prisma.sysDictType.findUnique({ * where: { * // ... provide filter here * } * }) **/ findUnique>( args: SelectSubset> ): Prisma__SysDictTypeClient<$Result.GetResult, T, 'findUnique'> | null, null, ExtArgs> /** * Find one SysDictType that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. * @param {SysDictTypeFindUniqueOrThrowArgs} args - Arguments to find a SysDictType * @example * // Get one SysDictType * const sysDictType = await prisma.sysDictType.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) **/ findUniqueOrThrow>( args?: SelectSubset> ): Prisma__SysDictTypeClient<$Result.GetResult, T, 'findUniqueOrThrow'>, never, ExtArgs> /** * Find the first SysDictType that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysDictTypeFindFirstArgs} args - Arguments to find a SysDictType * @example * // Get one SysDictType * const sysDictType = await prisma.sysDictType.findFirst({ * where: { * // ... provide filter here * } * }) **/ findFirst>( args?: SelectSubset> ): Prisma__SysDictTypeClient<$Result.GetResult, T, 'findFirst'> | null, null, ExtArgs> /** * Find the first SysDictType that matches the filter or * throw `PrismaKnownClientError` with `P2025` code if no matches were found. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysDictTypeFindFirstOrThrowArgs} args - Arguments to find a SysDictType * @example * // Get one SysDictType * const sysDictType = await prisma.sysDictType.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) **/ findFirstOrThrow>( args?: SelectSubset> ): Prisma__SysDictTypeClient<$Result.GetResult, T, 'findFirstOrThrow'>, never, ExtArgs> /** * Find zero or more SysDictTypes that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysDictTypeFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all SysDictTypes * const sysDictTypes = await prisma.sysDictType.findMany() * * // Get first 10 SysDictTypes * const sysDictTypes = await prisma.sysDictType.findMany({ take: 10 }) * * // Only select the `dictId` * const sysDictTypeWithDictIdOnly = await prisma.sysDictType.findMany({ select: { dictId: true } }) * **/ findMany>( args?: SelectSubset> ): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'>> /** * Create a SysDictType. * @param {SysDictTypeCreateArgs} args - Arguments to create a SysDictType. * @example * // Create one SysDictType * const SysDictType = await prisma.sysDictType.create({ * data: { * // ... data to create a SysDictType * } * }) * **/ create>( args: SelectSubset> ): Prisma__SysDictTypeClient<$Result.GetResult, T, 'create'>, never, ExtArgs> /** * Create many SysDictTypes. * @param {SysDictTypeCreateManyArgs} args - Arguments to create many SysDictTypes. * @example * // Create many SysDictTypes * const sysDictType = await prisma.sysDictType.createMany({ * data: [ * // ... provide data here * ] * }) * **/ createMany>( args?: SelectSubset> ): Prisma.PrismaPromise /** * Delete a SysDictType. * @param {SysDictTypeDeleteArgs} args - Arguments to delete one SysDictType. * @example * // Delete one SysDictType * const SysDictType = await prisma.sysDictType.delete({ * where: { * // ... filter to delete one SysDictType * } * }) * **/ delete>( args: SelectSubset> ): Prisma__SysDictTypeClient<$Result.GetResult, T, 'delete'>, never, ExtArgs> /** * Update one SysDictType. * @param {SysDictTypeUpdateArgs} args - Arguments to update one SysDictType. * @example * // Update one SysDictType * const sysDictType = await prisma.sysDictType.update({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * **/ update>( args: SelectSubset> ): Prisma__SysDictTypeClient<$Result.GetResult, T, 'update'>, never, ExtArgs> /** * Delete zero or more SysDictTypes. * @param {SysDictTypeDeleteManyArgs} args - Arguments to filter SysDictTypes to delete. * @example * // Delete a few SysDictTypes * const { count } = await prisma.sysDictType.deleteMany({ * where: { * // ... provide filter here * } * }) * **/ deleteMany>( args?: SelectSubset> ): Prisma.PrismaPromise /** * Update zero or more SysDictTypes. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysDictTypeUpdateManyArgs} args - Arguments to update one or more rows. * @example * // Update many SysDictTypes * const sysDictType = await prisma.sysDictType.updateMany({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * **/ updateMany>( args: SelectSubset> ): Prisma.PrismaPromise /** * Create or update one SysDictType. * @param {SysDictTypeUpsertArgs} args - Arguments to update or create a SysDictType. * @example * // Update or create a SysDictType * const sysDictType = await prisma.sysDictType.upsert({ * create: { * // ... data to create a SysDictType * }, * update: { * // ... in case it already exists, update * }, * where: { * // ... the filter for the SysDictType we want to update * } * }) **/ upsert>( args: SelectSubset> ): Prisma__SysDictTypeClient<$Result.GetResult, T, 'upsert'>, never, ExtArgs> /** * Count the number of SysDictTypes. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysDictTypeCountArgs} args - Arguments to filter SysDictTypes to count. * @example * // Count the number of SysDictTypes * const count = await prisma.sysDictType.count({ * where: { * // ... the filter for the SysDictTypes we want to count * } * }) **/ count( args?: Subset, ): Prisma.PrismaPromise< T extends $Utils.Record<'select', any> ? T['select'] extends true ? number : GetScalarType : number > /** * Allows you to perform aggregations operations on a SysDictType. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysDictTypeAggregateArgs} args - Select which aggregations you would like to apply and on what fields. * @example * // Ordered by age ascending * // Where email contains prisma.io * // Limited to the 10 users * const aggregations = await prisma.user.aggregate({ * _avg: { * age: true, * }, * where: { * email: { * contains: "prisma.io", * }, * }, * orderBy: { * age: "asc", * }, * take: 10, * }) **/ aggregate(args: Subset): Prisma.PrismaPromise> /** * Group by SysDictType. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysDictTypeGroupByArgs} args - Group by arguments. * @example * // Group by city, order by createdAt, get count * const result = await prisma.user.groupBy({ * by: ['city', 'createdAt'], * orderBy: { * createdAt: true * }, * _count: { * _all: true * }, * }) * **/ groupBy< T extends SysDictTypeGroupByArgs, HasSelectOrTake extends Or< Extends<'skip', Keys>, Extends<'take', Keys> >, OrderByArg extends True extends HasSelectOrTake ? { orderBy: SysDictTypeGroupByArgs['orderBy'] } : { orderBy?: SysDictTypeGroupByArgs['orderBy'] }, OrderFields extends ExcludeUnderscoreKeys>>, ByFields extends MaybeTupleToUnion, ByValid extends Has, HavingFields extends GetHavingFields, HavingValid extends Has, ByEmpty extends T['by'] extends never[] ? True : False, InputErrors extends ByEmpty extends True ? `Error: "by" must not be empty.` : HavingValid extends False ? { [P in HavingFields]: P extends ByFields ? never : P extends string ? `Error: Field "${P}" used in "having" needs to be provided in "by".` : [ Error, 'Field ', P, ` in "having" needs to be provided in "by"`, ] }[HavingFields] : 'take' extends Keys ? 'orderBy' extends Keys ? ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] : 'Error: If you provide "take", you also need to provide "orderBy"' : 'skip' extends Keys ? 'orderBy' extends Keys ? ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] : 'Error: If you provide "skip", you also need to provide "orderBy"' : ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetSysDictTypeGroupByPayload : Prisma.PrismaPromise /** * Fields of the SysDictType model */ readonly fields: SysDictTypeFieldRefs; } /** * The delegate class that acts as a "Promise-like" for SysDictType. * Why is this prefixed with `Prisma__`? * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ export interface Prisma__SysDictTypeClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: 'PrismaPromise'; dictDatas = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'> | Null>; /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of which ever callback is executed. */ then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise; /** * Attaches a callback for only the rejection of the Promise. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of the callback. */ catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise; /** * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The * resolved value cannot be modified from the callback. * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). * @returns A Promise for the completion of the callback. */ finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise; } /** * Fields of the SysDictType model */ interface SysDictTypeFieldRefs { readonly dictId: FieldRef<"SysDictType", 'Int'> readonly dictName: FieldRef<"SysDictType", 'String'> readonly dictType: FieldRef<"SysDictType", 'String'> readonly status: FieldRef<"SysDictType", 'String'> readonly createBy: FieldRef<"SysDictType", 'String'> readonly createTime: FieldRef<"SysDictType", 'String'> readonly updateBy: FieldRef<"SysDictType", 'String'> readonly updateTime: FieldRef<"SysDictType", 'String'> readonly remark: FieldRef<"SysDictType", 'String'> } // Custom InputTypes /** * SysDictType findUnique */ export type SysDictTypeFindUniqueArgs = { /** * Select specific fields to fetch from the SysDictType */ select?: SysDictTypeSelect | null /** * Omit specific fields from the SysDictType */ omit?: SysDictTypeOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysDictTypeInclude | null /** * Filter, which SysDictType to fetch. */ where: SysDictTypeWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * SysDictType findUniqueOrThrow */ export type SysDictTypeFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the SysDictType */ select?: SysDictTypeSelect | null /** * Omit specific fields from the SysDictType */ omit?: SysDictTypeOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysDictTypeInclude | null /** * Filter, which SysDictType to fetch. */ where: SysDictTypeWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * SysDictType findFirst */ export type SysDictTypeFindFirstArgs = { /** * Select specific fields to fetch from the SysDictType */ select?: SysDictTypeSelect | null /** * Omit specific fields from the SysDictType */ omit?: SysDictTypeOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysDictTypeInclude | null /** * Filter, which SysDictType to fetch. */ where?: SysDictTypeWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of SysDictTypes to fetch. */ orderBy?: SysDictTypeOrderByWithRelationInput | SysDictTypeOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for SysDictTypes. */ cursor?: SysDictTypeWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` SysDictTypes from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` SysDictTypes. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of SysDictTypes. */ distinct?: SysDictTypeScalarFieldEnum | SysDictTypeScalarFieldEnum[] relationLoadStrategy?: RelationLoadStrategy } /** * SysDictType findFirstOrThrow */ export type SysDictTypeFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the SysDictType */ select?: SysDictTypeSelect | null /** * Omit specific fields from the SysDictType */ omit?: SysDictTypeOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysDictTypeInclude | null /** * Filter, which SysDictType to fetch. */ where?: SysDictTypeWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of SysDictTypes to fetch. */ orderBy?: SysDictTypeOrderByWithRelationInput | SysDictTypeOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for SysDictTypes. */ cursor?: SysDictTypeWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` SysDictTypes from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` SysDictTypes. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of SysDictTypes. */ distinct?: SysDictTypeScalarFieldEnum | SysDictTypeScalarFieldEnum[] relationLoadStrategy?: RelationLoadStrategy } /** * SysDictType findMany */ export type SysDictTypeFindManyArgs = { /** * Select specific fields to fetch from the SysDictType */ select?: SysDictTypeSelect | null /** * Omit specific fields from the SysDictType */ omit?: SysDictTypeOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysDictTypeInclude | null /** * Filter, which SysDictTypes to fetch. */ where?: SysDictTypeWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of SysDictTypes to fetch. */ orderBy?: SysDictTypeOrderByWithRelationInput | SysDictTypeOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for listing SysDictTypes. */ cursor?: SysDictTypeWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` SysDictTypes from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` SysDictTypes. */ skip?: number distinct?: SysDictTypeScalarFieldEnum | SysDictTypeScalarFieldEnum[] relationLoadStrategy?: RelationLoadStrategy } /** * SysDictType create */ export type SysDictTypeCreateArgs = { /** * Select specific fields to fetch from the SysDictType */ select?: SysDictTypeSelect | null /** * Omit specific fields from the SysDictType */ omit?: SysDictTypeOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysDictTypeInclude | null /** * The data needed to create a SysDictType. */ data?: XOR relationLoadStrategy?: RelationLoadStrategy } /** * SysDictType createMany */ export type SysDictTypeCreateManyArgs = { /** * The data used to create many SysDictTypes. */ data: SysDictTypeCreateManyInput | SysDictTypeCreateManyInput[] skipDuplicates?: boolean } /** * SysDictType update */ export type SysDictTypeUpdateArgs = { /** * Select specific fields to fetch from the SysDictType */ select?: SysDictTypeSelect | null /** * Omit specific fields from the SysDictType */ omit?: SysDictTypeOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysDictTypeInclude | null /** * The data needed to update a SysDictType. */ data: XOR /** * Choose, which SysDictType to update. */ where: SysDictTypeWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * SysDictType updateMany */ export type SysDictTypeUpdateManyArgs = { /** * The data used to update SysDictTypes. */ data: XOR /** * Filter which SysDictTypes to update */ where?: SysDictTypeWhereInput } /** * SysDictType upsert */ export type SysDictTypeUpsertArgs = { /** * Select specific fields to fetch from the SysDictType */ select?: SysDictTypeSelect | null /** * Omit specific fields from the SysDictType */ omit?: SysDictTypeOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysDictTypeInclude | null /** * The filter to search for the SysDictType to update in case it exists. */ where: SysDictTypeWhereUniqueInput /** * In case the SysDictType found by the `where` argument doesn't exist, create a new SysDictType with this data. */ create: XOR /** * In case the SysDictType was found with the provided `where` argument, update it with this data. */ update: XOR relationLoadStrategy?: RelationLoadStrategy } /** * SysDictType delete */ export type SysDictTypeDeleteArgs = { /** * Select specific fields to fetch from the SysDictType */ select?: SysDictTypeSelect | null /** * Omit specific fields from the SysDictType */ omit?: SysDictTypeOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysDictTypeInclude | null /** * Filter which SysDictType to delete. */ where: SysDictTypeWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * SysDictType deleteMany */ export type SysDictTypeDeleteManyArgs = { /** * Filter which SysDictTypes to delete */ where?: SysDictTypeWhereInput } /** * SysDictType.dictDatas */ export type SysDictType$dictDatasArgs = { /** * Select specific fields to fetch from the SysDictData */ select?: SysDictDataSelect | null /** * Omit specific fields from the SysDictData */ omit?: SysDictDataOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysDictDataInclude | null where?: SysDictDataWhereInput orderBy?: SysDictDataOrderByWithRelationInput | SysDictDataOrderByWithRelationInput[] cursor?: SysDictDataWhereUniqueInput take?: number skip?: number distinct?: SysDictDataScalarFieldEnum | SysDictDataScalarFieldEnum[] } /** * SysDictType without action */ export type SysDictTypeDefaultArgs = { /** * Select specific fields to fetch from the SysDictType */ select?: SysDictTypeSelect | null /** * Omit specific fields from the SysDictType */ omit?: SysDictTypeOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysDictTypeInclude | null } /** * Model SysLogininfor */ export type AggregateSysLogininfor = { _count: SysLogininforCountAggregateOutputType | null _avg: SysLogininforAvgAggregateOutputType | null _sum: SysLogininforSumAggregateOutputType | null _min: SysLogininforMinAggregateOutputType | null _max: SysLogininforMaxAggregateOutputType | null } export type SysLogininforAvgAggregateOutputType = { infoId: number | null } export type SysLogininforSumAggregateOutputType = { infoId: number | null } export type SysLogininforMinAggregateOutputType = { infoId: number | null userName: string | null ipaddr: string | null loginLocation: string | null browser: string | null os: string | null status: string | null msg: string | null loginTime: string | null } export type SysLogininforMaxAggregateOutputType = { infoId: number | null userName: string | null ipaddr: string | null loginLocation: string | null browser: string | null os: string | null status: string | null msg: string | null loginTime: string | null } export type SysLogininforCountAggregateOutputType = { infoId: number userName: number ipaddr: number loginLocation: number browser: number os: number status: number msg: number loginTime: number _all: number } export type SysLogininforAvgAggregateInputType = { infoId?: true } export type SysLogininforSumAggregateInputType = { infoId?: true } export type SysLogininforMinAggregateInputType = { infoId?: true userName?: true ipaddr?: true loginLocation?: true browser?: true os?: true status?: true msg?: true loginTime?: true } export type SysLogininforMaxAggregateInputType = { infoId?: true userName?: true ipaddr?: true loginLocation?: true browser?: true os?: true status?: true msg?: true loginTime?: true } export type SysLogininforCountAggregateInputType = { infoId?: true userName?: true ipaddr?: true loginLocation?: true browser?: true os?: true status?: true msg?: true loginTime?: true _all?: true } export type SysLogininforAggregateArgs = { /** * Filter which SysLogininfor to aggregate. */ where?: SysLogininforWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of SysLogininfors to fetch. */ orderBy?: SysLogininforOrderByWithRelationInput | SysLogininforOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the start position */ cursor?: SysLogininforWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` SysLogininfors from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` SysLogininfors. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Count returned SysLogininfors **/ _count?: true | SysLogininforCountAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to average **/ _avg?: SysLogininforAvgAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to sum **/ _sum?: SysLogininforSumAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the minimum value **/ _min?: SysLogininforMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the maximum value **/ _max?: SysLogininforMaxAggregateInputType } export type GetSysLogininforAggregateType = { [P in keyof T & keyof AggregateSysLogininfor]: P extends '_count' | 'count' ? T[P] extends true ? number : GetScalarType : GetScalarType } export type SysLogininforGroupByArgs = { where?: SysLogininforWhereInput orderBy?: SysLogininforOrderByWithAggregationInput | SysLogininforOrderByWithAggregationInput[] by: SysLogininforScalarFieldEnum[] | SysLogininforScalarFieldEnum having?: SysLogininforScalarWhereWithAggregatesInput take?: number skip?: number _count?: SysLogininforCountAggregateInputType | true _avg?: SysLogininforAvgAggregateInputType _sum?: SysLogininforSumAggregateInputType _min?: SysLogininforMinAggregateInputType _max?: SysLogininforMaxAggregateInputType } export type SysLogininforGroupByOutputType = { infoId: number userName: string | null ipaddr: string | null loginLocation: string | null browser: string | null os: string | null status: string | null msg: string | null loginTime: string | null _count: SysLogininforCountAggregateOutputType | null _avg: SysLogininforAvgAggregateOutputType | null _sum: SysLogininforSumAggregateOutputType | null _min: SysLogininforMinAggregateOutputType | null _max: SysLogininforMaxAggregateOutputType | null } type GetSysLogininforGroupByPayload = Prisma.PrismaPromise< Array< PickEnumerable & { [P in ((keyof T) & (keyof SysLogininforGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : GetScalarType : GetScalarType } > > export type SysLogininforSelect = $Extensions.GetSelect<{ infoId?: boolean userName?: boolean ipaddr?: boolean loginLocation?: boolean browser?: boolean os?: boolean status?: boolean msg?: boolean loginTime?: boolean }, ExtArgs["result"]["sysLogininfor"]> export type SysLogininforSelectScalar = { infoId?: boolean userName?: boolean ipaddr?: boolean loginLocation?: boolean browser?: boolean os?: boolean status?: boolean msg?: boolean loginTime?: boolean } export type SysLogininforOmit = $Extensions.GetOmit<"infoId" | "userName" | "ipaddr" | "loginLocation" | "browser" | "os" | "status" | "msg" | "loginTime", ExtArgs["result"]["sysLogininfor"]> export type $SysLogininforPayload = { name: "SysLogininfor" objects: {} scalars: $Extensions.GetPayloadResult<{ infoId: number userName: string | null ipaddr: string | null loginLocation: string | null browser: string | null os: string | null status: string | null msg: string | null loginTime: string | null }, ExtArgs["result"]["sysLogininfor"]> composites: {} } type SysLogininforGetPayload = $Result.GetResult type SysLogininforCountArgs = Omit & { select?: SysLogininforCountAggregateInputType | true } export interface SysLogininforDelegate { [K: symbol]: { types: Prisma.TypeMap['model']['SysLogininfor'], meta: { name: 'SysLogininfor' } } /** * Find zero or one SysLogininfor that matches the filter. * @param {SysLogininforFindUniqueArgs} args - Arguments to find a SysLogininfor * @example * // Get one SysLogininfor * const sysLogininfor = await prisma.sysLogininfor.findUnique({ * where: { * // ... provide filter here * } * }) **/ findUnique>( args: SelectSubset> ): Prisma__SysLogininforClient<$Result.GetResult, T, 'findUnique'> | null, null, ExtArgs> /** * Find one SysLogininfor that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. * @param {SysLogininforFindUniqueOrThrowArgs} args - Arguments to find a SysLogininfor * @example * // Get one SysLogininfor * const sysLogininfor = await prisma.sysLogininfor.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) **/ findUniqueOrThrow>( args?: SelectSubset> ): Prisma__SysLogininforClient<$Result.GetResult, T, 'findUniqueOrThrow'>, never, ExtArgs> /** * Find the first SysLogininfor that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysLogininforFindFirstArgs} args - Arguments to find a SysLogininfor * @example * // Get one SysLogininfor * const sysLogininfor = await prisma.sysLogininfor.findFirst({ * where: { * // ... provide filter here * } * }) **/ findFirst>( args?: SelectSubset> ): Prisma__SysLogininforClient<$Result.GetResult, T, 'findFirst'> | null, null, ExtArgs> /** * Find the first SysLogininfor that matches the filter or * throw `PrismaKnownClientError` with `P2025` code if no matches were found. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysLogininforFindFirstOrThrowArgs} args - Arguments to find a SysLogininfor * @example * // Get one SysLogininfor * const sysLogininfor = await prisma.sysLogininfor.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) **/ findFirstOrThrow>( args?: SelectSubset> ): Prisma__SysLogininforClient<$Result.GetResult, T, 'findFirstOrThrow'>, never, ExtArgs> /** * Find zero or more SysLogininfors that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysLogininforFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all SysLogininfors * const sysLogininfors = await prisma.sysLogininfor.findMany() * * // Get first 10 SysLogininfors * const sysLogininfors = await prisma.sysLogininfor.findMany({ take: 10 }) * * // Only select the `infoId` * const sysLogininforWithInfoIdOnly = await prisma.sysLogininfor.findMany({ select: { infoId: true } }) * **/ findMany>( args?: SelectSubset> ): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'>> /** * Create a SysLogininfor. * @param {SysLogininforCreateArgs} args - Arguments to create a SysLogininfor. * @example * // Create one SysLogininfor * const SysLogininfor = await prisma.sysLogininfor.create({ * data: { * // ... data to create a SysLogininfor * } * }) * **/ create>( args: SelectSubset> ): Prisma__SysLogininforClient<$Result.GetResult, T, 'create'>, never, ExtArgs> /** * Create many SysLogininfors. * @param {SysLogininforCreateManyArgs} args - Arguments to create many SysLogininfors. * @example * // Create many SysLogininfors * const sysLogininfor = await prisma.sysLogininfor.createMany({ * data: [ * // ... provide data here * ] * }) * **/ createMany>( args?: SelectSubset> ): Prisma.PrismaPromise /** * Delete a SysLogininfor. * @param {SysLogininforDeleteArgs} args - Arguments to delete one SysLogininfor. * @example * // Delete one SysLogininfor * const SysLogininfor = await prisma.sysLogininfor.delete({ * where: { * // ... filter to delete one SysLogininfor * } * }) * **/ delete>( args: SelectSubset> ): Prisma__SysLogininforClient<$Result.GetResult, T, 'delete'>, never, ExtArgs> /** * Update one SysLogininfor. * @param {SysLogininforUpdateArgs} args - Arguments to update one SysLogininfor. * @example * // Update one SysLogininfor * const sysLogininfor = await prisma.sysLogininfor.update({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * **/ update>( args: SelectSubset> ): Prisma__SysLogininforClient<$Result.GetResult, T, 'update'>, never, ExtArgs> /** * Delete zero or more SysLogininfors. * @param {SysLogininforDeleteManyArgs} args - Arguments to filter SysLogininfors to delete. * @example * // Delete a few SysLogininfors * const { count } = await prisma.sysLogininfor.deleteMany({ * where: { * // ... provide filter here * } * }) * **/ deleteMany>( args?: SelectSubset> ): Prisma.PrismaPromise /** * Update zero or more SysLogininfors. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysLogininforUpdateManyArgs} args - Arguments to update one or more rows. * @example * // Update many SysLogininfors * const sysLogininfor = await prisma.sysLogininfor.updateMany({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * **/ updateMany>( args: SelectSubset> ): Prisma.PrismaPromise /** * Create or update one SysLogininfor. * @param {SysLogininforUpsertArgs} args - Arguments to update or create a SysLogininfor. * @example * // Update or create a SysLogininfor * const sysLogininfor = await prisma.sysLogininfor.upsert({ * create: { * // ... data to create a SysLogininfor * }, * update: { * // ... in case it already exists, update * }, * where: { * // ... the filter for the SysLogininfor we want to update * } * }) **/ upsert>( args: SelectSubset> ): Prisma__SysLogininforClient<$Result.GetResult, T, 'upsert'>, never, ExtArgs> /** * Count the number of SysLogininfors. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysLogininforCountArgs} args - Arguments to filter SysLogininfors to count. * @example * // Count the number of SysLogininfors * const count = await prisma.sysLogininfor.count({ * where: { * // ... the filter for the SysLogininfors we want to count * } * }) **/ count( args?: Subset, ): Prisma.PrismaPromise< T extends $Utils.Record<'select', any> ? T['select'] extends true ? number : GetScalarType : number > /** * Allows you to perform aggregations operations on a SysLogininfor. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysLogininforAggregateArgs} args - Select which aggregations you would like to apply and on what fields. * @example * // Ordered by age ascending * // Where email contains prisma.io * // Limited to the 10 users * const aggregations = await prisma.user.aggregate({ * _avg: { * age: true, * }, * where: { * email: { * contains: "prisma.io", * }, * }, * orderBy: { * age: "asc", * }, * take: 10, * }) **/ aggregate(args: Subset): Prisma.PrismaPromise> /** * Group by SysLogininfor. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysLogininforGroupByArgs} args - Group by arguments. * @example * // Group by city, order by createdAt, get count * const result = await prisma.user.groupBy({ * by: ['city', 'createdAt'], * orderBy: { * createdAt: true * }, * _count: { * _all: true * }, * }) * **/ groupBy< T extends SysLogininforGroupByArgs, HasSelectOrTake extends Or< Extends<'skip', Keys>, Extends<'take', Keys> >, OrderByArg extends True extends HasSelectOrTake ? { orderBy: SysLogininforGroupByArgs['orderBy'] } : { orderBy?: SysLogininforGroupByArgs['orderBy'] }, OrderFields extends ExcludeUnderscoreKeys>>, ByFields extends MaybeTupleToUnion, ByValid extends Has, HavingFields extends GetHavingFields, HavingValid extends Has, ByEmpty extends T['by'] extends never[] ? True : False, InputErrors extends ByEmpty extends True ? `Error: "by" must not be empty.` : HavingValid extends False ? { [P in HavingFields]: P extends ByFields ? never : P extends string ? `Error: Field "${P}" used in "having" needs to be provided in "by".` : [ Error, 'Field ', P, ` in "having" needs to be provided in "by"`, ] }[HavingFields] : 'take' extends Keys ? 'orderBy' extends Keys ? ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] : 'Error: If you provide "take", you also need to provide "orderBy"' : 'skip' extends Keys ? 'orderBy' extends Keys ? ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] : 'Error: If you provide "skip", you also need to provide "orderBy"' : ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetSysLogininforGroupByPayload : Prisma.PrismaPromise /** * Fields of the SysLogininfor model */ readonly fields: SysLogininforFieldRefs; } /** * The delegate class that acts as a "Promise-like" for SysLogininfor. * Why is this prefixed with `Prisma__`? * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ export interface Prisma__SysLogininforClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: 'PrismaPromise'; /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of which ever callback is executed. */ then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise; /** * Attaches a callback for only the rejection of the Promise. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of the callback. */ catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise; /** * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The * resolved value cannot be modified from the callback. * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). * @returns A Promise for the completion of the callback. */ finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise; } /** * Fields of the SysLogininfor model */ interface SysLogininforFieldRefs { readonly infoId: FieldRef<"SysLogininfor", 'Int'> readonly userName: FieldRef<"SysLogininfor", 'String'> readonly ipaddr: FieldRef<"SysLogininfor", 'String'> readonly loginLocation: FieldRef<"SysLogininfor", 'String'> readonly browser: FieldRef<"SysLogininfor", 'String'> readonly os: FieldRef<"SysLogininfor", 'String'> readonly status: FieldRef<"SysLogininfor", 'String'> readonly msg: FieldRef<"SysLogininfor", 'String'> readonly loginTime: FieldRef<"SysLogininfor", 'String'> } // Custom InputTypes /** * SysLogininfor findUnique */ export type SysLogininforFindUniqueArgs = { /** * Select specific fields to fetch from the SysLogininfor */ select?: SysLogininforSelect | null /** * Omit specific fields from the SysLogininfor */ omit?: SysLogininforOmit | null /** * Filter, which SysLogininfor to fetch. */ where: SysLogininforWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * SysLogininfor findUniqueOrThrow */ export type SysLogininforFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the SysLogininfor */ select?: SysLogininforSelect | null /** * Omit specific fields from the SysLogininfor */ omit?: SysLogininforOmit | null /** * Filter, which SysLogininfor to fetch. */ where: SysLogininforWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * SysLogininfor findFirst */ export type SysLogininforFindFirstArgs = { /** * Select specific fields to fetch from the SysLogininfor */ select?: SysLogininforSelect | null /** * Omit specific fields from the SysLogininfor */ omit?: SysLogininforOmit | null /** * Filter, which SysLogininfor to fetch. */ where?: SysLogininforWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of SysLogininfors to fetch. */ orderBy?: SysLogininforOrderByWithRelationInput | SysLogininforOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for SysLogininfors. */ cursor?: SysLogininforWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` SysLogininfors from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` SysLogininfors. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of SysLogininfors. */ distinct?: SysLogininforScalarFieldEnum | SysLogininforScalarFieldEnum[] relationLoadStrategy?: RelationLoadStrategy } /** * SysLogininfor findFirstOrThrow */ export type SysLogininforFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the SysLogininfor */ select?: SysLogininforSelect | null /** * Omit specific fields from the SysLogininfor */ omit?: SysLogininforOmit | null /** * Filter, which SysLogininfor to fetch. */ where?: SysLogininforWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of SysLogininfors to fetch. */ orderBy?: SysLogininforOrderByWithRelationInput | SysLogininforOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for SysLogininfors. */ cursor?: SysLogininforWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` SysLogininfors from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` SysLogininfors. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of SysLogininfors. */ distinct?: SysLogininforScalarFieldEnum | SysLogininforScalarFieldEnum[] relationLoadStrategy?: RelationLoadStrategy } /** * SysLogininfor findMany */ export type SysLogininforFindManyArgs = { /** * Select specific fields to fetch from the SysLogininfor */ select?: SysLogininforSelect | null /** * Omit specific fields from the SysLogininfor */ omit?: SysLogininforOmit | null /** * Filter, which SysLogininfors to fetch. */ where?: SysLogininforWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of SysLogininfors to fetch. */ orderBy?: SysLogininforOrderByWithRelationInput | SysLogininforOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for listing SysLogininfors. */ cursor?: SysLogininforWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` SysLogininfors from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` SysLogininfors. */ skip?: number distinct?: SysLogininforScalarFieldEnum | SysLogininforScalarFieldEnum[] relationLoadStrategy?: RelationLoadStrategy } /** * SysLogininfor create */ export type SysLogininforCreateArgs = { /** * Select specific fields to fetch from the SysLogininfor */ select?: SysLogininforSelect | null /** * Omit specific fields from the SysLogininfor */ omit?: SysLogininforOmit | null /** * The data needed to create a SysLogininfor. */ data?: XOR relationLoadStrategy?: RelationLoadStrategy } /** * SysLogininfor createMany */ export type SysLogininforCreateManyArgs = { /** * The data used to create many SysLogininfors. */ data: SysLogininforCreateManyInput | SysLogininforCreateManyInput[] skipDuplicates?: boolean } /** * SysLogininfor update */ export type SysLogininforUpdateArgs = { /** * Select specific fields to fetch from the SysLogininfor */ select?: SysLogininforSelect | null /** * Omit specific fields from the SysLogininfor */ omit?: SysLogininforOmit | null /** * The data needed to update a SysLogininfor. */ data: XOR /** * Choose, which SysLogininfor to update. */ where: SysLogininforWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * SysLogininfor updateMany */ export type SysLogininforUpdateManyArgs = { /** * The data used to update SysLogininfors. */ data: XOR /** * Filter which SysLogininfors to update */ where?: SysLogininforWhereInput } /** * SysLogininfor upsert */ export type SysLogininforUpsertArgs = { /** * Select specific fields to fetch from the SysLogininfor */ select?: SysLogininforSelect | null /** * Omit specific fields from the SysLogininfor */ omit?: SysLogininforOmit | null /** * The filter to search for the SysLogininfor to update in case it exists. */ where: SysLogininforWhereUniqueInput /** * In case the SysLogininfor found by the `where` argument doesn't exist, create a new SysLogininfor with this data. */ create: XOR /** * In case the SysLogininfor was found with the provided `where` argument, update it with this data. */ update: XOR relationLoadStrategy?: RelationLoadStrategy } /** * SysLogininfor delete */ export type SysLogininforDeleteArgs = { /** * Select specific fields to fetch from the SysLogininfor */ select?: SysLogininforSelect | null /** * Omit specific fields from the SysLogininfor */ omit?: SysLogininforOmit | null /** * Filter which SysLogininfor to delete. */ where: SysLogininforWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * SysLogininfor deleteMany */ export type SysLogininforDeleteManyArgs = { /** * Filter which SysLogininfors to delete */ where?: SysLogininforWhereInput } /** * SysLogininfor without action */ export type SysLogininforDefaultArgs = { /** * Select specific fields to fetch from the SysLogininfor */ select?: SysLogininforSelect | null /** * Omit specific fields from the SysLogininfor */ omit?: SysLogininforOmit | null } /** * Model SysMenu */ export type AggregateSysMenu = { _count: SysMenuCountAggregateOutputType | null _avg: SysMenuAvgAggregateOutputType | null _sum: SysMenuSumAggregateOutputType | null _min: SysMenuMinAggregateOutputType | null _max: SysMenuMaxAggregateOutputType | null } export type SysMenuAvgAggregateOutputType = { menuId: number | null parentId: number | null orderNum: number | null isFrame: number | null isCache: number | null } export type SysMenuSumAggregateOutputType = { menuId: number | null parentId: number | null orderNum: number | null isFrame: number | null isCache: number | null } export type SysMenuMinAggregateOutputType = { menuId: number | null menuName: string | null parentId: number | null orderNum: number | null path: string | null component: string | null query: string | null isFrame: number | null isCache: number | null menuType: string | null visible: string | null status: string | null perms: string | null icon: string | null createBy: string | null createTime: string | null updateBy: string | null updateTime: string | null remark: string | null } export type SysMenuMaxAggregateOutputType = { menuId: number | null menuName: string | null parentId: number | null orderNum: number | null path: string | null component: string | null query: string | null isFrame: number | null isCache: number | null menuType: string | null visible: string | null status: string | null perms: string | null icon: string | null createBy: string | null createTime: string | null updateBy: string | null updateTime: string | null remark: string | null } export type SysMenuCountAggregateOutputType = { menuId: number menuName: number parentId: number orderNum: number path: number component: number query: number isFrame: number isCache: number menuType: number visible: number status: number perms: number icon: number createBy: number createTime: number updateBy: number updateTime: number remark: number _all: number } export type SysMenuAvgAggregateInputType = { menuId?: true parentId?: true orderNum?: true isFrame?: true isCache?: true } export type SysMenuSumAggregateInputType = { menuId?: true parentId?: true orderNum?: true isFrame?: true isCache?: true } export type SysMenuMinAggregateInputType = { menuId?: true menuName?: true parentId?: true orderNum?: true path?: true component?: true query?: true isFrame?: true isCache?: true menuType?: true visible?: true status?: true perms?: true icon?: true createBy?: true createTime?: true updateBy?: true updateTime?: true remark?: true } export type SysMenuMaxAggregateInputType = { menuId?: true menuName?: true parentId?: true orderNum?: true path?: true component?: true query?: true isFrame?: true isCache?: true menuType?: true visible?: true status?: true perms?: true icon?: true createBy?: true createTime?: true updateBy?: true updateTime?: true remark?: true } export type SysMenuCountAggregateInputType = { menuId?: true menuName?: true parentId?: true orderNum?: true path?: true component?: true query?: true isFrame?: true isCache?: true menuType?: true visible?: true status?: true perms?: true icon?: true createBy?: true createTime?: true updateBy?: true updateTime?: true remark?: true _all?: true } export type SysMenuAggregateArgs = { /** * Filter which SysMenu to aggregate. */ where?: SysMenuWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of SysMenus to fetch. */ orderBy?: SysMenuOrderByWithRelationInput | SysMenuOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the start position */ cursor?: SysMenuWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` SysMenus from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` SysMenus. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Count returned SysMenus **/ _count?: true | SysMenuCountAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to average **/ _avg?: SysMenuAvgAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to sum **/ _sum?: SysMenuSumAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the minimum value **/ _min?: SysMenuMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the maximum value **/ _max?: SysMenuMaxAggregateInputType } export type GetSysMenuAggregateType = { [P in keyof T & keyof AggregateSysMenu]: P extends '_count' | 'count' ? T[P] extends true ? number : GetScalarType : GetScalarType } export type SysMenuGroupByArgs = { where?: SysMenuWhereInput orderBy?: SysMenuOrderByWithAggregationInput | SysMenuOrderByWithAggregationInput[] by: SysMenuScalarFieldEnum[] | SysMenuScalarFieldEnum having?: SysMenuScalarWhereWithAggregatesInput take?: number skip?: number _count?: SysMenuCountAggregateInputType | true _avg?: SysMenuAvgAggregateInputType _sum?: SysMenuSumAggregateInputType _min?: SysMenuMinAggregateInputType _max?: SysMenuMaxAggregateInputType } export type SysMenuGroupByOutputType = { menuId: number menuName: string parentId: number | null orderNum: number | null path: string | null component: string | null query: string | null isFrame: number | null isCache: number | null menuType: string | null visible: string | null status: string | null perms: string | null icon: string | null createBy: string | null createTime: string | null updateBy: string | null updateTime: string | null remark: string | null _count: SysMenuCountAggregateOutputType | null _avg: SysMenuAvgAggregateOutputType | null _sum: SysMenuSumAggregateOutputType | null _min: SysMenuMinAggregateOutputType | null _max: SysMenuMaxAggregateOutputType | null } type GetSysMenuGroupByPayload = Prisma.PrismaPromise< Array< PickEnumerable & { [P in ((keyof T) & (keyof SysMenuGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : GetScalarType : GetScalarType } > > export type SysMenuSelect = $Extensions.GetSelect<{ menuId?: boolean menuName?: boolean parentId?: boolean orderNum?: boolean path?: boolean component?: boolean query?: boolean isFrame?: boolean isCache?: boolean menuType?: boolean visible?: boolean status?: boolean perms?: boolean icon?: boolean createBy?: boolean createTime?: boolean updateBy?: boolean updateTime?: boolean remark?: boolean roles?: boolean | SysMenu$rolesArgs _count?: boolean | SysMenuCountOutputTypeDefaultArgs }, ExtArgs["result"]["sysMenu"]> export type SysMenuSelectScalar = { menuId?: boolean menuName?: boolean parentId?: boolean orderNum?: boolean path?: boolean component?: boolean query?: boolean isFrame?: boolean isCache?: boolean menuType?: boolean visible?: boolean status?: boolean perms?: boolean icon?: boolean createBy?: boolean createTime?: boolean updateBy?: boolean updateTime?: boolean remark?: boolean } export type SysMenuOmit = $Extensions.GetOmit<"menuId" | "menuName" | "parentId" | "orderNum" | "path" | "component" | "query" | "isFrame" | "isCache" | "menuType" | "visible" | "status" | "perms" | "icon" | "createBy" | "createTime" | "updateBy" | "updateTime" | "remark", ExtArgs["result"]["sysMenu"]> export type SysMenuInclude = { roles?: boolean | SysMenu$rolesArgs _count?: boolean | SysMenuCountOutputTypeDefaultArgs } export type $SysMenuPayload = { name: "SysMenu" objects: { roles: Prisma.$SysRoleMenuPayload[] } scalars: $Extensions.GetPayloadResult<{ menuId: number menuName: string parentId: number | null orderNum: number | null path: string | null component: string | null query: string | null isFrame: number | null isCache: number | null menuType: string | null visible: string | null status: string | null perms: string | null icon: string | null createBy: string | null createTime: string | null updateBy: string | null updateTime: string | null remark: string | null }, ExtArgs["result"]["sysMenu"]> composites: {} } type SysMenuGetPayload = $Result.GetResult type SysMenuCountArgs = Omit & { select?: SysMenuCountAggregateInputType | true } export interface SysMenuDelegate { [K: symbol]: { types: Prisma.TypeMap['model']['SysMenu'], meta: { name: 'SysMenu' } } /** * Find zero or one SysMenu that matches the filter. * @param {SysMenuFindUniqueArgs} args - Arguments to find a SysMenu * @example * // Get one SysMenu * const sysMenu = await prisma.sysMenu.findUnique({ * where: { * // ... provide filter here * } * }) **/ findUnique>( args: SelectSubset> ): Prisma__SysMenuClient<$Result.GetResult, T, 'findUnique'> | null, null, ExtArgs> /** * Find one SysMenu that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. * @param {SysMenuFindUniqueOrThrowArgs} args - Arguments to find a SysMenu * @example * // Get one SysMenu * const sysMenu = await prisma.sysMenu.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) **/ findUniqueOrThrow>( args?: SelectSubset> ): Prisma__SysMenuClient<$Result.GetResult, T, 'findUniqueOrThrow'>, never, ExtArgs> /** * Find the first SysMenu that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysMenuFindFirstArgs} args - Arguments to find a SysMenu * @example * // Get one SysMenu * const sysMenu = await prisma.sysMenu.findFirst({ * where: { * // ... provide filter here * } * }) **/ findFirst>( args?: SelectSubset> ): Prisma__SysMenuClient<$Result.GetResult, T, 'findFirst'> | null, null, ExtArgs> /** * Find the first SysMenu that matches the filter or * throw `PrismaKnownClientError` with `P2025` code if no matches were found. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysMenuFindFirstOrThrowArgs} args - Arguments to find a SysMenu * @example * // Get one SysMenu * const sysMenu = await prisma.sysMenu.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) **/ findFirstOrThrow>( args?: SelectSubset> ): Prisma__SysMenuClient<$Result.GetResult, T, 'findFirstOrThrow'>, never, ExtArgs> /** * Find zero or more SysMenus that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysMenuFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all SysMenus * const sysMenus = await prisma.sysMenu.findMany() * * // Get first 10 SysMenus * const sysMenus = await prisma.sysMenu.findMany({ take: 10 }) * * // Only select the `menuId` * const sysMenuWithMenuIdOnly = await prisma.sysMenu.findMany({ select: { menuId: true } }) * **/ findMany>( args?: SelectSubset> ): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'>> /** * Create a SysMenu. * @param {SysMenuCreateArgs} args - Arguments to create a SysMenu. * @example * // Create one SysMenu * const SysMenu = await prisma.sysMenu.create({ * data: { * // ... data to create a SysMenu * } * }) * **/ create>( args: SelectSubset> ): Prisma__SysMenuClient<$Result.GetResult, T, 'create'>, never, ExtArgs> /** * Create many SysMenus. * @param {SysMenuCreateManyArgs} args - Arguments to create many SysMenus. * @example * // Create many SysMenus * const sysMenu = await prisma.sysMenu.createMany({ * data: [ * // ... provide data here * ] * }) * **/ createMany>( args?: SelectSubset> ): Prisma.PrismaPromise /** * Delete a SysMenu. * @param {SysMenuDeleteArgs} args - Arguments to delete one SysMenu. * @example * // Delete one SysMenu * const SysMenu = await prisma.sysMenu.delete({ * where: { * // ... filter to delete one SysMenu * } * }) * **/ delete>( args: SelectSubset> ): Prisma__SysMenuClient<$Result.GetResult, T, 'delete'>, never, ExtArgs> /** * Update one SysMenu. * @param {SysMenuUpdateArgs} args - Arguments to update one SysMenu. * @example * // Update one SysMenu * const sysMenu = await prisma.sysMenu.update({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * **/ update>( args: SelectSubset> ): Prisma__SysMenuClient<$Result.GetResult, T, 'update'>, never, ExtArgs> /** * Delete zero or more SysMenus. * @param {SysMenuDeleteManyArgs} args - Arguments to filter SysMenus to delete. * @example * // Delete a few SysMenus * const { count } = await prisma.sysMenu.deleteMany({ * where: { * // ... provide filter here * } * }) * **/ deleteMany>( args?: SelectSubset> ): Prisma.PrismaPromise /** * Update zero or more SysMenus. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysMenuUpdateManyArgs} args - Arguments to update one or more rows. * @example * // Update many SysMenus * const sysMenu = await prisma.sysMenu.updateMany({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * **/ updateMany>( args: SelectSubset> ): Prisma.PrismaPromise /** * Create or update one SysMenu. * @param {SysMenuUpsertArgs} args - Arguments to update or create a SysMenu. * @example * // Update or create a SysMenu * const sysMenu = await prisma.sysMenu.upsert({ * create: { * // ... data to create a SysMenu * }, * update: { * // ... in case it already exists, update * }, * where: { * // ... the filter for the SysMenu we want to update * } * }) **/ upsert>( args: SelectSubset> ): Prisma__SysMenuClient<$Result.GetResult, T, 'upsert'>, never, ExtArgs> /** * Count the number of SysMenus. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysMenuCountArgs} args - Arguments to filter SysMenus to count. * @example * // Count the number of SysMenus * const count = await prisma.sysMenu.count({ * where: { * // ... the filter for the SysMenus we want to count * } * }) **/ count( args?: Subset, ): Prisma.PrismaPromise< T extends $Utils.Record<'select', any> ? T['select'] extends true ? number : GetScalarType : number > /** * Allows you to perform aggregations operations on a SysMenu. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysMenuAggregateArgs} args - Select which aggregations you would like to apply and on what fields. * @example * // Ordered by age ascending * // Where email contains prisma.io * // Limited to the 10 users * const aggregations = await prisma.user.aggregate({ * _avg: { * age: true, * }, * where: { * email: { * contains: "prisma.io", * }, * }, * orderBy: { * age: "asc", * }, * take: 10, * }) **/ aggregate(args: Subset): Prisma.PrismaPromise> /** * Group by SysMenu. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysMenuGroupByArgs} args - Group by arguments. * @example * // Group by city, order by createdAt, get count * const result = await prisma.user.groupBy({ * by: ['city', 'createdAt'], * orderBy: { * createdAt: true * }, * _count: { * _all: true * }, * }) * **/ groupBy< T extends SysMenuGroupByArgs, HasSelectOrTake extends Or< Extends<'skip', Keys>, Extends<'take', Keys> >, OrderByArg extends True extends HasSelectOrTake ? { orderBy: SysMenuGroupByArgs['orderBy'] } : { orderBy?: SysMenuGroupByArgs['orderBy'] }, OrderFields extends ExcludeUnderscoreKeys>>, ByFields extends MaybeTupleToUnion, ByValid extends Has, HavingFields extends GetHavingFields, HavingValid extends Has, ByEmpty extends T['by'] extends never[] ? True : False, InputErrors extends ByEmpty extends True ? `Error: "by" must not be empty.` : HavingValid extends False ? { [P in HavingFields]: P extends ByFields ? never : P extends string ? `Error: Field "${P}" used in "having" needs to be provided in "by".` : [ Error, 'Field ', P, ` in "having" needs to be provided in "by"`, ] }[HavingFields] : 'take' extends Keys ? 'orderBy' extends Keys ? ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] : 'Error: If you provide "take", you also need to provide "orderBy"' : 'skip' extends Keys ? 'orderBy' extends Keys ? ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] : 'Error: If you provide "skip", you also need to provide "orderBy"' : ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetSysMenuGroupByPayload : Prisma.PrismaPromise /** * Fields of the SysMenu model */ readonly fields: SysMenuFieldRefs; } /** * The delegate class that acts as a "Promise-like" for SysMenu. * Why is this prefixed with `Prisma__`? * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ export interface Prisma__SysMenuClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: 'PrismaPromise'; roles = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'> | Null>; /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of which ever callback is executed. */ then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise; /** * Attaches a callback for only the rejection of the Promise. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of the callback. */ catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise; /** * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The * resolved value cannot be modified from the callback. * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). * @returns A Promise for the completion of the callback. */ finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise; } /** * Fields of the SysMenu model */ interface SysMenuFieldRefs { readonly menuId: FieldRef<"SysMenu", 'Int'> readonly menuName: FieldRef<"SysMenu", 'String'> readonly parentId: FieldRef<"SysMenu", 'Int'> readonly orderNum: FieldRef<"SysMenu", 'Int'> readonly path: FieldRef<"SysMenu", 'String'> readonly component: FieldRef<"SysMenu", 'String'> readonly query: FieldRef<"SysMenu", 'String'> readonly isFrame: FieldRef<"SysMenu", 'Int'> readonly isCache: FieldRef<"SysMenu", 'Int'> readonly menuType: FieldRef<"SysMenu", 'String'> readonly visible: FieldRef<"SysMenu", 'String'> readonly status: FieldRef<"SysMenu", 'String'> readonly perms: FieldRef<"SysMenu", 'String'> readonly icon: FieldRef<"SysMenu", 'String'> readonly createBy: FieldRef<"SysMenu", 'String'> readonly createTime: FieldRef<"SysMenu", 'String'> readonly updateBy: FieldRef<"SysMenu", 'String'> readonly updateTime: FieldRef<"SysMenu", 'String'> readonly remark: FieldRef<"SysMenu", 'String'> } // Custom InputTypes /** * SysMenu findUnique */ export type SysMenuFindUniqueArgs = { /** * Select specific fields to fetch from the SysMenu */ select?: SysMenuSelect | null /** * Omit specific fields from the SysMenu */ omit?: SysMenuOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysMenuInclude | null /** * Filter, which SysMenu to fetch. */ where: SysMenuWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * SysMenu findUniqueOrThrow */ export type SysMenuFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the SysMenu */ select?: SysMenuSelect | null /** * Omit specific fields from the SysMenu */ omit?: SysMenuOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysMenuInclude | null /** * Filter, which SysMenu to fetch. */ where: SysMenuWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * SysMenu findFirst */ export type SysMenuFindFirstArgs = { /** * Select specific fields to fetch from the SysMenu */ select?: SysMenuSelect | null /** * Omit specific fields from the SysMenu */ omit?: SysMenuOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysMenuInclude | null /** * Filter, which SysMenu to fetch. */ where?: SysMenuWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of SysMenus to fetch. */ orderBy?: SysMenuOrderByWithRelationInput | SysMenuOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for SysMenus. */ cursor?: SysMenuWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` SysMenus from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` SysMenus. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of SysMenus. */ distinct?: SysMenuScalarFieldEnum | SysMenuScalarFieldEnum[] relationLoadStrategy?: RelationLoadStrategy } /** * SysMenu findFirstOrThrow */ export type SysMenuFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the SysMenu */ select?: SysMenuSelect | null /** * Omit specific fields from the SysMenu */ omit?: SysMenuOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysMenuInclude | null /** * Filter, which SysMenu to fetch. */ where?: SysMenuWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of SysMenus to fetch. */ orderBy?: SysMenuOrderByWithRelationInput | SysMenuOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for SysMenus. */ cursor?: SysMenuWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` SysMenus from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` SysMenus. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of SysMenus. */ distinct?: SysMenuScalarFieldEnum | SysMenuScalarFieldEnum[] relationLoadStrategy?: RelationLoadStrategy } /** * SysMenu findMany */ export type SysMenuFindManyArgs = { /** * Select specific fields to fetch from the SysMenu */ select?: SysMenuSelect | null /** * Omit specific fields from the SysMenu */ omit?: SysMenuOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysMenuInclude | null /** * Filter, which SysMenus to fetch. */ where?: SysMenuWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of SysMenus to fetch. */ orderBy?: SysMenuOrderByWithRelationInput | SysMenuOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for listing SysMenus. */ cursor?: SysMenuWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` SysMenus from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` SysMenus. */ skip?: number distinct?: SysMenuScalarFieldEnum | SysMenuScalarFieldEnum[] relationLoadStrategy?: RelationLoadStrategy } /** * SysMenu create */ export type SysMenuCreateArgs = { /** * Select specific fields to fetch from the SysMenu */ select?: SysMenuSelect | null /** * Omit specific fields from the SysMenu */ omit?: SysMenuOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysMenuInclude | null /** * The data needed to create a SysMenu. */ data: XOR relationLoadStrategy?: RelationLoadStrategy } /** * SysMenu createMany */ export type SysMenuCreateManyArgs = { /** * The data used to create many SysMenus. */ data: SysMenuCreateManyInput | SysMenuCreateManyInput[] skipDuplicates?: boolean } /** * SysMenu update */ export type SysMenuUpdateArgs = { /** * Select specific fields to fetch from the SysMenu */ select?: SysMenuSelect | null /** * Omit specific fields from the SysMenu */ omit?: SysMenuOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysMenuInclude | null /** * The data needed to update a SysMenu. */ data: XOR /** * Choose, which SysMenu to update. */ where: SysMenuWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * SysMenu updateMany */ export type SysMenuUpdateManyArgs = { /** * The data used to update SysMenus. */ data: XOR /** * Filter which SysMenus to update */ where?: SysMenuWhereInput } /** * SysMenu upsert */ export type SysMenuUpsertArgs = { /** * Select specific fields to fetch from the SysMenu */ select?: SysMenuSelect | null /** * Omit specific fields from the SysMenu */ omit?: SysMenuOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysMenuInclude | null /** * The filter to search for the SysMenu to update in case it exists. */ where: SysMenuWhereUniqueInput /** * In case the SysMenu found by the `where` argument doesn't exist, create a new SysMenu with this data. */ create: XOR /** * In case the SysMenu was found with the provided `where` argument, update it with this data. */ update: XOR relationLoadStrategy?: RelationLoadStrategy } /** * SysMenu delete */ export type SysMenuDeleteArgs = { /** * Select specific fields to fetch from the SysMenu */ select?: SysMenuSelect | null /** * Omit specific fields from the SysMenu */ omit?: SysMenuOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysMenuInclude | null /** * Filter which SysMenu to delete. */ where: SysMenuWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * SysMenu deleteMany */ export type SysMenuDeleteManyArgs = { /** * Filter which SysMenus to delete */ where?: SysMenuWhereInput } /** * SysMenu.roles */ export type SysMenu$rolesArgs = { /** * Select specific fields to fetch from the SysRoleMenu */ select?: SysRoleMenuSelect | null /** * Omit specific fields from the SysRoleMenu */ omit?: SysRoleMenuOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysRoleMenuInclude | null where?: SysRoleMenuWhereInput orderBy?: SysRoleMenuOrderByWithRelationInput | SysRoleMenuOrderByWithRelationInput[] cursor?: SysRoleMenuWhereUniqueInput take?: number skip?: number distinct?: SysRoleMenuScalarFieldEnum | SysRoleMenuScalarFieldEnum[] } /** * SysMenu without action */ export type SysMenuDefaultArgs = { /** * Select specific fields to fetch from the SysMenu */ select?: SysMenuSelect | null /** * Omit specific fields from the SysMenu */ omit?: SysMenuOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysMenuInclude | null } /** * Model SysNotice */ export type AggregateSysNotice = { _count: SysNoticeCountAggregateOutputType | null _avg: SysNoticeAvgAggregateOutputType | null _sum: SysNoticeSumAggregateOutputType | null _min: SysNoticeMinAggregateOutputType | null _max: SysNoticeMaxAggregateOutputType | null } export type SysNoticeAvgAggregateOutputType = { noticeId: number | null } export type SysNoticeSumAggregateOutputType = { noticeId: number | null } export type SysNoticeMinAggregateOutputType = { noticeId: number | null noticeTitle: string | null noticeType: string | null noticeContent: string | null status: string | null createBy: string | null createTime: string | null updateBy: string | null updateTime: string | null remark: string | null } export type SysNoticeMaxAggregateOutputType = { noticeId: number | null noticeTitle: string | null noticeType: string | null noticeContent: string | null status: string | null createBy: string | null createTime: string | null updateBy: string | null updateTime: string | null remark: string | null } export type SysNoticeCountAggregateOutputType = { noticeId: number noticeTitle: number noticeType: number noticeContent: number status: number createBy: number createTime: number updateBy: number updateTime: number remark: number _all: number } export type SysNoticeAvgAggregateInputType = { noticeId?: true } export type SysNoticeSumAggregateInputType = { noticeId?: true } export type SysNoticeMinAggregateInputType = { noticeId?: true noticeTitle?: true noticeType?: true noticeContent?: true status?: true createBy?: true createTime?: true updateBy?: true updateTime?: true remark?: true } export type SysNoticeMaxAggregateInputType = { noticeId?: true noticeTitle?: true noticeType?: true noticeContent?: true status?: true createBy?: true createTime?: true updateBy?: true updateTime?: true remark?: true } export type SysNoticeCountAggregateInputType = { noticeId?: true noticeTitle?: true noticeType?: true noticeContent?: true status?: true createBy?: true createTime?: true updateBy?: true updateTime?: true remark?: true _all?: true } export type SysNoticeAggregateArgs = { /** * Filter which SysNotice to aggregate. */ where?: SysNoticeWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of SysNotices to fetch. */ orderBy?: SysNoticeOrderByWithRelationInput | SysNoticeOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the start position */ cursor?: SysNoticeWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` SysNotices from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` SysNotices. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Count returned SysNotices **/ _count?: true | SysNoticeCountAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to average **/ _avg?: SysNoticeAvgAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to sum **/ _sum?: SysNoticeSumAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the minimum value **/ _min?: SysNoticeMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the maximum value **/ _max?: SysNoticeMaxAggregateInputType } export type GetSysNoticeAggregateType = { [P in keyof T & keyof AggregateSysNotice]: P extends '_count' | 'count' ? T[P] extends true ? number : GetScalarType : GetScalarType } export type SysNoticeGroupByArgs = { where?: SysNoticeWhereInput orderBy?: SysNoticeOrderByWithAggregationInput | SysNoticeOrderByWithAggregationInput[] by: SysNoticeScalarFieldEnum[] | SysNoticeScalarFieldEnum having?: SysNoticeScalarWhereWithAggregatesInput take?: number skip?: number _count?: SysNoticeCountAggregateInputType | true _avg?: SysNoticeAvgAggregateInputType _sum?: SysNoticeSumAggregateInputType _min?: SysNoticeMinAggregateInputType _max?: SysNoticeMaxAggregateInputType } export type SysNoticeGroupByOutputType = { noticeId: number noticeTitle: string noticeType: string noticeContent: string | null status: string | null createBy: string | null createTime: string | null updateBy: string | null updateTime: string | null remark: string | null _count: SysNoticeCountAggregateOutputType | null _avg: SysNoticeAvgAggregateOutputType | null _sum: SysNoticeSumAggregateOutputType | null _min: SysNoticeMinAggregateOutputType | null _max: SysNoticeMaxAggregateOutputType | null } type GetSysNoticeGroupByPayload = Prisma.PrismaPromise< Array< PickEnumerable & { [P in ((keyof T) & (keyof SysNoticeGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : GetScalarType : GetScalarType } > > export type SysNoticeSelect = $Extensions.GetSelect<{ noticeId?: boolean noticeTitle?: boolean noticeType?: boolean noticeContent?: boolean status?: boolean createBy?: boolean createTime?: boolean updateBy?: boolean updateTime?: boolean remark?: boolean }, ExtArgs["result"]["sysNotice"]> export type SysNoticeSelectScalar = { noticeId?: boolean noticeTitle?: boolean noticeType?: boolean noticeContent?: boolean status?: boolean createBy?: boolean createTime?: boolean updateBy?: boolean updateTime?: boolean remark?: boolean } export type SysNoticeOmit = $Extensions.GetOmit<"noticeId" | "noticeTitle" | "noticeType" | "noticeContent" | "status" | "createBy" | "createTime" | "updateBy" | "updateTime" | "remark", ExtArgs["result"]["sysNotice"]> export type $SysNoticePayload = { name: "SysNotice" objects: {} scalars: $Extensions.GetPayloadResult<{ noticeId: number noticeTitle: string noticeType: string noticeContent: string | null status: string | null createBy: string | null createTime: string | null updateBy: string | null updateTime: string | null remark: string | null }, ExtArgs["result"]["sysNotice"]> composites: {} } type SysNoticeGetPayload = $Result.GetResult type SysNoticeCountArgs = Omit & { select?: SysNoticeCountAggregateInputType | true } export interface SysNoticeDelegate { [K: symbol]: { types: Prisma.TypeMap['model']['SysNotice'], meta: { name: 'SysNotice' } } /** * Find zero or one SysNotice that matches the filter. * @param {SysNoticeFindUniqueArgs} args - Arguments to find a SysNotice * @example * // Get one SysNotice * const sysNotice = await prisma.sysNotice.findUnique({ * where: { * // ... provide filter here * } * }) **/ findUnique>( args: SelectSubset> ): Prisma__SysNoticeClient<$Result.GetResult, T, 'findUnique'> | null, null, ExtArgs> /** * Find one SysNotice that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. * @param {SysNoticeFindUniqueOrThrowArgs} args - Arguments to find a SysNotice * @example * // Get one SysNotice * const sysNotice = await prisma.sysNotice.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) **/ findUniqueOrThrow>( args?: SelectSubset> ): Prisma__SysNoticeClient<$Result.GetResult, T, 'findUniqueOrThrow'>, never, ExtArgs> /** * Find the first SysNotice that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysNoticeFindFirstArgs} args - Arguments to find a SysNotice * @example * // Get one SysNotice * const sysNotice = await prisma.sysNotice.findFirst({ * where: { * // ... provide filter here * } * }) **/ findFirst>( args?: SelectSubset> ): Prisma__SysNoticeClient<$Result.GetResult, T, 'findFirst'> | null, null, ExtArgs> /** * Find the first SysNotice that matches the filter or * throw `PrismaKnownClientError` with `P2025` code if no matches were found. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysNoticeFindFirstOrThrowArgs} args - Arguments to find a SysNotice * @example * // Get one SysNotice * const sysNotice = await prisma.sysNotice.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) **/ findFirstOrThrow>( args?: SelectSubset> ): Prisma__SysNoticeClient<$Result.GetResult, T, 'findFirstOrThrow'>, never, ExtArgs> /** * Find zero or more SysNotices that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysNoticeFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all SysNotices * const sysNotices = await prisma.sysNotice.findMany() * * // Get first 10 SysNotices * const sysNotices = await prisma.sysNotice.findMany({ take: 10 }) * * // Only select the `noticeId` * const sysNoticeWithNoticeIdOnly = await prisma.sysNotice.findMany({ select: { noticeId: true } }) * **/ findMany>( args?: SelectSubset> ): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'>> /** * Create a SysNotice. * @param {SysNoticeCreateArgs} args - Arguments to create a SysNotice. * @example * // Create one SysNotice * const SysNotice = await prisma.sysNotice.create({ * data: { * // ... data to create a SysNotice * } * }) * **/ create>( args: SelectSubset> ): Prisma__SysNoticeClient<$Result.GetResult, T, 'create'>, never, ExtArgs> /** * Create many SysNotices. * @param {SysNoticeCreateManyArgs} args - Arguments to create many SysNotices. * @example * // Create many SysNotices * const sysNotice = await prisma.sysNotice.createMany({ * data: [ * // ... provide data here * ] * }) * **/ createMany>( args?: SelectSubset> ): Prisma.PrismaPromise /** * Delete a SysNotice. * @param {SysNoticeDeleteArgs} args - Arguments to delete one SysNotice. * @example * // Delete one SysNotice * const SysNotice = await prisma.sysNotice.delete({ * where: { * // ... filter to delete one SysNotice * } * }) * **/ delete>( args: SelectSubset> ): Prisma__SysNoticeClient<$Result.GetResult, T, 'delete'>, never, ExtArgs> /** * Update one SysNotice. * @param {SysNoticeUpdateArgs} args - Arguments to update one SysNotice. * @example * // Update one SysNotice * const sysNotice = await prisma.sysNotice.update({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * **/ update>( args: SelectSubset> ): Prisma__SysNoticeClient<$Result.GetResult, T, 'update'>, never, ExtArgs> /** * Delete zero or more SysNotices. * @param {SysNoticeDeleteManyArgs} args - Arguments to filter SysNotices to delete. * @example * // Delete a few SysNotices * const { count } = await prisma.sysNotice.deleteMany({ * where: { * // ... provide filter here * } * }) * **/ deleteMany>( args?: SelectSubset> ): Prisma.PrismaPromise /** * Update zero or more SysNotices. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysNoticeUpdateManyArgs} args - Arguments to update one or more rows. * @example * // Update many SysNotices * const sysNotice = await prisma.sysNotice.updateMany({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * **/ updateMany>( args: SelectSubset> ): Prisma.PrismaPromise /** * Create or update one SysNotice. * @param {SysNoticeUpsertArgs} args - Arguments to update or create a SysNotice. * @example * // Update or create a SysNotice * const sysNotice = await prisma.sysNotice.upsert({ * create: { * // ... data to create a SysNotice * }, * update: { * // ... in case it already exists, update * }, * where: { * // ... the filter for the SysNotice we want to update * } * }) **/ upsert>( args: SelectSubset> ): Prisma__SysNoticeClient<$Result.GetResult, T, 'upsert'>, never, ExtArgs> /** * Count the number of SysNotices. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysNoticeCountArgs} args - Arguments to filter SysNotices to count. * @example * // Count the number of SysNotices * const count = await prisma.sysNotice.count({ * where: { * // ... the filter for the SysNotices we want to count * } * }) **/ count( args?: Subset, ): Prisma.PrismaPromise< T extends $Utils.Record<'select', any> ? T['select'] extends true ? number : GetScalarType : number > /** * Allows you to perform aggregations operations on a SysNotice. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysNoticeAggregateArgs} args - Select which aggregations you would like to apply and on what fields. * @example * // Ordered by age ascending * // Where email contains prisma.io * // Limited to the 10 users * const aggregations = await prisma.user.aggregate({ * _avg: { * age: true, * }, * where: { * email: { * contains: "prisma.io", * }, * }, * orderBy: { * age: "asc", * }, * take: 10, * }) **/ aggregate(args: Subset): Prisma.PrismaPromise> /** * Group by SysNotice. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysNoticeGroupByArgs} args - Group by arguments. * @example * // Group by city, order by createdAt, get count * const result = await prisma.user.groupBy({ * by: ['city', 'createdAt'], * orderBy: { * createdAt: true * }, * _count: { * _all: true * }, * }) * **/ groupBy< T extends SysNoticeGroupByArgs, HasSelectOrTake extends Or< Extends<'skip', Keys>, Extends<'take', Keys> >, OrderByArg extends True extends HasSelectOrTake ? { orderBy: SysNoticeGroupByArgs['orderBy'] } : { orderBy?: SysNoticeGroupByArgs['orderBy'] }, OrderFields extends ExcludeUnderscoreKeys>>, ByFields extends MaybeTupleToUnion, ByValid extends Has, HavingFields extends GetHavingFields, HavingValid extends Has, ByEmpty extends T['by'] extends never[] ? True : False, InputErrors extends ByEmpty extends True ? `Error: "by" must not be empty.` : HavingValid extends False ? { [P in HavingFields]: P extends ByFields ? never : P extends string ? `Error: Field "${P}" used in "having" needs to be provided in "by".` : [ Error, 'Field ', P, ` in "having" needs to be provided in "by"`, ] }[HavingFields] : 'take' extends Keys ? 'orderBy' extends Keys ? ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] : 'Error: If you provide "take", you also need to provide "orderBy"' : 'skip' extends Keys ? 'orderBy' extends Keys ? ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] : 'Error: If you provide "skip", you also need to provide "orderBy"' : ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetSysNoticeGroupByPayload : Prisma.PrismaPromise /** * Fields of the SysNotice model */ readonly fields: SysNoticeFieldRefs; } /** * The delegate class that acts as a "Promise-like" for SysNotice. * Why is this prefixed with `Prisma__`? * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ export interface Prisma__SysNoticeClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: 'PrismaPromise'; /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of which ever callback is executed. */ then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise; /** * Attaches a callback for only the rejection of the Promise. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of the callback. */ catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise; /** * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The * resolved value cannot be modified from the callback. * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). * @returns A Promise for the completion of the callback. */ finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise; } /** * Fields of the SysNotice model */ interface SysNoticeFieldRefs { readonly noticeId: FieldRef<"SysNotice", 'Int'> readonly noticeTitle: FieldRef<"SysNotice", 'String'> readonly noticeType: FieldRef<"SysNotice", 'String'> readonly noticeContent: FieldRef<"SysNotice", 'String'> readonly status: FieldRef<"SysNotice", 'String'> readonly createBy: FieldRef<"SysNotice", 'String'> readonly createTime: FieldRef<"SysNotice", 'String'> readonly updateBy: FieldRef<"SysNotice", 'String'> readonly updateTime: FieldRef<"SysNotice", 'String'> readonly remark: FieldRef<"SysNotice", 'String'> } // Custom InputTypes /** * SysNotice findUnique */ export type SysNoticeFindUniqueArgs = { /** * Select specific fields to fetch from the SysNotice */ select?: SysNoticeSelect | null /** * Omit specific fields from the SysNotice */ omit?: SysNoticeOmit | null /** * Filter, which SysNotice to fetch. */ where: SysNoticeWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * SysNotice findUniqueOrThrow */ export type SysNoticeFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the SysNotice */ select?: SysNoticeSelect | null /** * Omit specific fields from the SysNotice */ omit?: SysNoticeOmit | null /** * Filter, which SysNotice to fetch. */ where: SysNoticeWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * SysNotice findFirst */ export type SysNoticeFindFirstArgs = { /** * Select specific fields to fetch from the SysNotice */ select?: SysNoticeSelect | null /** * Omit specific fields from the SysNotice */ omit?: SysNoticeOmit | null /** * Filter, which SysNotice to fetch. */ where?: SysNoticeWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of SysNotices to fetch. */ orderBy?: SysNoticeOrderByWithRelationInput | SysNoticeOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for SysNotices. */ cursor?: SysNoticeWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` SysNotices from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` SysNotices. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of SysNotices. */ distinct?: SysNoticeScalarFieldEnum | SysNoticeScalarFieldEnum[] relationLoadStrategy?: RelationLoadStrategy } /** * SysNotice findFirstOrThrow */ export type SysNoticeFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the SysNotice */ select?: SysNoticeSelect | null /** * Omit specific fields from the SysNotice */ omit?: SysNoticeOmit | null /** * Filter, which SysNotice to fetch. */ where?: SysNoticeWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of SysNotices to fetch. */ orderBy?: SysNoticeOrderByWithRelationInput | SysNoticeOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for SysNotices. */ cursor?: SysNoticeWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` SysNotices from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` SysNotices. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of SysNotices. */ distinct?: SysNoticeScalarFieldEnum | SysNoticeScalarFieldEnum[] relationLoadStrategy?: RelationLoadStrategy } /** * SysNotice findMany */ export type SysNoticeFindManyArgs = { /** * Select specific fields to fetch from the SysNotice */ select?: SysNoticeSelect | null /** * Omit specific fields from the SysNotice */ omit?: SysNoticeOmit | null /** * Filter, which SysNotices to fetch. */ where?: SysNoticeWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of SysNotices to fetch. */ orderBy?: SysNoticeOrderByWithRelationInput | SysNoticeOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for listing SysNotices. */ cursor?: SysNoticeWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` SysNotices from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` SysNotices. */ skip?: number distinct?: SysNoticeScalarFieldEnum | SysNoticeScalarFieldEnum[] relationLoadStrategy?: RelationLoadStrategy } /** * SysNotice create */ export type SysNoticeCreateArgs = { /** * Select specific fields to fetch from the SysNotice */ select?: SysNoticeSelect | null /** * Omit specific fields from the SysNotice */ omit?: SysNoticeOmit | null /** * The data needed to create a SysNotice. */ data: XOR relationLoadStrategy?: RelationLoadStrategy } /** * SysNotice createMany */ export type SysNoticeCreateManyArgs = { /** * The data used to create many SysNotices. */ data: SysNoticeCreateManyInput | SysNoticeCreateManyInput[] skipDuplicates?: boolean } /** * SysNotice update */ export type SysNoticeUpdateArgs = { /** * Select specific fields to fetch from the SysNotice */ select?: SysNoticeSelect | null /** * Omit specific fields from the SysNotice */ omit?: SysNoticeOmit | null /** * The data needed to update a SysNotice. */ data: XOR /** * Choose, which SysNotice to update. */ where: SysNoticeWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * SysNotice updateMany */ export type SysNoticeUpdateManyArgs = { /** * The data used to update SysNotices. */ data: XOR /** * Filter which SysNotices to update */ where?: SysNoticeWhereInput } /** * SysNotice upsert */ export type SysNoticeUpsertArgs = { /** * Select specific fields to fetch from the SysNotice */ select?: SysNoticeSelect | null /** * Omit specific fields from the SysNotice */ omit?: SysNoticeOmit | null /** * The filter to search for the SysNotice to update in case it exists. */ where: SysNoticeWhereUniqueInput /** * In case the SysNotice found by the `where` argument doesn't exist, create a new SysNotice with this data. */ create: XOR /** * In case the SysNotice was found with the provided `where` argument, update it with this data. */ update: XOR relationLoadStrategy?: RelationLoadStrategy } /** * SysNotice delete */ export type SysNoticeDeleteArgs = { /** * Select specific fields to fetch from the SysNotice */ select?: SysNoticeSelect | null /** * Omit specific fields from the SysNotice */ omit?: SysNoticeOmit | null /** * Filter which SysNotice to delete. */ where: SysNoticeWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * SysNotice deleteMany */ export type SysNoticeDeleteManyArgs = { /** * Filter which SysNotices to delete */ where?: SysNoticeWhereInput } /** * SysNotice without action */ export type SysNoticeDefaultArgs = { /** * Select specific fields to fetch from the SysNotice */ select?: SysNoticeSelect | null /** * Omit specific fields from the SysNotice */ omit?: SysNoticeOmit | null } /** * Model SysPost */ export type AggregateSysPost = { _count: SysPostCountAggregateOutputType | null _avg: SysPostAvgAggregateOutputType | null _sum: SysPostSumAggregateOutputType | null _min: SysPostMinAggregateOutputType | null _max: SysPostMaxAggregateOutputType | null } export type SysPostAvgAggregateOutputType = { postId: number | null postSort: number | null } export type SysPostSumAggregateOutputType = { postId: number | null postSort: number | null } export type SysPostMinAggregateOutputType = { postId: number | null postCode: string | null postName: string | null postSort: number | null status: string | null createBy: string | null createTime: string | null updateBy: string | null updateTime: string | null remark: string | null } export type SysPostMaxAggregateOutputType = { postId: number | null postCode: string | null postName: string | null postSort: number | null status: string | null createBy: string | null createTime: string | null updateBy: string | null updateTime: string | null remark: string | null } export type SysPostCountAggregateOutputType = { postId: number postCode: number postName: number postSort: number status: number createBy: number createTime: number updateBy: number updateTime: number remark: number _all: number } export type SysPostAvgAggregateInputType = { postId?: true postSort?: true } export type SysPostSumAggregateInputType = { postId?: true postSort?: true } export type SysPostMinAggregateInputType = { postId?: true postCode?: true postName?: true postSort?: true status?: true createBy?: true createTime?: true updateBy?: true updateTime?: true remark?: true } export type SysPostMaxAggregateInputType = { postId?: true postCode?: true postName?: true postSort?: true status?: true createBy?: true createTime?: true updateBy?: true updateTime?: true remark?: true } export type SysPostCountAggregateInputType = { postId?: true postCode?: true postName?: true postSort?: true status?: true createBy?: true createTime?: true updateBy?: true updateTime?: true remark?: true _all?: true } export type SysPostAggregateArgs = { /** * Filter which SysPost to aggregate. */ where?: SysPostWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of SysPosts to fetch. */ orderBy?: SysPostOrderByWithRelationInput | SysPostOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the start position */ cursor?: SysPostWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` SysPosts from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` SysPosts. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Count returned SysPosts **/ _count?: true | SysPostCountAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to average **/ _avg?: SysPostAvgAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to sum **/ _sum?: SysPostSumAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the minimum value **/ _min?: SysPostMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the maximum value **/ _max?: SysPostMaxAggregateInputType } export type GetSysPostAggregateType = { [P in keyof T & keyof AggregateSysPost]: P extends '_count' | 'count' ? T[P] extends true ? number : GetScalarType : GetScalarType } export type SysPostGroupByArgs = { where?: SysPostWhereInput orderBy?: SysPostOrderByWithAggregationInput | SysPostOrderByWithAggregationInput[] by: SysPostScalarFieldEnum[] | SysPostScalarFieldEnum having?: SysPostScalarWhereWithAggregatesInput take?: number skip?: number _count?: SysPostCountAggregateInputType | true _avg?: SysPostAvgAggregateInputType _sum?: SysPostSumAggregateInputType _min?: SysPostMinAggregateInputType _max?: SysPostMaxAggregateInputType } export type SysPostGroupByOutputType = { postId: number postCode: string postName: string postSort: number status: string createBy: string | null createTime: string | null updateBy: string | null updateTime: string | null remark: string | null _count: SysPostCountAggregateOutputType | null _avg: SysPostAvgAggregateOutputType | null _sum: SysPostSumAggregateOutputType | null _min: SysPostMinAggregateOutputType | null _max: SysPostMaxAggregateOutputType | null } type GetSysPostGroupByPayload = Prisma.PrismaPromise< Array< PickEnumerable & { [P in ((keyof T) & (keyof SysPostGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : GetScalarType : GetScalarType } > > export type SysPostSelect = $Extensions.GetSelect<{ postId?: boolean postCode?: boolean postName?: boolean postSort?: boolean status?: boolean createBy?: boolean createTime?: boolean updateBy?: boolean updateTime?: boolean remark?: boolean users?: boolean | SysPost$usersArgs _count?: boolean | SysPostCountOutputTypeDefaultArgs }, ExtArgs["result"]["sysPost"]> export type SysPostSelectScalar = { postId?: boolean postCode?: boolean postName?: boolean postSort?: boolean status?: boolean createBy?: boolean createTime?: boolean updateBy?: boolean updateTime?: boolean remark?: boolean } export type SysPostOmit = $Extensions.GetOmit<"postId" | "postCode" | "postName" | "postSort" | "status" | "createBy" | "createTime" | "updateBy" | "updateTime" | "remark", ExtArgs["result"]["sysPost"]> export type SysPostInclude = { users?: boolean | SysPost$usersArgs _count?: boolean | SysPostCountOutputTypeDefaultArgs } export type $SysPostPayload = { name: "SysPost" objects: { users: Prisma.$SysUserPostPayload[] } scalars: $Extensions.GetPayloadResult<{ postId: number postCode: string postName: string postSort: number status: string createBy: string | null createTime: string | null updateBy: string | null updateTime: string | null remark: string | null }, ExtArgs["result"]["sysPost"]> composites: {} } type SysPostGetPayload = $Result.GetResult type SysPostCountArgs = Omit & { select?: SysPostCountAggregateInputType | true } export interface SysPostDelegate { [K: symbol]: { types: Prisma.TypeMap['model']['SysPost'], meta: { name: 'SysPost' } } /** * Find zero or one SysPost that matches the filter. * @param {SysPostFindUniqueArgs} args - Arguments to find a SysPost * @example * // Get one SysPost * const sysPost = await prisma.sysPost.findUnique({ * where: { * // ... provide filter here * } * }) **/ findUnique>( args: SelectSubset> ): Prisma__SysPostClient<$Result.GetResult, T, 'findUnique'> | null, null, ExtArgs> /** * Find one SysPost that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. * @param {SysPostFindUniqueOrThrowArgs} args - Arguments to find a SysPost * @example * // Get one SysPost * const sysPost = await prisma.sysPost.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) **/ findUniqueOrThrow>( args?: SelectSubset> ): Prisma__SysPostClient<$Result.GetResult, T, 'findUniqueOrThrow'>, never, ExtArgs> /** * Find the first SysPost that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysPostFindFirstArgs} args - Arguments to find a SysPost * @example * // Get one SysPost * const sysPost = await prisma.sysPost.findFirst({ * where: { * // ... provide filter here * } * }) **/ findFirst>( args?: SelectSubset> ): Prisma__SysPostClient<$Result.GetResult, T, 'findFirst'> | null, null, ExtArgs> /** * Find the first SysPost that matches the filter or * throw `PrismaKnownClientError` with `P2025` code if no matches were found. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysPostFindFirstOrThrowArgs} args - Arguments to find a SysPost * @example * // Get one SysPost * const sysPost = await prisma.sysPost.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) **/ findFirstOrThrow>( args?: SelectSubset> ): Prisma__SysPostClient<$Result.GetResult, T, 'findFirstOrThrow'>, never, ExtArgs> /** * Find zero or more SysPosts that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysPostFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all SysPosts * const sysPosts = await prisma.sysPost.findMany() * * // Get first 10 SysPosts * const sysPosts = await prisma.sysPost.findMany({ take: 10 }) * * // Only select the `postId` * const sysPostWithPostIdOnly = await prisma.sysPost.findMany({ select: { postId: true } }) * **/ findMany>( args?: SelectSubset> ): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'>> /** * Create a SysPost. * @param {SysPostCreateArgs} args - Arguments to create a SysPost. * @example * // Create one SysPost * const SysPost = await prisma.sysPost.create({ * data: { * // ... data to create a SysPost * } * }) * **/ create>( args: SelectSubset> ): Prisma__SysPostClient<$Result.GetResult, T, 'create'>, never, ExtArgs> /** * Create many SysPosts. * @param {SysPostCreateManyArgs} args - Arguments to create many SysPosts. * @example * // Create many SysPosts * const sysPost = await prisma.sysPost.createMany({ * data: [ * // ... provide data here * ] * }) * **/ createMany>( args?: SelectSubset> ): Prisma.PrismaPromise /** * Delete a SysPost. * @param {SysPostDeleteArgs} args - Arguments to delete one SysPost. * @example * // Delete one SysPost * const SysPost = await prisma.sysPost.delete({ * where: { * // ... filter to delete one SysPost * } * }) * **/ delete>( args: SelectSubset> ): Prisma__SysPostClient<$Result.GetResult, T, 'delete'>, never, ExtArgs> /** * Update one SysPost. * @param {SysPostUpdateArgs} args - Arguments to update one SysPost. * @example * // Update one SysPost * const sysPost = await prisma.sysPost.update({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * **/ update>( args: SelectSubset> ): Prisma__SysPostClient<$Result.GetResult, T, 'update'>, never, ExtArgs> /** * Delete zero or more SysPosts. * @param {SysPostDeleteManyArgs} args - Arguments to filter SysPosts to delete. * @example * // Delete a few SysPosts * const { count } = await prisma.sysPost.deleteMany({ * where: { * // ... provide filter here * } * }) * **/ deleteMany>( args?: SelectSubset> ): Prisma.PrismaPromise /** * Update zero or more SysPosts. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysPostUpdateManyArgs} args - Arguments to update one or more rows. * @example * // Update many SysPosts * const sysPost = await prisma.sysPost.updateMany({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * **/ updateMany>( args: SelectSubset> ): Prisma.PrismaPromise /** * Create or update one SysPost. * @param {SysPostUpsertArgs} args - Arguments to update or create a SysPost. * @example * // Update or create a SysPost * const sysPost = await prisma.sysPost.upsert({ * create: { * // ... data to create a SysPost * }, * update: { * // ... in case it already exists, update * }, * where: { * // ... the filter for the SysPost we want to update * } * }) **/ upsert>( args: SelectSubset> ): Prisma__SysPostClient<$Result.GetResult, T, 'upsert'>, never, ExtArgs> /** * Count the number of SysPosts. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysPostCountArgs} args - Arguments to filter SysPosts to count. * @example * // Count the number of SysPosts * const count = await prisma.sysPost.count({ * where: { * // ... the filter for the SysPosts we want to count * } * }) **/ count( args?: Subset, ): Prisma.PrismaPromise< T extends $Utils.Record<'select', any> ? T['select'] extends true ? number : GetScalarType : number > /** * Allows you to perform aggregations operations on a SysPost. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysPostAggregateArgs} args - Select which aggregations you would like to apply and on what fields. * @example * // Ordered by age ascending * // Where email contains prisma.io * // Limited to the 10 users * const aggregations = await prisma.user.aggregate({ * _avg: { * age: true, * }, * where: { * email: { * contains: "prisma.io", * }, * }, * orderBy: { * age: "asc", * }, * take: 10, * }) **/ aggregate(args: Subset): Prisma.PrismaPromise> /** * Group by SysPost. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysPostGroupByArgs} args - Group by arguments. * @example * // Group by city, order by createdAt, get count * const result = await prisma.user.groupBy({ * by: ['city', 'createdAt'], * orderBy: { * createdAt: true * }, * _count: { * _all: true * }, * }) * **/ groupBy< T extends SysPostGroupByArgs, HasSelectOrTake extends Or< Extends<'skip', Keys>, Extends<'take', Keys> >, OrderByArg extends True extends HasSelectOrTake ? { orderBy: SysPostGroupByArgs['orderBy'] } : { orderBy?: SysPostGroupByArgs['orderBy'] }, OrderFields extends ExcludeUnderscoreKeys>>, ByFields extends MaybeTupleToUnion, ByValid extends Has, HavingFields extends GetHavingFields, HavingValid extends Has, ByEmpty extends T['by'] extends never[] ? True : False, InputErrors extends ByEmpty extends True ? `Error: "by" must not be empty.` : HavingValid extends False ? { [P in HavingFields]: P extends ByFields ? never : P extends string ? `Error: Field "${P}" used in "having" needs to be provided in "by".` : [ Error, 'Field ', P, ` in "having" needs to be provided in "by"`, ] }[HavingFields] : 'take' extends Keys ? 'orderBy' extends Keys ? ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] : 'Error: If you provide "take", you also need to provide "orderBy"' : 'skip' extends Keys ? 'orderBy' extends Keys ? ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] : 'Error: If you provide "skip", you also need to provide "orderBy"' : ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetSysPostGroupByPayload : Prisma.PrismaPromise /** * Fields of the SysPost model */ readonly fields: SysPostFieldRefs; } /** * The delegate class that acts as a "Promise-like" for SysPost. * Why is this prefixed with `Prisma__`? * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ export interface Prisma__SysPostClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: 'PrismaPromise'; users = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'> | Null>; /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of which ever callback is executed. */ then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise; /** * Attaches a callback for only the rejection of the Promise. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of the callback. */ catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise; /** * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The * resolved value cannot be modified from the callback. * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). * @returns A Promise for the completion of the callback. */ finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise; } /** * Fields of the SysPost model */ interface SysPostFieldRefs { readonly postId: FieldRef<"SysPost", 'Int'> readonly postCode: FieldRef<"SysPost", 'String'> readonly postName: FieldRef<"SysPost", 'String'> readonly postSort: FieldRef<"SysPost", 'Int'> readonly status: FieldRef<"SysPost", 'String'> readonly createBy: FieldRef<"SysPost", 'String'> readonly createTime: FieldRef<"SysPost", 'String'> readonly updateBy: FieldRef<"SysPost", 'String'> readonly updateTime: FieldRef<"SysPost", 'String'> readonly remark: FieldRef<"SysPost", 'String'> } // Custom InputTypes /** * SysPost findUnique */ export type SysPostFindUniqueArgs = { /** * Select specific fields to fetch from the SysPost */ select?: SysPostSelect | null /** * Omit specific fields from the SysPost */ omit?: SysPostOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysPostInclude | null /** * Filter, which SysPost to fetch. */ where: SysPostWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * SysPost findUniqueOrThrow */ export type SysPostFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the SysPost */ select?: SysPostSelect | null /** * Omit specific fields from the SysPost */ omit?: SysPostOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysPostInclude | null /** * Filter, which SysPost to fetch. */ where: SysPostWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * SysPost findFirst */ export type SysPostFindFirstArgs = { /** * Select specific fields to fetch from the SysPost */ select?: SysPostSelect | null /** * Omit specific fields from the SysPost */ omit?: SysPostOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysPostInclude | null /** * Filter, which SysPost to fetch. */ where?: SysPostWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of SysPosts to fetch. */ orderBy?: SysPostOrderByWithRelationInput | SysPostOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for SysPosts. */ cursor?: SysPostWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` SysPosts from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` SysPosts. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of SysPosts. */ distinct?: SysPostScalarFieldEnum | SysPostScalarFieldEnum[] relationLoadStrategy?: RelationLoadStrategy } /** * SysPost findFirstOrThrow */ export type SysPostFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the SysPost */ select?: SysPostSelect | null /** * Omit specific fields from the SysPost */ omit?: SysPostOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysPostInclude | null /** * Filter, which SysPost to fetch. */ where?: SysPostWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of SysPosts to fetch. */ orderBy?: SysPostOrderByWithRelationInput | SysPostOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for SysPosts. */ cursor?: SysPostWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` SysPosts from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` SysPosts. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of SysPosts. */ distinct?: SysPostScalarFieldEnum | SysPostScalarFieldEnum[] relationLoadStrategy?: RelationLoadStrategy } /** * SysPost findMany */ export type SysPostFindManyArgs = { /** * Select specific fields to fetch from the SysPost */ select?: SysPostSelect | null /** * Omit specific fields from the SysPost */ omit?: SysPostOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysPostInclude | null /** * Filter, which SysPosts to fetch. */ where?: SysPostWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of SysPosts to fetch. */ orderBy?: SysPostOrderByWithRelationInput | SysPostOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for listing SysPosts. */ cursor?: SysPostWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` SysPosts from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` SysPosts. */ skip?: number distinct?: SysPostScalarFieldEnum | SysPostScalarFieldEnum[] relationLoadStrategy?: RelationLoadStrategy } /** * SysPost create */ export type SysPostCreateArgs = { /** * Select specific fields to fetch from the SysPost */ select?: SysPostSelect | null /** * Omit specific fields from the SysPost */ omit?: SysPostOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysPostInclude | null /** * The data needed to create a SysPost. */ data: XOR relationLoadStrategy?: RelationLoadStrategy } /** * SysPost createMany */ export type SysPostCreateManyArgs = { /** * The data used to create many SysPosts. */ data: SysPostCreateManyInput | SysPostCreateManyInput[] skipDuplicates?: boolean } /** * SysPost update */ export type SysPostUpdateArgs = { /** * Select specific fields to fetch from the SysPost */ select?: SysPostSelect | null /** * Omit specific fields from the SysPost */ omit?: SysPostOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysPostInclude | null /** * The data needed to update a SysPost. */ data: XOR /** * Choose, which SysPost to update. */ where: SysPostWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * SysPost updateMany */ export type SysPostUpdateManyArgs = { /** * The data used to update SysPosts. */ data: XOR /** * Filter which SysPosts to update */ where?: SysPostWhereInput } /** * SysPost upsert */ export type SysPostUpsertArgs = { /** * Select specific fields to fetch from the SysPost */ select?: SysPostSelect | null /** * Omit specific fields from the SysPost */ omit?: SysPostOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysPostInclude | null /** * The filter to search for the SysPost to update in case it exists. */ where: SysPostWhereUniqueInput /** * In case the SysPost found by the `where` argument doesn't exist, create a new SysPost with this data. */ create: XOR /** * In case the SysPost was found with the provided `where` argument, update it with this data. */ update: XOR relationLoadStrategy?: RelationLoadStrategy } /** * SysPost delete */ export type SysPostDeleteArgs = { /** * Select specific fields to fetch from the SysPost */ select?: SysPostSelect | null /** * Omit specific fields from the SysPost */ omit?: SysPostOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysPostInclude | null /** * Filter which SysPost to delete. */ where: SysPostWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * SysPost deleteMany */ export type SysPostDeleteManyArgs = { /** * Filter which SysPosts to delete */ where?: SysPostWhereInput } /** * SysPost.users */ export type SysPost$usersArgs = { /** * Select specific fields to fetch from the SysUserPost */ select?: SysUserPostSelect | null /** * Omit specific fields from the SysUserPost */ omit?: SysUserPostOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysUserPostInclude | null where?: SysUserPostWhereInput orderBy?: SysUserPostOrderByWithRelationInput | SysUserPostOrderByWithRelationInput[] cursor?: SysUserPostWhereUniqueInput take?: number skip?: number distinct?: SysUserPostScalarFieldEnum | SysUserPostScalarFieldEnum[] } /** * SysPost without action */ export type SysPostDefaultArgs = { /** * Select specific fields to fetch from the SysPost */ select?: SysPostSelect | null /** * Omit specific fields from the SysPost */ omit?: SysPostOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysPostInclude | null } /** * Model SysUserPost */ export type AggregateSysUserPost = { _count: SysUserPostCountAggregateOutputType | null _avg: SysUserPostAvgAggregateOutputType | null _sum: SysUserPostSumAggregateOutputType | null _min: SysUserPostMinAggregateOutputType | null _max: SysUserPostMaxAggregateOutputType | null } export type SysUserPostAvgAggregateOutputType = { userId: number | null postId: number | null } export type SysUserPostSumAggregateOutputType = { userId: number | null postId: number | null } export type SysUserPostMinAggregateOutputType = { userId: number | null postId: number | null } export type SysUserPostMaxAggregateOutputType = { userId: number | null postId: number | null } export type SysUserPostCountAggregateOutputType = { userId: number postId: number _all: number } export type SysUserPostAvgAggregateInputType = { userId?: true postId?: true } export type SysUserPostSumAggregateInputType = { userId?: true postId?: true } export type SysUserPostMinAggregateInputType = { userId?: true postId?: true } export type SysUserPostMaxAggregateInputType = { userId?: true postId?: true } export type SysUserPostCountAggregateInputType = { userId?: true postId?: true _all?: true } export type SysUserPostAggregateArgs = { /** * Filter which SysUserPost to aggregate. */ where?: SysUserPostWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of SysUserPosts to fetch. */ orderBy?: SysUserPostOrderByWithRelationInput | SysUserPostOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the start position */ cursor?: SysUserPostWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` SysUserPosts from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` SysUserPosts. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Count returned SysUserPosts **/ _count?: true | SysUserPostCountAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to average **/ _avg?: SysUserPostAvgAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to sum **/ _sum?: SysUserPostSumAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the minimum value **/ _min?: SysUserPostMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the maximum value **/ _max?: SysUserPostMaxAggregateInputType } export type GetSysUserPostAggregateType = { [P in keyof T & keyof AggregateSysUserPost]: P extends '_count' | 'count' ? T[P] extends true ? number : GetScalarType : GetScalarType } export type SysUserPostGroupByArgs = { where?: SysUserPostWhereInput orderBy?: SysUserPostOrderByWithAggregationInput | SysUserPostOrderByWithAggregationInput[] by: SysUserPostScalarFieldEnum[] | SysUserPostScalarFieldEnum having?: SysUserPostScalarWhereWithAggregatesInput take?: number skip?: number _count?: SysUserPostCountAggregateInputType | true _avg?: SysUserPostAvgAggregateInputType _sum?: SysUserPostSumAggregateInputType _min?: SysUserPostMinAggregateInputType _max?: SysUserPostMaxAggregateInputType } export type SysUserPostGroupByOutputType = { userId: number postId: number _count: SysUserPostCountAggregateOutputType | null _avg: SysUserPostAvgAggregateOutputType | null _sum: SysUserPostSumAggregateOutputType | null _min: SysUserPostMinAggregateOutputType | null _max: SysUserPostMaxAggregateOutputType | null } type GetSysUserPostGroupByPayload = Prisma.PrismaPromise< Array< PickEnumerable & { [P in ((keyof T) & (keyof SysUserPostGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : GetScalarType : GetScalarType } > > export type SysUserPostSelect = $Extensions.GetSelect<{ userId?: boolean postId?: boolean user?: boolean | SysUserDefaultArgs post?: boolean | SysPostDefaultArgs }, ExtArgs["result"]["sysUserPost"]> export type SysUserPostSelectScalar = { userId?: boolean postId?: boolean } export type SysUserPostOmit = $Extensions.GetOmit<"userId" | "postId", ExtArgs["result"]["sysUserPost"]> export type SysUserPostInclude = { user?: boolean | SysUserDefaultArgs post?: boolean | SysPostDefaultArgs } export type $SysUserPostPayload = { name: "SysUserPost" objects: { user: Prisma.$SysUserPayload post: Prisma.$SysPostPayload } scalars: $Extensions.GetPayloadResult<{ userId: number postId: number }, ExtArgs["result"]["sysUserPost"]> composites: {} } type SysUserPostGetPayload = $Result.GetResult type SysUserPostCountArgs = Omit & { select?: SysUserPostCountAggregateInputType | true } export interface SysUserPostDelegate { [K: symbol]: { types: Prisma.TypeMap['model']['SysUserPost'], meta: { name: 'SysUserPost' } } /** * Find zero or one SysUserPost that matches the filter. * @param {SysUserPostFindUniqueArgs} args - Arguments to find a SysUserPost * @example * // Get one SysUserPost * const sysUserPost = await prisma.sysUserPost.findUnique({ * where: { * // ... provide filter here * } * }) **/ findUnique>( args: SelectSubset> ): Prisma__SysUserPostClient<$Result.GetResult, T, 'findUnique'> | null, null, ExtArgs> /** * Find one SysUserPost that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. * @param {SysUserPostFindUniqueOrThrowArgs} args - Arguments to find a SysUserPost * @example * // Get one SysUserPost * const sysUserPost = await prisma.sysUserPost.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) **/ findUniqueOrThrow>( args?: SelectSubset> ): Prisma__SysUserPostClient<$Result.GetResult, T, 'findUniqueOrThrow'>, never, ExtArgs> /** * Find the first SysUserPost that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysUserPostFindFirstArgs} args - Arguments to find a SysUserPost * @example * // Get one SysUserPost * const sysUserPost = await prisma.sysUserPost.findFirst({ * where: { * // ... provide filter here * } * }) **/ findFirst>( args?: SelectSubset> ): Prisma__SysUserPostClient<$Result.GetResult, T, 'findFirst'> | null, null, ExtArgs> /** * Find the first SysUserPost that matches the filter or * throw `PrismaKnownClientError` with `P2025` code if no matches were found. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysUserPostFindFirstOrThrowArgs} args - Arguments to find a SysUserPost * @example * // Get one SysUserPost * const sysUserPost = await prisma.sysUserPost.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) **/ findFirstOrThrow>( args?: SelectSubset> ): Prisma__SysUserPostClient<$Result.GetResult, T, 'findFirstOrThrow'>, never, ExtArgs> /** * Find zero or more SysUserPosts that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysUserPostFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all SysUserPosts * const sysUserPosts = await prisma.sysUserPost.findMany() * * // Get first 10 SysUserPosts * const sysUserPosts = await prisma.sysUserPost.findMany({ take: 10 }) * * // Only select the `userId` * const sysUserPostWithUserIdOnly = await prisma.sysUserPost.findMany({ select: { userId: true } }) * **/ findMany>( args?: SelectSubset> ): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'>> /** * Create a SysUserPost. * @param {SysUserPostCreateArgs} args - Arguments to create a SysUserPost. * @example * // Create one SysUserPost * const SysUserPost = await prisma.sysUserPost.create({ * data: { * // ... data to create a SysUserPost * } * }) * **/ create>( args: SelectSubset> ): Prisma__SysUserPostClient<$Result.GetResult, T, 'create'>, never, ExtArgs> /** * Create many SysUserPosts. * @param {SysUserPostCreateManyArgs} args - Arguments to create many SysUserPosts. * @example * // Create many SysUserPosts * const sysUserPost = await prisma.sysUserPost.createMany({ * data: [ * // ... provide data here * ] * }) * **/ createMany>( args?: SelectSubset> ): Prisma.PrismaPromise /** * Delete a SysUserPost. * @param {SysUserPostDeleteArgs} args - Arguments to delete one SysUserPost. * @example * // Delete one SysUserPost * const SysUserPost = await prisma.sysUserPost.delete({ * where: { * // ... filter to delete one SysUserPost * } * }) * **/ delete>( args: SelectSubset> ): Prisma__SysUserPostClient<$Result.GetResult, T, 'delete'>, never, ExtArgs> /** * Update one SysUserPost. * @param {SysUserPostUpdateArgs} args - Arguments to update one SysUserPost. * @example * // Update one SysUserPost * const sysUserPost = await prisma.sysUserPost.update({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * **/ update>( args: SelectSubset> ): Prisma__SysUserPostClient<$Result.GetResult, T, 'update'>, never, ExtArgs> /** * Delete zero or more SysUserPosts. * @param {SysUserPostDeleteManyArgs} args - Arguments to filter SysUserPosts to delete. * @example * // Delete a few SysUserPosts * const { count } = await prisma.sysUserPost.deleteMany({ * where: { * // ... provide filter here * } * }) * **/ deleteMany>( args?: SelectSubset> ): Prisma.PrismaPromise /** * Update zero or more SysUserPosts. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysUserPostUpdateManyArgs} args - Arguments to update one or more rows. * @example * // Update many SysUserPosts * const sysUserPost = await prisma.sysUserPost.updateMany({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * **/ updateMany>( args: SelectSubset> ): Prisma.PrismaPromise /** * Create or update one SysUserPost. * @param {SysUserPostUpsertArgs} args - Arguments to update or create a SysUserPost. * @example * // Update or create a SysUserPost * const sysUserPost = await prisma.sysUserPost.upsert({ * create: { * // ... data to create a SysUserPost * }, * update: { * // ... in case it already exists, update * }, * where: { * // ... the filter for the SysUserPost we want to update * } * }) **/ upsert>( args: SelectSubset> ): Prisma__SysUserPostClient<$Result.GetResult, T, 'upsert'>, never, ExtArgs> /** * Count the number of SysUserPosts. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysUserPostCountArgs} args - Arguments to filter SysUserPosts to count. * @example * // Count the number of SysUserPosts * const count = await prisma.sysUserPost.count({ * where: { * // ... the filter for the SysUserPosts we want to count * } * }) **/ count( args?: Subset, ): Prisma.PrismaPromise< T extends $Utils.Record<'select', any> ? T['select'] extends true ? number : GetScalarType : number > /** * Allows you to perform aggregations operations on a SysUserPost. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysUserPostAggregateArgs} args - Select which aggregations you would like to apply and on what fields. * @example * // Ordered by age ascending * // Where email contains prisma.io * // Limited to the 10 users * const aggregations = await prisma.user.aggregate({ * _avg: { * age: true, * }, * where: { * email: { * contains: "prisma.io", * }, * }, * orderBy: { * age: "asc", * }, * take: 10, * }) **/ aggregate(args: Subset): Prisma.PrismaPromise> /** * Group by SysUserPost. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysUserPostGroupByArgs} args - Group by arguments. * @example * // Group by city, order by createdAt, get count * const result = await prisma.user.groupBy({ * by: ['city', 'createdAt'], * orderBy: { * createdAt: true * }, * _count: { * _all: true * }, * }) * **/ groupBy< T extends SysUserPostGroupByArgs, HasSelectOrTake extends Or< Extends<'skip', Keys>, Extends<'take', Keys> >, OrderByArg extends True extends HasSelectOrTake ? { orderBy: SysUserPostGroupByArgs['orderBy'] } : { orderBy?: SysUserPostGroupByArgs['orderBy'] }, OrderFields extends ExcludeUnderscoreKeys>>, ByFields extends MaybeTupleToUnion, ByValid extends Has, HavingFields extends GetHavingFields, HavingValid extends Has, ByEmpty extends T['by'] extends never[] ? True : False, InputErrors extends ByEmpty extends True ? `Error: "by" must not be empty.` : HavingValid extends False ? { [P in HavingFields]: P extends ByFields ? never : P extends string ? `Error: Field "${P}" used in "having" needs to be provided in "by".` : [ Error, 'Field ', P, ` in "having" needs to be provided in "by"`, ] }[HavingFields] : 'take' extends Keys ? 'orderBy' extends Keys ? ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] : 'Error: If you provide "take", you also need to provide "orderBy"' : 'skip' extends Keys ? 'orderBy' extends Keys ? ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] : 'Error: If you provide "skip", you also need to provide "orderBy"' : ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetSysUserPostGroupByPayload : Prisma.PrismaPromise /** * Fields of the SysUserPost model */ readonly fields: SysUserPostFieldRefs; } /** * The delegate class that acts as a "Promise-like" for SysUserPost. * Why is this prefixed with `Prisma__`? * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ export interface Prisma__SysUserPostClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: 'PrismaPromise'; user = {}>(args?: Subset>): Prisma__SysUserClient<$Result.GetResult, T, 'findUniqueOrThrow'> | Null, Null, ExtArgs>; post = {}>(args?: Subset>): Prisma__SysPostClient<$Result.GetResult, T, 'findUniqueOrThrow'> | Null, Null, ExtArgs>; /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of which ever callback is executed. */ then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise; /** * Attaches a callback for only the rejection of the Promise. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of the callback. */ catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise; /** * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The * resolved value cannot be modified from the callback. * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). * @returns A Promise for the completion of the callback. */ finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise; } /** * Fields of the SysUserPost model */ interface SysUserPostFieldRefs { readonly userId: FieldRef<"SysUserPost", 'Int'> readonly postId: FieldRef<"SysUserPost", 'Int'> } // Custom InputTypes /** * SysUserPost findUnique */ export type SysUserPostFindUniqueArgs = { /** * Select specific fields to fetch from the SysUserPost */ select?: SysUserPostSelect | null /** * Omit specific fields from the SysUserPost */ omit?: SysUserPostOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysUserPostInclude | null /** * Filter, which SysUserPost to fetch. */ where: SysUserPostWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * SysUserPost findUniqueOrThrow */ export type SysUserPostFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the SysUserPost */ select?: SysUserPostSelect | null /** * Omit specific fields from the SysUserPost */ omit?: SysUserPostOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysUserPostInclude | null /** * Filter, which SysUserPost to fetch. */ where: SysUserPostWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * SysUserPost findFirst */ export type SysUserPostFindFirstArgs = { /** * Select specific fields to fetch from the SysUserPost */ select?: SysUserPostSelect | null /** * Omit specific fields from the SysUserPost */ omit?: SysUserPostOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysUserPostInclude | null /** * Filter, which SysUserPost to fetch. */ where?: SysUserPostWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of SysUserPosts to fetch. */ orderBy?: SysUserPostOrderByWithRelationInput | SysUserPostOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for SysUserPosts. */ cursor?: SysUserPostWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` SysUserPosts from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` SysUserPosts. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of SysUserPosts. */ distinct?: SysUserPostScalarFieldEnum | SysUserPostScalarFieldEnum[] relationLoadStrategy?: RelationLoadStrategy } /** * SysUserPost findFirstOrThrow */ export type SysUserPostFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the SysUserPost */ select?: SysUserPostSelect | null /** * Omit specific fields from the SysUserPost */ omit?: SysUserPostOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysUserPostInclude | null /** * Filter, which SysUserPost to fetch. */ where?: SysUserPostWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of SysUserPosts to fetch. */ orderBy?: SysUserPostOrderByWithRelationInput | SysUserPostOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for SysUserPosts. */ cursor?: SysUserPostWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` SysUserPosts from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` SysUserPosts. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of SysUserPosts. */ distinct?: SysUserPostScalarFieldEnum | SysUserPostScalarFieldEnum[] relationLoadStrategy?: RelationLoadStrategy } /** * SysUserPost findMany */ export type SysUserPostFindManyArgs = { /** * Select specific fields to fetch from the SysUserPost */ select?: SysUserPostSelect | null /** * Omit specific fields from the SysUserPost */ omit?: SysUserPostOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysUserPostInclude | null /** * Filter, which SysUserPosts to fetch. */ where?: SysUserPostWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of SysUserPosts to fetch. */ orderBy?: SysUserPostOrderByWithRelationInput | SysUserPostOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for listing SysUserPosts. */ cursor?: SysUserPostWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` SysUserPosts from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` SysUserPosts. */ skip?: number distinct?: SysUserPostScalarFieldEnum | SysUserPostScalarFieldEnum[] relationLoadStrategy?: RelationLoadStrategy } /** * SysUserPost create */ export type SysUserPostCreateArgs = { /** * Select specific fields to fetch from the SysUserPost */ select?: SysUserPostSelect | null /** * Omit specific fields from the SysUserPost */ omit?: SysUserPostOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysUserPostInclude | null /** * The data needed to create a SysUserPost. */ data: XOR relationLoadStrategy?: RelationLoadStrategy } /** * SysUserPost createMany */ export type SysUserPostCreateManyArgs = { /** * The data used to create many SysUserPosts. */ data: SysUserPostCreateManyInput | SysUserPostCreateManyInput[] skipDuplicates?: boolean } /** * SysUserPost update */ export type SysUserPostUpdateArgs = { /** * Select specific fields to fetch from the SysUserPost */ select?: SysUserPostSelect | null /** * Omit specific fields from the SysUserPost */ omit?: SysUserPostOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysUserPostInclude | null /** * The data needed to update a SysUserPost. */ data: XOR /** * Choose, which SysUserPost to update. */ where: SysUserPostWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * SysUserPost updateMany */ export type SysUserPostUpdateManyArgs = { /** * The data used to update SysUserPosts. */ data: XOR /** * Filter which SysUserPosts to update */ where?: SysUserPostWhereInput } /** * SysUserPost upsert */ export type SysUserPostUpsertArgs = { /** * Select specific fields to fetch from the SysUserPost */ select?: SysUserPostSelect | null /** * Omit specific fields from the SysUserPost */ omit?: SysUserPostOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysUserPostInclude | null /** * The filter to search for the SysUserPost to update in case it exists. */ where: SysUserPostWhereUniqueInput /** * In case the SysUserPost found by the `where` argument doesn't exist, create a new SysUserPost with this data. */ create: XOR /** * In case the SysUserPost was found with the provided `where` argument, update it with this data. */ update: XOR relationLoadStrategy?: RelationLoadStrategy } /** * SysUserPost delete */ export type SysUserPostDeleteArgs = { /** * Select specific fields to fetch from the SysUserPost */ select?: SysUserPostSelect | null /** * Omit specific fields from the SysUserPost */ omit?: SysUserPostOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysUserPostInclude | null /** * Filter which SysUserPost to delete. */ where: SysUserPostWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * SysUserPost deleteMany */ export type SysUserPostDeleteManyArgs = { /** * Filter which SysUserPosts to delete */ where?: SysUserPostWhereInput } /** * SysUserPost without action */ export type SysUserPostDefaultArgs = { /** * Select specific fields to fetch from the SysUserPost */ select?: SysUserPostSelect | null /** * Omit specific fields from the SysUserPost */ omit?: SysUserPostOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysUserPostInclude | null } /** * Model SysRoleDept */ export type AggregateSysRoleDept = { _count: SysRoleDeptCountAggregateOutputType | null _avg: SysRoleDeptAvgAggregateOutputType | null _sum: SysRoleDeptSumAggregateOutputType | null _min: SysRoleDeptMinAggregateOutputType | null _max: SysRoleDeptMaxAggregateOutputType | null } export type SysRoleDeptAvgAggregateOutputType = { roleId: number | null deptId: number | null } export type SysRoleDeptSumAggregateOutputType = { roleId: number | null deptId: number | null } export type SysRoleDeptMinAggregateOutputType = { roleId: number | null deptId: number | null } export type SysRoleDeptMaxAggregateOutputType = { roleId: number | null deptId: number | null } export type SysRoleDeptCountAggregateOutputType = { roleId: number deptId: number _all: number } export type SysRoleDeptAvgAggregateInputType = { roleId?: true deptId?: true } export type SysRoleDeptSumAggregateInputType = { roleId?: true deptId?: true } export type SysRoleDeptMinAggregateInputType = { roleId?: true deptId?: true } export type SysRoleDeptMaxAggregateInputType = { roleId?: true deptId?: true } export type SysRoleDeptCountAggregateInputType = { roleId?: true deptId?: true _all?: true } export type SysRoleDeptAggregateArgs = { /** * Filter which SysRoleDept to aggregate. */ where?: SysRoleDeptWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of SysRoleDepts to fetch. */ orderBy?: SysRoleDeptOrderByWithRelationInput | SysRoleDeptOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the start position */ cursor?: SysRoleDeptWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` SysRoleDepts from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` SysRoleDepts. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Count returned SysRoleDepts **/ _count?: true | SysRoleDeptCountAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to average **/ _avg?: SysRoleDeptAvgAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to sum **/ _sum?: SysRoleDeptSumAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the minimum value **/ _min?: SysRoleDeptMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the maximum value **/ _max?: SysRoleDeptMaxAggregateInputType } export type GetSysRoleDeptAggregateType = { [P in keyof T & keyof AggregateSysRoleDept]: P extends '_count' | 'count' ? T[P] extends true ? number : GetScalarType : GetScalarType } export type SysRoleDeptGroupByArgs = { where?: SysRoleDeptWhereInput orderBy?: SysRoleDeptOrderByWithAggregationInput | SysRoleDeptOrderByWithAggregationInput[] by: SysRoleDeptScalarFieldEnum[] | SysRoleDeptScalarFieldEnum having?: SysRoleDeptScalarWhereWithAggregatesInput take?: number skip?: number _count?: SysRoleDeptCountAggregateInputType | true _avg?: SysRoleDeptAvgAggregateInputType _sum?: SysRoleDeptSumAggregateInputType _min?: SysRoleDeptMinAggregateInputType _max?: SysRoleDeptMaxAggregateInputType } export type SysRoleDeptGroupByOutputType = { roleId: number deptId: number _count: SysRoleDeptCountAggregateOutputType | null _avg: SysRoleDeptAvgAggregateOutputType | null _sum: SysRoleDeptSumAggregateOutputType | null _min: SysRoleDeptMinAggregateOutputType | null _max: SysRoleDeptMaxAggregateOutputType | null } type GetSysRoleDeptGroupByPayload = Prisma.PrismaPromise< Array< PickEnumerable & { [P in ((keyof T) & (keyof SysRoleDeptGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : GetScalarType : GetScalarType } > > export type SysRoleDeptSelect = $Extensions.GetSelect<{ roleId?: boolean deptId?: boolean role?: boolean | SysRoleDefaultArgs dept?: boolean | SysDeptDefaultArgs }, ExtArgs["result"]["sysRoleDept"]> export type SysRoleDeptSelectScalar = { roleId?: boolean deptId?: boolean } export type SysRoleDeptOmit = $Extensions.GetOmit<"roleId" | "deptId", ExtArgs["result"]["sysRoleDept"]> export type SysRoleDeptInclude = { role?: boolean | SysRoleDefaultArgs dept?: boolean | SysDeptDefaultArgs } export type $SysRoleDeptPayload = { name: "SysRoleDept" objects: { role: Prisma.$SysRolePayload dept: Prisma.$SysDeptPayload } scalars: $Extensions.GetPayloadResult<{ roleId: number deptId: number }, ExtArgs["result"]["sysRoleDept"]> composites: {} } type SysRoleDeptGetPayload = $Result.GetResult type SysRoleDeptCountArgs = Omit & { select?: SysRoleDeptCountAggregateInputType | true } export interface SysRoleDeptDelegate { [K: symbol]: { types: Prisma.TypeMap['model']['SysRoleDept'], meta: { name: 'SysRoleDept' } } /** * Find zero or one SysRoleDept that matches the filter. * @param {SysRoleDeptFindUniqueArgs} args - Arguments to find a SysRoleDept * @example * // Get one SysRoleDept * const sysRoleDept = await prisma.sysRoleDept.findUnique({ * where: { * // ... provide filter here * } * }) **/ findUnique>( args: SelectSubset> ): Prisma__SysRoleDeptClient<$Result.GetResult, T, 'findUnique'> | null, null, ExtArgs> /** * Find one SysRoleDept that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. * @param {SysRoleDeptFindUniqueOrThrowArgs} args - Arguments to find a SysRoleDept * @example * // Get one SysRoleDept * const sysRoleDept = await prisma.sysRoleDept.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) **/ findUniqueOrThrow>( args?: SelectSubset> ): Prisma__SysRoleDeptClient<$Result.GetResult, T, 'findUniqueOrThrow'>, never, ExtArgs> /** * Find the first SysRoleDept that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysRoleDeptFindFirstArgs} args - Arguments to find a SysRoleDept * @example * // Get one SysRoleDept * const sysRoleDept = await prisma.sysRoleDept.findFirst({ * where: { * // ... provide filter here * } * }) **/ findFirst>( args?: SelectSubset> ): Prisma__SysRoleDeptClient<$Result.GetResult, T, 'findFirst'> | null, null, ExtArgs> /** * Find the first SysRoleDept that matches the filter or * throw `PrismaKnownClientError` with `P2025` code if no matches were found. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysRoleDeptFindFirstOrThrowArgs} args - Arguments to find a SysRoleDept * @example * // Get one SysRoleDept * const sysRoleDept = await prisma.sysRoleDept.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) **/ findFirstOrThrow>( args?: SelectSubset> ): Prisma__SysRoleDeptClient<$Result.GetResult, T, 'findFirstOrThrow'>, never, ExtArgs> /** * Find zero or more SysRoleDepts that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysRoleDeptFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all SysRoleDepts * const sysRoleDepts = await prisma.sysRoleDept.findMany() * * // Get first 10 SysRoleDepts * const sysRoleDepts = await prisma.sysRoleDept.findMany({ take: 10 }) * * // Only select the `roleId` * const sysRoleDeptWithRoleIdOnly = await prisma.sysRoleDept.findMany({ select: { roleId: true } }) * **/ findMany>( args?: SelectSubset> ): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'>> /** * Create a SysRoleDept. * @param {SysRoleDeptCreateArgs} args - Arguments to create a SysRoleDept. * @example * // Create one SysRoleDept * const SysRoleDept = await prisma.sysRoleDept.create({ * data: { * // ... data to create a SysRoleDept * } * }) * **/ create>( args: SelectSubset> ): Prisma__SysRoleDeptClient<$Result.GetResult, T, 'create'>, never, ExtArgs> /** * Create many SysRoleDepts. * @param {SysRoleDeptCreateManyArgs} args - Arguments to create many SysRoleDepts. * @example * // Create many SysRoleDepts * const sysRoleDept = await prisma.sysRoleDept.createMany({ * data: [ * // ... provide data here * ] * }) * **/ createMany>( args?: SelectSubset> ): Prisma.PrismaPromise /** * Delete a SysRoleDept. * @param {SysRoleDeptDeleteArgs} args - Arguments to delete one SysRoleDept. * @example * // Delete one SysRoleDept * const SysRoleDept = await prisma.sysRoleDept.delete({ * where: { * // ... filter to delete one SysRoleDept * } * }) * **/ delete>( args: SelectSubset> ): Prisma__SysRoleDeptClient<$Result.GetResult, T, 'delete'>, never, ExtArgs> /** * Update one SysRoleDept. * @param {SysRoleDeptUpdateArgs} args - Arguments to update one SysRoleDept. * @example * // Update one SysRoleDept * const sysRoleDept = await prisma.sysRoleDept.update({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * **/ update>( args: SelectSubset> ): Prisma__SysRoleDeptClient<$Result.GetResult, T, 'update'>, never, ExtArgs> /** * Delete zero or more SysRoleDepts. * @param {SysRoleDeptDeleteManyArgs} args - Arguments to filter SysRoleDepts to delete. * @example * // Delete a few SysRoleDepts * const { count } = await prisma.sysRoleDept.deleteMany({ * where: { * // ... provide filter here * } * }) * **/ deleteMany>( args?: SelectSubset> ): Prisma.PrismaPromise /** * Update zero or more SysRoleDepts. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysRoleDeptUpdateManyArgs} args - Arguments to update one or more rows. * @example * // Update many SysRoleDepts * const sysRoleDept = await prisma.sysRoleDept.updateMany({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * **/ updateMany>( args: SelectSubset> ): Prisma.PrismaPromise /** * Create or update one SysRoleDept. * @param {SysRoleDeptUpsertArgs} args - Arguments to update or create a SysRoleDept. * @example * // Update or create a SysRoleDept * const sysRoleDept = await prisma.sysRoleDept.upsert({ * create: { * // ... data to create a SysRoleDept * }, * update: { * // ... in case it already exists, update * }, * where: { * // ... the filter for the SysRoleDept we want to update * } * }) **/ upsert>( args: SelectSubset> ): Prisma__SysRoleDeptClient<$Result.GetResult, T, 'upsert'>, never, ExtArgs> /** * Count the number of SysRoleDepts. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysRoleDeptCountArgs} args - Arguments to filter SysRoleDepts to count. * @example * // Count the number of SysRoleDepts * const count = await prisma.sysRoleDept.count({ * where: { * // ... the filter for the SysRoleDepts we want to count * } * }) **/ count( args?: Subset, ): Prisma.PrismaPromise< T extends $Utils.Record<'select', any> ? T['select'] extends true ? number : GetScalarType : number > /** * Allows you to perform aggregations operations on a SysRoleDept. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysRoleDeptAggregateArgs} args - Select which aggregations you would like to apply and on what fields. * @example * // Ordered by age ascending * // Where email contains prisma.io * // Limited to the 10 users * const aggregations = await prisma.user.aggregate({ * _avg: { * age: true, * }, * where: { * email: { * contains: "prisma.io", * }, * }, * orderBy: { * age: "asc", * }, * take: 10, * }) **/ aggregate(args: Subset): Prisma.PrismaPromise> /** * Group by SysRoleDept. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysRoleDeptGroupByArgs} args - Group by arguments. * @example * // Group by city, order by createdAt, get count * const result = await prisma.user.groupBy({ * by: ['city', 'createdAt'], * orderBy: { * createdAt: true * }, * _count: { * _all: true * }, * }) * **/ groupBy< T extends SysRoleDeptGroupByArgs, HasSelectOrTake extends Or< Extends<'skip', Keys>, Extends<'take', Keys> >, OrderByArg extends True extends HasSelectOrTake ? { orderBy: SysRoleDeptGroupByArgs['orderBy'] } : { orderBy?: SysRoleDeptGroupByArgs['orderBy'] }, OrderFields extends ExcludeUnderscoreKeys>>, ByFields extends MaybeTupleToUnion, ByValid extends Has, HavingFields extends GetHavingFields, HavingValid extends Has, ByEmpty extends T['by'] extends never[] ? True : False, InputErrors extends ByEmpty extends True ? `Error: "by" must not be empty.` : HavingValid extends False ? { [P in HavingFields]: P extends ByFields ? never : P extends string ? `Error: Field "${P}" used in "having" needs to be provided in "by".` : [ Error, 'Field ', P, ` in "having" needs to be provided in "by"`, ] }[HavingFields] : 'take' extends Keys ? 'orderBy' extends Keys ? ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] : 'Error: If you provide "take", you also need to provide "orderBy"' : 'skip' extends Keys ? 'orderBy' extends Keys ? ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] : 'Error: If you provide "skip", you also need to provide "orderBy"' : ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetSysRoleDeptGroupByPayload : Prisma.PrismaPromise /** * Fields of the SysRoleDept model */ readonly fields: SysRoleDeptFieldRefs; } /** * The delegate class that acts as a "Promise-like" for SysRoleDept. * Why is this prefixed with `Prisma__`? * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ export interface Prisma__SysRoleDeptClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: 'PrismaPromise'; role = {}>(args?: Subset>): Prisma__SysRoleClient<$Result.GetResult, T, 'findUniqueOrThrow'> | Null, Null, ExtArgs>; dept = {}>(args?: Subset>): Prisma__SysDeptClient<$Result.GetResult, T, 'findUniqueOrThrow'> | Null, Null, ExtArgs>; /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of which ever callback is executed. */ then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise; /** * Attaches a callback for only the rejection of the Promise. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of the callback. */ catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise; /** * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The * resolved value cannot be modified from the callback. * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). * @returns A Promise for the completion of the callback. */ finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise; } /** * Fields of the SysRoleDept model */ interface SysRoleDeptFieldRefs { readonly roleId: FieldRef<"SysRoleDept", 'Int'> readonly deptId: FieldRef<"SysRoleDept", 'Int'> } // Custom InputTypes /** * SysRoleDept findUnique */ export type SysRoleDeptFindUniqueArgs = { /** * Select specific fields to fetch from the SysRoleDept */ select?: SysRoleDeptSelect | null /** * Omit specific fields from the SysRoleDept */ omit?: SysRoleDeptOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysRoleDeptInclude | null /** * Filter, which SysRoleDept to fetch. */ where: SysRoleDeptWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * SysRoleDept findUniqueOrThrow */ export type SysRoleDeptFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the SysRoleDept */ select?: SysRoleDeptSelect | null /** * Omit specific fields from the SysRoleDept */ omit?: SysRoleDeptOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysRoleDeptInclude | null /** * Filter, which SysRoleDept to fetch. */ where: SysRoleDeptWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * SysRoleDept findFirst */ export type SysRoleDeptFindFirstArgs = { /** * Select specific fields to fetch from the SysRoleDept */ select?: SysRoleDeptSelect | null /** * Omit specific fields from the SysRoleDept */ omit?: SysRoleDeptOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysRoleDeptInclude | null /** * Filter, which SysRoleDept to fetch. */ where?: SysRoleDeptWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of SysRoleDepts to fetch. */ orderBy?: SysRoleDeptOrderByWithRelationInput | SysRoleDeptOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for SysRoleDepts. */ cursor?: SysRoleDeptWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` SysRoleDepts from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` SysRoleDepts. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of SysRoleDepts. */ distinct?: SysRoleDeptScalarFieldEnum | SysRoleDeptScalarFieldEnum[] relationLoadStrategy?: RelationLoadStrategy } /** * SysRoleDept findFirstOrThrow */ export type SysRoleDeptFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the SysRoleDept */ select?: SysRoleDeptSelect | null /** * Omit specific fields from the SysRoleDept */ omit?: SysRoleDeptOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysRoleDeptInclude | null /** * Filter, which SysRoleDept to fetch. */ where?: SysRoleDeptWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of SysRoleDepts to fetch. */ orderBy?: SysRoleDeptOrderByWithRelationInput | SysRoleDeptOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for SysRoleDepts. */ cursor?: SysRoleDeptWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` SysRoleDepts from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` SysRoleDepts. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of SysRoleDepts. */ distinct?: SysRoleDeptScalarFieldEnum | SysRoleDeptScalarFieldEnum[] relationLoadStrategy?: RelationLoadStrategy } /** * SysRoleDept findMany */ export type SysRoleDeptFindManyArgs = { /** * Select specific fields to fetch from the SysRoleDept */ select?: SysRoleDeptSelect | null /** * Omit specific fields from the SysRoleDept */ omit?: SysRoleDeptOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysRoleDeptInclude | null /** * Filter, which SysRoleDepts to fetch. */ where?: SysRoleDeptWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of SysRoleDepts to fetch. */ orderBy?: SysRoleDeptOrderByWithRelationInput | SysRoleDeptOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for listing SysRoleDepts. */ cursor?: SysRoleDeptWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` SysRoleDepts from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` SysRoleDepts. */ skip?: number distinct?: SysRoleDeptScalarFieldEnum | SysRoleDeptScalarFieldEnum[] relationLoadStrategy?: RelationLoadStrategy } /** * SysRoleDept create */ export type SysRoleDeptCreateArgs = { /** * Select specific fields to fetch from the SysRoleDept */ select?: SysRoleDeptSelect | null /** * Omit specific fields from the SysRoleDept */ omit?: SysRoleDeptOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysRoleDeptInclude | null /** * The data needed to create a SysRoleDept. */ data: XOR relationLoadStrategy?: RelationLoadStrategy } /** * SysRoleDept createMany */ export type SysRoleDeptCreateManyArgs = { /** * The data used to create many SysRoleDepts. */ data: SysRoleDeptCreateManyInput | SysRoleDeptCreateManyInput[] skipDuplicates?: boolean } /** * SysRoleDept update */ export type SysRoleDeptUpdateArgs = { /** * Select specific fields to fetch from the SysRoleDept */ select?: SysRoleDeptSelect | null /** * Omit specific fields from the SysRoleDept */ omit?: SysRoleDeptOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysRoleDeptInclude | null /** * The data needed to update a SysRoleDept. */ data: XOR /** * Choose, which SysRoleDept to update. */ where: SysRoleDeptWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * SysRoleDept updateMany */ export type SysRoleDeptUpdateManyArgs = { /** * The data used to update SysRoleDepts. */ data: XOR /** * Filter which SysRoleDepts to update */ where?: SysRoleDeptWhereInput } /** * SysRoleDept upsert */ export type SysRoleDeptUpsertArgs = { /** * Select specific fields to fetch from the SysRoleDept */ select?: SysRoleDeptSelect | null /** * Omit specific fields from the SysRoleDept */ omit?: SysRoleDeptOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysRoleDeptInclude | null /** * The filter to search for the SysRoleDept to update in case it exists. */ where: SysRoleDeptWhereUniqueInput /** * In case the SysRoleDept found by the `where` argument doesn't exist, create a new SysRoleDept with this data. */ create: XOR /** * In case the SysRoleDept was found with the provided `where` argument, update it with this data. */ update: XOR relationLoadStrategy?: RelationLoadStrategy } /** * SysRoleDept delete */ export type SysRoleDeptDeleteArgs = { /** * Select specific fields to fetch from the SysRoleDept */ select?: SysRoleDeptSelect | null /** * Omit specific fields from the SysRoleDept */ omit?: SysRoleDeptOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysRoleDeptInclude | null /** * Filter which SysRoleDept to delete. */ where: SysRoleDeptWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * SysRoleDept deleteMany */ export type SysRoleDeptDeleteManyArgs = { /** * Filter which SysRoleDepts to delete */ where?: SysRoleDeptWhereInput } /** * SysRoleDept without action */ export type SysRoleDeptDefaultArgs = { /** * Select specific fields to fetch from the SysRoleDept */ select?: SysRoleDeptSelect | null /** * Omit specific fields from the SysRoleDept */ omit?: SysRoleDeptOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysRoleDeptInclude | null } /** * Model SysRoleMenu */ export type AggregateSysRoleMenu = { _count: SysRoleMenuCountAggregateOutputType | null _avg: SysRoleMenuAvgAggregateOutputType | null _sum: SysRoleMenuSumAggregateOutputType | null _min: SysRoleMenuMinAggregateOutputType | null _max: SysRoleMenuMaxAggregateOutputType | null } export type SysRoleMenuAvgAggregateOutputType = { roleId: number | null menuId: number | null } export type SysRoleMenuSumAggregateOutputType = { roleId: number | null menuId: number | null } export type SysRoleMenuMinAggregateOutputType = { roleId: number | null menuId: number | null } export type SysRoleMenuMaxAggregateOutputType = { roleId: number | null menuId: number | null } export type SysRoleMenuCountAggregateOutputType = { roleId: number menuId: number _all: number } export type SysRoleMenuAvgAggregateInputType = { roleId?: true menuId?: true } export type SysRoleMenuSumAggregateInputType = { roleId?: true menuId?: true } export type SysRoleMenuMinAggregateInputType = { roleId?: true menuId?: true } export type SysRoleMenuMaxAggregateInputType = { roleId?: true menuId?: true } export type SysRoleMenuCountAggregateInputType = { roleId?: true menuId?: true _all?: true } export type SysRoleMenuAggregateArgs = { /** * Filter which SysRoleMenu to aggregate. */ where?: SysRoleMenuWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of SysRoleMenus to fetch. */ orderBy?: SysRoleMenuOrderByWithRelationInput | SysRoleMenuOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the start position */ cursor?: SysRoleMenuWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` SysRoleMenus from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` SysRoleMenus. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Count returned SysRoleMenus **/ _count?: true | SysRoleMenuCountAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to average **/ _avg?: SysRoleMenuAvgAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to sum **/ _sum?: SysRoleMenuSumAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the minimum value **/ _min?: SysRoleMenuMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the maximum value **/ _max?: SysRoleMenuMaxAggregateInputType } export type GetSysRoleMenuAggregateType = { [P in keyof T & keyof AggregateSysRoleMenu]: P extends '_count' | 'count' ? T[P] extends true ? number : GetScalarType : GetScalarType } export type SysRoleMenuGroupByArgs = { where?: SysRoleMenuWhereInput orderBy?: SysRoleMenuOrderByWithAggregationInput | SysRoleMenuOrderByWithAggregationInput[] by: SysRoleMenuScalarFieldEnum[] | SysRoleMenuScalarFieldEnum having?: SysRoleMenuScalarWhereWithAggregatesInput take?: number skip?: number _count?: SysRoleMenuCountAggregateInputType | true _avg?: SysRoleMenuAvgAggregateInputType _sum?: SysRoleMenuSumAggregateInputType _min?: SysRoleMenuMinAggregateInputType _max?: SysRoleMenuMaxAggregateInputType } export type SysRoleMenuGroupByOutputType = { roleId: number menuId: number _count: SysRoleMenuCountAggregateOutputType | null _avg: SysRoleMenuAvgAggregateOutputType | null _sum: SysRoleMenuSumAggregateOutputType | null _min: SysRoleMenuMinAggregateOutputType | null _max: SysRoleMenuMaxAggregateOutputType | null } type GetSysRoleMenuGroupByPayload = Prisma.PrismaPromise< Array< PickEnumerable & { [P in ((keyof T) & (keyof SysRoleMenuGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : GetScalarType : GetScalarType } > > export type SysRoleMenuSelect = $Extensions.GetSelect<{ roleId?: boolean menuId?: boolean menu?: boolean | SysMenuDefaultArgs role?: boolean | SysRoleDefaultArgs }, ExtArgs["result"]["sysRoleMenu"]> export type SysRoleMenuSelectScalar = { roleId?: boolean menuId?: boolean } export type SysRoleMenuOmit = $Extensions.GetOmit<"roleId" | "menuId", ExtArgs["result"]["sysRoleMenu"]> export type SysRoleMenuInclude = { menu?: boolean | SysMenuDefaultArgs role?: boolean | SysRoleDefaultArgs } export type $SysRoleMenuPayload = { name: "SysRoleMenu" objects: { menu: Prisma.$SysMenuPayload role: Prisma.$SysRolePayload } scalars: $Extensions.GetPayloadResult<{ roleId: number menuId: number }, ExtArgs["result"]["sysRoleMenu"]> composites: {} } type SysRoleMenuGetPayload = $Result.GetResult type SysRoleMenuCountArgs = Omit & { select?: SysRoleMenuCountAggregateInputType | true } export interface SysRoleMenuDelegate { [K: symbol]: { types: Prisma.TypeMap['model']['SysRoleMenu'], meta: { name: 'SysRoleMenu' } } /** * Find zero or one SysRoleMenu that matches the filter. * @param {SysRoleMenuFindUniqueArgs} args - Arguments to find a SysRoleMenu * @example * // Get one SysRoleMenu * const sysRoleMenu = await prisma.sysRoleMenu.findUnique({ * where: { * // ... provide filter here * } * }) **/ findUnique>( args: SelectSubset> ): Prisma__SysRoleMenuClient<$Result.GetResult, T, 'findUnique'> | null, null, ExtArgs> /** * Find one SysRoleMenu that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. * @param {SysRoleMenuFindUniqueOrThrowArgs} args - Arguments to find a SysRoleMenu * @example * // Get one SysRoleMenu * const sysRoleMenu = await prisma.sysRoleMenu.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) **/ findUniqueOrThrow>( args?: SelectSubset> ): Prisma__SysRoleMenuClient<$Result.GetResult, T, 'findUniqueOrThrow'>, never, ExtArgs> /** * Find the first SysRoleMenu that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysRoleMenuFindFirstArgs} args - Arguments to find a SysRoleMenu * @example * // Get one SysRoleMenu * const sysRoleMenu = await prisma.sysRoleMenu.findFirst({ * where: { * // ... provide filter here * } * }) **/ findFirst>( args?: SelectSubset> ): Prisma__SysRoleMenuClient<$Result.GetResult, T, 'findFirst'> | null, null, ExtArgs> /** * Find the first SysRoleMenu that matches the filter or * throw `PrismaKnownClientError` with `P2025` code if no matches were found. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysRoleMenuFindFirstOrThrowArgs} args - Arguments to find a SysRoleMenu * @example * // Get one SysRoleMenu * const sysRoleMenu = await prisma.sysRoleMenu.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) **/ findFirstOrThrow>( args?: SelectSubset> ): Prisma__SysRoleMenuClient<$Result.GetResult, T, 'findFirstOrThrow'>, never, ExtArgs> /** * Find zero or more SysRoleMenus that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysRoleMenuFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all SysRoleMenus * const sysRoleMenus = await prisma.sysRoleMenu.findMany() * * // Get first 10 SysRoleMenus * const sysRoleMenus = await prisma.sysRoleMenu.findMany({ take: 10 }) * * // Only select the `roleId` * const sysRoleMenuWithRoleIdOnly = await prisma.sysRoleMenu.findMany({ select: { roleId: true } }) * **/ findMany>( args?: SelectSubset> ): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'>> /** * Create a SysRoleMenu. * @param {SysRoleMenuCreateArgs} args - Arguments to create a SysRoleMenu. * @example * // Create one SysRoleMenu * const SysRoleMenu = await prisma.sysRoleMenu.create({ * data: { * // ... data to create a SysRoleMenu * } * }) * **/ create>( args: SelectSubset> ): Prisma__SysRoleMenuClient<$Result.GetResult, T, 'create'>, never, ExtArgs> /** * Create many SysRoleMenus. * @param {SysRoleMenuCreateManyArgs} args - Arguments to create many SysRoleMenus. * @example * // Create many SysRoleMenus * const sysRoleMenu = await prisma.sysRoleMenu.createMany({ * data: [ * // ... provide data here * ] * }) * **/ createMany>( args?: SelectSubset> ): Prisma.PrismaPromise /** * Delete a SysRoleMenu. * @param {SysRoleMenuDeleteArgs} args - Arguments to delete one SysRoleMenu. * @example * // Delete one SysRoleMenu * const SysRoleMenu = await prisma.sysRoleMenu.delete({ * where: { * // ... filter to delete one SysRoleMenu * } * }) * **/ delete>( args: SelectSubset> ): Prisma__SysRoleMenuClient<$Result.GetResult, T, 'delete'>, never, ExtArgs> /** * Update one SysRoleMenu. * @param {SysRoleMenuUpdateArgs} args - Arguments to update one SysRoleMenu. * @example * // Update one SysRoleMenu * const sysRoleMenu = await prisma.sysRoleMenu.update({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * **/ update>( args: SelectSubset> ): Prisma__SysRoleMenuClient<$Result.GetResult, T, 'update'>, never, ExtArgs> /** * Delete zero or more SysRoleMenus. * @param {SysRoleMenuDeleteManyArgs} args - Arguments to filter SysRoleMenus to delete. * @example * // Delete a few SysRoleMenus * const { count } = await prisma.sysRoleMenu.deleteMany({ * where: { * // ... provide filter here * } * }) * **/ deleteMany>( args?: SelectSubset> ): Prisma.PrismaPromise /** * Update zero or more SysRoleMenus. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysRoleMenuUpdateManyArgs} args - Arguments to update one or more rows. * @example * // Update many SysRoleMenus * const sysRoleMenu = await prisma.sysRoleMenu.updateMany({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * **/ updateMany>( args: SelectSubset> ): Prisma.PrismaPromise /** * Create or update one SysRoleMenu. * @param {SysRoleMenuUpsertArgs} args - Arguments to update or create a SysRoleMenu. * @example * // Update or create a SysRoleMenu * const sysRoleMenu = await prisma.sysRoleMenu.upsert({ * create: { * // ... data to create a SysRoleMenu * }, * update: { * // ... in case it already exists, update * }, * where: { * // ... the filter for the SysRoleMenu we want to update * } * }) **/ upsert>( args: SelectSubset> ): Prisma__SysRoleMenuClient<$Result.GetResult, T, 'upsert'>, never, ExtArgs> /** * Count the number of SysRoleMenus. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysRoleMenuCountArgs} args - Arguments to filter SysRoleMenus to count. * @example * // Count the number of SysRoleMenus * const count = await prisma.sysRoleMenu.count({ * where: { * // ... the filter for the SysRoleMenus we want to count * } * }) **/ count( args?: Subset, ): Prisma.PrismaPromise< T extends $Utils.Record<'select', any> ? T['select'] extends true ? number : GetScalarType : number > /** * Allows you to perform aggregations operations on a SysRoleMenu. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysRoleMenuAggregateArgs} args - Select which aggregations you would like to apply and on what fields. * @example * // Ordered by age ascending * // Where email contains prisma.io * // Limited to the 10 users * const aggregations = await prisma.user.aggregate({ * _avg: { * age: true, * }, * where: { * email: { * contains: "prisma.io", * }, * }, * orderBy: { * age: "asc", * }, * take: 10, * }) **/ aggregate(args: Subset): Prisma.PrismaPromise> /** * Group by SysRoleMenu. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysRoleMenuGroupByArgs} args - Group by arguments. * @example * // Group by city, order by createdAt, get count * const result = await prisma.user.groupBy({ * by: ['city', 'createdAt'], * orderBy: { * createdAt: true * }, * _count: { * _all: true * }, * }) * **/ groupBy< T extends SysRoleMenuGroupByArgs, HasSelectOrTake extends Or< Extends<'skip', Keys>, Extends<'take', Keys> >, OrderByArg extends True extends HasSelectOrTake ? { orderBy: SysRoleMenuGroupByArgs['orderBy'] } : { orderBy?: SysRoleMenuGroupByArgs['orderBy'] }, OrderFields extends ExcludeUnderscoreKeys>>, ByFields extends MaybeTupleToUnion, ByValid extends Has, HavingFields extends GetHavingFields, HavingValid extends Has, ByEmpty extends T['by'] extends never[] ? True : False, InputErrors extends ByEmpty extends True ? `Error: "by" must not be empty.` : HavingValid extends False ? { [P in HavingFields]: P extends ByFields ? never : P extends string ? `Error: Field "${P}" used in "having" needs to be provided in "by".` : [ Error, 'Field ', P, ` in "having" needs to be provided in "by"`, ] }[HavingFields] : 'take' extends Keys ? 'orderBy' extends Keys ? ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] : 'Error: If you provide "take", you also need to provide "orderBy"' : 'skip' extends Keys ? 'orderBy' extends Keys ? ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] : 'Error: If you provide "skip", you also need to provide "orderBy"' : ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetSysRoleMenuGroupByPayload : Prisma.PrismaPromise /** * Fields of the SysRoleMenu model */ readonly fields: SysRoleMenuFieldRefs; } /** * The delegate class that acts as a "Promise-like" for SysRoleMenu. * Why is this prefixed with `Prisma__`? * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ export interface Prisma__SysRoleMenuClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: 'PrismaPromise'; menu = {}>(args?: Subset>): Prisma__SysMenuClient<$Result.GetResult, T, 'findUniqueOrThrow'> | Null, Null, ExtArgs>; role = {}>(args?: Subset>): Prisma__SysRoleClient<$Result.GetResult, T, 'findUniqueOrThrow'> | Null, Null, ExtArgs>; /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of which ever callback is executed. */ then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise; /** * Attaches a callback for only the rejection of the Promise. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of the callback. */ catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise; /** * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The * resolved value cannot be modified from the callback. * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). * @returns A Promise for the completion of the callback. */ finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise; } /** * Fields of the SysRoleMenu model */ interface SysRoleMenuFieldRefs { readonly roleId: FieldRef<"SysRoleMenu", 'Int'> readonly menuId: FieldRef<"SysRoleMenu", 'Int'> } // Custom InputTypes /** * SysRoleMenu findUnique */ export type SysRoleMenuFindUniqueArgs = { /** * Select specific fields to fetch from the SysRoleMenu */ select?: SysRoleMenuSelect | null /** * Omit specific fields from the SysRoleMenu */ omit?: SysRoleMenuOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysRoleMenuInclude | null /** * Filter, which SysRoleMenu to fetch. */ where: SysRoleMenuWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * SysRoleMenu findUniqueOrThrow */ export type SysRoleMenuFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the SysRoleMenu */ select?: SysRoleMenuSelect | null /** * Omit specific fields from the SysRoleMenu */ omit?: SysRoleMenuOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysRoleMenuInclude | null /** * Filter, which SysRoleMenu to fetch. */ where: SysRoleMenuWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * SysRoleMenu findFirst */ export type SysRoleMenuFindFirstArgs = { /** * Select specific fields to fetch from the SysRoleMenu */ select?: SysRoleMenuSelect | null /** * Omit specific fields from the SysRoleMenu */ omit?: SysRoleMenuOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysRoleMenuInclude | null /** * Filter, which SysRoleMenu to fetch. */ where?: SysRoleMenuWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of SysRoleMenus to fetch. */ orderBy?: SysRoleMenuOrderByWithRelationInput | SysRoleMenuOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for SysRoleMenus. */ cursor?: SysRoleMenuWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` SysRoleMenus from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` SysRoleMenus. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of SysRoleMenus. */ distinct?: SysRoleMenuScalarFieldEnum | SysRoleMenuScalarFieldEnum[] relationLoadStrategy?: RelationLoadStrategy } /** * SysRoleMenu findFirstOrThrow */ export type SysRoleMenuFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the SysRoleMenu */ select?: SysRoleMenuSelect | null /** * Omit specific fields from the SysRoleMenu */ omit?: SysRoleMenuOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysRoleMenuInclude | null /** * Filter, which SysRoleMenu to fetch. */ where?: SysRoleMenuWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of SysRoleMenus to fetch. */ orderBy?: SysRoleMenuOrderByWithRelationInput | SysRoleMenuOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for SysRoleMenus. */ cursor?: SysRoleMenuWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` SysRoleMenus from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` SysRoleMenus. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of SysRoleMenus. */ distinct?: SysRoleMenuScalarFieldEnum | SysRoleMenuScalarFieldEnum[] relationLoadStrategy?: RelationLoadStrategy } /** * SysRoleMenu findMany */ export type SysRoleMenuFindManyArgs = { /** * Select specific fields to fetch from the SysRoleMenu */ select?: SysRoleMenuSelect | null /** * Omit specific fields from the SysRoleMenu */ omit?: SysRoleMenuOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysRoleMenuInclude | null /** * Filter, which SysRoleMenus to fetch. */ where?: SysRoleMenuWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of SysRoleMenus to fetch. */ orderBy?: SysRoleMenuOrderByWithRelationInput | SysRoleMenuOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for listing SysRoleMenus. */ cursor?: SysRoleMenuWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` SysRoleMenus from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` SysRoleMenus. */ skip?: number distinct?: SysRoleMenuScalarFieldEnum | SysRoleMenuScalarFieldEnum[] relationLoadStrategy?: RelationLoadStrategy } /** * SysRoleMenu create */ export type SysRoleMenuCreateArgs = { /** * Select specific fields to fetch from the SysRoleMenu */ select?: SysRoleMenuSelect | null /** * Omit specific fields from the SysRoleMenu */ omit?: SysRoleMenuOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysRoleMenuInclude | null /** * The data needed to create a SysRoleMenu. */ data: XOR relationLoadStrategy?: RelationLoadStrategy } /** * SysRoleMenu createMany */ export type SysRoleMenuCreateManyArgs = { /** * The data used to create many SysRoleMenus. */ data: SysRoleMenuCreateManyInput | SysRoleMenuCreateManyInput[] skipDuplicates?: boolean } /** * SysRoleMenu update */ export type SysRoleMenuUpdateArgs = { /** * Select specific fields to fetch from the SysRoleMenu */ select?: SysRoleMenuSelect | null /** * Omit specific fields from the SysRoleMenu */ omit?: SysRoleMenuOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysRoleMenuInclude | null /** * The data needed to update a SysRoleMenu. */ data: XOR /** * Choose, which SysRoleMenu to update. */ where: SysRoleMenuWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * SysRoleMenu updateMany */ export type SysRoleMenuUpdateManyArgs = { /** * The data used to update SysRoleMenus. */ data: XOR /** * Filter which SysRoleMenus to update */ where?: SysRoleMenuWhereInput } /** * SysRoleMenu upsert */ export type SysRoleMenuUpsertArgs = { /** * Select specific fields to fetch from the SysRoleMenu */ select?: SysRoleMenuSelect | null /** * Omit specific fields from the SysRoleMenu */ omit?: SysRoleMenuOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysRoleMenuInclude | null /** * The filter to search for the SysRoleMenu to update in case it exists. */ where: SysRoleMenuWhereUniqueInput /** * In case the SysRoleMenu found by the `where` argument doesn't exist, create a new SysRoleMenu with this data. */ create: XOR /** * In case the SysRoleMenu was found with the provided `where` argument, update it with this data. */ update: XOR relationLoadStrategy?: RelationLoadStrategy } /** * SysRoleMenu delete */ export type SysRoleMenuDeleteArgs = { /** * Select specific fields to fetch from the SysRoleMenu */ select?: SysRoleMenuSelect | null /** * Omit specific fields from the SysRoleMenu */ omit?: SysRoleMenuOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysRoleMenuInclude | null /** * Filter which SysRoleMenu to delete. */ where: SysRoleMenuWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * SysRoleMenu deleteMany */ export type SysRoleMenuDeleteManyArgs = { /** * Filter which SysRoleMenus to delete */ where?: SysRoleMenuWhereInput } /** * SysRoleMenu without action */ export type SysRoleMenuDefaultArgs = { /** * Select specific fields to fetch from the SysRoleMenu */ select?: SysRoleMenuSelect | null /** * Omit specific fields from the SysRoleMenu */ omit?: SysRoleMenuOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysRoleMenuInclude | null } /** * Model SysUser */ export type AggregateSysUser = { _count: SysUserCountAggregateOutputType | null _avg: SysUserAvgAggregateOutputType | null _sum: SysUserSumAggregateOutputType | null _min: SysUserMinAggregateOutputType | null _max: SysUserMaxAggregateOutputType | null } export type SysUserAvgAggregateOutputType = { userId: number | null deptId: number | null } export type SysUserSumAggregateOutputType = { userId: number | null deptId: number | null } export type SysUserMinAggregateOutputType = { userId: number | null deptId: number | null userName: string | null nickName: string | null userType: string | null email: string | null phonenumber: string | null sex: string | null avatar: string | null password: string | null status: string | null loginIp: string | null loginDate: string | null createBy: string | null createTime: string | null updateBy: string | null updateTime: string | null remark: string | null } export type SysUserMaxAggregateOutputType = { userId: number | null deptId: number | null userName: string | null nickName: string | null userType: string | null email: string | null phonenumber: string | null sex: string | null avatar: string | null password: string | null status: string | null loginIp: string | null loginDate: string | null createBy: string | null createTime: string | null updateBy: string | null updateTime: string | null remark: string | null } export type SysUserCountAggregateOutputType = { userId: number deptId: number userName: number nickName: number userType: number email: number phonenumber: number sex: number avatar: number password: number status: number loginIp: number loginDate: number createBy: number createTime: number updateBy: number updateTime: number remark: number _all: number } export type SysUserAvgAggregateInputType = { userId?: true deptId?: true } export type SysUserSumAggregateInputType = { userId?: true deptId?: true } export type SysUserMinAggregateInputType = { userId?: true deptId?: true userName?: true nickName?: true userType?: true email?: true phonenumber?: true sex?: true avatar?: true password?: true status?: true loginIp?: true loginDate?: true createBy?: true createTime?: true updateBy?: true updateTime?: true remark?: true } export type SysUserMaxAggregateInputType = { userId?: true deptId?: true userName?: true nickName?: true userType?: true email?: true phonenumber?: true sex?: true avatar?: true password?: true status?: true loginIp?: true loginDate?: true createBy?: true createTime?: true updateBy?: true updateTime?: true remark?: true } export type SysUserCountAggregateInputType = { userId?: true deptId?: true userName?: true nickName?: true userType?: true email?: true phonenumber?: true sex?: true avatar?: true password?: true status?: true loginIp?: true loginDate?: true createBy?: true createTime?: true updateBy?: true updateTime?: true remark?: true _all?: true } export type SysUserAggregateArgs = { /** * Filter which SysUser to aggregate. */ where?: SysUserWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of SysUsers to fetch. */ orderBy?: SysUserOrderByWithRelationInput | SysUserOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the start position */ cursor?: SysUserWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` SysUsers from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` SysUsers. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Count returned SysUsers **/ _count?: true | SysUserCountAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to average **/ _avg?: SysUserAvgAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to sum **/ _sum?: SysUserSumAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the minimum value **/ _min?: SysUserMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the maximum value **/ _max?: SysUserMaxAggregateInputType } export type GetSysUserAggregateType = { [P in keyof T & keyof AggregateSysUser]: P extends '_count' | 'count' ? T[P] extends true ? number : GetScalarType : GetScalarType } export type SysUserGroupByArgs = { where?: SysUserWhereInput orderBy?: SysUserOrderByWithAggregationInput | SysUserOrderByWithAggregationInput[] by: SysUserScalarFieldEnum[] | SysUserScalarFieldEnum having?: SysUserScalarWhereWithAggregatesInput take?: number skip?: number _count?: SysUserCountAggregateInputType | true _avg?: SysUserAvgAggregateInputType _sum?: SysUserSumAggregateInputType _min?: SysUserMinAggregateInputType _max?: SysUserMaxAggregateInputType } export type SysUserGroupByOutputType = { userId: number deptId: number | null userName: string nickName: string userType: string | null email: string | null phonenumber: string | null sex: string | null avatar: string | null password: string | null status: string | null loginIp: string | null loginDate: string | null createBy: string | null createTime: string | null updateBy: string | null updateTime: string | null remark: string | null _count: SysUserCountAggregateOutputType | null _avg: SysUserAvgAggregateOutputType | null _sum: SysUserSumAggregateOutputType | null _min: SysUserMinAggregateOutputType | null _max: SysUserMaxAggregateOutputType | null } type GetSysUserGroupByPayload = Prisma.PrismaPromise< Array< PickEnumerable & { [P in ((keyof T) & (keyof SysUserGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : GetScalarType : GetScalarType } > > export type SysUserSelect = $Extensions.GetSelect<{ userId?: boolean deptId?: boolean userName?: boolean nickName?: boolean userType?: boolean email?: boolean phonenumber?: boolean sex?: boolean avatar?: boolean password?: boolean status?: boolean loginIp?: boolean loginDate?: boolean createBy?: boolean createTime?: boolean updateBy?: boolean updateTime?: boolean remark?: boolean dept?: boolean | SysUser$deptArgs roles?: boolean | SysUser$rolesArgs posts?: boolean | SysUser$postsArgs _count?: boolean | SysUserCountOutputTypeDefaultArgs }, ExtArgs["result"]["sysUser"]> export type SysUserSelectScalar = { userId?: boolean deptId?: boolean userName?: boolean nickName?: boolean userType?: boolean email?: boolean phonenumber?: boolean sex?: boolean avatar?: boolean password?: boolean status?: boolean loginIp?: boolean loginDate?: boolean createBy?: boolean createTime?: boolean updateBy?: boolean updateTime?: boolean remark?: boolean } export type SysUserOmit = $Extensions.GetOmit<"userId" | "deptId" | "userName" | "nickName" | "userType" | "email" | "phonenumber" | "sex" | "avatar" | "password" | "status" | "loginIp" | "loginDate" | "createBy" | "createTime" | "updateBy" | "updateTime" | "remark", ExtArgs["result"]["sysUser"]> export type SysUserInclude = { dept?: boolean | SysUser$deptArgs roles?: boolean | SysUser$rolesArgs posts?: boolean | SysUser$postsArgs _count?: boolean | SysUserCountOutputTypeDefaultArgs } export type $SysUserPayload = { name: "SysUser" objects: { dept: Prisma.$SysDeptPayload | null roles: Prisma.$SysUserRolePayload[] posts: Prisma.$SysUserPostPayload[] } scalars: $Extensions.GetPayloadResult<{ userId: number deptId: number | null userName: string nickName: string userType: string | null email: string | null phonenumber: string | null sex: string | null avatar: string | null password: string | null status: string | null loginIp: string | null loginDate: string | null createBy: string | null createTime: string | null updateBy: string | null updateTime: string | null remark: string | null }, ExtArgs["result"]["sysUser"]> composites: {} } type SysUserGetPayload = $Result.GetResult type SysUserCountArgs = Omit & { select?: SysUserCountAggregateInputType | true } export interface SysUserDelegate { [K: symbol]: { types: Prisma.TypeMap['model']['SysUser'], meta: { name: 'SysUser' } } /** * Find zero or one SysUser that matches the filter. * @param {SysUserFindUniqueArgs} args - Arguments to find a SysUser * @example * // Get one SysUser * const sysUser = await prisma.sysUser.findUnique({ * where: { * // ... provide filter here * } * }) **/ findUnique>( args: SelectSubset> ): Prisma__SysUserClient<$Result.GetResult, T, 'findUnique'> | null, null, ExtArgs> /** * Find one SysUser that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. * @param {SysUserFindUniqueOrThrowArgs} args - Arguments to find a SysUser * @example * // Get one SysUser * const sysUser = await prisma.sysUser.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) **/ findUniqueOrThrow>( args?: SelectSubset> ): Prisma__SysUserClient<$Result.GetResult, T, 'findUniqueOrThrow'>, never, ExtArgs> /** * Find the first SysUser that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysUserFindFirstArgs} args - Arguments to find a SysUser * @example * // Get one SysUser * const sysUser = await prisma.sysUser.findFirst({ * where: { * // ... provide filter here * } * }) **/ findFirst>( args?: SelectSubset> ): Prisma__SysUserClient<$Result.GetResult, T, 'findFirst'> | null, null, ExtArgs> /** * Find the first SysUser that matches the filter or * throw `PrismaKnownClientError` with `P2025` code if no matches were found. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysUserFindFirstOrThrowArgs} args - Arguments to find a SysUser * @example * // Get one SysUser * const sysUser = await prisma.sysUser.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) **/ findFirstOrThrow>( args?: SelectSubset> ): Prisma__SysUserClient<$Result.GetResult, T, 'findFirstOrThrow'>, never, ExtArgs> /** * Find zero or more SysUsers that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysUserFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all SysUsers * const sysUsers = await prisma.sysUser.findMany() * * // Get first 10 SysUsers * const sysUsers = await prisma.sysUser.findMany({ take: 10 }) * * // Only select the `userId` * const sysUserWithUserIdOnly = await prisma.sysUser.findMany({ select: { userId: true } }) * **/ findMany>( args?: SelectSubset> ): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'>> /** * Create a SysUser. * @param {SysUserCreateArgs} args - Arguments to create a SysUser. * @example * // Create one SysUser * const SysUser = await prisma.sysUser.create({ * data: { * // ... data to create a SysUser * } * }) * **/ create>( args: SelectSubset> ): Prisma__SysUserClient<$Result.GetResult, T, 'create'>, never, ExtArgs> /** * Create many SysUsers. * @param {SysUserCreateManyArgs} args - Arguments to create many SysUsers. * @example * // Create many SysUsers * const sysUser = await prisma.sysUser.createMany({ * data: [ * // ... provide data here * ] * }) * **/ createMany>( args?: SelectSubset> ): Prisma.PrismaPromise /** * Delete a SysUser. * @param {SysUserDeleteArgs} args - Arguments to delete one SysUser. * @example * // Delete one SysUser * const SysUser = await prisma.sysUser.delete({ * where: { * // ... filter to delete one SysUser * } * }) * **/ delete>( args: SelectSubset> ): Prisma__SysUserClient<$Result.GetResult, T, 'delete'>, never, ExtArgs> /** * Update one SysUser. * @param {SysUserUpdateArgs} args - Arguments to update one SysUser. * @example * // Update one SysUser * const sysUser = await prisma.sysUser.update({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * **/ update>( args: SelectSubset> ): Prisma__SysUserClient<$Result.GetResult, T, 'update'>, never, ExtArgs> /** * Delete zero or more SysUsers. * @param {SysUserDeleteManyArgs} args - Arguments to filter SysUsers to delete. * @example * // Delete a few SysUsers * const { count } = await prisma.sysUser.deleteMany({ * where: { * // ... provide filter here * } * }) * **/ deleteMany>( args?: SelectSubset> ): Prisma.PrismaPromise /** * Update zero or more SysUsers. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysUserUpdateManyArgs} args - Arguments to update one or more rows. * @example * // Update many SysUsers * const sysUser = await prisma.sysUser.updateMany({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * **/ updateMany>( args: SelectSubset> ): Prisma.PrismaPromise /** * Create or update one SysUser. * @param {SysUserUpsertArgs} args - Arguments to update or create a SysUser. * @example * // Update or create a SysUser * const sysUser = await prisma.sysUser.upsert({ * create: { * // ... data to create a SysUser * }, * update: { * // ... in case it already exists, update * }, * where: { * // ... the filter for the SysUser we want to update * } * }) **/ upsert>( args: SelectSubset> ): Prisma__SysUserClient<$Result.GetResult, T, 'upsert'>, never, ExtArgs> /** * Count the number of SysUsers. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysUserCountArgs} args - Arguments to filter SysUsers to count. * @example * // Count the number of SysUsers * const count = await prisma.sysUser.count({ * where: { * // ... the filter for the SysUsers we want to count * } * }) **/ count( args?: Subset, ): Prisma.PrismaPromise< T extends $Utils.Record<'select', any> ? T['select'] extends true ? number : GetScalarType : number > /** * Allows you to perform aggregations operations on a SysUser. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysUserAggregateArgs} args - Select which aggregations you would like to apply and on what fields. * @example * // Ordered by age ascending * // Where email contains prisma.io * // Limited to the 10 users * const aggregations = await prisma.user.aggregate({ * _avg: { * age: true, * }, * where: { * email: { * contains: "prisma.io", * }, * }, * orderBy: { * age: "asc", * }, * take: 10, * }) **/ aggregate(args: Subset): Prisma.PrismaPromise> /** * Group by SysUser. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysUserGroupByArgs} args - Group by arguments. * @example * // Group by city, order by createdAt, get count * const result = await prisma.user.groupBy({ * by: ['city', 'createdAt'], * orderBy: { * createdAt: true * }, * _count: { * _all: true * }, * }) * **/ groupBy< T extends SysUserGroupByArgs, HasSelectOrTake extends Or< Extends<'skip', Keys>, Extends<'take', Keys> >, OrderByArg extends True extends HasSelectOrTake ? { orderBy: SysUserGroupByArgs['orderBy'] } : { orderBy?: SysUserGroupByArgs['orderBy'] }, OrderFields extends ExcludeUnderscoreKeys>>, ByFields extends MaybeTupleToUnion, ByValid extends Has, HavingFields extends GetHavingFields, HavingValid extends Has, ByEmpty extends T['by'] extends never[] ? True : False, InputErrors extends ByEmpty extends True ? `Error: "by" must not be empty.` : HavingValid extends False ? { [P in HavingFields]: P extends ByFields ? never : P extends string ? `Error: Field "${P}" used in "having" needs to be provided in "by".` : [ Error, 'Field ', P, ` in "having" needs to be provided in "by"`, ] }[HavingFields] : 'take' extends Keys ? 'orderBy' extends Keys ? ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] : 'Error: If you provide "take", you also need to provide "orderBy"' : 'skip' extends Keys ? 'orderBy' extends Keys ? ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] : 'Error: If you provide "skip", you also need to provide "orderBy"' : ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetSysUserGroupByPayload : Prisma.PrismaPromise /** * Fields of the SysUser model */ readonly fields: SysUserFieldRefs; } /** * The delegate class that acts as a "Promise-like" for SysUser. * Why is this prefixed with `Prisma__`? * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ export interface Prisma__SysUserClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: 'PrismaPromise'; dept = {}>(args?: Subset>): Prisma__SysDeptClient<$Result.GetResult, T, 'findUniqueOrThrow'> | null, null, ExtArgs>; roles = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'> | Null>; posts = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'> | Null>; /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of which ever callback is executed. */ then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise; /** * Attaches a callback for only the rejection of the Promise. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of the callback. */ catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise; /** * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The * resolved value cannot be modified from the callback. * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). * @returns A Promise for the completion of the callback. */ finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise; } /** * Fields of the SysUser model */ interface SysUserFieldRefs { readonly userId: FieldRef<"SysUser", 'Int'> readonly deptId: FieldRef<"SysUser", 'Int'> readonly userName: FieldRef<"SysUser", 'String'> readonly nickName: FieldRef<"SysUser", 'String'> readonly userType: FieldRef<"SysUser", 'String'> readonly email: FieldRef<"SysUser", 'String'> readonly phonenumber: FieldRef<"SysUser", 'String'> readonly sex: FieldRef<"SysUser", 'String'> readonly avatar: FieldRef<"SysUser", 'String'> readonly password: FieldRef<"SysUser", 'String'> readonly status: FieldRef<"SysUser", 'String'> readonly loginIp: FieldRef<"SysUser", 'String'> readonly loginDate: FieldRef<"SysUser", 'String'> readonly createBy: FieldRef<"SysUser", 'String'> readonly createTime: FieldRef<"SysUser", 'String'> readonly updateBy: FieldRef<"SysUser", 'String'> readonly updateTime: FieldRef<"SysUser", 'String'> readonly remark: FieldRef<"SysUser", 'String'> } // Custom InputTypes /** * SysUser findUnique */ export type SysUserFindUniqueArgs = { /** * Select specific fields to fetch from the SysUser */ select?: SysUserSelect | null /** * Omit specific fields from the SysUser */ omit?: SysUserOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysUserInclude | null /** * Filter, which SysUser to fetch. */ where: SysUserWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * SysUser findUniqueOrThrow */ export type SysUserFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the SysUser */ select?: SysUserSelect | null /** * Omit specific fields from the SysUser */ omit?: SysUserOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysUserInclude | null /** * Filter, which SysUser to fetch. */ where: SysUserWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * SysUser findFirst */ export type SysUserFindFirstArgs = { /** * Select specific fields to fetch from the SysUser */ select?: SysUserSelect | null /** * Omit specific fields from the SysUser */ omit?: SysUserOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysUserInclude | null /** * Filter, which SysUser to fetch. */ where?: SysUserWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of SysUsers to fetch. */ orderBy?: SysUserOrderByWithRelationInput | SysUserOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for SysUsers. */ cursor?: SysUserWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` SysUsers from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` SysUsers. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of SysUsers. */ distinct?: SysUserScalarFieldEnum | SysUserScalarFieldEnum[] relationLoadStrategy?: RelationLoadStrategy } /** * SysUser findFirstOrThrow */ export type SysUserFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the SysUser */ select?: SysUserSelect | null /** * Omit specific fields from the SysUser */ omit?: SysUserOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysUserInclude | null /** * Filter, which SysUser to fetch. */ where?: SysUserWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of SysUsers to fetch. */ orderBy?: SysUserOrderByWithRelationInput | SysUserOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for SysUsers. */ cursor?: SysUserWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` SysUsers from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` SysUsers. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of SysUsers. */ distinct?: SysUserScalarFieldEnum | SysUserScalarFieldEnum[] relationLoadStrategy?: RelationLoadStrategy } /** * SysUser findMany */ export type SysUserFindManyArgs = { /** * Select specific fields to fetch from the SysUser */ select?: SysUserSelect | null /** * Omit specific fields from the SysUser */ omit?: SysUserOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysUserInclude | null /** * Filter, which SysUsers to fetch. */ where?: SysUserWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of SysUsers to fetch. */ orderBy?: SysUserOrderByWithRelationInput | SysUserOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for listing SysUsers. */ cursor?: SysUserWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` SysUsers from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` SysUsers. */ skip?: number distinct?: SysUserScalarFieldEnum | SysUserScalarFieldEnum[] relationLoadStrategy?: RelationLoadStrategy } /** * SysUser create */ export type SysUserCreateArgs = { /** * Select specific fields to fetch from the SysUser */ select?: SysUserSelect | null /** * Omit specific fields from the SysUser */ omit?: SysUserOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysUserInclude | null /** * The data needed to create a SysUser. */ data: XOR relationLoadStrategy?: RelationLoadStrategy } /** * SysUser createMany */ export type SysUserCreateManyArgs = { /** * The data used to create many SysUsers. */ data: SysUserCreateManyInput | SysUserCreateManyInput[] skipDuplicates?: boolean } /** * SysUser update */ export type SysUserUpdateArgs = { /** * Select specific fields to fetch from the SysUser */ select?: SysUserSelect | null /** * Omit specific fields from the SysUser */ omit?: SysUserOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysUserInclude | null /** * The data needed to update a SysUser. */ data: XOR /** * Choose, which SysUser to update. */ where: SysUserWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * SysUser updateMany */ export type SysUserUpdateManyArgs = { /** * The data used to update SysUsers. */ data: XOR /** * Filter which SysUsers to update */ where?: SysUserWhereInput } /** * SysUser upsert */ export type SysUserUpsertArgs = { /** * Select specific fields to fetch from the SysUser */ select?: SysUserSelect | null /** * Omit specific fields from the SysUser */ omit?: SysUserOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysUserInclude | null /** * The filter to search for the SysUser to update in case it exists. */ where: SysUserWhereUniqueInput /** * In case the SysUser found by the `where` argument doesn't exist, create a new SysUser with this data. */ create: XOR /** * In case the SysUser was found with the provided `where` argument, update it with this data. */ update: XOR relationLoadStrategy?: RelationLoadStrategy } /** * SysUser delete */ export type SysUserDeleteArgs = { /** * Select specific fields to fetch from the SysUser */ select?: SysUserSelect | null /** * Omit specific fields from the SysUser */ omit?: SysUserOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysUserInclude | null /** * Filter which SysUser to delete. */ where: SysUserWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * SysUser deleteMany */ export type SysUserDeleteManyArgs = { /** * Filter which SysUsers to delete */ where?: SysUserWhereInput } /** * SysUser.dept */ export type SysUser$deptArgs = { /** * Select specific fields to fetch from the SysDept */ select?: SysDeptSelect | null /** * Omit specific fields from the SysDept */ omit?: SysDeptOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysDeptInclude | null where?: SysDeptWhereInput } /** * SysUser.roles */ export type SysUser$rolesArgs = { /** * Select specific fields to fetch from the SysUserRole */ select?: SysUserRoleSelect | null /** * Omit specific fields from the SysUserRole */ omit?: SysUserRoleOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysUserRoleInclude | null where?: SysUserRoleWhereInput orderBy?: SysUserRoleOrderByWithRelationInput | SysUserRoleOrderByWithRelationInput[] cursor?: SysUserRoleWhereUniqueInput take?: number skip?: number distinct?: SysUserRoleScalarFieldEnum | SysUserRoleScalarFieldEnum[] } /** * SysUser.posts */ export type SysUser$postsArgs = { /** * Select specific fields to fetch from the SysUserPost */ select?: SysUserPostSelect | null /** * Omit specific fields from the SysUserPost */ omit?: SysUserPostOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysUserPostInclude | null where?: SysUserPostWhereInput orderBy?: SysUserPostOrderByWithRelationInput | SysUserPostOrderByWithRelationInput[] cursor?: SysUserPostWhereUniqueInput take?: number skip?: number distinct?: SysUserPostScalarFieldEnum | SysUserPostScalarFieldEnum[] } /** * SysUser without action */ export type SysUserDefaultArgs = { /** * Select specific fields to fetch from the SysUser */ select?: SysUserSelect | null /** * Omit specific fields from the SysUser */ omit?: SysUserOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysUserInclude | null } /** * Model SysRole */ export type AggregateSysRole = { _count: SysRoleCountAggregateOutputType | null _avg: SysRoleAvgAggregateOutputType | null _sum: SysRoleSumAggregateOutputType | null _min: SysRoleMinAggregateOutputType | null _max: SysRoleMaxAggregateOutputType | null } export type SysRoleAvgAggregateOutputType = { roleId: number | null roleSort: number | null menuCheckStrictly: number | null deptCheckStrictly: number | null } export type SysRoleSumAggregateOutputType = { roleId: number | null roleSort: number | null menuCheckStrictly: number | null deptCheckStrictly: number | null } export type SysRoleMinAggregateOutputType = { roleId: number | null roleName: string | null roleKey: string | null roleSort: number | null dataScope: string | null menuCheckStrictly: number | null deptCheckStrictly: number | null status: string | null createBy: string | null createTime: string | null updateBy: string | null updateTime: string | null remark: string | null } export type SysRoleMaxAggregateOutputType = { roleId: number | null roleName: string | null roleKey: string | null roleSort: number | null dataScope: string | null menuCheckStrictly: number | null deptCheckStrictly: number | null status: string | null createBy: string | null createTime: string | null updateBy: string | null updateTime: string | null remark: string | null } export type SysRoleCountAggregateOutputType = { roleId: number roleName: number roleKey: number roleSort: number dataScope: number menuCheckStrictly: number deptCheckStrictly: number status: number createBy: number createTime: number updateBy: number updateTime: number remark: number _all: number } export type SysRoleAvgAggregateInputType = { roleId?: true roleSort?: true menuCheckStrictly?: true deptCheckStrictly?: true } export type SysRoleSumAggregateInputType = { roleId?: true roleSort?: true menuCheckStrictly?: true deptCheckStrictly?: true } export type SysRoleMinAggregateInputType = { roleId?: true roleName?: true roleKey?: true roleSort?: true dataScope?: true menuCheckStrictly?: true deptCheckStrictly?: true status?: true createBy?: true createTime?: true updateBy?: true updateTime?: true remark?: true } export type SysRoleMaxAggregateInputType = { roleId?: true roleName?: true roleKey?: true roleSort?: true dataScope?: true menuCheckStrictly?: true deptCheckStrictly?: true status?: true createBy?: true createTime?: true updateBy?: true updateTime?: true remark?: true } export type SysRoleCountAggregateInputType = { roleId?: true roleName?: true roleKey?: true roleSort?: true dataScope?: true menuCheckStrictly?: true deptCheckStrictly?: true status?: true createBy?: true createTime?: true updateBy?: true updateTime?: true remark?: true _all?: true } export type SysRoleAggregateArgs = { /** * Filter which SysRole to aggregate. */ where?: SysRoleWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of SysRoles to fetch. */ orderBy?: SysRoleOrderByWithRelationInput | SysRoleOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the start position */ cursor?: SysRoleWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` SysRoles from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` SysRoles. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Count returned SysRoles **/ _count?: true | SysRoleCountAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to average **/ _avg?: SysRoleAvgAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to sum **/ _sum?: SysRoleSumAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the minimum value **/ _min?: SysRoleMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the maximum value **/ _max?: SysRoleMaxAggregateInputType } export type GetSysRoleAggregateType = { [P in keyof T & keyof AggregateSysRole]: P extends '_count' | 'count' ? T[P] extends true ? number : GetScalarType : GetScalarType } export type SysRoleGroupByArgs = { where?: SysRoleWhereInput orderBy?: SysRoleOrderByWithAggregationInput | SysRoleOrderByWithAggregationInput[] by: SysRoleScalarFieldEnum[] | SysRoleScalarFieldEnum having?: SysRoleScalarWhereWithAggregatesInput take?: number skip?: number _count?: SysRoleCountAggregateInputType | true _avg?: SysRoleAvgAggregateInputType _sum?: SysRoleSumAggregateInputType _min?: SysRoleMinAggregateInputType _max?: SysRoleMaxAggregateInputType } export type SysRoleGroupByOutputType = { roleId: number roleName: string roleKey: string roleSort: number dataScope: string | null menuCheckStrictly: number | null deptCheckStrictly: number | null status: string createBy: string | null createTime: string | null updateBy: string | null updateTime: string | null remark: string | null _count: SysRoleCountAggregateOutputType | null _avg: SysRoleAvgAggregateOutputType | null _sum: SysRoleSumAggregateOutputType | null _min: SysRoleMinAggregateOutputType | null _max: SysRoleMaxAggregateOutputType | null } type GetSysRoleGroupByPayload = Prisma.PrismaPromise< Array< PickEnumerable & { [P in ((keyof T) & (keyof SysRoleGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : GetScalarType : GetScalarType } > > export type SysRoleSelect = $Extensions.GetSelect<{ roleId?: boolean roleName?: boolean roleKey?: boolean roleSort?: boolean dataScope?: boolean menuCheckStrictly?: boolean deptCheckStrictly?: boolean status?: boolean createBy?: boolean createTime?: boolean updateBy?: boolean updateTime?: boolean remark?: boolean users?: boolean | SysRole$usersArgs menus?: boolean | SysRole$menusArgs depts?: boolean | SysRole$deptsArgs _count?: boolean | SysRoleCountOutputTypeDefaultArgs }, ExtArgs["result"]["sysRole"]> export type SysRoleSelectScalar = { roleId?: boolean roleName?: boolean roleKey?: boolean roleSort?: boolean dataScope?: boolean menuCheckStrictly?: boolean deptCheckStrictly?: boolean status?: boolean createBy?: boolean createTime?: boolean updateBy?: boolean updateTime?: boolean remark?: boolean } export type SysRoleOmit = $Extensions.GetOmit<"roleId" | "roleName" | "roleKey" | "roleSort" | "dataScope" | "menuCheckStrictly" | "deptCheckStrictly" | "status" | "createBy" | "createTime" | "updateBy" | "updateTime" | "remark", ExtArgs["result"]["sysRole"]> export type SysRoleInclude = { users?: boolean | SysRole$usersArgs menus?: boolean | SysRole$menusArgs depts?: boolean | SysRole$deptsArgs _count?: boolean | SysRoleCountOutputTypeDefaultArgs } export type $SysRolePayload = { name: "SysRole" objects: { users: Prisma.$SysUserRolePayload[] menus: Prisma.$SysRoleMenuPayload[] depts: Prisma.$SysRoleDeptPayload[] } scalars: $Extensions.GetPayloadResult<{ roleId: number roleName: string roleKey: string roleSort: number dataScope: string | null menuCheckStrictly: number | null deptCheckStrictly: number | null status: string createBy: string | null createTime: string | null updateBy: string | null updateTime: string | null remark: string | null }, ExtArgs["result"]["sysRole"]> composites: {} } type SysRoleGetPayload = $Result.GetResult type SysRoleCountArgs = Omit & { select?: SysRoleCountAggregateInputType | true } export interface SysRoleDelegate { [K: symbol]: { types: Prisma.TypeMap['model']['SysRole'], meta: { name: 'SysRole' } } /** * Find zero or one SysRole that matches the filter. * @param {SysRoleFindUniqueArgs} args - Arguments to find a SysRole * @example * // Get one SysRole * const sysRole = await prisma.sysRole.findUnique({ * where: { * // ... provide filter here * } * }) **/ findUnique>( args: SelectSubset> ): Prisma__SysRoleClient<$Result.GetResult, T, 'findUnique'> | null, null, ExtArgs> /** * Find one SysRole that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. * @param {SysRoleFindUniqueOrThrowArgs} args - Arguments to find a SysRole * @example * // Get one SysRole * const sysRole = await prisma.sysRole.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) **/ findUniqueOrThrow>( args?: SelectSubset> ): Prisma__SysRoleClient<$Result.GetResult, T, 'findUniqueOrThrow'>, never, ExtArgs> /** * Find the first SysRole that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysRoleFindFirstArgs} args - Arguments to find a SysRole * @example * // Get one SysRole * const sysRole = await prisma.sysRole.findFirst({ * where: { * // ... provide filter here * } * }) **/ findFirst>( args?: SelectSubset> ): Prisma__SysRoleClient<$Result.GetResult, T, 'findFirst'> | null, null, ExtArgs> /** * Find the first SysRole that matches the filter or * throw `PrismaKnownClientError` with `P2025` code if no matches were found. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysRoleFindFirstOrThrowArgs} args - Arguments to find a SysRole * @example * // Get one SysRole * const sysRole = await prisma.sysRole.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) **/ findFirstOrThrow>( args?: SelectSubset> ): Prisma__SysRoleClient<$Result.GetResult, T, 'findFirstOrThrow'>, never, ExtArgs> /** * Find zero or more SysRoles that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysRoleFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all SysRoles * const sysRoles = await prisma.sysRole.findMany() * * // Get first 10 SysRoles * const sysRoles = await prisma.sysRole.findMany({ take: 10 }) * * // Only select the `roleId` * const sysRoleWithRoleIdOnly = await prisma.sysRole.findMany({ select: { roleId: true } }) * **/ findMany>( args?: SelectSubset> ): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'>> /** * Create a SysRole. * @param {SysRoleCreateArgs} args - Arguments to create a SysRole. * @example * // Create one SysRole * const SysRole = await prisma.sysRole.create({ * data: { * // ... data to create a SysRole * } * }) * **/ create>( args: SelectSubset> ): Prisma__SysRoleClient<$Result.GetResult, T, 'create'>, never, ExtArgs> /** * Create many SysRoles. * @param {SysRoleCreateManyArgs} args - Arguments to create many SysRoles. * @example * // Create many SysRoles * const sysRole = await prisma.sysRole.createMany({ * data: [ * // ... provide data here * ] * }) * **/ createMany>( args?: SelectSubset> ): Prisma.PrismaPromise /** * Delete a SysRole. * @param {SysRoleDeleteArgs} args - Arguments to delete one SysRole. * @example * // Delete one SysRole * const SysRole = await prisma.sysRole.delete({ * where: { * // ... filter to delete one SysRole * } * }) * **/ delete>( args: SelectSubset> ): Prisma__SysRoleClient<$Result.GetResult, T, 'delete'>, never, ExtArgs> /** * Update one SysRole. * @param {SysRoleUpdateArgs} args - Arguments to update one SysRole. * @example * // Update one SysRole * const sysRole = await prisma.sysRole.update({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * **/ update>( args: SelectSubset> ): Prisma__SysRoleClient<$Result.GetResult, T, 'update'>, never, ExtArgs> /** * Delete zero or more SysRoles. * @param {SysRoleDeleteManyArgs} args - Arguments to filter SysRoles to delete. * @example * // Delete a few SysRoles * const { count } = await prisma.sysRole.deleteMany({ * where: { * // ... provide filter here * } * }) * **/ deleteMany>( args?: SelectSubset> ): Prisma.PrismaPromise /** * Update zero or more SysRoles. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysRoleUpdateManyArgs} args - Arguments to update one or more rows. * @example * // Update many SysRoles * const sysRole = await prisma.sysRole.updateMany({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * **/ updateMany>( args: SelectSubset> ): Prisma.PrismaPromise /** * Create or update one SysRole. * @param {SysRoleUpsertArgs} args - Arguments to update or create a SysRole. * @example * // Update or create a SysRole * const sysRole = await prisma.sysRole.upsert({ * create: { * // ... data to create a SysRole * }, * update: { * // ... in case it already exists, update * }, * where: { * // ... the filter for the SysRole we want to update * } * }) **/ upsert>( args: SelectSubset> ): Prisma__SysRoleClient<$Result.GetResult, T, 'upsert'>, never, ExtArgs> /** * Count the number of SysRoles. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysRoleCountArgs} args - Arguments to filter SysRoles to count. * @example * // Count the number of SysRoles * const count = await prisma.sysRole.count({ * where: { * // ... the filter for the SysRoles we want to count * } * }) **/ count( args?: Subset, ): Prisma.PrismaPromise< T extends $Utils.Record<'select', any> ? T['select'] extends true ? number : GetScalarType : number > /** * Allows you to perform aggregations operations on a SysRole. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysRoleAggregateArgs} args - Select which aggregations you would like to apply and on what fields. * @example * // Ordered by age ascending * // Where email contains prisma.io * // Limited to the 10 users * const aggregations = await prisma.user.aggregate({ * _avg: { * age: true, * }, * where: { * email: { * contains: "prisma.io", * }, * }, * orderBy: { * age: "asc", * }, * take: 10, * }) **/ aggregate(args: Subset): Prisma.PrismaPromise> /** * Group by SysRole. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysRoleGroupByArgs} args - Group by arguments. * @example * // Group by city, order by createdAt, get count * const result = await prisma.user.groupBy({ * by: ['city', 'createdAt'], * orderBy: { * createdAt: true * }, * _count: { * _all: true * }, * }) * **/ groupBy< T extends SysRoleGroupByArgs, HasSelectOrTake extends Or< Extends<'skip', Keys>, Extends<'take', Keys> >, OrderByArg extends True extends HasSelectOrTake ? { orderBy: SysRoleGroupByArgs['orderBy'] } : { orderBy?: SysRoleGroupByArgs['orderBy'] }, OrderFields extends ExcludeUnderscoreKeys>>, ByFields extends MaybeTupleToUnion, ByValid extends Has, HavingFields extends GetHavingFields, HavingValid extends Has, ByEmpty extends T['by'] extends never[] ? True : False, InputErrors extends ByEmpty extends True ? `Error: "by" must not be empty.` : HavingValid extends False ? { [P in HavingFields]: P extends ByFields ? never : P extends string ? `Error: Field "${P}" used in "having" needs to be provided in "by".` : [ Error, 'Field ', P, ` in "having" needs to be provided in "by"`, ] }[HavingFields] : 'take' extends Keys ? 'orderBy' extends Keys ? ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] : 'Error: If you provide "take", you also need to provide "orderBy"' : 'skip' extends Keys ? 'orderBy' extends Keys ? ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] : 'Error: If you provide "skip", you also need to provide "orderBy"' : ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetSysRoleGroupByPayload : Prisma.PrismaPromise /** * Fields of the SysRole model */ readonly fields: SysRoleFieldRefs; } /** * The delegate class that acts as a "Promise-like" for SysRole. * Why is this prefixed with `Prisma__`? * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ export interface Prisma__SysRoleClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: 'PrismaPromise'; users = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'> | Null>; menus = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'> | Null>; depts = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'> | Null>; /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of which ever callback is executed. */ then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise; /** * Attaches a callback for only the rejection of the Promise. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of the callback. */ catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise; /** * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The * resolved value cannot be modified from the callback. * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). * @returns A Promise for the completion of the callback. */ finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise; } /** * Fields of the SysRole model */ interface SysRoleFieldRefs { readonly roleId: FieldRef<"SysRole", 'Int'> readonly roleName: FieldRef<"SysRole", 'String'> readonly roleKey: FieldRef<"SysRole", 'String'> readonly roleSort: FieldRef<"SysRole", 'Int'> readonly dataScope: FieldRef<"SysRole", 'String'> readonly menuCheckStrictly: FieldRef<"SysRole", 'Int'> readonly deptCheckStrictly: FieldRef<"SysRole", 'Int'> readonly status: FieldRef<"SysRole", 'String'> readonly createBy: FieldRef<"SysRole", 'String'> readonly createTime: FieldRef<"SysRole", 'String'> readonly updateBy: FieldRef<"SysRole", 'String'> readonly updateTime: FieldRef<"SysRole", 'String'> readonly remark: FieldRef<"SysRole", 'String'> } // Custom InputTypes /** * SysRole findUnique */ export type SysRoleFindUniqueArgs = { /** * Select specific fields to fetch from the SysRole */ select?: SysRoleSelect | null /** * Omit specific fields from the SysRole */ omit?: SysRoleOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysRoleInclude | null /** * Filter, which SysRole to fetch. */ where: SysRoleWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * SysRole findUniqueOrThrow */ export type SysRoleFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the SysRole */ select?: SysRoleSelect | null /** * Omit specific fields from the SysRole */ omit?: SysRoleOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysRoleInclude | null /** * Filter, which SysRole to fetch. */ where: SysRoleWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * SysRole findFirst */ export type SysRoleFindFirstArgs = { /** * Select specific fields to fetch from the SysRole */ select?: SysRoleSelect | null /** * Omit specific fields from the SysRole */ omit?: SysRoleOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysRoleInclude | null /** * Filter, which SysRole to fetch. */ where?: SysRoleWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of SysRoles to fetch. */ orderBy?: SysRoleOrderByWithRelationInput | SysRoleOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for SysRoles. */ cursor?: SysRoleWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` SysRoles from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` SysRoles. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of SysRoles. */ distinct?: SysRoleScalarFieldEnum | SysRoleScalarFieldEnum[] relationLoadStrategy?: RelationLoadStrategy } /** * SysRole findFirstOrThrow */ export type SysRoleFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the SysRole */ select?: SysRoleSelect | null /** * Omit specific fields from the SysRole */ omit?: SysRoleOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysRoleInclude | null /** * Filter, which SysRole to fetch. */ where?: SysRoleWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of SysRoles to fetch. */ orderBy?: SysRoleOrderByWithRelationInput | SysRoleOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for SysRoles. */ cursor?: SysRoleWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` SysRoles from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` SysRoles. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of SysRoles. */ distinct?: SysRoleScalarFieldEnum | SysRoleScalarFieldEnum[] relationLoadStrategy?: RelationLoadStrategy } /** * SysRole findMany */ export type SysRoleFindManyArgs = { /** * Select specific fields to fetch from the SysRole */ select?: SysRoleSelect | null /** * Omit specific fields from the SysRole */ omit?: SysRoleOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysRoleInclude | null /** * Filter, which SysRoles to fetch. */ where?: SysRoleWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of SysRoles to fetch. */ orderBy?: SysRoleOrderByWithRelationInput | SysRoleOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for listing SysRoles. */ cursor?: SysRoleWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` SysRoles from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` SysRoles. */ skip?: number distinct?: SysRoleScalarFieldEnum | SysRoleScalarFieldEnum[] relationLoadStrategy?: RelationLoadStrategy } /** * SysRole create */ export type SysRoleCreateArgs = { /** * Select specific fields to fetch from the SysRole */ select?: SysRoleSelect | null /** * Omit specific fields from the SysRole */ omit?: SysRoleOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysRoleInclude | null /** * The data needed to create a SysRole. */ data: XOR relationLoadStrategy?: RelationLoadStrategy } /** * SysRole createMany */ export type SysRoleCreateManyArgs = { /** * The data used to create many SysRoles. */ data: SysRoleCreateManyInput | SysRoleCreateManyInput[] skipDuplicates?: boolean } /** * SysRole update */ export type SysRoleUpdateArgs = { /** * Select specific fields to fetch from the SysRole */ select?: SysRoleSelect | null /** * Omit specific fields from the SysRole */ omit?: SysRoleOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysRoleInclude | null /** * The data needed to update a SysRole. */ data: XOR /** * Choose, which SysRole to update. */ where: SysRoleWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * SysRole updateMany */ export type SysRoleUpdateManyArgs = { /** * The data used to update SysRoles. */ data: XOR /** * Filter which SysRoles to update */ where?: SysRoleWhereInput } /** * SysRole upsert */ export type SysRoleUpsertArgs = { /** * Select specific fields to fetch from the SysRole */ select?: SysRoleSelect | null /** * Omit specific fields from the SysRole */ omit?: SysRoleOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysRoleInclude | null /** * The filter to search for the SysRole to update in case it exists. */ where: SysRoleWhereUniqueInput /** * In case the SysRole found by the `where` argument doesn't exist, create a new SysRole with this data. */ create: XOR /** * In case the SysRole was found with the provided `where` argument, update it with this data. */ update: XOR relationLoadStrategy?: RelationLoadStrategy } /** * SysRole delete */ export type SysRoleDeleteArgs = { /** * Select specific fields to fetch from the SysRole */ select?: SysRoleSelect | null /** * Omit specific fields from the SysRole */ omit?: SysRoleOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysRoleInclude | null /** * Filter which SysRole to delete. */ where: SysRoleWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * SysRole deleteMany */ export type SysRoleDeleteManyArgs = { /** * Filter which SysRoles to delete */ where?: SysRoleWhereInput } /** * SysRole.users */ export type SysRole$usersArgs = { /** * Select specific fields to fetch from the SysUserRole */ select?: SysUserRoleSelect | null /** * Omit specific fields from the SysUserRole */ omit?: SysUserRoleOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysUserRoleInclude | null where?: SysUserRoleWhereInput orderBy?: SysUserRoleOrderByWithRelationInput | SysUserRoleOrderByWithRelationInput[] cursor?: SysUserRoleWhereUniqueInput take?: number skip?: number distinct?: SysUserRoleScalarFieldEnum | SysUserRoleScalarFieldEnum[] } /** * SysRole.menus */ export type SysRole$menusArgs = { /** * Select specific fields to fetch from the SysRoleMenu */ select?: SysRoleMenuSelect | null /** * Omit specific fields from the SysRoleMenu */ omit?: SysRoleMenuOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysRoleMenuInclude | null where?: SysRoleMenuWhereInput orderBy?: SysRoleMenuOrderByWithRelationInput | SysRoleMenuOrderByWithRelationInput[] cursor?: SysRoleMenuWhereUniqueInput take?: number skip?: number distinct?: SysRoleMenuScalarFieldEnum | SysRoleMenuScalarFieldEnum[] } /** * SysRole.depts */ export type SysRole$deptsArgs = { /** * Select specific fields to fetch from the SysRoleDept */ select?: SysRoleDeptSelect | null /** * Omit specific fields from the SysRoleDept */ omit?: SysRoleDeptOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysRoleDeptInclude | null where?: SysRoleDeptWhereInput orderBy?: SysRoleDeptOrderByWithRelationInput | SysRoleDeptOrderByWithRelationInput[] cursor?: SysRoleDeptWhereUniqueInput take?: number skip?: number distinct?: SysRoleDeptScalarFieldEnum | SysRoleDeptScalarFieldEnum[] } /** * SysRole without action */ export type SysRoleDefaultArgs = { /** * Select specific fields to fetch from the SysRole */ select?: SysRoleSelect | null /** * Omit specific fields from the SysRole */ omit?: SysRoleOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysRoleInclude | null } /** * Model SysUserRole */ export type AggregateSysUserRole = { _count: SysUserRoleCountAggregateOutputType | null _avg: SysUserRoleAvgAggregateOutputType | null _sum: SysUserRoleSumAggregateOutputType | null _min: SysUserRoleMinAggregateOutputType | null _max: SysUserRoleMaxAggregateOutputType | null } export type SysUserRoleAvgAggregateOutputType = { userId: number | null roleId: number | null } export type SysUserRoleSumAggregateOutputType = { userId: number | null roleId: number | null } export type SysUserRoleMinAggregateOutputType = { userId: number | null roleId: number | null } export type SysUserRoleMaxAggregateOutputType = { userId: number | null roleId: number | null } export type SysUserRoleCountAggregateOutputType = { userId: number roleId: number _all: number } export type SysUserRoleAvgAggregateInputType = { userId?: true roleId?: true } export type SysUserRoleSumAggregateInputType = { userId?: true roleId?: true } export type SysUserRoleMinAggregateInputType = { userId?: true roleId?: true } export type SysUserRoleMaxAggregateInputType = { userId?: true roleId?: true } export type SysUserRoleCountAggregateInputType = { userId?: true roleId?: true _all?: true } export type SysUserRoleAggregateArgs = { /** * Filter which SysUserRole to aggregate. */ where?: SysUserRoleWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of SysUserRoles to fetch. */ orderBy?: SysUserRoleOrderByWithRelationInput | SysUserRoleOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the start position */ cursor?: SysUserRoleWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` SysUserRoles from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` SysUserRoles. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Count returned SysUserRoles **/ _count?: true | SysUserRoleCountAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to average **/ _avg?: SysUserRoleAvgAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to sum **/ _sum?: SysUserRoleSumAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the minimum value **/ _min?: SysUserRoleMinAggregateInputType /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} * * Select which fields to find the maximum value **/ _max?: SysUserRoleMaxAggregateInputType } export type GetSysUserRoleAggregateType = { [P in keyof T & keyof AggregateSysUserRole]: P extends '_count' | 'count' ? T[P] extends true ? number : GetScalarType : GetScalarType } export type SysUserRoleGroupByArgs = { where?: SysUserRoleWhereInput orderBy?: SysUserRoleOrderByWithAggregationInput | SysUserRoleOrderByWithAggregationInput[] by: SysUserRoleScalarFieldEnum[] | SysUserRoleScalarFieldEnum having?: SysUserRoleScalarWhereWithAggregatesInput take?: number skip?: number _count?: SysUserRoleCountAggregateInputType | true _avg?: SysUserRoleAvgAggregateInputType _sum?: SysUserRoleSumAggregateInputType _min?: SysUserRoleMinAggregateInputType _max?: SysUserRoleMaxAggregateInputType } export type SysUserRoleGroupByOutputType = { userId: number roleId: number _count: SysUserRoleCountAggregateOutputType | null _avg: SysUserRoleAvgAggregateOutputType | null _sum: SysUserRoleSumAggregateOutputType | null _min: SysUserRoleMinAggregateOutputType | null _max: SysUserRoleMaxAggregateOutputType | null } type GetSysUserRoleGroupByPayload = Prisma.PrismaPromise< Array< PickEnumerable & { [P in ((keyof T) & (keyof SysUserRoleGroupByOutputType))]: P extends '_count' ? T[P] extends boolean ? number : GetScalarType : GetScalarType } > > export type SysUserRoleSelect = $Extensions.GetSelect<{ userId?: boolean roleId?: boolean user?: boolean | SysUserDefaultArgs role?: boolean | SysRoleDefaultArgs }, ExtArgs["result"]["sysUserRole"]> export type SysUserRoleSelectScalar = { userId?: boolean roleId?: boolean } export type SysUserRoleOmit = $Extensions.GetOmit<"userId" | "roleId", ExtArgs["result"]["sysUserRole"]> export type SysUserRoleInclude = { user?: boolean | SysUserDefaultArgs role?: boolean | SysRoleDefaultArgs } export type $SysUserRolePayload = { name: "SysUserRole" objects: { user: Prisma.$SysUserPayload role: Prisma.$SysRolePayload } scalars: $Extensions.GetPayloadResult<{ userId: number roleId: number }, ExtArgs["result"]["sysUserRole"]> composites: {} } type SysUserRoleGetPayload = $Result.GetResult type SysUserRoleCountArgs = Omit & { select?: SysUserRoleCountAggregateInputType | true } export interface SysUserRoleDelegate { [K: symbol]: { types: Prisma.TypeMap['model']['SysUserRole'], meta: { name: 'SysUserRole' } } /** * Find zero or one SysUserRole that matches the filter. * @param {SysUserRoleFindUniqueArgs} args - Arguments to find a SysUserRole * @example * // Get one SysUserRole * const sysUserRole = await prisma.sysUserRole.findUnique({ * where: { * // ... provide filter here * } * }) **/ findUnique>( args: SelectSubset> ): Prisma__SysUserRoleClient<$Result.GetResult, T, 'findUnique'> | null, null, ExtArgs> /** * Find one SysUserRole that matches the filter or throw an error with `error.code='P2025'` * if no matches were found. * @param {SysUserRoleFindUniqueOrThrowArgs} args - Arguments to find a SysUserRole * @example * // Get one SysUserRole * const sysUserRole = await prisma.sysUserRole.findUniqueOrThrow({ * where: { * // ... provide filter here * } * }) **/ findUniqueOrThrow>( args?: SelectSubset> ): Prisma__SysUserRoleClient<$Result.GetResult, T, 'findUniqueOrThrow'>, never, ExtArgs> /** * Find the first SysUserRole that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysUserRoleFindFirstArgs} args - Arguments to find a SysUserRole * @example * // Get one SysUserRole * const sysUserRole = await prisma.sysUserRole.findFirst({ * where: { * // ... provide filter here * } * }) **/ findFirst>( args?: SelectSubset> ): Prisma__SysUserRoleClient<$Result.GetResult, T, 'findFirst'> | null, null, ExtArgs> /** * Find the first SysUserRole that matches the filter or * throw `PrismaKnownClientError` with `P2025` code if no matches were found. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysUserRoleFindFirstOrThrowArgs} args - Arguments to find a SysUserRole * @example * // Get one SysUserRole * const sysUserRole = await prisma.sysUserRole.findFirstOrThrow({ * where: { * // ... provide filter here * } * }) **/ findFirstOrThrow>( args?: SelectSubset> ): Prisma__SysUserRoleClient<$Result.GetResult, T, 'findFirstOrThrow'>, never, ExtArgs> /** * Find zero or more SysUserRoles that matches the filter. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysUserRoleFindManyArgs} args - Arguments to filter and select certain fields only. * @example * // Get all SysUserRoles * const sysUserRoles = await prisma.sysUserRole.findMany() * * // Get first 10 SysUserRoles * const sysUserRoles = await prisma.sysUserRole.findMany({ take: 10 }) * * // Only select the `userId` * const sysUserRoleWithUserIdOnly = await prisma.sysUserRole.findMany({ select: { userId: true } }) * **/ findMany>( args?: SelectSubset> ): Prisma.PrismaPromise<$Result.GetResult, T, 'findMany'>> /** * Create a SysUserRole. * @param {SysUserRoleCreateArgs} args - Arguments to create a SysUserRole. * @example * // Create one SysUserRole * const SysUserRole = await prisma.sysUserRole.create({ * data: { * // ... data to create a SysUserRole * } * }) * **/ create>( args: SelectSubset> ): Prisma__SysUserRoleClient<$Result.GetResult, T, 'create'>, never, ExtArgs> /** * Create many SysUserRoles. * @param {SysUserRoleCreateManyArgs} args - Arguments to create many SysUserRoles. * @example * // Create many SysUserRoles * const sysUserRole = await prisma.sysUserRole.createMany({ * data: [ * // ... provide data here * ] * }) * **/ createMany>( args?: SelectSubset> ): Prisma.PrismaPromise /** * Delete a SysUserRole. * @param {SysUserRoleDeleteArgs} args - Arguments to delete one SysUserRole. * @example * // Delete one SysUserRole * const SysUserRole = await prisma.sysUserRole.delete({ * where: { * // ... filter to delete one SysUserRole * } * }) * **/ delete>( args: SelectSubset> ): Prisma__SysUserRoleClient<$Result.GetResult, T, 'delete'>, never, ExtArgs> /** * Update one SysUserRole. * @param {SysUserRoleUpdateArgs} args - Arguments to update one SysUserRole. * @example * // Update one SysUserRole * const sysUserRole = await prisma.sysUserRole.update({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * **/ update>( args: SelectSubset> ): Prisma__SysUserRoleClient<$Result.GetResult, T, 'update'>, never, ExtArgs> /** * Delete zero or more SysUserRoles. * @param {SysUserRoleDeleteManyArgs} args - Arguments to filter SysUserRoles to delete. * @example * // Delete a few SysUserRoles * const { count } = await prisma.sysUserRole.deleteMany({ * where: { * // ... provide filter here * } * }) * **/ deleteMany>( args?: SelectSubset> ): Prisma.PrismaPromise /** * Update zero or more SysUserRoles. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysUserRoleUpdateManyArgs} args - Arguments to update one or more rows. * @example * // Update many SysUserRoles * const sysUserRole = await prisma.sysUserRole.updateMany({ * where: { * // ... provide filter here * }, * data: { * // ... provide data here * } * }) * **/ updateMany>( args: SelectSubset> ): Prisma.PrismaPromise /** * Create or update one SysUserRole. * @param {SysUserRoleUpsertArgs} args - Arguments to update or create a SysUserRole. * @example * // Update or create a SysUserRole * const sysUserRole = await prisma.sysUserRole.upsert({ * create: { * // ... data to create a SysUserRole * }, * update: { * // ... in case it already exists, update * }, * where: { * // ... the filter for the SysUserRole we want to update * } * }) **/ upsert>( args: SelectSubset> ): Prisma__SysUserRoleClient<$Result.GetResult, T, 'upsert'>, never, ExtArgs> /** * Count the number of SysUserRoles. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysUserRoleCountArgs} args - Arguments to filter SysUserRoles to count. * @example * // Count the number of SysUserRoles * const count = await prisma.sysUserRole.count({ * where: { * // ... the filter for the SysUserRoles we want to count * } * }) **/ count( args?: Subset, ): Prisma.PrismaPromise< T extends $Utils.Record<'select', any> ? T['select'] extends true ? number : GetScalarType : number > /** * Allows you to perform aggregations operations on a SysUserRole. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysUserRoleAggregateArgs} args - Select which aggregations you would like to apply and on what fields. * @example * // Ordered by age ascending * // Where email contains prisma.io * // Limited to the 10 users * const aggregations = await prisma.user.aggregate({ * _avg: { * age: true, * }, * where: { * email: { * contains: "prisma.io", * }, * }, * orderBy: { * age: "asc", * }, * take: 10, * }) **/ aggregate(args: Subset): Prisma.PrismaPromise> /** * Group by SysUserRole. * Note, that providing `undefined` is treated as the value not being there. * Read more here: https://pris.ly/d/null-undefined * @param {SysUserRoleGroupByArgs} args - Group by arguments. * @example * // Group by city, order by createdAt, get count * const result = await prisma.user.groupBy({ * by: ['city', 'createdAt'], * orderBy: { * createdAt: true * }, * _count: { * _all: true * }, * }) * **/ groupBy< T extends SysUserRoleGroupByArgs, HasSelectOrTake extends Or< Extends<'skip', Keys>, Extends<'take', Keys> >, OrderByArg extends True extends HasSelectOrTake ? { orderBy: SysUserRoleGroupByArgs['orderBy'] } : { orderBy?: SysUserRoleGroupByArgs['orderBy'] }, OrderFields extends ExcludeUnderscoreKeys>>, ByFields extends MaybeTupleToUnion, ByValid extends Has, HavingFields extends GetHavingFields, HavingValid extends Has, ByEmpty extends T['by'] extends never[] ? True : False, InputErrors extends ByEmpty extends True ? `Error: "by" must not be empty.` : HavingValid extends False ? { [P in HavingFields]: P extends ByFields ? never : P extends string ? `Error: Field "${P}" used in "having" needs to be provided in "by".` : [ Error, 'Field ', P, ` in "having" needs to be provided in "by"`, ] }[HavingFields] : 'take' extends Keys ? 'orderBy' extends Keys ? ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] : 'Error: If you provide "take", you also need to provide "orderBy"' : 'skip' extends Keys ? 'orderBy' extends Keys ? ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] : 'Error: If you provide "skip", you also need to provide "orderBy"' : ByValid extends True ? {} : { [P in OrderFields]: P extends ByFields ? never : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` }[OrderFields] >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetSysUserRoleGroupByPayload : Prisma.PrismaPromise /** * Fields of the SysUserRole model */ readonly fields: SysUserRoleFieldRefs; } /** * The delegate class that acts as a "Promise-like" for SysUserRole. * Why is this prefixed with `Prisma__`? * Because we want to prevent naming conflicts as mentioned in * https://github.com/prisma/prisma-client-js/issues/707 */ export interface Prisma__SysUserRoleClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: 'PrismaPromise'; user = {}>(args?: Subset>): Prisma__SysUserClient<$Result.GetResult, T, 'findUniqueOrThrow'> | Null, Null, ExtArgs>; role = {}>(args?: Subset>): Prisma__SysRoleClient<$Result.GetResult, T, 'findUniqueOrThrow'> | Null, Null, ExtArgs>; /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of which ever callback is executed. */ then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise; /** * Attaches a callback for only the rejection of the Promise. * @param onrejected The callback to execute when the Promise is rejected. * @returns A Promise for the completion of the callback. */ catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise; /** * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The * resolved value cannot be modified from the callback. * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). * @returns A Promise for the completion of the callback. */ finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise; } /** * Fields of the SysUserRole model */ interface SysUserRoleFieldRefs { readonly userId: FieldRef<"SysUserRole", 'Int'> readonly roleId: FieldRef<"SysUserRole", 'Int'> } // Custom InputTypes /** * SysUserRole findUnique */ export type SysUserRoleFindUniqueArgs = { /** * Select specific fields to fetch from the SysUserRole */ select?: SysUserRoleSelect | null /** * Omit specific fields from the SysUserRole */ omit?: SysUserRoleOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysUserRoleInclude | null /** * Filter, which SysUserRole to fetch. */ where: SysUserRoleWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * SysUserRole findUniqueOrThrow */ export type SysUserRoleFindUniqueOrThrowArgs = { /** * Select specific fields to fetch from the SysUserRole */ select?: SysUserRoleSelect | null /** * Omit specific fields from the SysUserRole */ omit?: SysUserRoleOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysUserRoleInclude | null /** * Filter, which SysUserRole to fetch. */ where: SysUserRoleWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * SysUserRole findFirst */ export type SysUserRoleFindFirstArgs = { /** * Select specific fields to fetch from the SysUserRole */ select?: SysUserRoleSelect | null /** * Omit specific fields from the SysUserRole */ omit?: SysUserRoleOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysUserRoleInclude | null /** * Filter, which SysUserRole to fetch. */ where?: SysUserRoleWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of SysUserRoles to fetch. */ orderBy?: SysUserRoleOrderByWithRelationInput | SysUserRoleOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for SysUserRoles. */ cursor?: SysUserRoleWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` SysUserRoles from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` SysUserRoles. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of SysUserRoles. */ distinct?: SysUserRoleScalarFieldEnum | SysUserRoleScalarFieldEnum[] relationLoadStrategy?: RelationLoadStrategy } /** * SysUserRole findFirstOrThrow */ export type SysUserRoleFindFirstOrThrowArgs = { /** * Select specific fields to fetch from the SysUserRole */ select?: SysUserRoleSelect | null /** * Omit specific fields from the SysUserRole */ omit?: SysUserRoleOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysUserRoleInclude | null /** * Filter, which SysUserRole to fetch. */ where?: SysUserRoleWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of SysUserRoles to fetch. */ orderBy?: SysUserRoleOrderByWithRelationInput | SysUserRoleOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for searching for SysUserRoles. */ cursor?: SysUserRoleWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` SysUserRoles from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` SysUserRoles. */ skip?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} * * Filter by unique combinations of SysUserRoles. */ distinct?: SysUserRoleScalarFieldEnum | SysUserRoleScalarFieldEnum[] relationLoadStrategy?: RelationLoadStrategy } /** * SysUserRole findMany */ export type SysUserRoleFindManyArgs = { /** * Select specific fields to fetch from the SysUserRole */ select?: SysUserRoleSelect | null /** * Omit specific fields from the SysUserRole */ omit?: SysUserRoleOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysUserRoleInclude | null /** * Filter, which SysUserRoles to fetch. */ where?: SysUserRoleWhereInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} * * Determine the order of SysUserRoles to fetch. */ orderBy?: SysUserRoleOrderByWithRelationInput | SysUserRoleOrderByWithRelationInput[] /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} * * Sets the position for listing SysUserRoles. */ cursor?: SysUserRoleWhereUniqueInput /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Take `±n` SysUserRoles from the position of the cursor. */ take?: number /** * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} * * Skip the first `n` SysUserRoles. */ skip?: number distinct?: SysUserRoleScalarFieldEnum | SysUserRoleScalarFieldEnum[] relationLoadStrategy?: RelationLoadStrategy } /** * SysUserRole create */ export type SysUserRoleCreateArgs = { /** * Select specific fields to fetch from the SysUserRole */ select?: SysUserRoleSelect | null /** * Omit specific fields from the SysUserRole */ omit?: SysUserRoleOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysUserRoleInclude | null /** * The data needed to create a SysUserRole. */ data: XOR relationLoadStrategy?: RelationLoadStrategy } /** * SysUserRole createMany */ export type SysUserRoleCreateManyArgs = { /** * The data used to create many SysUserRoles. */ data: SysUserRoleCreateManyInput | SysUserRoleCreateManyInput[] skipDuplicates?: boolean } /** * SysUserRole update */ export type SysUserRoleUpdateArgs = { /** * Select specific fields to fetch from the SysUserRole */ select?: SysUserRoleSelect | null /** * Omit specific fields from the SysUserRole */ omit?: SysUserRoleOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysUserRoleInclude | null /** * The data needed to update a SysUserRole. */ data: XOR /** * Choose, which SysUserRole to update. */ where: SysUserRoleWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * SysUserRole updateMany */ export type SysUserRoleUpdateManyArgs = { /** * The data used to update SysUserRoles. */ data: XOR /** * Filter which SysUserRoles to update */ where?: SysUserRoleWhereInput } /** * SysUserRole upsert */ export type SysUserRoleUpsertArgs = { /** * Select specific fields to fetch from the SysUserRole */ select?: SysUserRoleSelect | null /** * Omit specific fields from the SysUserRole */ omit?: SysUserRoleOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysUserRoleInclude | null /** * The filter to search for the SysUserRole to update in case it exists. */ where: SysUserRoleWhereUniqueInput /** * In case the SysUserRole found by the `where` argument doesn't exist, create a new SysUserRole with this data. */ create: XOR /** * In case the SysUserRole was found with the provided `where` argument, update it with this data. */ update: XOR relationLoadStrategy?: RelationLoadStrategy } /** * SysUserRole delete */ export type SysUserRoleDeleteArgs = { /** * Select specific fields to fetch from the SysUserRole */ select?: SysUserRoleSelect | null /** * Omit specific fields from the SysUserRole */ omit?: SysUserRoleOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysUserRoleInclude | null /** * Filter which SysUserRole to delete. */ where: SysUserRoleWhereUniqueInput relationLoadStrategy?: RelationLoadStrategy } /** * SysUserRole deleteMany */ export type SysUserRoleDeleteManyArgs = { /** * Filter which SysUserRoles to delete */ where?: SysUserRoleWhereInput } /** * SysUserRole without action */ export type SysUserRoleDefaultArgs = { /** * Select specific fields to fetch from the SysUserRole */ select?: SysUserRoleSelect | null /** * Omit specific fields from the SysUserRole */ omit?: SysUserRoleOmit | null /** * Choose, which related nodes to fetch as well */ include?: SysUserRoleInclude | null } /** * Enums */ export const TransactionIsolationLevel: { ReadUncommitted: 'ReadUncommitted', ReadCommitted: 'ReadCommitted', RepeatableRead: 'RepeatableRead', Serializable: 'Serializable' }; export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel] export const GenTableScalarFieldEnum: { tableId: 'tableId', tableName: 'tableName', tableComment: 'tableComment', subTableName: 'subTableName', subTableFkName: 'subTableFkName', className: 'className', tplCategory: 'tplCategory', tplWebType: 'tplWebType', packageName: 'packageName', moduleName: 'moduleName', businessName: 'businessName', functionName: 'functionName', functionAuthor: 'functionAuthor', genType: 'genType', genPath: 'genPath', options: 'options', createBy: 'createBy', createTime: 'createTime', updateBy: 'updateBy', updateTime: 'updateTime', remark: 'remark' }; export type GenTableScalarFieldEnum = (typeof GenTableScalarFieldEnum)[keyof typeof GenTableScalarFieldEnum] export const RelationLoadStrategy: { query: 'query', join: 'join' }; export type RelationLoadStrategy = (typeof RelationLoadStrategy)[keyof typeof RelationLoadStrategy] export const GenTableColumnScalarFieldEnum: { columnId: 'columnId', tableId: 'tableId', columnName: 'columnName', columnComment: 'columnComment', columnType: 'columnType', javaType: 'javaType', javaField: 'javaField', isPk: 'isPk', isIncrement: 'isIncrement', isRequired: 'isRequired', isInsert: 'isInsert', isEdit: 'isEdit', isList: 'isList', isQuery: 'isQuery', queryType: 'queryType', htmlType: 'htmlType', dictType: 'dictType', sort: 'sort', createBy: 'createBy', createTime: 'createTime', updateBy: 'updateBy', updateTime: 'updateTime' }; export type GenTableColumnScalarFieldEnum = (typeof GenTableColumnScalarFieldEnum)[keyof typeof GenTableColumnScalarFieldEnum] export const SysConfigScalarFieldEnum: { configId: 'configId', configName: 'configName', configKey: 'configKey', configValue: 'configValue', configType: 'configType', createBy: 'createBy', createTime: 'createTime', updateBy: 'updateBy', updateTime: 'updateTime', remark: 'remark' }; export type SysConfigScalarFieldEnum = (typeof SysConfigScalarFieldEnum)[keyof typeof SysConfigScalarFieldEnum] export const SysDeptScalarFieldEnum: { deptId: 'deptId', parentId: 'parentId', ancestors: 'ancestors', deptName: 'deptName', orderNum: 'orderNum', leader: 'leader', phone: 'phone', email: 'email', status: 'status', createBy: 'createBy', createTime: 'createTime', updateBy: 'updateBy', updateTime: 'updateTime' }; export type SysDeptScalarFieldEnum = (typeof SysDeptScalarFieldEnum)[keyof typeof SysDeptScalarFieldEnum] export const SysDictDataScalarFieldEnum: { dictCode: 'dictCode', dictSort: 'dictSort', dictLabel: 'dictLabel', dictValue: 'dictValue', dictType: 'dictType', cssClass: 'cssClass', listClass: 'listClass', isDefault: 'isDefault', status: 'status', createBy: 'createBy', createTime: 'createTime', updateBy: 'updateBy', updateTime: 'updateTime', remark: 'remark' }; export type SysDictDataScalarFieldEnum = (typeof SysDictDataScalarFieldEnum)[keyof typeof SysDictDataScalarFieldEnum] export const SysDictTypeScalarFieldEnum: { dictId: 'dictId', dictName: 'dictName', dictType: 'dictType', status: 'status', createBy: 'createBy', createTime: 'createTime', updateBy: 'updateBy', updateTime: 'updateTime', remark: 'remark' }; export type SysDictTypeScalarFieldEnum = (typeof SysDictTypeScalarFieldEnum)[keyof typeof SysDictTypeScalarFieldEnum] export const SysLogininforScalarFieldEnum: { infoId: 'infoId', userName: 'userName', ipaddr: 'ipaddr', loginLocation: 'loginLocation', browser: 'browser', os: 'os', status: 'status', msg: 'msg', loginTime: 'loginTime' }; export type SysLogininforScalarFieldEnum = (typeof SysLogininforScalarFieldEnum)[keyof typeof SysLogininforScalarFieldEnum] export const SysMenuScalarFieldEnum: { menuId: 'menuId', menuName: 'menuName', parentId: 'parentId', orderNum: 'orderNum', path: 'path', component: 'component', query: 'query', isFrame: 'isFrame', isCache: 'isCache', menuType: 'menuType', visible: 'visible', status: 'status', perms: 'perms', icon: 'icon', createBy: 'createBy', createTime: 'createTime', updateBy: 'updateBy', updateTime: 'updateTime', remark: 'remark' }; export type SysMenuScalarFieldEnum = (typeof SysMenuScalarFieldEnum)[keyof typeof SysMenuScalarFieldEnum] export const SysNoticeScalarFieldEnum: { noticeId: 'noticeId', noticeTitle: 'noticeTitle', noticeType: 'noticeType', noticeContent: 'noticeContent', status: 'status', createBy: 'createBy', createTime: 'createTime', updateBy: 'updateBy', updateTime: 'updateTime', remark: 'remark' }; export type SysNoticeScalarFieldEnum = (typeof SysNoticeScalarFieldEnum)[keyof typeof SysNoticeScalarFieldEnum] export const SysPostScalarFieldEnum: { postId: 'postId', postCode: 'postCode', postName: 'postName', postSort: 'postSort', status: 'status', createBy: 'createBy', createTime: 'createTime', updateBy: 'updateBy', updateTime: 'updateTime', remark: 'remark' }; export type SysPostScalarFieldEnum = (typeof SysPostScalarFieldEnum)[keyof typeof SysPostScalarFieldEnum] export const SysUserPostScalarFieldEnum: { userId: 'userId', postId: 'postId' }; export type SysUserPostScalarFieldEnum = (typeof SysUserPostScalarFieldEnum)[keyof typeof SysUserPostScalarFieldEnum] export const SysRoleDeptScalarFieldEnum: { roleId: 'roleId', deptId: 'deptId' }; export type SysRoleDeptScalarFieldEnum = (typeof SysRoleDeptScalarFieldEnum)[keyof typeof SysRoleDeptScalarFieldEnum] export const SysRoleMenuScalarFieldEnum: { roleId: 'roleId', menuId: 'menuId' }; export type SysRoleMenuScalarFieldEnum = (typeof SysRoleMenuScalarFieldEnum)[keyof typeof SysRoleMenuScalarFieldEnum] export const SysUserScalarFieldEnum: { userId: 'userId', deptId: 'deptId', userName: 'userName', nickName: 'nickName', userType: 'userType', email: 'email', phonenumber: 'phonenumber', sex: 'sex', avatar: 'avatar', password: 'password', status: 'status', loginIp: 'loginIp', loginDate: 'loginDate', createBy: 'createBy', createTime: 'createTime', updateBy: 'updateBy', updateTime: 'updateTime', remark: 'remark' }; export type SysUserScalarFieldEnum = (typeof SysUserScalarFieldEnum)[keyof typeof SysUserScalarFieldEnum] export const SysRoleScalarFieldEnum: { roleId: 'roleId', roleName: 'roleName', roleKey: 'roleKey', roleSort: 'roleSort', dataScope: 'dataScope', menuCheckStrictly: 'menuCheckStrictly', deptCheckStrictly: 'deptCheckStrictly', status: 'status', createBy: 'createBy', createTime: 'createTime', updateBy: 'updateBy', updateTime: 'updateTime', remark: 'remark' }; export type SysRoleScalarFieldEnum = (typeof SysRoleScalarFieldEnum)[keyof typeof SysRoleScalarFieldEnum] export const SysUserRoleScalarFieldEnum: { userId: 'userId', roleId: 'roleId' }; export type SysUserRoleScalarFieldEnum = (typeof SysUserRoleScalarFieldEnum)[keyof typeof SysUserRoleScalarFieldEnum] export const SortOrder: { asc: 'asc', desc: 'desc' }; export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder] export const NullsOrder: { first: 'first', last: 'last' }; export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder] /** * Field references */ /** * Reference to a field of type 'Int' */ export type IntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int'> /** * Reference to a field of type 'String' */ export type StringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'String'> /** * Reference to a field of type 'Float' */ export type FloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Float'> /** * Deep Input Types */ export type GenTableWhereInput = { AND?: GenTableWhereInput | GenTableWhereInput[] OR?: GenTableWhereInput[] NOT?: GenTableWhereInput | GenTableWhereInput[] tableId?: IntFilter<"GenTable"> | number tableName?: StringNullableFilter<"GenTable"> | string | null tableComment?: StringNullableFilter<"GenTable"> | string | null subTableName?: StringNullableFilter<"GenTable"> | string | null subTableFkName?: StringNullableFilter<"GenTable"> | string | null className?: StringNullableFilter<"GenTable"> | string | null tplCategory?: StringNullableFilter<"GenTable"> | string | null tplWebType?: StringNullableFilter<"GenTable"> | string | null packageName?: StringNullableFilter<"GenTable"> | string | null moduleName?: StringNullableFilter<"GenTable"> | string | null businessName?: StringNullableFilter<"GenTable"> | string | null functionName?: StringNullableFilter<"GenTable"> | string | null functionAuthor?: StringNullableFilter<"GenTable"> | string | null genType?: StringNullableFilter<"GenTable"> | string | null genPath?: StringNullableFilter<"GenTable"> | string | null options?: StringNullableFilter<"GenTable"> | string | null createBy?: StringNullableFilter<"GenTable"> | string | null createTime?: StringNullableFilter<"GenTable"> | string | null updateBy?: StringNullableFilter<"GenTable"> | string | null updateTime?: StringNullableFilter<"GenTable"> | string | null remark?: StringNullableFilter<"GenTable"> | string | null tableColumns?: GenTableColumnListRelationFilter } export type GenTableOrderByWithRelationInput = { tableId?: SortOrder tableName?: SortOrderInput | SortOrder tableComment?: SortOrderInput | SortOrder subTableName?: SortOrderInput | SortOrder subTableFkName?: SortOrderInput | SortOrder className?: SortOrderInput | SortOrder tplCategory?: SortOrderInput | SortOrder tplWebType?: SortOrderInput | SortOrder packageName?: SortOrderInput | SortOrder moduleName?: SortOrderInput | SortOrder businessName?: SortOrderInput | SortOrder functionName?: SortOrderInput | SortOrder functionAuthor?: SortOrderInput | SortOrder genType?: SortOrderInput | SortOrder genPath?: SortOrderInput | SortOrder options?: SortOrderInput | SortOrder createBy?: SortOrderInput | SortOrder createTime?: SortOrderInput | SortOrder updateBy?: SortOrderInput | SortOrder updateTime?: SortOrderInput | SortOrder remark?: SortOrderInput | SortOrder tableColumns?: GenTableColumnOrderByRelationAggregateInput } export type GenTableWhereUniqueInput = Prisma.AtLeast<{ tableId?: number AND?: GenTableWhereInput | GenTableWhereInput[] OR?: GenTableWhereInput[] NOT?: GenTableWhereInput | GenTableWhereInput[] tableName?: StringNullableFilter<"GenTable"> | string | null tableComment?: StringNullableFilter<"GenTable"> | string | null subTableName?: StringNullableFilter<"GenTable"> | string | null subTableFkName?: StringNullableFilter<"GenTable"> | string | null className?: StringNullableFilter<"GenTable"> | string | null tplCategory?: StringNullableFilter<"GenTable"> | string | null tplWebType?: StringNullableFilter<"GenTable"> | string | null packageName?: StringNullableFilter<"GenTable"> | string | null moduleName?: StringNullableFilter<"GenTable"> | string | null businessName?: StringNullableFilter<"GenTable"> | string | null functionName?: StringNullableFilter<"GenTable"> | string | null functionAuthor?: StringNullableFilter<"GenTable"> | string | null genType?: StringNullableFilter<"GenTable"> | string | null genPath?: StringNullableFilter<"GenTable"> | string | null options?: StringNullableFilter<"GenTable"> | string | null createBy?: StringNullableFilter<"GenTable"> | string | null createTime?: StringNullableFilter<"GenTable"> | string | null updateBy?: StringNullableFilter<"GenTable"> | string | null updateTime?: StringNullableFilter<"GenTable"> | string | null remark?: StringNullableFilter<"GenTable"> | string | null tableColumns?: GenTableColumnListRelationFilter }, "tableId"> export type GenTableOrderByWithAggregationInput = { tableId?: SortOrder tableName?: SortOrderInput | SortOrder tableComment?: SortOrderInput | SortOrder subTableName?: SortOrderInput | SortOrder subTableFkName?: SortOrderInput | SortOrder className?: SortOrderInput | SortOrder tplCategory?: SortOrderInput | SortOrder tplWebType?: SortOrderInput | SortOrder packageName?: SortOrderInput | SortOrder moduleName?: SortOrderInput | SortOrder businessName?: SortOrderInput | SortOrder functionName?: SortOrderInput | SortOrder functionAuthor?: SortOrderInput | SortOrder genType?: SortOrderInput | SortOrder genPath?: SortOrderInput | SortOrder options?: SortOrderInput | SortOrder createBy?: SortOrderInput | SortOrder createTime?: SortOrderInput | SortOrder updateBy?: SortOrderInput | SortOrder updateTime?: SortOrderInput | SortOrder remark?: SortOrderInput | SortOrder _count?: GenTableCountOrderByAggregateInput _avg?: GenTableAvgOrderByAggregateInput _max?: GenTableMaxOrderByAggregateInput _min?: GenTableMinOrderByAggregateInput _sum?: GenTableSumOrderByAggregateInput } export type GenTableScalarWhereWithAggregatesInput = { AND?: GenTableScalarWhereWithAggregatesInput | GenTableScalarWhereWithAggregatesInput[] OR?: GenTableScalarWhereWithAggregatesInput[] NOT?: GenTableScalarWhereWithAggregatesInput | GenTableScalarWhereWithAggregatesInput[] tableId?: IntWithAggregatesFilter<"GenTable"> | number tableName?: StringNullableWithAggregatesFilter<"GenTable"> | string | null tableComment?: StringNullableWithAggregatesFilter<"GenTable"> | string | null subTableName?: StringNullableWithAggregatesFilter<"GenTable"> | string | null subTableFkName?: StringNullableWithAggregatesFilter<"GenTable"> | string | null className?: StringNullableWithAggregatesFilter<"GenTable"> | string | null tplCategory?: StringNullableWithAggregatesFilter<"GenTable"> | string | null tplWebType?: StringNullableWithAggregatesFilter<"GenTable"> | string | null packageName?: StringNullableWithAggregatesFilter<"GenTable"> | string | null moduleName?: StringNullableWithAggregatesFilter<"GenTable"> | string | null businessName?: StringNullableWithAggregatesFilter<"GenTable"> | string | null functionName?: StringNullableWithAggregatesFilter<"GenTable"> | string | null functionAuthor?: StringNullableWithAggregatesFilter<"GenTable"> | string | null genType?: StringNullableWithAggregatesFilter<"GenTable"> | string | null genPath?: StringNullableWithAggregatesFilter<"GenTable"> | string | null options?: StringNullableWithAggregatesFilter<"GenTable"> | string | null createBy?: StringNullableWithAggregatesFilter<"GenTable"> | string | null createTime?: StringNullableWithAggregatesFilter<"GenTable"> | string | null updateBy?: StringNullableWithAggregatesFilter<"GenTable"> | string | null updateTime?: StringNullableWithAggregatesFilter<"GenTable"> | string | null remark?: StringNullableWithAggregatesFilter<"GenTable"> | string | null } export type GenTableColumnWhereInput = { AND?: GenTableColumnWhereInput | GenTableColumnWhereInput[] OR?: GenTableColumnWhereInput[] NOT?: GenTableColumnWhereInput | GenTableColumnWhereInput[] columnId?: IntFilter<"GenTableColumn"> | number tableId?: IntNullableFilter<"GenTableColumn"> | number | null columnName?: StringNullableFilter<"GenTableColumn"> | string | null columnComment?: StringNullableFilter<"GenTableColumn"> | string | null columnType?: StringNullableFilter<"GenTableColumn"> | string | null javaType?: StringNullableFilter<"GenTableColumn"> | string | null javaField?: StringNullableFilter<"GenTableColumn"> | string | null isPk?: StringNullableFilter<"GenTableColumn"> | string | null isIncrement?: StringNullableFilter<"GenTableColumn"> | string | null isRequired?: StringNullableFilter<"GenTableColumn"> | string | null isInsert?: StringNullableFilter<"GenTableColumn"> | string | null isEdit?: StringNullableFilter<"GenTableColumn"> | string | null isList?: StringNullableFilter<"GenTableColumn"> | string | null isQuery?: StringNullableFilter<"GenTableColumn"> | string | null queryType?: StringNullableFilter<"GenTableColumn"> | string | null htmlType?: StringNullableFilter<"GenTableColumn"> | string | null dictType?: StringNullableFilter<"GenTableColumn"> | string | null sort?: IntNullableFilter<"GenTableColumn"> | number | null createBy?: StringNullableFilter<"GenTableColumn"> | string | null createTime?: StringNullableFilter<"GenTableColumn"> | string | null updateBy?: StringNullableFilter<"GenTableColumn"> | string | null updateTime?: StringNullableFilter<"GenTableColumn"> | string | null table?: XOR | null } export type GenTableColumnOrderByWithRelationInput = { columnId?: SortOrder tableId?: SortOrderInput | SortOrder columnName?: SortOrderInput | SortOrder columnComment?: SortOrderInput | SortOrder columnType?: SortOrderInput | SortOrder javaType?: SortOrderInput | SortOrder javaField?: SortOrderInput | SortOrder isPk?: SortOrderInput | SortOrder isIncrement?: SortOrderInput | SortOrder isRequired?: SortOrderInput | SortOrder isInsert?: SortOrderInput | SortOrder isEdit?: SortOrderInput | SortOrder isList?: SortOrderInput | SortOrder isQuery?: SortOrderInput | SortOrder queryType?: SortOrderInput | SortOrder htmlType?: SortOrderInput | SortOrder dictType?: SortOrderInput | SortOrder sort?: SortOrderInput | SortOrder createBy?: SortOrderInput | SortOrder createTime?: SortOrderInput | SortOrder updateBy?: SortOrderInput | SortOrder updateTime?: SortOrderInput | SortOrder table?: GenTableOrderByWithRelationInput } export type GenTableColumnWhereUniqueInput = Prisma.AtLeast<{ columnId?: number AND?: GenTableColumnWhereInput | GenTableColumnWhereInput[] OR?: GenTableColumnWhereInput[] NOT?: GenTableColumnWhereInput | GenTableColumnWhereInput[] tableId?: IntNullableFilter<"GenTableColumn"> | number | null columnName?: StringNullableFilter<"GenTableColumn"> | string | null columnComment?: StringNullableFilter<"GenTableColumn"> | string | null columnType?: StringNullableFilter<"GenTableColumn"> | string | null javaType?: StringNullableFilter<"GenTableColumn"> | string | null javaField?: StringNullableFilter<"GenTableColumn"> | string | null isPk?: StringNullableFilter<"GenTableColumn"> | string | null isIncrement?: StringNullableFilter<"GenTableColumn"> | string | null isRequired?: StringNullableFilter<"GenTableColumn"> | string | null isInsert?: StringNullableFilter<"GenTableColumn"> | string | null isEdit?: StringNullableFilter<"GenTableColumn"> | string | null isList?: StringNullableFilter<"GenTableColumn"> | string | null isQuery?: StringNullableFilter<"GenTableColumn"> | string | null queryType?: StringNullableFilter<"GenTableColumn"> | string | null htmlType?: StringNullableFilter<"GenTableColumn"> | string | null dictType?: StringNullableFilter<"GenTableColumn"> | string | null sort?: IntNullableFilter<"GenTableColumn"> | number | null createBy?: StringNullableFilter<"GenTableColumn"> | string | null createTime?: StringNullableFilter<"GenTableColumn"> | string | null updateBy?: StringNullableFilter<"GenTableColumn"> | string | null updateTime?: StringNullableFilter<"GenTableColumn"> | string | null table?: XOR | null }, "columnId"> export type GenTableColumnOrderByWithAggregationInput = { columnId?: SortOrder tableId?: SortOrderInput | SortOrder columnName?: SortOrderInput | SortOrder columnComment?: SortOrderInput | SortOrder columnType?: SortOrderInput | SortOrder javaType?: SortOrderInput | SortOrder javaField?: SortOrderInput | SortOrder isPk?: SortOrderInput | SortOrder isIncrement?: SortOrderInput | SortOrder isRequired?: SortOrderInput | SortOrder isInsert?: SortOrderInput | SortOrder isEdit?: SortOrderInput | SortOrder isList?: SortOrderInput | SortOrder isQuery?: SortOrderInput | SortOrder queryType?: SortOrderInput | SortOrder htmlType?: SortOrderInput | SortOrder dictType?: SortOrderInput | SortOrder sort?: SortOrderInput | SortOrder createBy?: SortOrderInput | SortOrder createTime?: SortOrderInput | SortOrder updateBy?: SortOrderInput | SortOrder updateTime?: SortOrderInput | SortOrder _count?: GenTableColumnCountOrderByAggregateInput _avg?: GenTableColumnAvgOrderByAggregateInput _max?: GenTableColumnMaxOrderByAggregateInput _min?: GenTableColumnMinOrderByAggregateInput _sum?: GenTableColumnSumOrderByAggregateInput } export type GenTableColumnScalarWhereWithAggregatesInput = { AND?: GenTableColumnScalarWhereWithAggregatesInput | GenTableColumnScalarWhereWithAggregatesInput[] OR?: GenTableColumnScalarWhereWithAggregatesInput[] NOT?: GenTableColumnScalarWhereWithAggregatesInput | GenTableColumnScalarWhereWithAggregatesInput[] columnId?: IntWithAggregatesFilter<"GenTableColumn"> | number tableId?: IntNullableWithAggregatesFilter<"GenTableColumn"> | number | null columnName?: StringNullableWithAggregatesFilter<"GenTableColumn"> | string | null columnComment?: StringNullableWithAggregatesFilter<"GenTableColumn"> | string | null columnType?: StringNullableWithAggregatesFilter<"GenTableColumn"> | string | null javaType?: StringNullableWithAggregatesFilter<"GenTableColumn"> | string | null javaField?: StringNullableWithAggregatesFilter<"GenTableColumn"> | string | null isPk?: StringNullableWithAggregatesFilter<"GenTableColumn"> | string | null isIncrement?: StringNullableWithAggregatesFilter<"GenTableColumn"> | string | null isRequired?: StringNullableWithAggregatesFilter<"GenTableColumn"> | string | null isInsert?: StringNullableWithAggregatesFilter<"GenTableColumn"> | string | null isEdit?: StringNullableWithAggregatesFilter<"GenTableColumn"> | string | null isList?: StringNullableWithAggregatesFilter<"GenTableColumn"> | string | null isQuery?: StringNullableWithAggregatesFilter<"GenTableColumn"> | string | null queryType?: StringNullableWithAggregatesFilter<"GenTableColumn"> | string | null htmlType?: StringNullableWithAggregatesFilter<"GenTableColumn"> | string | null dictType?: StringNullableWithAggregatesFilter<"GenTableColumn"> | string | null sort?: IntNullableWithAggregatesFilter<"GenTableColumn"> | number | null createBy?: StringNullableWithAggregatesFilter<"GenTableColumn"> | string | null createTime?: StringNullableWithAggregatesFilter<"GenTableColumn"> | string | null updateBy?: StringNullableWithAggregatesFilter<"GenTableColumn"> | string | null updateTime?: StringNullableWithAggregatesFilter<"GenTableColumn"> | string | null } export type SysConfigWhereInput = { AND?: SysConfigWhereInput | SysConfigWhereInput[] OR?: SysConfigWhereInput[] NOT?: SysConfigWhereInput | SysConfigWhereInput[] configId?: IntFilter<"SysConfig"> | number configName?: StringNullableFilter<"SysConfig"> | string | null configKey?: StringNullableFilter<"SysConfig"> | string | null configValue?: StringNullableFilter<"SysConfig"> | string | null configType?: StringNullableFilter<"SysConfig"> | string | null createBy?: StringNullableFilter<"SysConfig"> | string | null createTime?: StringNullableFilter<"SysConfig"> | string | null updateBy?: StringNullableFilter<"SysConfig"> | string | null updateTime?: StringNullableFilter<"SysConfig"> | string | null remark?: StringNullableFilter<"SysConfig"> | string | null } export type SysConfigOrderByWithRelationInput = { configId?: SortOrder configName?: SortOrderInput | SortOrder configKey?: SortOrderInput | SortOrder configValue?: SortOrderInput | SortOrder configType?: SortOrderInput | SortOrder createBy?: SortOrderInput | SortOrder createTime?: SortOrderInput | SortOrder updateBy?: SortOrderInput | SortOrder updateTime?: SortOrderInput | SortOrder remark?: SortOrderInput | SortOrder } export type SysConfigWhereUniqueInput = Prisma.AtLeast<{ configId?: number AND?: SysConfigWhereInput | SysConfigWhereInput[] OR?: SysConfigWhereInput[] NOT?: SysConfigWhereInput | SysConfigWhereInput[] configName?: StringNullableFilter<"SysConfig"> | string | null configKey?: StringNullableFilter<"SysConfig"> | string | null configValue?: StringNullableFilter<"SysConfig"> | string | null configType?: StringNullableFilter<"SysConfig"> | string | null createBy?: StringNullableFilter<"SysConfig"> | string | null createTime?: StringNullableFilter<"SysConfig"> | string | null updateBy?: StringNullableFilter<"SysConfig"> | string | null updateTime?: StringNullableFilter<"SysConfig"> | string | null remark?: StringNullableFilter<"SysConfig"> | string | null }, "configId"> export type SysConfigOrderByWithAggregationInput = { configId?: SortOrder configName?: SortOrderInput | SortOrder configKey?: SortOrderInput | SortOrder configValue?: SortOrderInput | SortOrder configType?: SortOrderInput | SortOrder createBy?: SortOrderInput | SortOrder createTime?: SortOrderInput | SortOrder updateBy?: SortOrderInput | SortOrder updateTime?: SortOrderInput | SortOrder remark?: SortOrderInput | SortOrder _count?: SysConfigCountOrderByAggregateInput _avg?: SysConfigAvgOrderByAggregateInput _max?: SysConfigMaxOrderByAggregateInput _min?: SysConfigMinOrderByAggregateInput _sum?: SysConfigSumOrderByAggregateInput } export type SysConfigScalarWhereWithAggregatesInput = { AND?: SysConfigScalarWhereWithAggregatesInput | SysConfigScalarWhereWithAggregatesInput[] OR?: SysConfigScalarWhereWithAggregatesInput[] NOT?: SysConfigScalarWhereWithAggregatesInput | SysConfigScalarWhereWithAggregatesInput[] configId?: IntWithAggregatesFilter<"SysConfig"> | number configName?: StringNullableWithAggregatesFilter<"SysConfig"> | string | null configKey?: StringNullableWithAggregatesFilter<"SysConfig"> | string | null configValue?: StringNullableWithAggregatesFilter<"SysConfig"> | string | null configType?: StringNullableWithAggregatesFilter<"SysConfig"> | string | null createBy?: StringNullableWithAggregatesFilter<"SysConfig"> | string | null createTime?: StringNullableWithAggregatesFilter<"SysConfig"> | string | null updateBy?: StringNullableWithAggregatesFilter<"SysConfig"> | string | null updateTime?: StringNullableWithAggregatesFilter<"SysConfig"> | string | null remark?: StringNullableWithAggregatesFilter<"SysConfig"> | string | null } export type SysDeptWhereInput = { AND?: SysDeptWhereInput | SysDeptWhereInput[] OR?: SysDeptWhereInput[] NOT?: SysDeptWhereInput | SysDeptWhereInput[] deptId?: IntFilter<"SysDept"> | number parentId?: IntNullableFilter<"SysDept"> | number | null ancestors?: StringNullableFilter<"SysDept"> | string | null deptName?: StringNullableFilter<"SysDept"> | string | null orderNum?: IntNullableFilter<"SysDept"> | number | null leader?: StringNullableFilter<"SysDept"> | string | null phone?: StringNullableFilter<"SysDept"> | string | null email?: StringNullableFilter<"SysDept"> | string | null status?: StringNullableFilter<"SysDept"> | string | null createBy?: StringNullableFilter<"SysDept"> | string | null createTime?: StringNullableFilter<"SysDept"> | string | null updateBy?: StringNullableFilter<"SysDept"> | string | null updateTime?: StringNullableFilter<"SysDept"> | string | null users?: SysUserListRelationFilter roles?: SysRoleDeptListRelationFilter } export type SysDeptOrderByWithRelationInput = { deptId?: SortOrder parentId?: SortOrderInput | SortOrder ancestors?: SortOrderInput | SortOrder deptName?: SortOrderInput | SortOrder orderNum?: SortOrderInput | SortOrder leader?: SortOrderInput | SortOrder phone?: SortOrderInput | SortOrder email?: SortOrderInput | SortOrder status?: SortOrderInput | SortOrder createBy?: SortOrderInput | SortOrder createTime?: SortOrderInput | SortOrder updateBy?: SortOrderInput | SortOrder updateTime?: SortOrderInput | SortOrder users?: SysUserOrderByRelationAggregateInput roles?: SysRoleDeptOrderByRelationAggregateInput } export type SysDeptWhereUniqueInput = Prisma.AtLeast<{ deptId?: number AND?: SysDeptWhereInput | SysDeptWhereInput[] OR?: SysDeptWhereInput[] NOT?: SysDeptWhereInput | SysDeptWhereInput[] parentId?: IntNullableFilter<"SysDept"> | number | null ancestors?: StringNullableFilter<"SysDept"> | string | null deptName?: StringNullableFilter<"SysDept"> | string | null orderNum?: IntNullableFilter<"SysDept"> | number | null leader?: StringNullableFilter<"SysDept"> | string | null phone?: StringNullableFilter<"SysDept"> | string | null email?: StringNullableFilter<"SysDept"> | string | null status?: StringNullableFilter<"SysDept"> | string | null createBy?: StringNullableFilter<"SysDept"> | string | null createTime?: StringNullableFilter<"SysDept"> | string | null updateBy?: StringNullableFilter<"SysDept"> | string | null updateTime?: StringNullableFilter<"SysDept"> | string | null users?: SysUserListRelationFilter roles?: SysRoleDeptListRelationFilter }, "deptId"> export type SysDeptOrderByWithAggregationInput = { deptId?: SortOrder parentId?: SortOrderInput | SortOrder ancestors?: SortOrderInput | SortOrder deptName?: SortOrderInput | SortOrder orderNum?: SortOrderInput | SortOrder leader?: SortOrderInput | SortOrder phone?: SortOrderInput | SortOrder email?: SortOrderInput | SortOrder status?: SortOrderInput | SortOrder createBy?: SortOrderInput | SortOrder createTime?: SortOrderInput | SortOrder updateBy?: SortOrderInput | SortOrder updateTime?: SortOrderInput | SortOrder _count?: SysDeptCountOrderByAggregateInput _avg?: SysDeptAvgOrderByAggregateInput _max?: SysDeptMaxOrderByAggregateInput _min?: SysDeptMinOrderByAggregateInput _sum?: SysDeptSumOrderByAggregateInput } export type SysDeptScalarWhereWithAggregatesInput = { AND?: SysDeptScalarWhereWithAggregatesInput | SysDeptScalarWhereWithAggregatesInput[] OR?: SysDeptScalarWhereWithAggregatesInput[] NOT?: SysDeptScalarWhereWithAggregatesInput | SysDeptScalarWhereWithAggregatesInput[] deptId?: IntWithAggregatesFilter<"SysDept"> | number parentId?: IntNullableWithAggregatesFilter<"SysDept"> | number | null ancestors?: StringNullableWithAggregatesFilter<"SysDept"> | string | null deptName?: StringNullableWithAggregatesFilter<"SysDept"> | string | null orderNum?: IntNullableWithAggregatesFilter<"SysDept"> | number | null leader?: StringNullableWithAggregatesFilter<"SysDept"> | string | null phone?: StringNullableWithAggregatesFilter<"SysDept"> | string | null email?: StringNullableWithAggregatesFilter<"SysDept"> | string | null status?: StringNullableWithAggregatesFilter<"SysDept"> | string | null createBy?: StringNullableWithAggregatesFilter<"SysDept"> | string | null createTime?: StringNullableWithAggregatesFilter<"SysDept"> | string | null updateBy?: StringNullableWithAggregatesFilter<"SysDept"> | string | null updateTime?: StringNullableWithAggregatesFilter<"SysDept"> | string | null } export type SysDictDataWhereInput = { AND?: SysDictDataWhereInput | SysDictDataWhereInput[] OR?: SysDictDataWhereInput[] NOT?: SysDictDataWhereInput | SysDictDataWhereInput[] dictCode?: IntFilter<"SysDictData"> | number dictSort?: IntNullableFilter<"SysDictData"> | number | null dictLabel?: StringNullableFilter<"SysDictData"> | string | null dictValue?: StringNullableFilter<"SysDictData"> | string | null dictType?: StringNullableFilter<"SysDictData"> | string | null cssClass?: StringNullableFilter<"SysDictData"> | string | null listClass?: StringNullableFilter<"SysDictData"> | string | null isDefault?: StringNullableFilter<"SysDictData"> | string | null status?: StringNullableFilter<"SysDictData"> | string | null createBy?: StringNullableFilter<"SysDictData"> | string | null createTime?: StringNullableFilter<"SysDictData"> | string | null updateBy?: StringNullableFilter<"SysDictData"> | string | null updateTime?: StringNullableFilter<"SysDictData"> | string | null remark?: StringNullableFilter<"SysDictData"> | string | null sysDictType?: XOR | null } export type SysDictDataOrderByWithRelationInput = { dictCode?: SortOrder dictSort?: SortOrderInput | SortOrder dictLabel?: SortOrderInput | SortOrder dictValue?: SortOrderInput | SortOrder dictType?: SortOrderInput | SortOrder cssClass?: SortOrderInput | SortOrder listClass?: SortOrderInput | SortOrder isDefault?: SortOrderInput | SortOrder status?: SortOrderInput | SortOrder createBy?: SortOrderInput | SortOrder createTime?: SortOrderInput | SortOrder updateBy?: SortOrderInput | SortOrder updateTime?: SortOrderInput | SortOrder remark?: SortOrderInput | SortOrder sysDictType?: SysDictTypeOrderByWithRelationInput } export type SysDictDataWhereUniqueInput = Prisma.AtLeast<{ dictCode?: number AND?: SysDictDataWhereInput | SysDictDataWhereInput[] OR?: SysDictDataWhereInput[] NOT?: SysDictDataWhereInput | SysDictDataWhereInput[] dictSort?: IntNullableFilter<"SysDictData"> | number | null dictLabel?: StringNullableFilter<"SysDictData"> | string | null dictValue?: StringNullableFilter<"SysDictData"> | string | null dictType?: StringNullableFilter<"SysDictData"> | string | null cssClass?: StringNullableFilter<"SysDictData"> | string | null listClass?: StringNullableFilter<"SysDictData"> | string | null isDefault?: StringNullableFilter<"SysDictData"> | string | null status?: StringNullableFilter<"SysDictData"> | string | null createBy?: StringNullableFilter<"SysDictData"> | string | null createTime?: StringNullableFilter<"SysDictData"> | string | null updateBy?: StringNullableFilter<"SysDictData"> | string | null updateTime?: StringNullableFilter<"SysDictData"> | string | null remark?: StringNullableFilter<"SysDictData"> | string | null sysDictType?: XOR | null }, "dictCode"> export type SysDictDataOrderByWithAggregationInput = { dictCode?: SortOrder dictSort?: SortOrderInput | SortOrder dictLabel?: SortOrderInput | SortOrder dictValue?: SortOrderInput | SortOrder dictType?: SortOrderInput | SortOrder cssClass?: SortOrderInput | SortOrder listClass?: SortOrderInput | SortOrder isDefault?: SortOrderInput | SortOrder status?: SortOrderInput | SortOrder createBy?: SortOrderInput | SortOrder createTime?: SortOrderInput | SortOrder updateBy?: SortOrderInput | SortOrder updateTime?: SortOrderInput | SortOrder remark?: SortOrderInput | SortOrder _count?: SysDictDataCountOrderByAggregateInput _avg?: SysDictDataAvgOrderByAggregateInput _max?: SysDictDataMaxOrderByAggregateInput _min?: SysDictDataMinOrderByAggregateInput _sum?: SysDictDataSumOrderByAggregateInput } export type SysDictDataScalarWhereWithAggregatesInput = { AND?: SysDictDataScalarWhereWithAggregatesInput | SysDictDataScalarWhereWithAggregatesInput[] OR?: SysDictDataScalarWhereWithAggregatesInput[] NOT?: SysDictDataScalarWhereWithAggregatesInput | SysDictDataScalarWhereWithAggregatesInput[] dictCode?: IntWithAggregatesFilter<"SysDictData"> | number dictSort?: IntNullableWithAggregatesFilter<"SysDictData"> | number | null dictLabel?: StringNullableWithAggregatesFilter<"SysDictData"> | string | null dictValue?: StringNullableWithAggregatesFilter<"SysDictData"> | string | null dictType?: StringNullableWithAggregatesFilter<"SysDictData"> | string | null cssClass?: StringNullableWithAggregatesFilter<"SysDictData"> | string | null listClass?: StringNullableWithAggregatesFilter<"SysDictData"> | string | null isDefault?: StringNullableWithAggregatesFilter<"SysDictData"> | string | null status?: StringNullableWithAggregatesFilter<"SysDictData"> | string | null createBy?: StringNullableWithAggregatesFilter<"SysDictData"> | string | null createTime?: StringNullableWithAggregatesFilter<"SysDictData"> | string | null updateBy?: StringNullableWithAggregatesFilter<"SysDictData"> | string | null updateTime?: StringNullableWithAggregatesFilter<"SysDictData"> | string | null remark?: StringNullableWithAggregatesFilter<"SysDictData"> | string | null } export type SysDictTypeWhereInput = { AND?: SysDictTypeWhereInput | SysDictTypeWhereInput[] OR?: SysDictTypeWhereInput[] NOT?: SysDictTypeWhereInput | SysDictTypeWhereInput[] dictId?: IntFilter<"SysDictType"> | number dictName?: StringNullableFilter<"SysDictType"> | string | null dictType?: StringNullableFilter<"SysDictType"> | string | null status?: StringNullableFilter<"SysDictType"> | string | null createBy?: StringNullableFilter<"SysDictType"> | string | null createTime?: StringNullableFilter<"SysDictType"> | string | null updateBy?: StringNullableFilter<"SysDictType"> | string | null updateTime?: StringNullableFilter<"SysDictType"> | string | null remark?: StringNullableFilter<"SysDictType"> | string | null dictDatas?: SysDictDataListRelationFilter } export type SysDictTypeOrderByWithRelationInput = { dictId?: SortOrder dictName?: SortOrderInput | SortOrder dictType?: SortOrderInput | SortOrder status?: SortOrderInput | SortOrder createBy?: SortOrderInput | SortOrder createTime?: SortOrderInput | SortOrder updateBy?: SortOrderInput | SortOrder updateTime?: SortOrderInput | SortOrder remark?: SortOrderInput | SortOrder dictDatas?: SysDictDataOrderByRelationAggregateInput } export type SysDictTypeWhereUniqueInput = Prisma.AtLeast<{ dictId?: number dictType?: string AND?: SysDictTypeWhereInput | SysDictTypeWhereInput[] OR?: SysDictTypeWhereInput[] NOT?: SysDictTypeWhereInput | SysDictTypeWhereInput[] dictName?: StringNullableFilter<"SysDictType"> | string | null status?: StringNullableFilter<"SysDictType"> | string | null createBy?: StringNullableFilter<"SysDictType"> | string | null createTime?: StringNullableFilter<"SysDictType"> | string | null updateBy?: StringNullableFilter<"SysDictType"> | string | null updateTime?: StringNullableFilter<"SysDictType"> | string | null remark?: StringNullableFilter<"SysDictType"> | string | null dictDatas?: SysDictDataListRelationFilter }, "dictId" | "dictType"> export type SysDictTypeOrderByWithAggregationInput = { dictId?: SortOrder dictName?: SortOrderInput | SortOrder dictType?: SortOrderInput | SortOrder status?: SortOrderInput | SortOrder createBy?: SortOrderInput | SortOrder createTime?: SortOrderInput | SortOrder updateBy?: SortOrderInput | SortOrder updateTime?: SortOrderInput | SortOrder remark?: SortOrderInput | SortOrder _count?: SysDictTypeCountOrderByAggregateInput _avg?: SysDictTypeAvgOrderByAggregateInput _max?: SysDictTypeMaxOrderByAggregateInput _min?: SysDictTypeMinOrderByAggregateInput _sum?: SysDictTypeSumOrderByAggregateInput } export type SysDictTypeScalarWhereWithAggregatesInput = { AND?: SysDictTypeScalarWhereWithAggregatesInput | SysDictTypeScalarWhereWithAggregatesInput[] OR?: SysDictTypeScalarWhereWithAggregatesInput[] NOT?: SysDictTypeScalarWhereWithAggregatesInput | SysDictTypeScalarWhereWithAggregatesInput[] dictId?: IntWithAggregatesFilter<"SysDictType"> | number dictName?: StringNullableWithAggregatesFilter<"SysDictType"> | string | null dictType?: StringNullableWithAggregatesFilter<"SysDictType"> | string | null status?: StringNullableWithAggregatesFilter<"SysDictType"> | string | null createBy?: StringNullableWithAggregatesFilter<"SysDictType"> | string | null createTime?: StringNullableWithAggregatesFilter<"SysDictType"> | string | null updateBy?: StringNullableWithAggregatesFilter<"SysDictType"> | string | null updateTime?: StringNullableWithAggregatesFilter<"SysDictType"> | string | null remark?: StringNullableWithAggregatesFilter<"SysDictType"> | string | null } export type SysLogininforWhereInput = { AND?: SysLogininforWhereInput | SysLogininforWhereInput[] OR?: SysLogininforWhereInput[] NOT?: SysLogininforWhereInput | SysLogininforWhereInput[] infoId?: IntFilter<"SysLogininfor"> | number userName?: StringNullableFilter<"SysLogininfor"> | string | null ipaddr?: StringNullableFilter<"SysLogininfor"> | string | null loginLocation?: StringNullableFilter<"SysLogininfor"> | string | null browser?: StringNullableFilter<"SysLogininfor"> | string | null os?: StringNullableFilter<"SysLogininfor"> | string | null status?: StringNullableFilter<"SysLogininfor"> | string | null msg?: StringNullableFilter<"SysLogininfor"> | string | null loginTime?: StringNullableFilter<"SysLogininfor"> | string | null } export type SysLogininforOrderByWithRelationInput = { infoId?: SortOrder userName?: SortOrderInput | SortOrder ipaddr?: SortOrderInput | SortOrder loginLocation?: SortOrderInput | SortOrder browser?: SortOrderInput | SortOrder os?: SortOrderInput | SortOrder status?: SortOrderInput | SortOrder msg?: SortOrderInput | SortOrder loginTime?: SortOrderInput | SortOrder } export type SysLogininforWhereUniqueInput = Prisma.AtLeast<{ infoId?: number AND?: SysLogininforWhereInput | SysLogininforWhereInput[] OR?: SysLogininforWhereInput[] NOT?: SysLogininforWhereInput | SysLogininforWhereInput[] userName?: StringNullableFilter<"SysLogininfor"> | string | null ipaddr?: StringNullableFilter<"SysLogininfor"> | string | null loginLocation?: StringNullableFilter<"SysLogininfor"> | string | null browser?: StringNullableFilter<"SysLogininfor"> | string | null os?: StringNullableFilter<"SysLogininfor"> | string | null status?: StringNullableFilter<"SysLogininfor"> | string | null msg?: StringNullableFilter<"SysLogininfor"> | string | null loginTime?: StringNullableFilter<"SysLogininfor"> | string | null }, "infoId"> export type SysLogininforOrderByWithAggregationInput = { infoId?: SortOrder userName?: SortOrderInput | SortOrder ipaddr?: SortOrderInput | SortOrder loginLocation?: SortOrderInput | SortOrder browser?: SortOrderInput | SortOrder os?: SortOrderInput | SortOrder status?: SortOrderInput | SortOrder msg?: SortOrderInput | SortOrder loginTime?: SortOrderInput | SortOrder _count?: SysLogininforCountOrderByAggregateInput _avg?: SysLogininforAvgOrderByAggregateInput _max?: SysLogininforMaxOrderByAggregateInput _min?: SysLogininforMinOrderByAggregateInput _sum?: SysLogininforSumOrderByAggregateInput } export type SysLogininforScalarWhereWithAggregatesInput = { AND?: SysLogininforScalarWhereWithAggregatesInput | SysLogininforScalarWhereWithAggregatesInput[] OR?: SysLogininforScalarWhereWithAggregatesInput[] NOT?: SysLogininforScalarWhereWithAggregatesInput | SysLogininforScalarWhereWithAggregatesInput[] infoId?: IntWithAggregatesFilter<"SysLogininfor"> | number userName?: StringNullableWithAggregatesFilter<"SysLogininfor"> | string | null ipaddr?: StringNullableWithAggregatesFilter<"SysLogininfor"> | string | null loginLocation?: StringNullableWithAggregatesFilter<"SysLogininfor"> | string | null browser?: StringNullableWithAggregatesFilter<"SysLogininfor"> | string | null os?: StringNullableWithAggregatesFilter<"SysLogininfor"> | string | null status?: StringNullableWithAggregatesFilter<"SysLogininfor"> | string | null msg?: StringNullableWithAggregatesFilter<"SysLogininfor"> | string | null loginTime?: StringNullableWithAggregatesFilter<"SysLogininfor"> | string | null } export type SysMenuWhereInput = { AND?: SysMenuWhereInput | SysMenuWhereInput[] OR?: SysMenuWhereInput[] NOT?: SysMenuWhereInput | SysMenuWhereInput[] menuId?: IntFilter<"SysMenu"> | number menuName?: StringFilter<"SysMenu"> | string parentId?: IntNullableFilter<"SysMenu"> | number | null orderNum?: IntNullableFilter<"SysMenu"> | number | null path?: StringNullableFilter<"SysMenu"> | string | null component?: StringNullableFilter<"SysMenu"> | string | null query?: StringNullableFilter<"SysMenu"> | string | null isFrame?: IntNullableFilter<"SysMenu"> | number | null isCache?: IntNullableFilter<"SysMenu"> | number | null menuType?: StringNullableFilter<"SysMenu"> | string | null visible?: StringNullableFilter<"SysMenu"> | string | null status?: StringNullableFilter<"SysMenu"> | string | null perms?: StringNullableFilter<"SysMenu"> | string | null icon?: StringNullableFilter<"SysMenu"> | string | null createBy?: StringNullableFilter<"SysMenu"> | string | null createTime?: StringNullableFilter<"SysMenu"> | string | null updateBy?: StringNullableFilter<"SysMenu"> | string | null updateTime?: StringNullableFilter<"SysMenu"> | string | null remark?: StringNullableFilter<"SysMenu"> | string | null roles?: SysRoleMenuListRelationFilter } export type SysMenuOrderByWithRelationInput = { menuId?: SortOrder menuName?: SortOrder parentId?: SortOrderInput | SortOrder orderNum?: SortOrderInput | SortOrder path?: SortOrderInput | SortOrder component?: SortOrderInput | SortOrder query?: SortOrderInput | SortOrder isFrame?: SortOrderInput | SortOrder isCache?: SortOrderInput | SortOrder menuType?: SortOrderInput | SortOrder visible?: SortOrderInput | SortOrder status?: SortOrderInput | SortOrder perms?: SortOrderInput | SortOrder icon?: SortOrderInput | SortOrder createBy?: SortOrderInput | SortOrder createTime?: SortOrderInput | SortOrder updateBy?: SortOrderInput | SortOrder updateTime?: SortOrderInput | SortOrder remark?: SortOrderInput | SortOrder roles?: SysRoleMenuOrderByRelationAggregateInput } export type SysMenuWhereUniqueInput = Prisma.AtLeast<{ menuId?: number AND?: SysMenuWhereInput | SysMenuWhereInput[] OR?: SysMenuWhereInput[] NOT?: SysMenuWhereInput | SysMenuWhereInput[] menuName?: StringFilter<"SysMenu"> | string parentId?: IntNullableFilter<"SysMenu"> | number | null orderNum?: IntNullableFilter<"SysMenu"> | number | null path?: StringNullableFilter<"SysMenu"> | string | null component?: StringNullableFilter<"SysMenu"> | string | null query?: StringNullableFilter<"SysMenu"> | string | null isFrame?: IntNullableFilter<"SysMenu"> | number | null isCache?: IntNullableFilter<"SysMenu"> | number | null menuType?: StringNullableFilter<"SysMenu"> | string | null visible?: StringNullableFilter<"SysMenu"> | string | null status?: StringNullableFilter<"SysMenu"> | string | null perms?: StringNullableFilter<"SysMenu"> | string | null icon?: StringNullableFilter<"SysMenu"> | string | null createBy?: StringNullableFilter<"SysMenu"> | string | null createTime?: StringNullableFilter<"SysMenu"> | string | null updateBy?: StringNullableFilter<"SysMenu"> | string | null updateTime?: StringNullableFilter<"SysMenu"> | string | null remark?: StringNullableFilter<"SysMenu"> | string | null roles?: SysRoleMenuListRelationFilter }, "menuId"> export type SysMenuOrderByWithAggregationInput = { menuId?: SortOrder menuName?: SortOrder parentId?: SortOrderInput | SortOrder orderNum?: SortOrderInput | SortOrder path?: SortOrderInput | SortOrder component?: SortOrderInput | SortOrder query?: SortOrderInput | SortOrder isFrame?: SortOrderInput | SortOrder isCache?: SortOrderInput | SortOrder menuType?: SortOrderInput | SortOrder visible?: SortOrderInput | SortOrder status?: SortOrderInput | SortOrder perms?: SortOrderInput | SortOrder icon?: SortOrderInput | SortOrder createBy?: SortOrderInput | SortOrder createTime?: SortOrderInput | SortOrder updateBy?: SortOrderInput | SortOrder updateTime?: SortOrderInput | SortOrder remark?: SortOrderInput | SortOrder _count?: SysMenuCountOrderByAggregateInput _avg?: SysMenuAvgOrderByAggregateInput _max?: SysMenuMaxOrderByAggregateInput _min?: SysMenuMinOrderByAggregateInput _sum?: SysMenuSumOrderByAggregateInput } export type SysMenuScalarWhereWithAggregatesInput = { AND?: SysMenuScalarWhereWithAggregatesInput | SysMenuScalarWhereWithAggregatesInput[] OR?: SysMenuScalarWhereWithAggregatesInput[] NOT?: SysMenuScalarWhereWithAggregatesInput | SysMenuScalarWhereWithAggregatesInput[] menuId?: IntWithAggregatesFilter<"SysMenu"> | number menuName?: StringWithAggregatesFilter<"SysMenu"> | string parentId?: IntNullableWithAggregatesFilter<"SysMenu"> | number | null orderNum?: IntNullableWithAggregatesFilter<"SysMenu"> | number | null path?: StringNullableWithAggregatesFilter<"SysMenu"> | string | null component?: StringNullableWithAggregatesFilter<"SysMenu"> | string | null query?: StringNullableWithAggregatesFilter<"SysMenu"> | string | null isFrame?: IntNullableWithAggregatesFilter<"SysMenu"> | number | null isCache?: IntNullableWithAggregatesFilter<"SysMenu"> | number | null menuType?: StringNullableWithAggregatesFilter<"SysMenu"> | string | null visible?: StringNullableWithAggregatesFilter<"SysMenu"> | string | null status?: StringNullableWithAggregatesFilter<"SysMenu"> | string | null perms?: StringNullableWithAggregatesFilter<"SysMenu"> | string | null icon?: StringNullableWithAggregatesFilter<"SysMenu"> | string | null createBy?: StringNullableWithAggregatesFilter<"SysMenu"> | string | null createTime?: StringNullableWithAggregatesFilter<"SysMenu"> | string | null updateBy?: StringNullableWithAggregatesFilter<"SysMenu"> | string | null updateTime?: StringNullableWithAggregatesFilter<"SysMenu"> | string | null remark?: StringNullableWithAggregatesFilter<"SysMenu"> | string | null } export type SysNoticeWhereInput = { AND?: SysNoticeWhereInput | SysNoticeWhereInput[] OR?: SysNoticeWhereInput[] NOT?: SysNoticeWhereInput | SysNoticeWhereInput[] noticeId?: IntFilter<"SysNotice"> | number noticeTitle?: StringFilter<"SysNotice"> | string noticeType?: StringFilter<"SysNotice"> | string noticeContent?: StringNullableFilter<"SysNotice"> | string | null status?: StringNullableFilter<"SysNotice"> | string | null createBy?: StringNullableFilter<"SysNotice"> | string | null createTime?: StringNullableFilter<"SysNotice"> | string | null updateBy?: StringNullableFilter<"SysNotice"> | string | null updateTime?: StringNullableFilter<"SysNotice"> | string | null remark?: StringNullableFilter<"SysNotice"> | string | null } export type SysNoticeOrderByWithRelationInput = { noticeId?: SortOrder noticeTitle?: SortOrder noticeType?: SortOrder noticeContent?: SortOrderInput | SortOrder status?: SortOrderInput | SortOrder createBy?: SortOrderInput | SortOrder createTime?: SortOrderInput | SortOrder updateBy?: SortOrderInput | SortOrder updateTime?: SortOrderInput | SortOrder remark?: SortOrderInput | SortOrder } export type SysNoticeWhereUniqueInput = Prisma.AtLeast<{ noticeId?: number AND?: SysNoticeWhereInput | SysNoticeWhereInput[] OR?: SysNoticeWhereInput[] NOT?: SysNoticeWhereInput | SysNoticeWhereInput[] noticeTitle?: StringFilter<"SysNotice"> | string noticeType?: StringFilter<"SysNotice"> | string noticeContent?: StringNullableFilter<"SysNotice"> | string | null status?: StringNullableFilter<"SysNotice"> | string | null createBy?: StringNullableFilter<"SysNotice"> | string | null createTime?: StringNullableFilter<"SysNotice"> | string | null updateBy?: StringNullableFilter<"SysNotice"> | string | null updateTime?: StringNullableFilter<"SysNotice"> | string | null remark?: StringNullableFilter<"SysNotice"> | string | null }, "noticeId"> export type SysNoticeOrderByWithAggregationInput = { noticeId?: SortOrder noticeTitle?: SortOrder noticeType?: SortOrder noticeContent?: SortOrderInput | SortOrder status?: SortOrderInput | SortOrder createBy?: SortOrderInput | SortOrder createTime?: SortOrderInput | SortOrder updateBy?: SortOrderInput | SortOrder updateTime?: SortOrderInput | SortOrder remark?: SortOrderInput | SortOrder _count?: SysNoticeCountOrderByAggregateInput _avg?: SysNoticeAvgOrderByAggregateInput _max?: SysNoticeMaxOrderByAggregateInput _min?: SysNoticeMinOrderByAggregateInput _sum?: SysNoticeSumOrderByAggregateInput } export type SysNoticeScalarWhereWithAggregatesInput = { AND?: SysNoticeScalarWhereWithAggregatesInput | SysNoticeScalarWhereWithAggregatesInput[] OR?: SysNoticeScalarWhereWithAggregatesInput[] NOT?: SysNoticeScalarWhereWithAggregatesInput | SysNoticeScalarWhereWithAggregatesInput[] noticeId?: IntWithAggregatesFilter<"SysNotice"> | number noticeTitle?: StringWithAggregatesFilter<"SysNotice"> | string noticeType?: StringWithAggregatesFilter<"SysNotice"> | string noticeContent?: StringNullableWithAggregatesFilter<"SysNotice"> | string | null status?: StringNullableWithAggregatesFilter<"SysNotice"> | string | null createBy?: StringNullableWithAggregatesFilter<"SysNotice"> | string | null createTime?: StringNullableWithAggregatesFilter<"SysNotice"> | string | null updateBy?: StringNullableWithAggregatesFilter<"SysNotice"> | string | null updateTime?: StringNullableWithAggregatesFilter<"SysNotice"> | string | null remark?: StringNullableWithAggregatesFilter<"SysNotice"> | string | null } export type SysPostWhereInput = { AND?: SysPostWhereInput | SysPostWhereInput[] OR?: SysPostWhereInput[] NOT?: SysPostWhereInput | SysPostWhereInput[] postId?: IntFilter<"SysPost"> | number postCode?: StringFilter<"SysPost"> | string postName?: StringFilter<"SysPost"> | string postSort?: IntFilter<"SysPost"> | number status?: StringFilter<"SysPost"> | string createBy?: StringNullableFilter<"SysPost"> | string | null createTime?: StringNullableFilter<"SysPost"> | string | null updateBy?: StringNullableFilter<"SysPost"> | string | null updateTime?: StringNullableFilter<"SysPost"> | string | null remark?: StringNullableFilter<"SysPost"> | string | null users?: SysUserPostListRelationFilter } export type SysPostOrderByWithRelationInput = { postId?: SortOrder postCode?: SortOrder postName?: SortOrder postSort?: SortOrder status?: SortOrder createBy?: SortOrderInput | SortOrder createTime?: SortOrderInput | SortOrder updateBy?: SortOrderInput | SortOrder updateTime?: SortOrderInput | SortOrder remark?: SortOrderInput | SortOrder users?: SysUserPostOrderByRelationAggregateInput } export type SysPostWhereUniqueInput = Prisma.AtLeast<{ postId?: number AND?: SysPostWhereInput | SysPostWhereInput[] OR?: SysPostWhereInput[] NOT?: SysPostWhereInput | SysPostWhereInput[] postCode?: StringFilter<"SysPost"> | string postName?: StringFilter<"SysPost"> | string postSort?: IntFilter<"SysPost"> | number status?: StringFilter<"SysPost"> | string createBy?: StringNullableFilter<"SysPost"> | string | null createTime?: StringNullableFilter<"SysPost"> | string | null updateBy?: StringNullableFilter<"SysPost"> | string | null updateTime?: StringNullableFilter<"SysPost"> | string | null remark?: StringNullableFilter<"SysPost"> | string | null users?: SysUserPostListRelationFilter }, "postId"> export type SysPostOrderByWithAggregationInput = { postId?: SortOrder postCode?: SortOrder postName?: SortOrder postSort?: SortOrder status?: SortOrder createBy?: SortOrderInput | SortOrder createTime?: SortOrderInput | SortOrder updateBy?: SortOrderInput | SortOrder updateTime?: SortOrderInput | SortOrder remark?: SortOrderInput | SortOrder _count?: SysPostCountOrderByAggregateInput _avg?: SysPostAvgOrderByAggregateInput _max?: SysPostMaxOrderByAggregateInput _min?: SysPostMinOrderByAggregateInput _sum?: SysPostSumOrderByAggregateInput } export type SysPostScalarWhereWithAggregatesInput = { AND?: SysPostScalarWhereWithAggregatesInput | SysPostScalarWhereWithAggregatesInput[] OR?: SysPostScalarWhereWithAggregatesInput[] NOT?: SysPostScalarWhereWithAggregatesInput | SysPostScalarWhereWithAggregatesInput[] postId?: IntWithAggregatesFilter<"SysPost"> | number postCode?: StringWithAggregatesFilter<"SysPost"> | string postName?: StringWithAggregatesFilter<"SysPost"> | string postSort?: IntWithAggregatesFilter<"SysPost"> | number status?: StringWithAggregatesFilter<"SysPost"> | string createBy?: StringNullableWithAggregatesFilter<"SysPost"> | string | null createTime?: StringNullableWithAggregatesFilter<"SysPost"> | string | null updateBy?: StringNullableWithAggregatesFilter<"SysPost"> | string | null updateTime?: StringNullableWithAggregatesFilter<"SysPost"> | string | null remark?: StringNullableWithAggregatesFilter<"SysPost"> | string | null } export type SysUserPostWhereInput = { AND?: SysUserPostWhereInput | SysUserPostWhereInput[] OR?: SysUserPostWhereInput[] NOT?: SysUserPostWhereInput | SysUserPostWhereInput[] userId?: IntFilter<"SysUserPost"> | number postId?: IntFilter<"SysUserPost"> | number user?: XOR post?: XOR } export type SysUserPostOrderByWithRelationInput = { userId?: SortOrder postId?: SortOrder user?: SysUserOrderByWithRelationInput post?: SysPostOrderByWithRelationInput } export type SysUserPostWhereUniqueInput = Prisma.AtLeast<{ userId_postId?: SysUserPostUserIdPostIdCompoundUniqueInput AND?: SysUserPostWhereInput | SysUserPostWhereInput[] OR?: SysUserPostWhereInput[] NOT?: SysUserPostWhereInput | SysUserPostWhereInput[] userId?: IntFilter<"SysUserPost"> | number postId?: IntFilter<"SysUserPost"> | number user?: XOR post?: XOR }, "userId_postId"> export type SysUserPostOrderByWithAggregationInput = { userId?: SortOrder postId?: SortOrder _count?: SysUserPostCountOrderByAggregateInput _avg?: SysUserPostAvgOrderByAggregateInput _max?: SysUserPostMaxOrderByAggregateInput _min?: SysUserPostMinOrderByAggregateInput _sum?: SysUserPostSumOrderByAggregateInput } export type SysUserPostScalarWhereWithAggregatesInput = { AND?: SysUserPostScalarWhereWithAggregatesInput | SysUserPostScalarWhereWithAggregatesInput[] OR?: SysUserPostScalarWhereWithAggregatesInput[] NOT?: SysUserPostScalarWhereWithAggregatesInput | SysUserPostScalarWhereWithAggregatesInput[] userId?: IntWithAggregatesFilter<"SysUserPost"> | number postId?: IntWithAggregatesFilter<"SysUserPost"> | number } export type SysRoleDeptWhereInput = { AND?: SysRoleDeptWhereInput | SysRoleDeptWhereInput[] OR?: SysRoleDeptWhereInput[] NOT?: SysRoleDeptWhereInput | SysRoleDeptWhereInput[] roleId?: IntFilter<"SysRoleDept"> | number deptId?: IntFilter<"SysRoleDept"> | number role?: XOR dept?: XOR } export type SysRoleDeptOrderByWithRelationInput = { roleId?: SortOrder deptId?: SortOrder role?: SysRoleOrderByWithRelationInput dept?: SysDeptOrderByWithRelationInput } export type SysRoleDeptWhereUniqueInput = Prisma.AtLeast<{ roleId_deptId?: SysRoleDeptRoleIdDeptIdCompoundUniqueInput AND?: SysRoleDeptWhereInput | SysRoleDeptWhereInput[] OR?: SysRoleDeptWhereInput[] NOT?: SysRoleDeptWhereInput | SysRoleDeptWhereInput[] roleId?: IntFilter<"SysRoleDept"> | number deptId?: IntFilter<"SysRoleDept"> | number role?: XOR dept?: XOR }, "roleId_deptId"> export type SysRoleDeptOrderByWithAggregationInput = { roleId?: SortOrder deptId?: SortOrder _count?: SysRoleDeptCountOrderByAggregateInput _avg?: SysRoleDeptAvgOrderByAggregateInput _max?: SysRoleDeptMaxOrderByAggregateInput _min?: SysRoleDeptMinOrderByAggregateInput _sum?: SysRoleDeptSumOrderByAggregateInput } export type SysRoleDeptScalarWhereWithAggregatesInput = { AND?: SysRoleDeptScalarWhereWithAggregatesInput | SysRoleDeptScalarWhereWithAggregatesInput[] OR?: SysRoleDeptScalarWhereWithAggregatesInput[] NOT?: SysRoleDeptScalarWhereWithAggregatesInput | SysRoleDeptScalarWhereWithAggregatesInput[] roleId?: IntWithAggregatesFilter<"SysRoleDept"> | number deptId?: IntWithAggregatesFilter<"SysRoleDept"> | number } export type SysRoleMenuWhereInput = { AND?: SysRoleMenuWhereInput | SysRoleMenuWhereInput[] OR?: SysRoleMenuWhereInput[] NOT?: SysRoleMenuWhereInput | SysRoleMenuWhereInput[] roleId?: IntFilter<"SysRoleMenu"> | number menuId?: IntFilter<"SysRoleMenu"> | number menu?: XOR role?: XOR } export type SysRoleMenuOrderByWithRelationInput = { roleId?: SortOrder menuId?: SortOrder menu?: SysMenuOrderByWithRelationInput role?: SysRoleOrderByWithRelationInput } export type SysRoleMenuWhereUniqueInput = Prisma.AtLeast<{ roleId_menuId?: SysRoleMenuRoleIdMenuIdCompoundUniqueInput AND?: SysRoleMenuWhereInput | SysRoleMenuWhereInput[] OR?: SysRoleMenuWhereInput[] NOT?: SysRoleMenuWhereInput | SysRoleMenuWhereInput[] roleId?: IntFilter<"SysRoleMenu"> | number menuId?: IntFilter<"SysRoleMenu"> | number menu?: XOR role?: XOR }, "roleId_menuId"> export type SysRoleMenuOrderByWithAggregationInput = { roleId?: SortOrder menuId?: SortOrder _count?: SysRoleMenuCountOrderByAggregateInput _avg?: SysRoleMenuAvgOrderByAggregateInput _max?: SysRoleMenuMaxOrderByAggregateInput _min?: SysRoleMenuMinOrderByAggregateInput _sum?: SysRoleMenuSumOrderByAggregateInput } export type SysRoleMenuScalarWhereWithAggregatesInput = { AND?: SysRoleMenuScalarWhereWithAggregatesInput | SysRoleMenuScalarWhereWithAggregatesInput[] OR?: SysRoleMenuScalarWhereWithAggregatesInput[] NOT?: SysRoleMenuScalarWhereWithAggregatesInput | SysRoleMenuScalarWhereWithAggregatesInput[] roleId?: IntWithAggregatesFilter<"SysRoleMenu"> | number menuId?: IntWithAggregatesFilter<"SysRoleMenu"> | number } export type SysUserWhereInput = { AND?: SysUserWhereInput | SysUserWhereInput[] OR?: SysUserWhereInput[] NOT?: SysUserWhereInput | SysUserWhereInput[] userId?: IntFilter<"SysUser"> | number deptId?: IntNullableFilter<"SysUser"> | number | null userName?: StringFilter<"SysUser"> | string nickName?: StringFilter<"SysUser"> | string userType?: StringNullableFilter<"SysUser"> | string | null email?: StringNullableFilter<"SysUser"> | string | null phonenumber?: StringNullableFilter<"SysUser"> | string | null sex?: StringNullableFilter<"SysUser"> | string | null avatar?: StringNullableFilter<"SysUser"> | string | null password?: StringNullableFilter<"SysUser"> | string | null status?: StringNullableFilter<"SysUser"> | string | null loginIp?: StringNullableFilter<"SysUser"> | string | null loginDate?: StringNullableFilter<"SysUser"> | string | null createBy?: StringNullableFilter<"SysUser"> | string | null createTime?: StringNullableFilter<"SysUser"> | string | null updateBy?: StringNullableFilter<"SysUser"> | string | null updateTime?: StringNullableFilter<"SysUser"> | string | null remark?: StringNullableFilter<"SysUser"> | string | null dept?: XOR | null roles?: SysUserRoleListRelationFilter posts?: SysUserPostListRelationFilter } export type SysUserOrderByWithRelationInput = { userId?: SortOrder deptId?: SortOrderInput | SortOrder userName?: SortOrder nickName?: SortOrder userType?: SortOrderInput | SortOrder email?: SortOrderInput | SortOrder phonenumber?: SortOrderInput | SortOrder sex?: SortOrderInput | SortOrder avatar?: SortOrderInput | SortOrder password?: SortOrderInput | SortOrder status?: SortOrderInput | SortOrder loginIp?: SortOrderInput | SortOrder loginDate?: SortOrderInput | SortOrder createBy?: SortOrderInput | SortOrder createTime?: SortOrderInput | SortOrder updateBy?: SortOrderInput | SortOrder updateTime?: SortOrderInput | SortOrder remark?: SortOrderInput | SortOrder dept?: SysDeptOrderByWithRelationInput roles?: SysUserRoleOrderByRelationAggregateInput posts?: SysUserPostOrderByRelationAggregateInput } export type SysUserWhereUniqueInput = Prisma.AtLeast<{ userId?: number AND?: SysUserWhereInput | SysUserWhereInput[] OR?: SysUserWhereInput[] NOT?: SysUserWhereInput | SysUserWhereInput[] deptId?: IntNullableFilter<"SysUser"> | number | null userName?: StringFilter<"SysUser"> | string nickName?: StringFilter<"SysUser"> | string userType?: StringNullableFilter<"SysUser"> | string | null email?: StringNullableFilter<"SysUser"> | string | null phonenumber?: StringNullableFilter<"SysUser"> | string | null sex?: StringNullableFilter<"SysUser"> | string | null avatar?: StringNullableFilter<"SysUser"> | string | null password?: StringNullableFilter<"SysUser"> | string | null status?: StringNullableFilter<"SysUser"> | string | null loginIp?: StringNullableFilter<"SysUser"> | string | null loginDate?: StringNullableFilter<"SysUser"> | string | null createBy?: StringNullableFilter<"SysUser"> | string | null createTime?: StringNullableFilter<"SysUser"> | string | null updateBy?: StringNullableFilter<"SysUser"> | string | null updateTime?: StringNullableFilter<"SysUser"> | string | null remark?: StringNullableFilter<"SysUser"> | string | null dept?: XOR | null roles?: SysUserRoleListRelationFilter posts?: SysUserPostListRelationFilter }, "userId"> export type SysUserOrderByWithAggregationInput = { userId?: SortOrder deptId?: SortOrderInput | SortOrder userName?: SortOrder nickName?: SortOrder userType?: SortOrderInput | SortOrder email?: SortOrderInput | SortOrder phonenumber?: SortOrderInput | SortOrder sex?: SortOrderInput | SortOrder avatar?: SortOrderInput | SortOrder password?: SortOrderInput | SortOrder status?: SortOrderInput | SortOrder loginIp?: SortOrderInput | SortOrder loginDate?: SortOrderInput | SortOrder createBy?: SortOrderInput | SortOrder createTime?: SortOrderInput | SortOrder updateBy?: SortOrderInput | SortOrder updateTime?: SortOrderInput | SortOrder remark?: SortOrderInput | SortOrder _count?: SysUserCountOrderByAggregateInput _avg?: SysUserAvgOrderByAggregateInput _max?: SysUserMaxOrderByAggregateInput _min?: SysUserMinOrderByAggregateInput _sum?: SysUserSumOrderByAggregateInput } export type SysUserScalarWhereWithAggregatesInput = { AND?: SysUserScalarWhereWithAggregatesInput | SysUserScalarWhereWithAggregatesInput[] OR?: SysUserScalarWhereWithAggregatesInput[] NOT?: SysUserScalarWhereWithAggregatesInput | SysUserScalarWhereWithAggregatesInput[] userId?: IntWithAggregatesFilter<"SysUser"> | number deptId?: IntNullableWithAggregatesFilter<"SysUser"> | number | null userName?: StringWithAggregatesFilter<"SysUser"> | string nickName?: StringWithAggregatesFilter<"SysUser"> | string userType?: StringNullableWithAggregatesFilter<"SysUser"> | string | null email?: StringNullableWithAggregatesFilter<"SysUser"> | string | null phonenumber?: StringNullableWithAggregatesFilter<"SysUser"> | string | null sex?: StringNullableWithAggregatesFilter<"SysUser"> | string | null avatar?: StringNullableWithAggregatesFilter<"SysUser"> | string | null password?: StringNullableWithAggregatesFilter<"SysUser"> | string | null status?: StringNullableWithAggregatesFilter<"SysUser"> | string | null loginIp?: StringNullableWithAggregatesFilter<"SysUser"> | string | null loginDate?: StringNullableWithAggregatesFilter<"SysUser"> | string | null createBy?: StringNullableWithAggregatesFilter<"SysUser"> | string | null createTime?: StringNullableWithAggregatesFilter<"SysUser"> | string | null updateBy?: StringNullableWithAggregatesFilter<"SysUser"> | string | null updateTime?: StringNullableWithAggregatesFilter<"SysUser"> | string | null remark?: StringNullableWithAggregatesFilter<"SysUser"> | string | null } export type SysRoleWhereInput = { AND?: SysRoleWhereInput | SysRoleWhereInput[] OR?: SysRoleWhereInput[] NOT?: SysRoleWhereInput | SysRoleWhereInput[] roleId?: IntFilter<"SysRole"> | number roleName?: StringFilter<"SysRole"> | string roleKey?: StringFilter<"SysRole"> | string roleSort?: IntFilter<"SysRole"> | number dataScope?: StringNullableFilter<"SysRole"> | string | null menuCheckStrictly?: IntNullableFilter<"SysRole"> | number | null deptCheckStrictly?: IntNullableFilter<"SysRole"> | number | null status?: StringFilter<"SysRole"> | string createBy?: StringNullableFilter<"SysRole"> | string | null createTime?: StringNullableFilter<"SysRole"> | string | null updateBy?: StringNullableFilter<"SysRole"> | string | null updateTime?: StringNullableFilter<"SysRole"> | string | null remark?: StringNullableFilter<"SysRole"> | string | null users?: SysUserRoleListRelationFilter menus?: SysRoleMenuListRelationFilter depts?: SysRoleDeptListRelationFilter } export type SysRoleOrderByWithRelationInput = { roleId?: SortOrder roleName?: SortOrder roleKey?: SortOrder roleSort?: SortOrder dataScope?: SortOrderInput | SortOrder menuCheckStrictly?: SortOrderInput | SortOrder deptCheckStrictly?: SortOrderInput | SortOrder status?: SortOrder createBy?: SortOrderInput | SortOrder createTime?: SortOrderInput | SortOrder updateBy?: SortOrderInput | SortOrder updateTime?: SortOrderInput | SortOrder remark?: SortOrderInput | SortOrder users?: SysUserRoleOrderByRelationAggregateInput menus?: SysRoleMenuOrderByRelationAggregateInput depts?: SysRoleDeptOrderByRelationAggregateInput } export type SysRoleWhereUniqueInput = Prisma.AtLeast<{ roleId?: number AND?: SysRoleWhereInput | SysRoleWhereInput[] OR?: SysRoleWhereInput[] NOT?: SysRoleWhereInput | SysRoleWhereInput[] roleName?: StringFilter<"SysRole"> | string roleKey?: StringFilter<"SysRole"> | string roleSort?: IntFilter<"SysRole"> | number dataScope?: StringNullableFilter<"SysRole"> | string | null menuCheckStrictly?: IntNullableFilter<"SysRole"> | number | null deptCheckStrictly?: IntNullableFilter<"SysRole"> | number | null status?: StringFilter<"SysRole"> | string createBy?: StringNullableFilter<"SysRole"> | string | null createTime?: StringNullableFilter<"SysRole"> | string | null updateBy?: StringNullableFilter<"SysRole"> | string | null updateTime?: StringNullableFilter<"SysRole"> | string | null remark?: StringNullableFilter<"SysRole"> | string | null users?: SysUserRoleListRelationFilter menus?: SysRoleMenuListRelationFilter depts?: SysRoleDeptListRelationFilter }, "roleId"> export type SysRoleOrderByWithAggregationInput = { roleId?: SortOrder roleName?: SortOrder roleKey?: SortOrder roleSort?: SortOrder dataScope?: SortOrderInput | SortOrder menuCheckStrictly?: SortOrderInput | SortOrder deptCheckStrictly?: SortOrderInput | SortOrder status?: SortOrder createBy?: SortOrderInput | SortOrder createTime?: SortOrderInput | SortOrder updateBy?: SortOrderInput | SortOrder updateTime?: SortOrderInput | SortOrder remark?: SortOrderInput | SortOrder _count?: SysRoleCountOrderByAggregateInput _avg?: SysRoleAvgOrderByAggregateInput _max?: SysRoleMaxOrderByAggregateInput _min?: SysRoleMinOrderByAggregateInput _sum?: SysRoleSumOrderByAggregateInput } export type SysRoleScalarWhereWithAggregatesInput = { AND?: SysRoleScalarWhereWithAggregatesInput | SysRoleScalarWhereWithAggregatesInput[] OR?: SysRoleScalarWhereWithAggregatesInput[] NOT?: SysRoleScalarWhereWithAggregatesInput | SysRoleScalarWhereWithAggregatesInput[] roleId?: IntWithAggregatesFilter<"SysRole"> | number roleName?: StringWithAggregatesFilter<"SysRole"> | string roleKey?: StringWithAggregatesFilter<"SysRole"> | string roleSort?: IntWithAggregatesFilter<"SysRole"> | number dataScope?: StringNullableWithAggregatesFilter<"SysRole"> | string | null menuCheckStrictly?: IntNullableWithAggregatesFilter<"SysRole"> | number | null deptCheckStrictly?: IntNullableWithAggregatesFilter<"SysRole"> | number | null status?: StringWithAggregatesFilter<"SysRole"> | string createBy?: StringNullableWithAggregatesFilter<"SysRole"> | string | null createTime?: StringNullableWithAggregatesFilter<"SysRole"> | string | null updateBy?: StringNullableWithAggregatesFilter<"SysRole"> | string | null updateTime?: StringNullableWithAggregatesFilter<"SysRole"> | string | null remark?: StringNullableWithAggregatesFilter<"SysRole"> | string | null } export type SysUserRoleWhereInput = { AND?: SysUserRoleWhereInput | SysUserRoleWhereInput[] OR?: SysUserRoleWhereInput[] NOT?: SysUserRoleWhereInput | SysUserRoleWhereInput[] userId?: IntFilter<"SysUserRole"> | number roleId?: IntFilter<"SysUserRole"> | number user?: XOR role?: XOR } export type SysUserRoleOrderByWithRelationInput = { userId?: SortOrder roleId?: SortOrder user?: SysUserOrderByWithRelationInput role?: SysRoleOrderByWithRelationInput } export type SysUserRoleWhereUniqueInput = Prisma.AtLeast<{ userId_roleId?: SysUserRoleUserIdRoleIdCompoundUniqueInput AND?: SysUserRoleWhereInput | SysUserRoleWhereInput[] OR?: SysUserRoleWhereInput[] NOT?: SysUserRoleWhereInput | SysUserRoleWhereInput[] userId?: IntFilter<"SysUserRole"> | number roleId?: IntFilter<"SysUserRole"> | number user?: XOR role?: XOR }, "userId_roleId"> export type SysUserRoleOrderByWithAggregationInput = { userId?: SortOrder roleId?: SortOrder _count?: SysUserRoleCountOrderByAggregateInput _avg?: SysUserRoleAvgOrderByAggregateInput _max?: SysUserRoleMaxOrderByAggregateInput _min?: SysUserRoleMinOrderByAggregateInput _sum?: SysUserRoleSumOrderByAggregateInput } export type SysUserRoleScalarWhereWithAggregatesInput = { AND?: SysUserRoleScalarWhereWithAggregatesInput | SysUserRoleScalarWhereWithAggregatesInput[] OR?: SysUserRoleScalarWhereWithAggregatesInput[] NOT?: SysUserRoleScalarWhereWithAggregatesInput | SysUserRoleScalarWhereWithAggregatesInput[] userId?: IntWithAggregatesFilter<"SysUserRole"> | number roleId?: IntWithAggregatesFilter<"SysUserRole"> | number } export type GenTableCreateInput = { tableName?: string | null tableComment?: string | null subTableName?: string | null subTableFkName?: string | null className?: string | null tplCategory?: string | null tplWebType?: string | null packageName?: string | null moduleName?: string | null businessName?: string | null functionName?: string | null functionAuthor?: string | null genType?: string | null genPath?: string | null options?: string | null createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null remark?: string | null tableColumns?: GenTableColumnCreateNestedManyWithoutTableInput } export type GenTableUncheckedCreateInput = { tableId?: number tableName?: string | null tableComment?: string | null subTableName?: string | null subTableFkName?: string | null className?: string | null tplCategory?: string | null tplWebType?: string | null packageName?: string | null moduleName?: string | null businessName?: string | null functionName?: string | null functionAuthor?: string | null genType?: string | null genPath?: string | null options?: string | null createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null remark?: string | null tableColumns?: GenTableColumnUncheckedCreateNestedManyWithoutTableInput } export type GenTableUpdateInput = { tableName?: NullableStringFieldUpdateOperationsInput | string | null tableComment?: NullableStringFieldUpdateOperationsInput | string | null subTableName?: NullableStringFieldUpdateOperationsInput | string | null subTableFkName?: NullableStringFieldUpdateOperationsInput | string | null className?: NullableStringFieldUpdateOperationsInput | string | null tplCategory?: NullableStringFieldUpdateOperationsInput | string | null tplWebType?: NullableStringFieldUpdateOperationsInput | string | null packageName?: NullableStringFieldUpdateOperationsInput | string | null moduleName?: NullableStringFieldUpdateOperationsInput | string | null businessName?: NullableStringFieldUpdateOperationsInput | string | null functionName?: NullableStringFieldUpdateOperationsInput | string | null functionAuthor?: NullableStringFieldUpdateOperationsInput | string | null genType?: NullableStringFieldUpdateOperationsInput | string | null genPath?: NullableStringFieldUpdateOperationsInput | string | null options?: NullableStringFieldUpdateOperationsInput | string | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null tableColumns?: GenTableColumnUpdateManyWithoutTableNestedInput } export type GenTableUncheckedUpdateInput = { tableId?: IntFieldUpdateOperationsInput | number tableName?: NullableStringFieldUpdateOperationsInput | string | null tableComment?: NullableStringFieldUpdateOperationsInput | string | null subTableName?: NullableStringFieldUpdateOperationsInput | string | null subTableFkName?: NullableStringFieldUpdateOperationsInput | string | null className?: NullableStringFieldUpdateOperationsInput | string | null tplCategory?: NullableStringFieldUpdateOperationsInput | string | null tplWebType?: NullableStringFieldUpdateOperationsInput | string | null packageName?: NullableStringFieldUpdateOperationsInput | string | null moduleName?: NullableStringFieldUpdateOperationsInput | string | null businessName?: NullableStringFieldUpdateOperationsInput | string | null functionName?: NullableStringFieldUpdateOperationsInput | string | null functionAuthor?: NullableStringFieldUpdateOperationsInput | string | null genType?: NullableStringFieldUpdateOperationsInput | string | null genPath?: NullableStringFieldUpdateOperationsInput | string | null options?: NullableStringFieldUpdateOperationsInput | string | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null tableColumns?: GenTableColumnUncheckedUpdateManyWithoutTableNestedInput } export type GenTableCreateManyInput = { tableId?: number tableName?: string | null tableComment?: string | null subTableName?: string | null subTableFkName?: string | null className?: string | null tplCategory?: string | null tplWebType?: string | null packageName?: string | null moduleName?: string | null businessName?: string | null functionName?: string | null functionAuthor?: string | null genType?: string | null genPath?: string | null options?: string | null createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null remark?: string | null } export type GenTableUpdateManyMutationInput = { tableName?: NullableStringFieldUpdateOperationsInput | string | null tableComment?: NullableStringFieldUpdateOperationsInput | string | null subTableName?: NullableStringFieldUpdateOperationsInput | string | null subTableFkName?: NullableStringFieldUpdateOperationsInput | string | null className?: NullableStringFieldUpdateOperationsInput | string | null tplCategory?: NullableStringFieldUpdateOperationsInput | string | null tplWebType?: NullableStringFieldUpdateOperationsInput | string | null packageName?: NullableStringFieldUpdateOperationsInput | string | null moduleName?: NullableStringFieldUpdateOperationsInput | string | null businessName?: NullableStringFieldUpdateOperationsInput | string | null functionName?: NullableStringFieldUpdateOperationsInput | string | null functionAuthor?: NullableStringFieldUpdateOperationsInput | string | null genType?: NullableStringFieldUpdateOperationsInput | string | null genPath?: NullableStringFieldUpdateOperationsInput | string | null options?: NullableStringFieldUpdateOperationsInput | string | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null } export type GenTableUncheckedUpdateManyInput = { tableId?: IntFieldUpdateOperationsInput | number tableName?: NullableStringFieldUpdateOperationsInput | string | null tableComment?: NullableStringFieldUpdateOperationsInput | string | null subTableName?: NullableStringFieldUpdateOperationsInput | string | null subTableFkName?: NullableStringFieldUpdateOperationsInput | string | null className?: NullableStringFieldUpdateOperationsInput | string | null tplCategory?: NullableStringFieldUpdateOperationsInput | string | null tplWebType?: NullableStringFieldUpdateOperationsInput | string | null packageName?: NullableStringFieldUpdateOperationsInput | string | null moduleName?: NullableStringFieldUpdateOperationsInput | string | null businessName?: NullableStringFieldUpdateOperationsInput | string | null functionName?: NullableStringFieldUpdateOperationsInput | string | null functionAuthor?: NullableStringFieldUpdateOperationsInput | string | null genType?: NullableStringFieldUpdateOperationsInput | string | null genPath?: NullableStringFieldUpdateOperationsInput | string | null options?: NullableStringFieldUpdateOperationsInput | string | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null } export type GenTableColumnCreateInput = { columnName?: string | null columnComment?: string | null columnType?: string | null javaType?: string | null javaField?: string | null isPk?: string | null isIncrement?: string | null isRequired?: string | null isInsert?: string | null isEdit?: string | null isList?: string | null isQuery?: string | null queryType?: string | null htmlType?: string | null dictType?: string | null sort?: number | null createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null table?: GenTableCreateNestedOneWithoutTableColumnsInput } export type GenTableColumnUncheckedCreateInput = { columnId?: number tableId?: number | null columnName?: string | null columnComment?: string | null columnType?: string | null javaType?: string | null javaField?: string | null isPk?: string | null isIncrement?: string | null isRequired?: string | null isInsert?: string | null isEdit?: string | null isList?: string | null isQuery?: string | null queryType?: string | null htmlType?: string | null dictType?: string | null sort?: number | null createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null } export type GenTableColumnUpdateInput = { columnName?: NullableStringFieldUpdateOperationsInput | string | null columnComment?: NullableStringFieldUpdateOperationsInput | string | null columnType?: NullableStringFieldUpdateOperationsInput | string | null javaType?: NullableStringFieldUpdateOperationsInput | string | null javaField?: NullableStringFieldUpdateOperationsInput | string | null isPk?: NullableStringFieldUpdateOperationsInput | string | null isIncrement?: NullableStringFieldUpdateOperationsInput | string | null isRequired?: NullableStringFieldUpdateOperationsInput | string | null isInsert?: NullableStringFieldUpdateOperationsInput | string | null isEdit?: NullableStringFieldUpdateOperationsInput | string | null isList?: NullableStringFieldUpdateOperationsInput | string | null isQuery?: NullableStringFieldUpdateOperationsInput | string | null queryType?: NullableStringFieldUpdateOperationsInput | string | null htmlType?: NullableStringFieldUpdateOperationsInput | string | null dictType?: NullableStringFieldUpdateOperationsInput | string | null sort?: NullableIntFieldUpdateOperationsInput | number | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null table?: GenTableUpdateOneWithoutTableColumnsNestedInput } export type GenTableColumnUncheckedUpdateInput = { columnId?: IntFieldUpdateOperationsInput | number tableId?: NullableIntFieldUpdateOperationsInput | number | null columnName?: NullableStringFieldUpdateOperationsInput | string | null columnComment?: NullableStringFieldUpdateOperationsInput | string | null columnType?: NullableStringFieldUpdateOperationsInput | string | null javaType?: NullableStringFieldUpdateOperationsInput | string | null javaField?: NullableStringFieldUpdateOperationsInput | string | null isPk?: NullableStringFieldUpdateOperationsInput | string | null isIncrement?: NullableStringFieldUpdateOperationsInput | string | null isRequired?: NullableStringFieldUpdateOperationsInput | string | null isInsert?: NullableStringFieldUpdateOperationsInput | string | null isEdit?: NullableStringFieldUpdateOperationsInput | string | null isList?: NullableStringFieldUpdateOperationsInput | string | null isQuery?: NullableStringFieldUpdateOperationsInput | string | null queryType?: NullableStringFieldUpdateOperationsInput | string | null htmlType?: NullableStringFieldUpdateOperationsInput | string | null dictType?: NullableStringFieldUpdateOperationsInput | string | null sort?: NullableIntFieldUpdateOperationsInput | number | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null } export type GenTableColumnCreateManyInput = { columnId?: number tableId?: number | null columnName?: string | null columnComment?: string | null columnType?: string | null javaType?: string | null javaField?: string | null isPk?: string | null isIncrement?: string | null isRequired?: string | null isInsert?: string | null isEdit?: string | null isList?: string | null isQuery?: string | null queryType?: string | null htmlType?: string | null dictType?: string | null sort?: number | null createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null } export type GenTableColumnUpdateManyMutationInput = { columnName?: NullableStringFieldUpdateOperationsInput | string | null columnComment?: NullableStringFieldUpdateOperationsInput | string | null columnType?: NullableStringFieldUpdateOperationsInput | string | null javaType?: NullableStringFieldUpdateOperationsInput | string | null javaField?: NullableStringFieldUpdateOperationsInput | string | null isPk?: NullableStringFieldUpdateOperationsInput | string | null isIncrement?: NullableStringFieldUpdateOperationsInput | string | null isRequired?: NullableStringFieldUpdateOperationsInput | string | null isInsert?: NullableStringFieldUpdateOperationsInput | string | null isEdit?: NullableStringFieldUpdateOperationsInput | string | null isList?: NullableStringFieldUpdateOperationsInput | string | null isQuery?: NullableStringFieldUpdateOperationsInput | string | null queryType?: NullableStringFieldUpdateOperationsInput | string | null htmlType?: NullableStringFieldUpdateOperationsInput | string | null dictType?: NullableStringFieldUpdateOperationsInput | string | null sort?: NullableIntFieldUpdateOperationsInput | number | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null } export type GenTableColumnUncheckedUpdateManyInput = { columnId?: IntFieldUpdateOperationsInput | number tableId?: NullableIntFieldUpdateOperationsInput | number | null columnName?: NullableStringFieldUpdateOperationsInput | string | null columnComment?: NullableStringFieldUpdateOperationsInput | string | null columnType?: NullableStringFieldUpdateOperationsInput | string | null javaType?: NullableStringFieldUpdateOperationsInput | string | null javaField?: NullableStringFieldUpdateOperationsInput | string | null isPk?: NullableStringFieldUpdateOperationsInput | string | null isIncrement?: NullableStringFieldUpdateOperationsInput | string | null isRequired?: NullableStringFieldUpdateOperationsInput | string | null isInsert?: NullableStringFieldUpdateOperationsInput | string | null isEdit?: NullableStringFieldUpdateOperationsInput | string | null isList?: NullableStringFieldUpdateOperationsInput | string | null isQuery?: NullableStringFieldUpdateOperationsInput | string | null queryType?: NullableStringFieldUpdateOperationsInput | string | null htmlType?: NullableStringFieldUpdateOperationsInput | string | null dictType?: NullableStringFieldUpdateOperationsInput | string | null sort?: NullableIntFieldUpdateOperationsInput | number | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null } export type SysConfigCreateInput = { configName?: string | null configKey?: string | null configValue?: string | null configType?: string | null createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null remark?: string | null } export type SysConfigUncheckedCreateInput = { configId?: number configName?: string | null configKey?: string | null configValue?: string | null configType?: string | null createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null remark?: string | null } export type SysConfigUpdateInput = { configName?: NullableStringFieldUpdateOperationsInput | string | null configKey?: NullableStringFieldUpdateOperationsInput | string | null configValue?: NullableStringFieldUpdateOperationsInput | string | null configType?: NullableStringFieldUpdateOperationsInput | string | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null } export type SysConfigUncheckedUpdateInput = { configId?: IntFieldUpdateOperationsInput | number configName?: NullableStringFieldUpdateOperationsInput | string | null configKey?: NullableStringFieldUpdateOperationsInput | string | null configValue?: NullableStringFieldUpdateOperationsInput | string | null configType?: NullableStringFieldUpdateOperationsInput | string | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null } export type SysConfigCreateManyInput = { configId?: number configName?: string | null configKey?: string | null configValue?: string | null configType?: string | null createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null remark?: string | null } export type SysConfigUpdateManyMutationInput = { configName?: NullableStringFieldUpdateOperationsInput | string | null configKey?: NullableStringFieldUpdateOperationsInput | string | null configValue?: NullableStringFieldUpdateOperationsInput | string | null configType?: NullableStringFieldUpdateOperationsInput | string | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null } export type SysConfigUncheckedUpdateManyInput = { configId?: IntFieldUpdateOperationsInput | number configName?: NullableStringFieldUpdateOperationsInput | string | null configKey?: NullableStringFieldUpdateOperationsInput | string | null configValue?: NullableStringFieldUpdateOperationsInput | string | null configType?: NullableStringFieldUpdateOperationsInput | string | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null } export type SysDeptCreateInput = { parentId?: number | null ancestors?: string | null deptName?: string | null orderNum?: number | null leader?: string | null phone?: string | null email?: string | null status?: string | null createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null users?: SysUserCreateNestedManyWithoutDeptInput roles?: SysRoleDeptCreateNestedManyWithoutDeptInput } export type SysDeptUncheckedCreateInput = { deptId?: number parentId?: number | null ancestors?: string | null deptName?: string | null orderNum?: number | null leader?: string | null phone?: string | null email?: string | null status?: string | null createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null users?: SysUserUncheckedCreateNestedManyWithoutDeptInput roles?: SysRoleDeptUncheckedCreateNestedManyWithoutDeptInput } export type SysDeptUpdateInput = { parentId?: NullableIntFieldUpdateOperationsInput | number | null ancestors?: NullableStringFieldUpdateOperationsInput | string | null deptName?: NullableStringFieldUpdateOperationsInput | string | null orderNum?: NullableIntFieldUpdateOperationsInput | number | null leader?: NullableStringFieldUpdateOperationsInput | string | null phone?: NullableStringFieldUpdateOperationsInput | string | null email?: NullableStringFieldUpdateOperationsInput | string | null status?: NullableStringFieldUpdateOperationsInput | string | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null users?: SysUserUpdateManyWithoutDeptNestedInput roles?: SysRoleDeptUpdateManyWithoutDeptNestedInput } export type SysDeptUncheckedUpdateInput = { deptId?: IntFieldUpdateOperationsInput | number parentId?: NullableIntFieldUpdateOperationsInput | number | null ancestors?: NullableStringFieldUpdateOperationsInput | string | null deptName?: NullableStringFieldUpdateOperationsInput | string | null orderNum?: NullableIntFieldUpdateOperationsInput | number | null leader?: NullableStringFieldUpdateOperationsInput | string | null phone?: NullableStringFieldUpdateOperationsInput | string | null email?: NullableStringFieldUpdateOperationsInput | string | null status?: NullableStringFieldUpdateOperationsInput | string | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null users?: SysUserUncheckedUpdateManyWithoutDeptNestedInput roles?: SysRoleDeptUncheckedUpdateManyWithoutDeptNestedInput } export type SysDeptCreateManyInput = { deptId?: number parentId?: number | null ancestors?: string | null deptName?: string | null orderNum?: number | null leader?: string | null phone?: string | null email?: string | null status?: string | null createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null } export type SysDeptUpdateManyMutationInput = { parentId?: NullableIntFieldUpdateOperationsInput | number | null ancestors?: NullableStringFieldUpdateOperationsInput | string | null deptName?: NullableStringFieldUpdateOperationsInput | string | null orderNum?: NullableIntFieldUpdateOperationsInput | number | null leader?: NullableStringFieldUpdateOperationsInput | string | null phone?: NullableStringFieldUpdateOperationsInput | string | null email?: NullableStringFieldUpdateOperationsInput | string | null status?: NullableStringFieldUpdateOperationsInput | string | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null } export type SysDeptUncheckedUpdateManyInput = { deptId?: IntFieldUpdateOperationsInput | number parentId?: NullableIntFieldUpdateOperationsInput | number | null ancestors?: NullableStringFieldUpdateOperationsInput | string | null deptName?: NullableStringFieldUpdateOperationsInput | string | null orderNum?: NullableIntFieldUpdateOperationsInput | number | null leader?: NullableStringFieldUpdateOperationsInput | string | null phone?: NullableStringFieldUpdateOperationsInput | string | null email?: NullableStringFieldUpdateOperationsInput | string | null status?: NullableStringFieldUpdateOperationsInput | string | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null } export type SysDictDataCreateInput = { dictSort?: number | null dictLabel?: string | null dictValue?: string | null cssClass?: string | null listClass?: string | null isDefault?: string | null status?: string | null createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null remark?: string | null sysDictType?: SysDictTypeCreateNestedOneWithoutDictDatasInput } export type SysDictDataUncheckedCreateInput = { dictCode?: number dictSort?: number | null dictLabel?: string | null dictValue?: string | null dictType?: string | null cssClass?: string | null listClass?: string | null isDefault?: string | null status?: string | null createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null remark?: string | null } export type SysDictDataUpdateInput = { dictSort?: NullableIntFieldUpdateOperationsInput | number | null dictLabel?: NullableStringFieldUpdateOperationsInput | string | null dictValue?: NullableStringFieldUpdateOperationsInput | string | null cssClass?: NullableStringFieldUpdateOperationsInput | string | null listClass?: NullableStringFieldUpdateOperationsInput | string | null isDefault?: NullableStringFieldUpdateOperationsInput | string | null status?: NullableStringFieldUpdateOperationsInput | string | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null sysDictType?: SysDictTypeUpdateOneWithoutDictDatasNestedInput } export type SysDictDataUncheckedUpdateInput = { dictCode?: IntFieldUpdateOperationsInput | number dictSort?: NullableIntFieldUpdateOperationsInput | number | null dictLabel?: NullableStringFieldUpdateOperationsInput | string | null dictValue?: NullableStringFieldUpdateOperationsInput | string | null dictType?: NullableStringFieldUpdateOperationsInput | string | null cssClass?: NullableStringFieldUpdateOperationsInput | string | null listClass?: NullableStringFieldUpdateOperationsInput | string | null isDefault?: NullableStringFieldUpdateOperationsInput | string | null status?: NullableStringFieldUpdateOperationsInput | string | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null } export type SysDictDataCreateManyInput = { dictCode?: number dictSort?: number | null dictLabel?: string | null dictValue?: string | null dictType?: string | null cssClass?: string | null listClass?: string | null isDefault?: string | null status?: string | null createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null remark?: string | null } export type SysDictDataUpdateManyMutationInput = { dictSort?: NullableIntFieldUpdateOperationsInput | number | null dictLabel?: NullableStringFieldUpdateOperationsInput | string | null dictValue?: NullableStringFieldUpdateOperationsInput | string | null cssClass?: NullableStringFieldUpdateOperationsInput | string | null listClass?: NullableStringFieldUpdateOperationsInput | string | null isDefault?: NullableStringFieldUpdateOperationsInput | string | null status?: NullableStringFieldUpdateOperationsInput | string | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null } export type SysDictDataUncheckedUpdateManyInput = { dictCode?: IntFieldUpdateOperationsInput | number dictSort?: NullableIntFieldUpdateOperationsInput | number | null dictLabel?: NullableStringFieldUpdateOperationsInput | string | null dictValue?: NullableStringFieldUpdateOperationsInput | string | null dictType?: NullableStringFieldUpdateOperationsInput | string | null cssClass?: NullableStringFieldUpdateOperationsInput | string | null listClass?: NullableStringFieldUpdateOperationsInput | string | null isDefault?: NullableStringFieldUpdateOperationsInput | string | null status?: NullableStringFieldUpdateOperationsInput | string | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null } export type SysDictTypeCreateInput = { dictName?: string | null dictType?: string | null status?: string | null createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null remark?: string | null dictDatas?: SysDictDataCreateNestedManyWithoutSysDictTypeInput } export type SysDictTypeUncheckedCreateInput = { dictId?: number dictName?: string | null dictType?: string | null status?: string | null createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null remark?: string | null dictDatas?: SysDictDataUncheckedCreateNestedManyWithoutSysDictTypeInput } export type SysDictTypeUpdateInput = { dictName?: NullableStringFieldUpdateOperationsInput | string | null dictType?: NullableStringFieldUpdateOperationsInput | string | null status?: NullableStringFieldUpdateOperationsInput | string | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null dictDatas?: SysDictDataUpdateManyWithoutSysDictTypeNestedInput } export type SysDictTypeUncheckedUpdateInput = { dictId?: IntFieldUpdateOperationsInput | number dictName?: NullableStringFieldUpdateOperationsInput | string | null dictType?: NullableStringFieldUpdateOperationsInput | string | null status?: NullableStringFieldUpdateOperationsInput | string | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null dictDatas?: SysDictDataUncheckedUpdateManyWithoutSysDictTypeNestedInput } export type SysDictTypeCreateManyInput = { dictId?: number dictName?: string | null dictType?: string | null status?: string | null createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null remark?: string | null } export type SysDictTypeUpdateManyMutationInput = { dictName?: NullableStringFieldUpdateOperationsInput | string | null dictType?: NullableStringFieldUpdateOperationsInput | string | null status?: NullableStringFieldUpdateOperationsInput | string | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null } export type SysDictTypeUncheckedUpdateManyInput = { dictId?: IntFieldUpdateOperationsInput | number dictName?: NullableStringFieldUpdateOperationsInput | string | null dictType?: NullableStringFieldUpdateOperationsInput | string | null status?: NullableStringFieldUpdateOperationsInput | string | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null } export type SysLogininforCreateInput = { userName?: string | null ipaddr?: string | null loginLocation?: string | null browser?: string | null os?: string | null status?: string | null msg?: string | null loginTime?: string | null } export type SysLogininforUncheckedCreateInput = { infoId?: number userName?: string | null ipaddr?: string | null loginLocation?: string | null browser?: string | null os?: string | null status?: string | null msg?: string | null loginTime?: string | null } export type SysLogininforUpdateInput = { userName?: NullableStringFieldUpdateOperationsInput | string | null ipaddr?: NullableStringFieldUpdateOperationsInput | string | null loginLocation?: NullableStringFieldUpdateOperationsInput | string | null browser?: NullableStringFieldUpdateOperationsInput | string | null os?: NullableStringFieldUpdateOperationsInput | string | null status?: NullableStringFieldUpdateOperationsInput | string | null msg?: NullableStringFieldUpdateOperationsInput | string | null loginTime?: NullableStringFieldUpdateOperationsInput | string | null } export type SysLogininforUncheckedUpdateInput = { infoId?: IntFieldUpdateOperationsInput | number userName?: NullableStringFieldUpdateOperationsInput | string | null ipaddr?: NullableStringFieldUpdateOperationsInput | string | null loginLocation?: NullableStringFieldUpdateOperationsInput | string | null browser?: NullableStringFieldUpdateOperationsInput | string | null os?: NullableStringFieldUpdateOperationsInput | string | null status?: NullableStringFieldUpdateOperationsInput | string | null msg?: NullableStringFieldUpdateOperationsInput | string | null loginTime?: NullableStringFieldUpdateOperationsInput | string | null } export type SysLogininforCreateManyInput = { infoId?: number userName?: string | null ipaddr?: string | null loginLocation?: string | null browser?: string | null os?: string | null status?: string | null msg?: string | null loginTime?: string | null } export type SysLogininforUpdateManyMutationInput = { userName?: NullableStringFieldUpdateOperationsInput | string | null ipaddr?: NullableStringFieldUpdateOperationsInput | string | null loginLocation?: NullableStringFieldUpdateOperationsInput | string | null browser?: NullableStringFieldUpdateOperationsInput | string | null os?: NullableStringFieldUpdateOperationsInput | string | null status?: NullableStringFieldUpdateOperationsInput | string | null msg?: NullableStringFieldUpdateOperationsInput | string | null loginTime?: NullableStringFieldUpdateOperationsInput | string | null } export type SysLogininforUncheckedUpdateManyInput = { infoId?: IntFieldUpdateOperationsInput | number userName?: NullableStringFieldUpdateOperationsInput | string | null ipaddr?: NullableStringFieldUpdateOperationsInput | string | null loginLocation?: NullableStringFieldUpdateOperationsInput | string | null browser?: NullableStringFieldUpdateOperationsInput | string | null os?: NullableStringFieldUpdateOperationsInput | string | null status?: NullableStringFieldUpdateOperationsInput | string | null msg?: NullableStringFieldUpdateOperationsInput | string | null loginTime?: NullableStringFieldUpdateOperationsInput | string | null } export type SysMenuCreateInput = { menuName: string parentId?: number | null orderNum?: number | null path?: string | null component?: string | null query?: string | null isFrame?: number | null isCache?: number | null menuType?: string | null visible?: string | null status?: string | null perms?: string | null icon?: string | null createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null remark?: string | null roles?: SysRoleMenuCreateNestedManyWithoutMenuInput } export type SysMenuUncheckedCreateInput = { menuId?: number menuName: string parentId?: number | null orderNum?: number | null path?: string | null component?: string | null query?: string | null isFrame?: number | null isCache?: number | null menuType?: string | null visible?: string | null status?: string | null perms?: string | null icon?: string | null createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null remark?: string | null roles?: SysRoleMenuUncheckedCreateNestedManyWithoutMenuInput } export type SysMenuUpdateInput = { menuName?: StringFieldUpdateOperationsInput | string parentId?: NullableIntFieldUpdateOperationsInput | number | null orderNum?: NullableIntFieldUpdateOperationsInput | number | null path?: NullableStringFieldUpdateOperationsInput | string | null component?: NullableStringFieldUpdateOperationsInput | string | null query?: NullableStringFieldUpdateOperationsInput | string | null isFrame?: NullableIntFieldUpdateOperationsInput | number | null isCache?: NullableIntFieldUpdateOperationsInput | number | null menuType?: NullableStringFieldUpdateOperationsInput | string | null visible?: NullableStringFieldUpdateOperationsInput | string | null status?: NullableStringFieldUpdateOperationsInput | string | null perms?: NullableStringFieldUpdateOperationsInput | string | null icon?: NullableStringFieldUpdateOperationsInput | string | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null roles?: SysRoleMenuUpdateManyWithoutMenuNestedInput } export type SysMenuUncheckedUpdateInput = { menuId?: IntFieldUpdateOperationsInput | number menuName?: StringFieldUpdateOperationsInput | string parentId?: NullableIntFieldUpdateOperationsInput | number | null orderNum?: NullableIntFieldUpdateOperationsInput | number | null path?: NullableStringFieldUpdateOperationsInput | string | null component?: NullableStringFieldUpdateOperationsInput | string | null query?: NullableStringFieldUpdateOperationsInput | string | null isFrame?: NullableIntFieldUpdateOperationsInput | number | null isCache?: NullableIntFieldUpdateOperationsInput | number | null menuType?: NullableStringFieldUpdateOperationsInput | string | null visible?: NullableStringFieldUpdateOperationsInput | string | null status?: NullableStringFieldUpdateOperationsInput | string | null perms?: NullableStringFieldUpdateOperationsInput | string | null icon?: NullableStringFieldUpdateOperationsInput | string | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null roles?: SysRoleMenuUncheckedUpdateManyWithoutMenuNestedInput } export type SysMenuCreateManyInput = { menuId?: number menuName: string parentId?: number | null orderNum?: number | null path?: string | null component?: string | null query?: string | null isFrame?: number | null isCache?: number | null menuType?: string | null visible?: string | null status?: string | null perms?: string | null icon?: string | null createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null remark?: string | null } export type SysMenuUpdateManyMutationInput = { menuName?: StringFieldUpdateOperationsInput | string parentId?: NullableIntFieldUpdateOperationsInput | number | null orderNum?: NullableIntFieldUpdateOperationsInput | number | null path?: NullableStringFieldUpdateOperationsInput | string | null component?: NullableStringFieldUpdateOperationsInput | string | null query?: NullableStringFieldUpdateOperationsInput | string | null isFrame?: NullableIntFieldUpdateOperationsInput | number | null isCache?: NullableIntFieldUpdateOperationsInput | number | null menuType?: NullableStringFieldUpdateOperationsInput | string | null visible?: NullableStringFieldUpdateOperationsInput | string | null status?: NullableStringFieldUpdateOperationsInput | string | null perms?: NullableStringFieldUpdateOperationsInput | string | null icon?: NullableStringFieldUpdateOperationsInput | string | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null } export type SysMenuUncheckedUpdateManyInput = { menuId?: IntFieldUpdateOperationsInput | number menuName?: StringFieldUpdateOperationsInput | string parentId?: NullableIntFieldUpdateOperationsInput | number | null orderNum?: NullableIntFieldUpdateOperationsInput | number | null path?: NullableStringFieldUpdateOperationsInput | string | null component?: NullableStringFieldUpdateOperationsInput | string | null query?: NullableStringFieldUpdateOperationsInput | string | null isFrame?: NullableIntFieldUpdateOperationsInput | number | null isCache?: NullableIntFieldUpdateOperationsInput | number | null menuType?: NullableStringFieldUpdateOperationsInput | string | null visible?: NullableStringFieldUpdateOperationsInput | string | null status?: NullableStringFieldUpdateOperationsInput | string | null perms?: NullableStringFieldUpdateOperationsInput | string | null icon?: NullableStringFieldUpdateOperationsInput | string | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null } export type SysNoticeCreateInput = { noticeTitle: string noticeType: string noticeContent?: string | null status?: string | null createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null remark?: string | null } export type SysNoticeUncheckedCreateInput = { noticeId?: number noticeTitle: string noticeType: string noticeContent?: string | null status?: string | null createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null remark?: string | null } export type SysNoticeUpdateInput = { noticeTitle?: StringFieldUpdateOperationsInput | string noticeType?: StringFieldUpdateOperationsInput | string noticeContent?: NullableStringFieldUpdateOperationsInput | string | null status?: NullableStringFieldUpdateOperationsInput | string | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null } export type SysNoticeUncheckedUpdateInput = { noticeId?: IntFieldUpdateOperationsInput | number noticeTitle?: StringFieldUpdateOperationsInput | string noticeType?: StringFieldUpdateOperationsInput | string noticeContent?: NullableStringFieldUpdateOperationsInput | string | null status?: NullableStringFieldUpdateOperationsInput | string | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null } export type SysNoticeCreateManyInput = { noticeId?: number noticeTitle: string noticeType: string noticeContent?: string | null status?: string | null createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null remark?: string | null } export type SysNoticeUpdateManyMutationInput = { noticeTitle?: StringFieldUpdateOperationsInput | string noticeType?: StringFieldUpdateOperationsInput | string noticeContent?: NullableStringFieldUpdateOperationsInput | string | null status?: NullableStringFieldUpdateOperationsInput | string | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null } export type SysNoticeUncheckedUpdateManyInput = { noticeId?: IntFieldUpdateOperationsInput | number noticeTitle?: StringFieldUpdateOperationsInput | string noticeType?: StringFieldUpdateOperationsInput | string noticeContent?: NullableStringFieldUpdateOperationsInput | string | null status?: NullableStringFieldUpdateOperationsInput | string | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null } export type SysPostCreateInput = { postCode: string postName: string postSort: number status?: string createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null remark?: string | null users?: SysUserPostCreateNestedManyWithoutPostInput } export type SysPostUncheckedCreateInput = { postId?: number postCode: string postName: string postSort: number status?: string createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null remark?: string | null users?: SysUserPostUncheckedCreateNestedManyWithoutPostInput } export type SysPostUpdateInput = { postCode?: StringFieldUpdateOperationsInput | string postName?: StringFieldUpdateOperationsInput | string postSort?: IntFieldUpdateOperationsInput | number status?: StringFieldUpdateOperationsInput | string createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null users?: SysUserPostUpdateManyWithoutPostNestedInput } export type SysPostUncheckedUpdateInput = { postId?: IntFieldUpdateOperationsInput | number postCode?: StringFieldUpdateOperationsInput | string postName?: StringFieldUpdateOperationsInput | string postSort?: IntFieldUpdateOperationsInput | number status?: StringFieldUpdateOperationsInput | string createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null users?: SysUserPostUncheckedUpdateManyWithoutPostNestedInput } export type SysPostCreateManyInput = { postId?: number postCode: string postName: string postSort: number status?: string createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null remark?: string | null } export type SysPostUpdateManyMutationInput = { postCode?: StringFieldUpdateOperationsInput | string postName?: StringFieldUpdateOperationsInput | string postSort?: IntFieldUpdateOperationsInput | number status?: StringFieldUpdateOperationsInput | string createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null } export type SysPostUncheckedUpdateManyInput = { postId?: IntFieldUpdateOperationsInput | number postCode?: StringFieldUpdateOperationsInput | string postName?: StringFieldUpdateOperationsInput | string postSort?: IntFieldUpdateOperationsInput | number status?: StringFieldUpdateOperationsInput | string createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null } export type SysUserPostCreateInput = { user: SysUserCreateNestedOneWithoutPostsInput post: SysPostCreateNestedOneWithoutUsersInput } export type SysUserPostUncheckedCreateInput = { userId: number postId: number } export type SysUserPostUpdateInput = { user?: SysUserUpdateOneRequiredWithoutPostsNestedInput post?: SysPostUpdateOneRequiredWithoutUsersNestedInput } export type SysUserPostUncheckedUpdateInput = { userId?: IntFieldUpdateOperationsInput | number postId?: IntFieldUpdateOperationsInput | number } export type SysUserPostCreateManyInput = { userId: number postId: number } export type SysUserPostUpdateManyMutationInput = { } export type SysUserPostUncheckedUpdateManyInput = { userId?: IntFieldUpdateOperationsInput | number postId?: IntFieldUpdateOperationsInput | number } export type SysRoleDeptCreateInput = { role: SysRoleCreateNestedOneWithoutDeptsInput dept: SysDeptCreateNestedOneWithoutRolesInput } export type SysRoleDeptUncheckedCreateInput = { roleId: number deptId: number } export type SysRoleDeptUpdateInput = { role?: SysRoleUpdateOneRequiredWithoutDeptsNestedInput dept?: SysDeptUpdateOneRequiredWithoutRolesNestedInput } export type SysRoleDeptUncheckedUpdateInput = { roleId?: IntFieldUpdateOperationsInput | number deptId?: IntFieldUpdateOperationsInput | number } export type SysRoleDeptCreateManyInput = { roleId: number deptId: number } export type SysRoleDeptUpdateManyMutationInput = { } export type SysRoleDeptUncheckedUpdateManyInput = { roleId?: IntFieldUpdateOperationsInput | number deptId?: IntFieldUpdateOperationsInput | number } export type SysRoleMenuCreateInput = { menu: SysMenuCreateNestedOneWithoutRolesInput role: SysRoleCreateNestedOneWithoutMenusInput } export type SysRoleMenuUncheckedCreateInput = { roleId: number menuId: number } export type SysRoleMenuUpdateInput = { menu?: SysMenuUpdateOneRequiredWithoutRolesNestedInput role?: SysRoleUpdateOneRequiredWithoutMenusNestedInput } export type SysRoleMenuUncheckedUpdateInput = { roleId?: IntFieldUpdateOperationsInput | number menuId?: IntFieldUpdateOperationsInput | number } export type SysRoleMenuCreateManyInput = { roleId: number menuId: number } export type SysRoleMenuUpdateManyMutationInput = { } export type SysRoleMenuUncheckedUpdateManyInput = { roleId?: IntFieldUpdateOperationsInput | number menuId?: IntFieldUpdateOperationsInput | number } export type SysUserCreateInput = { userName: string nickName: string userType?: string | null email?: string | null phonenumber?: string | null sex?: string | null avatar?: string | null password?: string | null status?: string | null loginIp?: string | null loginDate?: string | null createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null remark?: string | null dept?: SysDeptCreateNestedOneWithoutUsersInput roles?: SysUserRoleCreateNestedManyWithoutUserInput posts?: SysUserPostCreateNestedManyWithoutUserInput } export type SysUserUncheckedCreateInput = { userId?: number deptId?: number | null userName: string nickName: string userType?: string | null email?: string | null phonenumber?: string | null sex?: string | null avatar?: string | null password?: string | null status?: string | null loginIp?: string | null loginDate?: string | null createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null remark?: string | null roles?: SysUserRoleUncheckedCreateNestedManyWithoutUserInput posts?: SysUserPostUncheckedCreateNestedManyWithoutUserInput } export type SysUserUpdateInput = { userName?: StringFieldUpdateOperationsInput | string nickName?: StringFieldUpdateOperationsInput | string userType?: NullableStringFieldUpdateOperationsInput | string | null email?: NullableStringFieldUpdateOperationsInput | string | null phonenumber?: NullableStringFieldUpdateOperationsInput | string | null sex?: NullableStringFieldUpdateOperationsInput | string | null avatar?: NullableStringFieldUpdateOperationsInput | string | null password?: NullableStringFieldUpdateOperationsInput | string | null status?: NullableStringFieldUpdateOperationsInput | string | null loginIp?: NullableStringFieldUpdateOperationsInput | string | null loginDate?: NullableStringFieldUpdateOperationsInput | string | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null dept?: SysDeptUpdateOneWithoutUsersNestedInput roles?: SysUserRoleUpdateManyWithoutUserNestedInput posts?: SysUserPostUpdateManyWithoutUserNestedInput } export type SysUserUncheckedUpdateInput = { userId?: IntFieldUpdateOperationsInput | number deptId?: NullableIntFieldUpdateOperationsInput | number | null userName?: StringFieldUpdateOperationsInput | string nickName?: StringFieldUpdateOperationsInput | string userType?: NullableStringFieldUpdateOperationsInput | string | null email?: NullableStringFieldUpdateOperationsInput | string | null phonenumber?: NullableStringFieldUpdateOperationsInput | string | null sex?: NullableStringFieldUpdateOperationsInput | string | null avatar?: NullableStringFieldUpdateOperationsInput | string | null password?: NullableStringFieldUpdateOperationsInput | string | null status?: NullableStringFieldUpdateOperationsInput | string | null loginIp?: NullableStringFieldUpdateOperationsInput | string | null loginDate?: NullableStringFieldUpdateOperationsInput | string | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null roles?: SysUserRoleUncheckedUpdateManyWithoutUserNestedInput posts?: SysUserPostUncheckedUpdateManyWithoutUserNestedInput } export type SysUserCreateManyInput = { userId?: number deptId?: number | null userName: string nickName: string userType?: string | null email?: string | null phonenumber?: string | null sex?: string | null avatar?: string | null password?: string | null status?: string | null loginIp?: string | null loginDate?: string | null createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null remark?: string | null } export type SysUserUpdateManyMutationInput = { userName?: StringFieldUpdateOperationsInput | string nickName?: StringFieldUpdateOperationsInput | string userType?: NullableStringFieldUpdateOperationsInput | string | null email?: NullableStringFieldUpdateOperationsInput | string | null phonenumber?: NullableStringFieldUpdateOperationsInput | string | null sex?: NullableStringFieldUpdateOperationsInput | string | null avatar?: NullableStringFieldUpdateOperationsInput | string | null password?: NullableStringFieldUpdateOperationsInput | string | null status?: NullableStringFieldUpdateOperationsInput | string | null loginIp?: NullableStringFieldUpdateOperationsInput | string | null loginDate?: NullableStringFieldUpdateOperationsInput | string | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null } export type SysUserUncheckedUpdateManyInput = { userId?: IntFieldUpdateOperationsInput | number deptId?: NullableIntFieldUpdateOperationsInput | number | null userName?: StringFieldUpdateOperationsInput | string nickName?: StringFieldUpdateOperationsInput | string userType?: NullableStringFieldUpdateOperationsInput | string | null email?: NullableStringFieldUpdateOperationsInput | string | null phonenumber?: NullableStringFieldUpdateOperationsInput | string | null sex?: NullableStringFieldUpdateOperationsInput | string | null avatar?: NullableStringFieldUpdateOperationsInput | string | null password?: NullableStringFieldUpdateOperationsInput | string | null status?: NullableStringFieldUpdateOperationsInput | string | null loginIp?: NullableStringFieldUpdateOperationsInput | string | null loginDate?: NullableStringFieldUpdateOperationsInput | string | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null } export type SysRoleCreateInput = { roleName: string roleKey: string roleSort: number dataScope?: string | null menuCheckStrictly?: number | null deptCheckStrictly?: number | null status?: string createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null remark?: string | null users?: SysUserRoleCreateNestedManyWithoutRoleInput menus?: SysRoleMenuCreateNestedManyWithoutRoleInput depts?: SysRoleDeptCreateNestedManyWithoutRoleInput } export type SysRoleUncheckedCreateInput = { roleId?: number roleName: string roleKey: string roleSort: number dataScope?: string | null menuCheckStrictly?: number | null deptCheckStrictly?: number | null status?: string createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null remark?: string | null users?: SysUserRoleUncheckedCreateNestedManyWithoutRoleInput menus?: SysRoleMenuUncheckedCreateNestedManyWithoutRoleInput depts?: SysRoleDeptUncheckedCreateNestedManyWithoutRoleInput } export type SysRoleUpdateInput = { roleName?: StringFieldUpdateOperationsInput | string roleKey?: StringFieldUpdateOperationsInput | string roleSort?: IntFieldUpdateOperationsInput | number dataScope?: NullableStringFieldUpdateOperationsInput | string | null menuCheckStrictly?: NullableIntFieldUpdateOperationsInput | number | null deptCheckStrictly?: NullableIntFieldUpdateOperationsInput | number | null status?: StringFieldUpdateOperationsInput | string createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null users?: SysUserRoleUpdateManyWithoutRoleNestedInput menus?: SysRoleMenuUpdateManyWithoutRoleNestedInput depts?: SysRoleDeptUpdateManyWithoutRoleNestedInput } export type SysRoleUncheckedUpdateInput = { roleId?: IntFieldUpdateOperationsInput | number roleName?: StringFieldUpdateOperationsInput | string roleKey?: StringFieldUpdateOperationsInput | string roleSort?: IntFieldUpdateOperationsInput | number dataScope?: NullableStringFieldUpdateOperationsInput | string | null menuCheckStrictly?: NullableIntFieldUpdateOperationsInput | number | null deptCheckStrictly?: NullableIntFieldUpdateOperationsInput | number | null status?: StringFieldUpdateOperationsInput | string createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null users?: SysUserRoleUncheckedUpdateManyWithoutRoleNestedInput menus?: SysRoleMenuUncheckedUpdateManyWithoutRoleNestedInput depts?: SysRoleDeptUncheckedUpdateManyWithoutRoleNestedInput } export type SysRoleCreateManyInput = { roleId?: number roleName: string roleKey: string roleSort: number dataScope?: string | null menuCheckStrictly?: number | null deptCheckStrictly?: number | null status?: string createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null remark?: string | null } export type SysRoleUpdateManyMutationInput = { roleName?: StringFieldUpdateOperationsInput | string roleKey?: StringFieldUpdateOperationsInput | string roleSort?: IntFieldUpdateOperationsInput | number dataScope?: NullableStringFieldUpdateOperationsInput | string | null menuCheckStrictly?: NullableIntFieldUpdateOperationsInput | number | null deptCheckStrictly?: NullableIntFieldUpdateOperationsInput | number | null status?: StringFieldUpdateOperationsInput | string createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null } export type SysRoleUncheckedUpdateManyInput = { roleId?: IntFieldUpdateOperationsInput | number roleName?: StringFieldUpdateOperationsInput | string roleKey?: StringFieldUpdateOperationsInput | string roleSort?: IntFieldUpdateOperationsInput | number dataScope?: NullableStringFieldUpdateOperationsInput | string | null menuCheckStrictly?: NullableIntFieldUpdateOperationsInput | number | null deptCheckStrictly?: NullableIntFieldUpdateOperationsInput | number | null status?: StringFieldUpdateOperationsInput | string createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null } export type SysUserRoleCreateInput = { user: SysUserCreateNestedOneWithoutRolesInput role: SysRoleCreateNestedOneWithoutUsersInput } export type SysUserRoleUncheckedCreateInput = { userId: number roleId: number } export type SysUserRoleUpdateInput = { user?: SysUserUpdateOneRequiredWithoutRolesNestedInput role?: SysRoleUpdateOneRequiredWithoutUsersNestedInput } export type SysUserRoleUncheckedUpdateInput = { userId?: IntFieldUpdateOperationsInput | number roleId?: IntFieldUpdateOperationsInput | number } export type SysUserRoleCreateManyInput = { userId: number roleId: number } export type SysUserRoleUpdateManyMutationInput = { } export type SysUserRoleUncheckedUpdateManyInput = { userId?: IntFieldUpdateOperationsInput | number roleId?: IntFieldUpdateOperationsInput | number } export type IntFilter<$PrismaModel = never> = { equals?: number | IntFieldRefInput<$PrismaModel> in?: number[] notIn?: number[] lt?: number | IntFieldRefInput<$PrismaModel> lte?: number | IntFieldRefInput<$PrismaModel> gt?: number | IntFieldRefInput<$PrismaModel> gte?: number | IntFieldRefInput<$PrismaModel> not?: NestedIntFilter<$PrismaModel> | number } export type StringNullableFilter<$PrismaModel = never> = { equals?: string | StringFieldRefInput<$PrismaModel> | null in?: string[] | null notIn?: string[] | null lt?: string | StringFieldRefInput<$PrismaModel> lte?: string | StringFieldRefInput<$PrismaModel> gt?: string | StringFieldRefInput<$PrismaModel> gte?: string | StringFieldRefInput<$PrismaModel> contains?: string | StringFieldRefInput<$PrismaModel> startsWith?: string | StringFieldRefInput<$PrismaModel> endsWith?: string | StringFieldRefInput<$PrismaModel> not?: NestedStringNullableFilter<$PrismaModel> | string | null } export type GenTableColumnListRelationFilter = { every?: GenTableColumnWhereInput some?: GenTableColumnWhereInput none?: GenTableColumnWhereInput } export type SortOrderInput = { sort: SortOrder nulls?: NullsOrder } export type GenTableColumnOrderByRelationAggregateInput = { _count?: SortOrder } export type GenTableCountOrderByAggregateInput = { tableId?: SortOrder tableName?: SortOrder tableComment?: SortOrder subTableName?: SortOrder subTableFkName?: SortOrder className?: SortOrder tplCategory?: SortOrder tplWebType?: SortOrder packageName?: SortOrder moduleName?: SortOrder businessName?: SortOrder functionName?: SortOrder functionAuthor?: SortOrder genType?: SortOrder genPath?: SortOrder options?: SortOrder createBy?: SortOrder createTime?: SortOrder updateBy?: SortOrder updateTime?: SortOrder remark?: SortOrder } export type GenTableAvgOrderByAggregateInput = { tableId?: SortOrder } export type GenTableMaxOrderByAggregateInput = { tableId?: SortOrder tableName?: SortOrder tableComment?: SortOrder subTableName?: SortOrder subTableFkName?: SortOrder className?: SortOrder tplCategory?: SortOrder tplWebType?: SortOrder packageName?: SortOrder moduleName?: SortOrder businessName?: SortOrder functionName?: SortOrder functionAuthor?: SortOrder genType?: SortOrder genPath?: SortOrder options?: SortOrder createBy?: SortOrder createTime?: SortOrder updateBy?: SortOrder updateTime?: SortOrder remark?: SortOrder } export type GenTableMinOrderByAggregateInput = { tableId?: SortOrder tableName?: SortOrder tableComment?: SortOrder subTableName?: SortOrder subTableFkName?: SortOrder className?: SortOrder tplCategory?: SortOrder tplWebType?: SortOrder packageName?: SortOrder moduleName?: SortOrder businessName?: SortOrder functionName?: SortOrder functionAuthor?: SortOrder genType?: SortOrder genPath?: SortOrder options?: SortOrder createBy?: SortOrder createTime?: SortOrder updateBy?: SortOrder updateTime?: SortOrder remark?: SortOrder } export type GenTableSumOrderByAggregateInput = { tableId?: SortOrder } export type IntWithAggregatesFilter<$PrismaModel = never> = { equals?: number | IntFieldRefInput<$PrismaModel> in?: number[] notIn?: number[] lt?: number | IntFieldRefInput<$PrismaModel> lte?: number | IntFieldRefInput<$PrismaModel> gt?: number | IntFieldRefInput<$PrismaModel> gte?: number | IntFieldRefInput<$PrismaModel> not?: NestedIntWithAggregatesFilter<$PrismaModel> | number _count?: NestedIntFilter<$PrismaModel> _avg?: NestedFloatFilter<$PrismaModel> _sum?: NestedIntFilter<$PrismaModel> _min?: NestedIntFilter<$PrismaModel> _max?: NestedIntFilter<$PrismaModel> } export type StringNullableWithAggregatesFilter<$PrismaModel = never> = { equals?: string | StringFieldRefInput<$PrismaModel> | null in?: string[] | null notIn?: string[] | null lt?: string | StringFieldRefInput<$PrismaModel> lte?: string | StringFieldRefInput<$PrismaModel> gt?: string | StringFieldRefInput<$PrismaModel> gte?: string | StringFieldRefInput<$PrismaModel> contains?: string | StringFieldRefInput<$PrismaModel> startsWith?: string | StringFieldRefInput<$PrismaModel> endsWith?: string | StringFieldRefInput<$PrismaModel> not?: NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null _count?: NestedIntNullableFilter<$PrismaModel> _min?: NestedStringNullableFilter<$PrismaModel> _max?: NestedStringNullableFilter<$PrismaModel> } export type IntNullableFilter<$PrismaModel = never> = { equals?: number | IntFieldRefInput<$PrismaModel> | null in?: number[] | null notIn?: number[] | null lt?: number | IntFieldRefInput<$PrismaModel> lte?: number | IntFieldRefInput<$PrismaModel> gt?: number | IntFieldRefInput<$PrismaModel> gte?: number | IntFieldRefInput<$PrismaModel> not?: NestedIntNullableFilter<$PrismaModel> | number | null } export type GenTableNullableRelationFilter = { is?: GenTableWhereInput | null isNot?: GenTableWhereInput | null } export type GenTableColumnCountOrderByAggregateInput = { columnId?: SortOrder tableId?: SortOrder columnName?: SortOrder columnComment?: SortOrder columnType?: SortOrder javaType?: SortOrder javaField?: SortOrder isPk?: SortOrder isIncrement?: SortOrder isRequired?: SortOrder isInsert?: SortOrder isEdit?: SortOrder isList?: SortOrder isQuery?: SortOrder queryType?: SortOrder htmlType?: SortOrder dictType?: SortOrder sort?: SortOrder createBy?: SortOrder createTime?: SortOrder updateBy?: SortOrder updateTime?: SortOrder } export type GenTableColumnAvgOrderByAggregateInput = { columnId?: SortOrder tableId?: SortOrder sort?: SortOrder } export type GenTableColumnMaxOrderByAggregateInput = { columnId?: SortOrder tableId?: SortOrder columnName?: SortOrder columnComment?: SortOrder columnType?: SortOrder javaType?: SortOrder javaField?: SortOrder isPk?: SortOrder isIncrement?: SortOrder isRequired?: SortOrder isInsert?: SortOrder isEdit?: SortOrder isList?: SortOrder isQuery?: SortOrder queryType?: SortOrder htmlType?: SortOrder dictType?: SortOrder sort?: SortOrder createBy?: SortOrder createTime?: SortOrder updateBy?: SortOrder updateTime?: SortOrder } export type GenTableColumnMinOrderByAggregateInput = { columnId?: SortOrder tableId?: SortOrder columnName?: SortOrder columnComment?: SortOrder columnType?: SortOrder javaType?: SortOrder javaField?: SortOrder isPk?: SortOrder isIncrement?: SortOrder isRequired?: SortOrder isInsert?: SortOrder isEdit?: SortOrder isList?: SortOrder isQuery?: SortOrder queryType?: SortOrder htmlType?: SortOrder dictType?: SortOrder sort?: SortOrder createBy?: SortOrder createTime?: SortOrder updateBy?: SortOrder updateTime?: SortOrder } export type GenTableColumnSumOrderByAggregateInput = { columnId?: SortOrder tableId?: SortOrder sort?: SortOrder } export type IntNullableWithAggregatesFilter<$PrismaModel = never> = { equals?: number | IntFieldRefInput<$PrismaModel> | null in?: number[] | null notIn?: number[] | null lt?: number | IntFieldRefInput<$PrismaModel> lte?: number | IntFieldRefInput<$PrismaModel> gt?: number | IntFieldRefInput<$PrismaModel> gte?: number | IntFieldRefInput<$PrismaModel> not?: NestedIntNullableWithAggregatesFilter<$PrismaModel> | number | null _count?: NestedIntNullableFilter<$PrismaModel> _avg?: NestedFloatNullableFilter<$PrismaModel> _sum?: NestedIntNullableFilter<$PrismaModel> _min?: NestedIntNullableFilter<$PrismaModel> _max?: NestedIntNullableFilter<$PrismaModel> } export type SysConfigCountOrderByAggregateInput = { configId?: SortOrder configName?: SortOrder configKey?: SortOrder configValue?: SortOrder configType?: SortOrder createBy?: SortOrder createTime?: SortOrder updateBy?: SortOrder updateTime?: SortOrder remark?: SortOrder } export type SysConfigAvgOrderByAggregateInput = { configId?: SortOrder } export type SysConfigMaxOrderByAggregateInput = { configId?: SortOrder configName?: SortOrder configKey?: SortOrder configValue?: SortOrder configType?: SortOrder createBy?: SortOrder createTime?: SortOrder updateBy?: SortOrder updateTime?: SortOrder remark?: SortOrder } export type SysConfigMinOrderByAggregateInput = { configId?: SortOrder configName?: SortOrder configKey?: SortOrder configValue?: SortOrder configType?: SortOrder createBy?: SortOrder createTime?: SortOrder updateBy?: SortOrder updateTime?: SortOrder remark?: SortOrder } export type SysConfigSumOrderByAggregateInput = { configId?: SortOrder } export type SysUserListRelationFilter = { every?: SysUserWhereInput some?: SysUserWhereInput none?: SysUserWhereInput } export type SysRoleDeptListRelationFilter = { every?: SysRoleDeptWhereInput some?: SysRoleDeptWhereInput none?: SysRoleDeptWhereInput } export type SysUserOrderByRelationAggregateInput = { _count?: SortOrder } export type SysRoleDeptOrderByRelationAggregateInput = { _count?: SortOrder } export type SysDeptCountOrderByAggregateInput = { deptId?: SortOrder parentId?: SortOrder ancestors?: SortOrder deptName?: SortOrder orderNum?: SortOrder leader?: SortOrder phone?: SortOrder email?: SortOrder status?: SortOrder createBy?: SortOrder createTime?: SortOrder updateBy?: SortOrder updateTime?: SortOrder } export type SysDeptAvgOrderByAggregateInput = { deptId?: SortOrder parentId?: SortOrder orderNum?: SortOrder } export type SysDeptMaxOrderByAggregateInput = { deptId?: SortOrder parentId?: SortOrder ancestors?: SortOrder deptName?: SortOrder orderNum?: SortOrder leader?: SortOrder phone?: SortOrder email?: SortOrder status?: SortOrder createBy?: SortOrder createTime?: SortOrder updateBy?: SortOrder updateTime?: SortOrder } export type SysDeptMinOrderByAggregateInput = { deptId?: SortOrder parentId?: SortOrder ancestors?: SortOrder deptName?: SortOrder orderNum?: SortOrder leader?: SortOrder phone?: SortOrder email?: SortOrder status?: SortOrder createBy?: SortOrder createTime?: SortOrder updateBy?: SortOrder updateTime?: SortOrder } export type SysDeptSumOrderByAggregateInput = { deptId?: SortOrder parentId?: SortOrder orderNum?: SortOrder } export type SysDictTypeNullableRelationFilter = { is?: SysDictTypeWhereInput | null isNot?: SysDictTypeWhereInput | null } export type SysDictDataCountOrderByAggregateInput = { dictCode?: SortOrder dictSort?: SortOrder dictLabel?: SortOrder dictValue?: SortOrder dictType?: SortOrder cssClass?: SortOrder listClass?: SortOrder isDefault?: SortOrder status?: SortOrder createBy?: SortOrder createTime?: SortOrder updateBy?: SortOrder updateTime?: SortOrder remark?: SortOrder } export type SysDictDataAvgOrderByAggregateInput = { dictCode?: SortOrder dictSort?: SortOrder } export type SysDictDataMaxOrderByAggregateInput = { dictCode?: SortOrder dictSort?: SortOrder dictLabel?: SortOrder dictValue?: SortOrder dictType?: SortOrder cssClass?: SortOrder listClass?: SortOrder isDefault?: SortOrder status?: SortOrder createBy?: SortOrder createTime?: SortOrder updateBy?: SortOrder updateTime?: SortOrder remark?: SortOrder } export type SysDictDataMinOrderByAggregateInput = { dictCode?: SortOrder dictSort?: SortOrder dictLabel?: SortOrder dictValue?: SortOrder dictType?: SortOrder cssClass?: SortOrder listClass?: SortOrder isDefault?: SortOrder status?: SortOrder createBy?: SortOrder createTime?: SortOrder updateBy?: SortOrder updateTime?: SortOrder remark?: SortOrder } export type SysDictDataSumOrderByAggregateInput = { dictCode?: SortOrder dictSort?: SortOrder } export type SysDictDataListRelationFilter = { every?: SysDictDataWhereInput some?: SysDictDataWhereInput none?: SysDictDataWhereInput } export type SysDictDataOrderByRelationAggregateInput = { _count?: SortOrder } export type SysDictTypeCountOrderByAggregateInput = { dictId?: SortOrder dictName?: SortOrder dictType?: SortOrder status?: SortOrder createBy?: SortOrder createTime?: SortOrder updateBy?: SortOrder updateTime?: SortOrder remark?: SortOrder } export type SysDictTypeAvgOrderByAggregateInput = { dictId?: SortOrder } export type SysDictTypeMaxOrderByAggregateInput = { dictId?: SortOrder dictName?: SortOrder dictType?: SortOrder status?: SortOrder createBy?: SortOrder createTime?: SortOrder updateBy?: SortOrder updateTime?: SortOrder remark?: SortOrder } export type SysDictTypeMinOrderByAggregateInput = { dictId?: SortOrder dictName?: SortOrder dictType?: SortOrder status?: SortOrder createBy?: SortOrder createTime?: SortOrder updateBy?: SortOrder updateTime?: SortOrder remark?: SortOrder } export type SysDictTypeSumOrderByAggregateInput = { dictId?: SortOrder } export type SysLogininforCountOrderByAggregateInput = { infoId?: SortOrder userName?: SortOrder ipaddr?: SortOrder loginLocation?: SortOrder browser?: SortOrder os?: SortOrder status?: SortOrder msg?: SortOrder loginTime?: SortOrder } export type SysLogininforAvgOrderByAggregateInput = { infoId?: SortOrder } export type SysLogininforMaxOrderByAggregateInput = { infoId?: SortOrder userName?: SortOrder ipaddr?: SortOrder loginLocation?: SortOrder browser?: SortOrder os?: SortOrder status?: SortOrder msg?: SortOrder loginTime?: SortOrder } export type SysLogininforMinOrderByAggregateInput = { infoId?: SortOrder userName?: SortOrder ipaddr?: SortOrder loginLocation?: SortOrder browser?: SortOrder os?: SortOrder status?: SortOrder msg?: SortOrder loginTime?: SortOrder } export type SysLogininforSumOrderByAggregateInput = { infoId?: SortOrder } export type StringFilter<$PrismaModel = never> = { equals?: string | StringFieldRefInput<$PrismaModel> in?: string[] notIn?: string[] lt?: string | StringFieldRefInput<$PrismaModel> lte?: string | StringFieldRefInput<$PrismaModel> gt?: string | StringFieldRefInput<$PrismaModel> gte?: string | StringFieldRefInput<$PrismaModel> contains?: string | StringFieldRefInput<$PrismaModel> startsWith?: string | StringFieldRefInput<$PrismaModel> endsWith?: string | StringFieldRefInput<$PrismaModel> not?: NestedStringFilter<$PrismaModel> | string } export type SysRoleMenuListRelationFilter = { every?: SysRoleMenuWhereInput some?: SysRoleMenuWhereInput none?: SysRoleMenuWhereInput } export type SysRoleMenuOrderByRelationAggregateInput = { _count?: SortOrder } export type SysMenuCountOrderByAggregateInput = { menuId?: SortOrder menuName?: SortOrder parentId?: SortOrder orderNum?: SortOrder path?: SortOrder component?: SortOrder query?: SortOrder isFrame?: SortOrder isCache?: SortOrder menuType?: SortOrder visible?: SortOrder status?: SortOrder perms?: SortOrder icon?: SortOrder createBy?: SortOrder createTime?: SortOrder updateBy?: SortOrder updateTime?: SortOrder remark?: SortOrder } export type SysMenuAvgOrderByAggregateInput = { menuId?: SortOrder parentId?: SortOrder orderNum?: SortOrder isFrame?: SortOrder isCache?: SortOrder } export type SysMenuMaxOrderByAggregateInput = { menuId?: SortOrder menuName?: SortOrder parentId?: SortOrder orderNum?: SortOrder path?: SortOrder component?: SortOrder query?: SortOrder isFrame?: SortOrder isCache?: SortOrder menuType?: SortOrder visible?: SortOrder status?: SortOrder perms?: SortOrder icon?: SortOrder createBy?: SortOrder createTime?: SortOrder updateBy?: SortOrder updateTime?: SortOrder remark?: SortOrder } export type SysMenuMinOrderByAggregateInput = { menuId?: SortOrder menuName?: SortOrder parentId?: SortOrder orderNum?: SortOrder path?: SortOrder component?: SortOrder query?: SortOrder isFrame?: SortOrder isCache?: SortOrder menuType?: SortOrder visible?: SortOrder status?: SortOrder perms?: SortOrder icon?: SortOrder createBy?: SortOrder createTime?: SortOrder updateBy?: SortOrder updateTime?: SortOrder remark?: SortOrder } export type SysMenuSumOrderByAggregateInput = { menuId?: SortOrder parentId?: SortOrder orderNum?: SortOrder isFrame?: SortOrder isCache?: SortOrder } export type StringWithAggregatesFilter<$PrismaModel = never> = { equals?: string | StringFieldRefInput<$PrismaModel> in?: string[] notIn?: string[] lt?: string | StringFieldRefInput<$PrismaModel> lte?: string | StringFieldRefInput<$PrismaModel> gt?: string | StringFieldRefInput<$PrismaModel> gte?: string | StringFieldRefInput<$PrismaModel> contains?: string | StringFieldRefInput<$PrismaModel> startsWith?: string | StringFieldRefInput<$PrismaModel> endsWith?: string | StringFieldRefInput<$PrismaModel> not?: NestedStringWithAggregatesFilter<$PrismaModel> | string _count?: NestedIntFilter<$PrismaModel> _min?: NestedStringFilter<$PrismaModel> _max?: NestedStringFilter<$PrismaModel> } export type SysNoticeCountOrderByAggregateInput = { noticeId?: SortOrder noticeTitle?: SortOrder noticeType?: SortOrder noticeContent?: SortOrder status?: SortOrder createBy?: SortOrder createTime?: SortOrder updateBy?: SortOrder updateTime?: SortOrder remark?: SortOrder } export type SysNoticeAvgOrderByAggregateInput = { noticeId?: SortOrder } export type SysNoticeMaxOrderByAggregateInput = { noticeId?: SortOrder noticeTitle?: SortOrder noticeType?: SortOrder noticeContent?: SortOrder status?: SortOrder createBy?: SortOrder createTime?: SortOrder updateBy?: SortOrder updateTime?: SortOrder remark?: SortOrder } export type SysNoticeMinOrderByAggregateInput = { noticeId?: SortOrder noticeTitle?: SortOrder noticeType?: SortOrder noticeContent?: SortOrder status?: SortOrder createBy?: SortOrder createTime?: SortOrder updateBy?: SortOrder updateTime?: SortOrder remark?: SortOrder } export type SysNoticeSumOrderByAggregateInput = { noticeId?: SortOrder } export type SysUserPostListRelationFilter = { every?: SysUserPostWhereInput some?: SysUserPostWhereInput none?: SysUserPostWhereInput } export type SysUserPostOrderByRelationAggregateInput = { _count?: SortOrder } export type SysPostCountOrderByAggregateInput = { postId?: SortOrder postCode?: SortOrder postName?: SortOrder postSort?: SortOrder status?: SortOrder createBy?: SortOrder createTime?: SortOrder updateBy?: SortOrder updateTime?: SortOrder remark?: SortOrder } export type SysPostAvgOrderByAggregateInput = { postId?: SortOrder postSort?: SortOrder } export type SysPostMaxOrderByAggregateInput = { postId?: SortOrder postCode?: SortOrder postName?: SortOrder postSort?: SortOrder status?: SortOrder createBy?: SortOrder createTime?: SortOrder updateBy?: SortOrder updateTime?: SortOrder remark?: SortOrder } export type SysPostMinOrderByAggregateInput = { postId?: SortOrder postCode?: SortOrder postName?: SortOrder postSort?: SortOrder status?: SortOrder createBy?: SortOrder createTime?: SortOrder updateBy?: SortOrder updateTime?: SortOrder remark?: SortOrder } export type SysPostSumOrderByAggregateInput = { postId?: SortOrder postSort?: SortOrder } export type SysUserRelationFilter = { is?: SysUserWhereInput isNot?: SysUserWhereInput } export type SysPostRelationFilter = { is?: SysPostWhereInput isNot?: SysPostWhereInput } export type SysUserPostUserIdPostIdCompoundUniqueInput = { userId: number postId: number } export type SysUserPostCountOrderByAggregateInput = { userId?: SortOrder postId?: SortOrder } export type SysUserPostAvgOrderByAggregateInput = { userId?: SortOrder postId?: SortOrder } export type SysUserPostMaxOrderByAggregateInput = { userId?: SortOrder postId?: SortOrder } export type SysUserPostMinOrderByAggregateInput = { userId?: SortOrder postId?: SortOrder } export type SysUserPostSumOrderByAggregateInput = { userId?: SortOrder postId?: SortOrder } export type SysRoleRelationFilter = { is?: SysRoleWhereInput isNot?: SysRoleWhereInput } export type SysDeptRelationFilter = { is?: SysDeptWhereInput isNot?: SysDeptWhereInput } export type SysRoleDeptRoleIdDeptIdCompoundUniqueInput = { roleId: number deptId: number } export type SysRoleDeptCountOrderByAggregateInput = { roleId?: SortOrder deptId?: SortOrder } export type SysRoleDeptAvgOrderByAggregateInput = { roleId?: SortOrder deptId?: SortOrder } export type SysRoleDeptMaxOrderByAggregateInput = { roleId?: SortOrder deptId?: SortOrder } export type SysRoleDeptMinOrderByAggregateInput = { roleId?: SortOrder deptId?: SortOrder } export type SysRoleDeptSumOrderByAggregateInput = { roleId?: SortOrder deptId?: SortOrder } export type SysMenuRelationFilter = { is?: SysMenuWhereInput isNot?: SysMenuWhereInput } export type SysRoleMenuRoleIdMenuIdCompoundUniqueInput = { roleId: number menuId: number } export type SysRoleMenuCountOrderByAggregateInput = { roleId?: SortOrder menuId?: SortOrder } export type SysRoleMenuAvgOrderByAggregateInput = { roleId?: SortOrder menuId?: SortOrder } export type SysRoleMenuMaxOrderByAggregateInput = { roleId?: SortOrder menuId?: SortOrder } export type SysRoleMenuMinOrderByAggregateInput = { roleId?: SortOrder menuId?: SortOrder } export type SysRoleMenuSumOrderByAggregateInput = { roleId?: SortOrder menuId?: SortOrder } export type SysDeptNullableRelationFilter = { is?: SysDeptWhereInput | null isNot?: SysDeptWhereInput | null } export type SysUserRoleListRelationFilter = { every?: SysUserRoleWhereInput some?: SysUserRoleWhereInput none?: SysUserRoleWhereInput } export type SysUserRoleOrderByRelationAggregateInput = { _count?: SortOrder } export type SysUserCountOrderByAggregateInput = { userId?: SortOrder deptId?: SortOrder userName?: SortOrder nickName?: SortOrder userType?: SortOrder email?: SortOrder phonenumber?: SortOrder sex?: SortOrder avatar?: SortOrder password?: SortOrder status?: SortOrder loginIp?: SortOrder loginDate?: SortOrder createBy?: SortOrder createTime?: SortOrder updateBy?: SortOrder updateTime?: SortOrder remark?: SortOrder } export type SysUserAvgOrderByAggregateInput = { userId?: SortOrder deptId?: SortOrder } export type SysUserMaxOrderByAggregateInput = { userId?: SortOrder deptId?: SortOrder userName?: SortOrder nickName?: SortOrder userType?: SortOrder email?: SortOrder phonenumber?: SortOrder sex?: SortOrder avatar?: SortOrder password?: SortOrder status?: SortOrder loginIp?: SortOrder loginDate?: SortOrder createBy?: SortOrder createTime?: SortOrder updateBy?: SortOrder updateTime?: SortOrder remark?: SortOrder } export type SysUserMinOrderByAggregateInput = { userId?: SortOrder deptId?: SortOrder userName?: SortOrder nickName?: SortOrder userType?: SortOrder email?: SortOrder phonenumber?: SortOrder sex?: SortOrder avatar?: SortOrder password?: SortOrder status?: SortOrder loginIp?: SortOrder loginDate?: SortOrder createBy?: SortOrder createTime?: SortOrder updateBy?: SortOrder updateTime?: SortOrder remark?: SortOrder } export type SysUserSumOrderByAggregateInput = { userId?: SortOrder deptId?: SortOrder } export type SysRoleCountOrderByAggregateInput = { roleId?: SortOrder roleName?: SortOrder roleKey?: SortOrder roleSort?: SortOrder dataScope?: SortOrder menuCheckStrictly?: SortOrder deptCheckStrictly?: SortOrder status?: SortOrder createBy?: SortOrder createTime?: SortOrder updateBy?: SortOrder updateTime?: SortOrder remark?: SortOrder } export type SysRoleAvgOrderByAggregateInput = { roleId?: SortOrder roleSort?: SortOrder menuCheckStrictly?: SortOrder deptCheckStrictly?: SortOrder } export type SysRoleMaxOrderByAggregateInput = { roleId?: SortOrder roleName?: SortOrder roleKey?: SortOrder roleSort?: SortOrder dataScope?: SortOrder menuCheckStrictly?: SortOrder deptCheckStrictly?: SortOrder status?: SortOrder createBy?: SortOrder createTime?: SortOrder updateBy?: SortOrder updateTime?: SortOrder remark?: SortOrder } export type SysRoleMinOrderByAggregateInput = { roleId?: SortOrder roleName?: SortOrder roleKey?: SortOrder roleSort?: SortOrder dataScope?: SortOrder menuCheckStrictly?: SortOrder deptCheckStrictly?: SortOrder status?: SortOrder createBy?: SortOrder createTime?: SortOrder updateBy?: SortOrder updateTime?: SortOrder remark?: SortOrder } export type SysRoleSumOrderByAggregateInput = { roleId?: SortOrder roleSort?: SortOrder menuCheckStrictly?: SortOrder deptCheckStrictly?: SortOrder } export type SysUserRoleUserIdRoleIdCompoundUniqueInput = { userId: number roleId: number } export type SysUserRoleCountOrderByAggregateInput = { userId?: SortOrder roleId?: SortOrder } export type SysUserRoleAvgOrderByAggregateInput = { userId?: SortOrder roleId?: SortOrder } export type SysUserRoleMaxOrderByAggregateInput = { userId?: SortOrder roleId?: SortOrder } export type SysUserRoleMinOrderByAggregateInput = { userId?: SortOrder roleId?: SortOrder } export type SysUserRoleSumOrderByAggregateInput = { userId?: SortOrder roleId?: SortOrder } export type GenTableColumnCreateNestedManyWithoutTableInput = { create?: XOR | GenTableColumnCreateWithoutTableInput[] | GenTableColumnUncheckedCreateWithoutTableInput[] connectOrCreate?: GenTableColumnCreateOrConnectWithoutTableInput | GenTableColumnCreateOrConnectWithoutTableInput[] createMany?: GenTableColumnCreateManyTableInputEnvelope connect?: GenTableColumnWhereUniqueInput | GenTableColumnWhereUniqueInput[] } export type GenTableColumnUncheckedCreateNestedManyWithoutTableInput = { create?: XOR | GenTableColumnCreateWithoutTableInput[] | GenTableColumnUncheckedCreateWithoutTableInput[] connectOrCreate?: GenTableColumnCreateOrConnectWithoutTableInput | GenTableColumnCreateOrConnectWithoutTableInput[] createMany?: GenTableColumnCreateManyTableInputEnvelope connect?: GenTableColumnWhereUniqueInput | GenTableColumnWhereUniqueInput[] } export type NullableStringFieldUpdateOperationsInput = { set?: string | null } export type GenTableColumnUpdateManyWithoutTableNestedInput = { create?: XOR | GenTableColumnCreateWithoutTableInput[] | GenTableColumnUncheckedCreateWithoutTableInput[] connectOrCreate?: GenTableColumnCreateOrConnectWithoutTableInput | GenTableColumnCreateOrConnectWithoutTableInput[] upsert?: GenTableColumnUpsertWithWhereUniqueWithoutTableInput | GenTableColumnUpsertWithWhereUniqueWithoutTableInput[] createMany?: GenTableColumnCreateManyTableInputEnvelope set?: GenTableColumnWhereUniqueInput | GenTableColumnWhereUniqueInput[] disconnect?: GenTableColumnWhereUniqueInput | GenTableColumnWhereUniqueInput[] delete?: GenTableColumnWhereUniqueInput | GenTableColumnWhereUniqueInput[] connect?: GenTableColumnWhereUniqueInput | GenTableColumnWhereUniqueInput[] update?: GenTableColumnUpdateWithWhereUniqueWithoutTableInput | GenTableColumnUpdateWithWhereUniqueWithoutTableInput[] updateMany?: GenTableColumnUpdateManyWithWhereWithoutTableInput | GenTableColumnUpdateManyWithWhereWithoutTableInput[] deleteMany?: GenTableColumnScalarWhereInput | GenTableColumnScalarWhereInput[] } export type IntFieldUpdateOperationsInput = { set?: number increment?: number decrement?: number multiply?: number divide?: number } export type GenTableColumnUncheckedUpdateManyWithoutTableNestedInput = { create?: XOR | GenTableColumnCreateWithoutTableInput[] | GenTableColumnUncheckedCreateWithoutTableInput[] connectOrCreate?: GenTableColumnCreateOrConnectWithoutTableInput | GenTableColumnCreateOrConnectWithoutTableInput[] upsert?: GenTableColumnUpsertWithWhereUniqueWithoutTableInput | GenTableColumnUpsertWithWhereUniqueWithoutTableInput[] createMany?: GenTableColumnCreateManyTableInputEnvelope set?: GenTableColumnWhereUniqueInput | GenTableColumnWhereUniqueInput[] disconnect?: GenTableColumnWhereUniqueInput | GenTableColumnWhereUniqueInput[] delete?: GenTableColumnWhereUniqueInput | GenTableColumnWhereUniqueInput[] connect?: GenTableColumnWhereUniqueInput | GenTableColumnWhereUniqueInput[] update?: GenTableColumnUpdateWithWhereUniqueWithoutTableInput | GenTableColumnUpdateWithWhereUniqueWithoutTableInput[] updateMany?: GenTableColumnUpdateManyWithWhereWithoutTableInput | GenTableColumnUpdateManyWithWhereWithoutTableInput[] deleteMany?: GenTableColumnScalarWhereInput | GenTableColumnScalarWhereInput[] } export type GenTableCreateNestedOneWithoutTableColumnsInput = { create?: XOR connectOrCreate?: GenTableCreateOrConnectWithoutTableColumnsInput connect?: GenTableWhereUniqueInput } export type NullableIntFieldUpdateOperationsInput = { set?: number | null increment?: number decrement?: number multiply?: number divide?: number } export type GenTableUpdateOneWithoutTableColumnsNestedInput = { create?: XOR connectOrCreate?: GenTableCreateOrConnectWithoutTableColumnsInput upsert?: GenTableUpsertWithoutTableColumnsInput disconnect?: GenTableWhereInput | boolean delete?: GenTableWhereInput | boolean connect?: GenTableWhereUniqueInput update?: XOR, GenTableUncheckedUpdateWithoutTableColumnsInput> } export type SysUserCreateNestedManyWithoutDeptInput = { create?: XOR | SysUserCreateWithoutDeptInput[] | SysUserUncheckedCreateWithoutDeptInput[] connectOrCreate?: SysUserCreateOrConnectWithoutDeptInput | SysUserCreateOrConnectWithoutDeptInput[] createMany?: SysUserCreateManyDeptInputEnvelope connect?: SysUserWhereUniqueInput | SysUserWhereUniqueInput[] } export type SysRoleDeptCreateNestedManyWithoutDeptInput = { create?: XOR | SysRoleDeptCreateWithoutDeptInput[] | SysRoleDeptUncheckedCreateWithoutDeptInput[] connectOrCreate?: SysRoleDeptCreateOrConnectWithoutDeptInput | SysRoleDeptCreateOrConnectWithoutDeptInput[] createMany?: SysRoleDeptCreateManyDeptInputEnvelope connect?: SysRoleDeptWhereUniqueInput | SysRoleDeptWhereUniqueInput[] } export type SysUserUncheckedCreateNestedManyWithoutDeptInput = { create?: XOR | SysUserCreateWithoutDeptInput[] | SysUserUncheckedCreateWithoutDeptInput[] connectOrCreate?: SysUserCreateOrConnectWithoutDeptInput | SysUserCreateOrConnectWithoutDeptInput[] createMany?: SysUserCreateManyDeptInputEnvelope connect?: SysUserWhereUniqueInput | SysUserWhereUniqueInput[] } export type SysRoleDeptUncheckedCreateNestedManyWithoutDeptInput = { create?: XOR | SysRoleDeptCreateWithoutDeptInput[] | SysRoleDeptUncheckedCreateWithoutDeptInput[] connectOrCreate?: SysRoleDeptCreateOrConnectWithoutDeptInput | SysRoleDeptCreateOrConnectWithoutDeptInput[] createMany?: SysRoleDeptCreateManyDeptInputEnvelope connect?: SysRoleDeptWhereUniqueInput | SysRoleDeptWhereUniqueInput[] } export type SysUserUpdateManyWithoutDeptNestedInput = { create?: XOR | SysUserCreateWithoutDeptInput[] | SysUserUncheckedCreateWithoutDeptInput[] connectOrCreate?: SysUserCreateOrConnectWithoutDeptInput | SysUserCreateOrConnectWithoutDeptInput[] upsert?: SysUserUpsertWithWhereUniqueWithoutDeptInput | SysUserUpsertWithWhereUniqueWithoutDeptInput[] createMany?: SysUserCreateManyDeptInputEnvelope set?: SysUserWhereUniqueInput | SysUserWhereUniqueInput[] disconnect?: SysUserWhereUniqueInput | SysUserWhereUniqueInput[] delete?: SysUserWhereUniqueInput | SysUserWhereUniqueInput[] connect?: SysUserWhereUniqueInput | SysUserWhereUniqueInput[] update?: SysUserUpdateWithWhereUniqueWithoutDeptInput | SysUserUpdateWithWhereUniqueWithoutDeptInput[] updateMany?: SysUserUpdateManyWithWhereWithoutDeptInput | SysUserUpdateManyWithWhereWithoutDeptInput[] deleteMany?: SysUserScalarWhereInput | SysUserScalarWhereInput[] } export type SysRoleDeptUpdateManyWithoutDeptNestedInput = { create?: XOR | SysRoleDeptCreateWithoutDeptInput[] | SysRoleDeptUncheckedCreateWithoutDeptInput[] connectOrCreate?: SysRoleDeptCreateOrConnectWithoutDeptInput | SysRoleDeptCreateOrConnectWithoutDeptInput[] upsert?: SysRoleDeptUpsertWithWhereUniqueWithoutDeptInput | SysRoleDeptUpsertWithWhereUniqueWithoutDeptInput[] createMany?: SysRoleDeptCreateManyDeptInputEnvelope set?: SysRoleDeptWhereUniqueInput | SysRoleDeptWhereUniqueInput[] disconnect?: SysRoleDeptWhereUniqueInput | SysRoleDeptWhereUniqueInput[] delete?: SysRoleDeptWhereUniqueInput | SysRoleDeptWhereUniqueInput[] connect?: SysRoleDeptWhereUniqueInput | SysRoleDeptWhereUniqueInput[] update?: SysRoleDeptUpdateWithWhereUniqueWithoutDeptInput | SysRoleDeptUpdateWithWhereUniqueWithoutDeptInput[] updateMany?: SysRoleDeptUpdateManyWithWhereWithoutDeptInput | SysRoleDeptUpdateManyWithWhereWithoutDeptInput[] deleteMany?: SysRoleDeptScalarWhereInput | SysRoleDeptScalarWhereInput[] } export type SysUserUncheckedUpdateManyWithoutDeptNestedInput = { create?: XOR | SysUserCreateWithoutDeptInput[] | SysUserUncheckedCreateWithoutDeptInput[] connectOrCreate?: SysUserCreateOrConnectWithoutDeptInput | SysUserCreateOrConnectWithoutDeptInput[] upsert?: SysUserUpsertWithWhereUniqueWithoutDeptInput | SysUserUpsertWithWhereUniqueWithoutDeptInput[] createMany?: SysUserCreateManyDeptInputEnvelope set?: SysUserWhereUniqueInput | SysUserWhereUniqueInput[] disconnect?: SysUserWhereUniqueInput | SysUserWhereUniqueInput[] delete?: SysUserWhereUniqueInput | SysUserWhereUniqueInput[] connect?: SysUserWhereUniqueInput | SysUserWhereUniqueInput[] update?: SysUserUpdateWithWhereUniqueWithoutDeptInput | SysUserUpdateWithWhereUniqueWithoutDeptInput[] updateMany?: SysUserUpdateManyWithWhereWithoutDeptInput | SysUserUpdateManyWithWhereWithoutDeptInput[] deleteMany?: SysUserScalarWhereInput | SysUserScalarWhereInput[] } export type SysRoleDeptUncheckedUpdateManyWithoutDeptNestedInput = { create?: XOR | SysRoleDeptCreateWithoutDeptInput[] | SysRoleDeptUncheckedCreateWithoutDeptInput[] connectOrCreate?: SysRoleDeptCreateOrConnectWithoutDeptInput | SysRoleDeptCreateOrConnectWithoutDeptInput[] upsert?: SysRoleDeptUpsertWithWhereUniqueWithoutDeptInput | SysRoleDeptUpsertWithWhereUniqueWithoutDeptInput[] createMany?: SysRoleDeptCreateManyDeptInputEnvelope set?: SysRoleDeptWhereUniqueInput | SysRoleDeptWhereUniqueInput[] disconnect?: SysRoleDeptWhereUniqueInput | SysRoleDeptWhereUniqueInput[] delete?: SysRoleDeptWhereUniqueInput | SysRoleDeptWhereUniqueInput[] connect?: SysRoleDeptWhereUniqueInput | SysRoleDeptWhereUniqueInput[] update?: SysRoleDeptUpdateWithWhereUniqueWithoutDeptInput | SysRoleDeptUpdateWithWhereUniqueWithoutDeptInput[] updateMany?: SysRoleDeptUpdateManyWithWhereWithoutDeptInput | SysRoleDeptUpdateManyWithWhereWithoutDeptInput[] deleteMany?: SysRoleDeptScalarWhereInput | SysRoleDeptScalarWhereInput[] } export type SysDictTypeCreateNestedOneWithoutDictDatasInput = { create?: XOR connectOrCreate?: SysDictTypeCreateOrConnectWithoutDictDatasInput connect?: SysDictTypeWhereUniqueInput } export type SysDictTypeUpdateOneWithoutDictDatasNestedInput = { create?: XOR connectOrCreate?: SysDictTypeCreateOrConnectWithoutDictDatasInput upsert?: SysDictTypeUpsertWithoutDictDatasInput disconnect?: SysDictTypeWhereInput | boolean delete?: SysDictTypeWhereInput | boolean connect?: SysDictTypeWhereUniqueInput update?: XOR, SysDictTypeUncheckedUpdateWithoutDictDatasInput> } export type SysDictDataCreateNestedManyWithoutSysDictTypeInput = { create?: XOR | SysDictDataCreateWithoutSysDictTypeInput[] | SysDictDataUncheckedCreateWithoutSysDictTypeInput[] connectOrCreate?: SysDictDataCreateOrConnectWithoutSysDictTypeInput | SysDictDataCreateOrConnectWithoutSysDictTypeInput[] createMany?: SysDictDataCreateManySysDictTypeInputEnvelope connect?: SysDictDataWhereUniqueInput | SysDictDataWhereUniqueInput[] } export type SysDictDataUncheckedCreateNestedManyWithoutSysDictTypeInput = { create?: XOR | SysDictDataCreateWithoutSysDictTypeInput[] | SysDictDataUncheckedCreateWithoutSysDictTypeInput[] connectOrCreate?: SysDictDataCreateOrConnectWithoutSysDictTypeInput | SysDictDataCreateOrConnectWithoutSysDictTypeInput[] createMany?: SysDictDataCreateManySysDictTypeInputEnvelope connect?: SysDictDataWhereUniqueInput | SysDictDataWhereUniqueInput[] } export type SysDictDataUpdateManyWithoutSysDictTypeNestedInput = { create?: XOR | SysDictDataCreateWithoutSysDictTypeInput[] | SysDictDataUncheckedCreateWithoutSysDictTypeInput[] connectOrCreate?: SysDictDataCreateOrConnectWithoutSysDictTypeInput | SysDictDataCreateOrConnectWithoutSysDictTypeInput[] upsert?: SysDictDataUpsertWithWhereUniqueWithoutSysDictTypeInput | SysDictDataUpsertWithWhereUniqueWithoutSysDictTypeInput[] createMany?: SysDictDataCreateManySysDictTypeInputEnvelope set?: SysDictDataWhereUniqueInput | SysDictDataWhereUniqueInput[] disconnect?: SysDictDataWhereUniqueInput | SysDictDataWhereUniqueInput[] delete?: SysDictDataWhereUniqueInput | SysDictDataWhereUniqueInput[] connect?: SysDictDataWhereUniqueInput | SysDictDataWhereUniqueInput[] update?: SysDictDataUpdateWithWhereUniqueWithoutSysDictTypeInput | SysDictDataUpdateWithWhereUniqueWithoutSysDictTypeInput[] updateMany?: SysDictDataUpdateManyWithWhereWithoutSysDictTypeInput | SysDictDataUpdateManyWithWhereWithoutSysDictTypeInput[] deleteMany?: SysDictDataScalarWhereInput | SysDictDataScalarWhereInput[] } export type SysDictDataUncheckedUpdateManyWithoutSysDictTypeNestedInput = { create?: XOR | SysDictDataCreateWithoutSysDictTypeInput[] | SysDictDataUncheckedCreateWithoutSysDictTypeInput[] connectOrCreate?: SysDictDataCreateOrConnectWithoutSysDictTypeInput | SysDictDataCreateOrConnectWithoutSysDictTypeInput[] upsert?: SysDictDataUpsertWithWhereUniqueWithoutSysDictTypeInput | SysDictDataUpsertWithWhereUniqueWithoutSysDictTypeInput[] createMany?: SysDictDataCreateManySysDictTypeInputEnvelope set?: SysDictDataWhereUniqueInput | SysDictDataWhereUniqueInput[] disconnect?: SysDictDataWhereUniqueInput | SysDictDataWhereUniqueInput[] delete?: SysDictDataWhereUniqueInput | SysDictDataWhereUniqueInput[] connect?: SysDictDataWhereUniqueInput | SysDictDataWhereUniqueInput[] update?: SysDictDataUpdateWithWhereUniqueWithoutSysDictTypeInput | SysDictDataUpdateWithWhereUniqueWithoutSysDictTypeInput[] updateMany?: SysDictDataUpdateManyWithWhereWithoutSysDictTypeInput | SysDictDataUpdateManyWithWhereWithoutSysDictTypeInput[] deleteMany?: SysDictDataScalarWhereInput | SysDictDataScalarWhereInput[] } export type SysRoleMenuCreateNestedManyWithoutMenuInput = { create?: XOR | SysRoleMenuCreateWithoutMenuInput[] | SysRoleMenuUncheckedCreateWithoutMenuInput[] connectOrCreate?: SysRoleMenuCreateOrConnectWithoutMenuInput | SysRoleMenuCreateOrConnectWithoutMenuInput[] createMany?: SysRoleMenuCreateManyMenuInputEnvelope connect?: SysRoleMenuWhereUniqueInput | SysRoleMenuWhereUniqueInput[] } export type SysRoleMenuUncheckedCreateNestedManyWithoutMenuInput = { create?: XOR | SysRoleMenuCreateWithoutMenuInput[] | SysRoleMenuUncheckedCreateWithoutMenuInput[] connectOrCreate?: SysRoleMenuCreateOrConnectWithoutMenuInput | SysRoleMenuCreateOrConnectWithoutMenuInput[] createMany?: SysRoleMenuCreateManyMenuInputEnvelope connect?: SysRoleMenuWhereUniqueInput | SysRoleMenuWhereUniqueInput[] } export type StringFieldUpdateOperationsInput = { set?: string } export type SysRoleMenuUpdateManyWithoutMenuNestedInput = { create?: XOR | SysRoleMenuCreateWithoutMenuInput[] | SysRoleMenuUncheckedCreateWithoutMenuInput[] connectOrCreate?: SysRoleMenuCreateOrConnectWithoutMenuInput | SysRoleMenuCreateOrConnectWithoutMenuInput[] upsert?: SysRoleMenuUpsertWithWhereUniqueWithoutMenuInput | SysRoleMenuUpsertWithWhereUniqueWithoutMenuInput[] createMany?: SysRoleMenuCreateManyMenuInputEnvelope set?: SysRoleMenuWhereUniqueInput | SysRoleMenuWhereUniqueInput[] disconnect?: SysRoleMenuWhereUniqueInput | SysRoleMenuWhereUniqueInput[] delete?: SysRoleMenuWhereUniqueInput | SysRoleMenuWhereUniqueInput[] connect?: SysRoleMenuWhereUniqueInput | SysRoleMenuWhereUniqueInput[] update?: SysRoleMenuUpdateWithWhereUniqueWithoutMenuInput | SysRoleMenuUpdateWithWhereUniqueWithoutMenuInput[] updateMany?: SysRoleMenuUpdateManyWithWhereWithoutMenuInput | SysRoleMenuUpdateManyWithWhereWithoutMenuInput[] deleteMany?: SysRoleMenuScalarWhereInput | SysRoleMenuScalarWhereInput[] } export type SysRoleMenuUncheckedUpdateManyWithoutMenuNestedInput = { create?: XOR | SysRoleMenuCreateWithoutMenuInput[] | SysRoleMenuUncheckedCreateWithoutMenuInput[] connectOrCreate?: SysRoleMenuCreateOrConnectWithoutMenuInput | SysRoleMenuCreateOrConnectWithoutMenuInput[] upsert?: SysRoleMenuUpsertWithWhereUniqueWithoutMenuInput | SysRoleMenuUpsertWithWhereUniqueWithoutMenuInput[] createMany?: SysRoleMenuCreateManyMenuInputEnvelope set?: SysRoleMenuWhereUniqueInput | SysRoleMenuWhereUniqueInput[] disconnect?: SysRoleMenuWhereUniqueInput | SysRoleMenuWhereUniqueInput[] delete?: SysRoleMenuWhereUniqueInput | SysRoleMenuWhereUniqueInput[] connect?: SysRoleMenuWhereUniqueInput | SysRoleMenuWhereUniqueInput[] update?: SysRoleMenuUpdateWithWhereUniqueWithoutMenuInput | SysRoleMenuUpdateWithWhereUniqueWithoutMenuInput[] updateMany?: SysRoleMenuUpdateManyWithWhereWithoutMenuInput | SysRoleMenuUpdateManyWithWhereWithoutMenuInput[] deleteMany?: SysRoleMenuScalarWhereInput | SysRoleMenuScalarWhereInput[] } export type SysUserPostCreateNestedManyWithoutPostInput = { create?: XOR | SysUserPostCreateWithoutPostInput[] | SysUserPostUncheckedCreateWithoutPostInput[] connectOrCreate?: SysUserPostCreateOrConnectWithoutPostInput | SysUserPostCreateOrConnectWithoutPostInput[] createMany?: SysUserPostCreateManyPostInputEnvelope connect?: SysUserPostWhereUniqueInput | SysUserPostWhereUniqueInput[] } export type SysUserPostUncheckedCreateNestedManyWithoutPostInput = { create?: XOR | SysUserPostCreateWithoutPostInput[] | SysUserPostUncheckedCreateWithoutPostInput[] connectOrCreate?: SysUserPostCreateOrConnectWithoutPostInput | SysUserPostCreateOrConnectWithoutPostInput[] createMany?: SysUserPostCreateManyPostInputEnvelope connect?: SysUserPostWhereUniqueInput | SysUserPostWhereUniqueInput[] } export type SysUserPostUpdateManyWithoutPostNestedInput = { create?: XOR | SysUserPostCreateWithoutPostInput[] | SysUserPostUncheckedCreateWithoutPostInput[] connectOrCreate?: SysUserPostCreateOrConnectWithoutPostInput | SysUserPostCreateOrConnectWithoutPostInput[] upsert?: SysUserPostUpsertWithWhereUniqueWithoutPostInput | SysUserPostUpsertWithWhereUniqueWithoutPostInput[] createMany?: SysUserPostCreateManyPostInputEnvelope set?: SysUserPostWhereUniqueInput | SysUserPostWhereUniqueInput[] disconnect?: SysUserPostWhereUniqueInput | SysUserPostWhereUniqueInput[] delete?: SysUserPostWhereUniqueInput | SysUserPostWhereUniqueInput[] connect?: SysUserPostWhereUniqueInput | SysUserPostWhereUniqueInput[] update?: SysUserPostUpdateWithWhereUniqueWithoutPostInput | SysUserPostUpdateWithWhereUniqueWithoutPostInput[] updateMany?: SysUserPostUpdateManyWithWhereWithoutPostInput | SysUserPostUpdateManyWithWhereWithoutPostInput[] deleteMany?: SysUserPostScalarWhereInput | SysUserPostScalarWhereInput[] } export type SysUserPostUncheckedUpdateManyWithoutPostNestedInput = { create?: XOR | SysUserPostCreateWithoutPostInput[] | SysUserPostUncheckedCreateWithoutPostInput[] connectOrCreate?: SysUserPostCreateOrConnectWithoutPostInput | SysUserPostCreateOrConnectWithoutPostInput[] upsert?: SysUserPostUpsertWithWhereUniqueWithoutPostInput | SysUserPostUpsertWithWhereUniqueWithoutPostInput[] createMany?: SysUserPostCreateManyPostInputEnvelope set?: SysUserPostWhereUniqueInput | SysUserPostWhereUniqueInput[] disconnect?: SysUserPostWhereUniqueInput | SysUserPostWhereUniqueInput[] delete?: SysUserPostWhereUniqueInput | SysUserPostWhereUniqueInput[] connect?: SysUserPostWhereUniqueInput | SysUserPostWhereUniqueInput[] update?: SysUserPostUpdateWithWhereUniqueWithoutPostInput | SysUserPostUpdateWithWhereUniqueWithoutPostInput[] updateMany?: SysUserPostUpdateManyWithWhereWithoutPostInput | SysUserPostUpdateManyWithWhereWithoutPostInput[] deleteMany?: SysUserPostScalarWhereInput | SysUserPostScalarWhereInput[] } export type SysUserCreateNestedOneWithoutPostsInput = { create?: XOR connectOrCreate?: SysUserCreateOrConnectWithoutPostsInput connect?: SysUserWhereUniqueInput } export type SysPostCreateNestedOneWithoutUsersInput = { create?: XOR connectOrCreate?: SysPostCreateOrConnectWithoutUsersInput connect?: SysPostWhereUniqueInput } export type SysUserUpdateOneRequiredWithoutPostsNestedInput = { create?: XOR connectOrCreate?: SysUserCreateOrConnectWithoutPostsInput upsert?: SysUserUpsertWithoutPostsInput connect?: SysUserWhereUniqueInput update?: XOR, SysUserUncheckedUpdateWithoutPostsInput> } export type SysPostUpdateOneRequiredWithoutUsersNestedInput = { create?: XOR connectOrCreate?: SysPostCreateOrConnectWithoutUsersInput upsert?: SysPostUpsertWithoutUsersInput connect?: SysPostWhereUniqueInput update?: XOR, SysPostUncheckedUpdateWithoutUsersInput> } export type SysRoleCreateNestedOneWithoutDeptsInput = { create?: XOR connectOrCreate?: SysRoleCreateOrConnectWithoutDeptsInput connect?: SysRoleWhereUniqueInput } export type SysDeptCreateNestedOneWithoutRolesInput = { create?: XOR connectOrCreate?: SysDeptCreateOrConnectWithoutRolesInput connect?: SysDeptWhereUniqueInput } export type SysRoleUpdateOneRequiredWithoutDeptsNestedInput = { create?: XOR connectOrCreate?: SysRoleCreateOrConnectWithoutDeptsInput upsert?: SysRoleUpsertWithoutDeptsInput connect?: SysRoleWhereUniqueInput update?: XOR, SysRoleUncheckedUpdateWithoutDeptsInput> } export type SysDeptUpdateOneRequiredWithoutRolesNestedInput = { create?: XOR connectOrCreate?: SysDeptCreateOrConnectWithoutRolesInput upsert?: SysDeptUpsertWithoutRolesInput connect?: SysDeptWhereUniqueInput update?: XOR, SysDeptUncheckedUpdateWithoutRolesInput> } export type SysMenuCreateNestedOneWithoutRolesInput = { create?: XOR connectOrCreate?: SysMenuCreateOrConnectWithoutRolesInput connect?: SysMenuWhereUniqueInput } export type SysRoleCreateNestedOneWithoutMenusInput = { create?: XOR connectOrCreate?: SysRoleCreateOrConnectWithoutMenusInput connect?: SysRoleWhereUniqueInput } export type SysMenuUpdateOneRequiredWithoutRolesNestedInput = { create?: XOR connectOrCreate?: SysMenuCreateOrConnectWithoutRolesInput upsert?: SysMenuUpsertWithoutRolesInput connect?: SysMenuWhereUniqueInput update?: XOR, SysMenuUncheckedUpdateWithoutRolesInput> } export type SysRoleUpdateOneRequiredWithoutMenusNestedInput = { create?: XOR connectOrCreate?: SysRoleCreateOrConnectWithoutMenusInput upsert?: SysRoleUpsertWithoutMenusInput connect?: SysRoleWhereUniqueInput update?: XOR, SysRoleUncheckedUpdateWithoutMenusInput> } export type SysDeptCreateNestedOneWithoutUsersInput = { create?: XOR connectOrCreate?: SysDeptCreateOrConnectWithoutUsersInput connect?: SysDeptWhereUniqueInput } export type SysUserRoleCreateNestedManyWithoutUserInput = { create?: XOR | SysUserRoleCreateWithoutUserInput[] | SysUserRoleUncheckedCreateWithoutUserInput[] connectOrCreate?: SysUserRoleCreateOrConnectWithoutUserInput | SysUserRoleCreateOrConnectWithoutUserInput[] createMany?: SysUserRoleCreateManyUserInputEnvelope connect?: SysUserRoleWhereUniqueInput | SysUserRoleWhereUniqueInput[] } export type SysUserPostCreateNestedManyWithoutUserInput = { create?: XOR | SysUserPostCreateWithoutUserInput[] | SysUserPostUncheckedCreateWithoutUserInput[] connectOrCreate?: SysUserPostCreateOrConnectWithoutUserInput | SysUserPostCreateOrConnectWithoutUserInput[] createMany?: SysUserPostCreateManyUserInputEnvelope connect?: SysUserPostWhereUniqueInput | SysUserPostWhereUniqueInput[] } export type SysUserRoleUncheckedCreateNestedManyWithoutUserInput = { create?: XOR | SysUserRoleCreateWithoutUserInput[] | SysUserRoleUncheckedCreateWithoutUserInput[] connectOrCreate?: SysUserRoleCreateOrConnectWithoutUserInput | SysUserRoleCreateOrConnectWithoutUserInput[] createMany?: SysUserRoleCreateManyUserInputEnvelope connect?: SysUserRoleWhereUniqueInput | SysUserRoleWhereUniqueInput[] } export type SysUserPostUncheckedCreateNestedManyWithoutUserInput = { create?: XOR | SysUserPostCreateWithoutUserInput[] | SysUserPostUncheckedCreateWithoutUserInput[] connectOrCreate?: SysUserPostCreateOrConnectWithoutUserInput | SysUserPostCreateOrConnectWithoutUserInput[] createMany?: SysUserPostCreateManyUserInputEnvelope connect?: SysUserPostWhereUniqueInput | SysUserPostWhereUniqueInput[] } export type SysDeptUpdateOneWithoutUsersNestedInput = { create?: XOR connectOrCreate?: SysDeptCreateOrConnectWithoutUsersInput upsert?: SysDeptUpsertWithoutUsersInput disconnect?: SysDeptWhereInput | boolean delete?: SysDeptWhereInput | boolean connect?: SysDeptWhereUniqueInput update?: XOR, SysDeptUncheckedUpdateWithoutUsersInput> } export type SysUserRoleUpdateManyWithoutUserNestedInput = { create?: XOR | SysUserRoleCreateWithoutUserInput[] | SysUserRoleUncheckedCreateWithoutUserInput[] connectOrCreate?: SysUserRoleCreateOrConnectWithoutUserInput | SysUserRoleCreateOrConnectWithoutUserInput[] upsert?: SysUserRoleUpsertWithWhereUniqueWithoutUserInput | SysUserRoleUpsertWithWhereUniqueWithoutUserInput[] createMany?: SysUserRoleCreateManyUserInputEnvelope set?: SysUserRoleWhereUniqueInput | SysUserRoleWhereUniqueInput[] disconnect?: SysUserRoleWhereUniqueInput | SysUserRoleWhereUniqueInput[] delete?: SysUserRoleWhereUniqueInput | SysUserRoleWhereUniqueInput[] connect?: SysUserRoleWhereUniqueInput | SysUserRoleWhereUniqueInput[] update?: SysUserRoleUpdateWithWhereUniqueWithoutUserInput | SysUserRoleUpdateWithWhereUniqueWithoutUserInput[] updateMany?: SysUserRoleUpdateManyWithWhereWithoutUserInput | SysUserRoleUpdateManyWithWhereWithoutUserInput[] deleteMany?: SysUserRoleScalarWhereInput | SysUserRoleScalarWhereInput[] } export type SysUserPostUpdateManyWithoutUserNestedInput = { create?: XOR | SysUserPostCreateWithoutUserInput[] | SysUserPostUncheckedCreateWithoutUserInput[] connectOrCreate?: SysUserPostCreateOrConnectWithoutUserInput | SysUserPostCreateOrConnectWithoutUserInput[] upsert?: SysUserPostUpsertWithWhereUniqueWithoutUserInput | SysUserPostUpsertWithWhereUniqueWithoutUserInput[] createMany?: SysUserPostCreateManyUserInputEnvelope set?: SysUserPostWhereUniqueInput | SysUserPostWhereUniqueInput[] disconnect?: SysUserPostWhereUniqueInput | SysUserPostWhereUniqueInput[] delete?: SysUserPostWhereUniqueInput | SysUserPostWhereUniqueInput[] connect?: SysUserPostWhereUniqueInput | SysUserPostWhereUniqueInput[] update?: SysUserPostUpdateWithWhereUniqueWithoutUserInput | SysUserPostUpdateWithWhereUniqueWithoutUserInput[] updateMany?: SysUserPostUpdateManyWithWhereWithoutUserInput | SysUserPostUpdateManyWithWhereWithoutUserInput[] deleteMany?: SysUserPostScalarWhereInput | SysUserPostScalarWhereInput[] } export type SysUserRoleUncheckedUpdateManyWithoutUserNestedInput = { create?: XOR | SysUserRoleCreateWithoutUserInput[] | SysUserRoleUncheckedCreateWithoutUserInput[] connectOrCreate?: SysUserRoleCreateOrConnectWithoutUserInput | SysUserRoleCreateOrConnectWithoutUserInput[] upsert?: SysUserRoleUpsertWithWhereUniqueWithoutUserInput | SysUserRoleUpsertWithWhereUniqueWithoutUserInput[] createMany?: SysUserRoleCreateManyUserInputEnvelope set?: SysUserRoleWhereUniqueInput | SysUserRoleWhereUniqueInput[] disconnect?: SysUserRoleWhereUniqueInput | SysUserRoleWhereUniqueInput[] delete?: SysUserRoleWhereUniqueInput | SysUserRoleWhereUniqueInput[] connect?: SysUserRoleWhereUniqueInput | SysUserRoleWhereUniqueInput[] update?: SysUserRoleUpdateWithWhereUniqueWithoutUserInput | SysUserRoleUpdateWithWhereUniqueWithoutUserInput[] updateMany?: SysUserRoleUpdateManyWithWhereWithoutUserInput | SysUserRoleUpdateManyWithWhereWithoutUserInput[] deleteMany?: SysUserRoleScalarWhereInput | SysUserRoleScalarWhereInput[] } export type SysUserPostUncheckedUpdateManyWithoutUserNestedInput = { create?: XOR | SysUserPostCreateWithoutUserInput[] | SysUserPostUncheckedCreateWithoutUserInput[] connectOrCreate?: SysUserPostCreateOrConnectWithoutUserInput | SysUserPostCreateOrConnectWithoutUserInput[] upsert?: SysUserPostUpsertWithWhereUniqueWithoutUserInput | SysUserPostUpsertWithWhereUniqueWithoutUserInput[] createMany?: SysUserPostCreateManyUserInputEnvelope set?: SysUserPostWhereUniqueInput | SysUserPostWhereUniqueInput[] disconnect?: SysUserPostWhereUniqueInput | SysUserPostWhereUniqueInput[] delete?: SysUserPostWhereUniqueInput | SysUserPostWhereUniqueInput[] connect?: SysUserPostWhereUniqueInput | SysUserPostWhereUniqueInput[] update?: SysUserPostUpdateWithWhereUniqueWithoutUserInput | SysUserPostUpdateWithWhereUniqueWithoutUserInput[] updateMany?: SysUserPostUpdateManyWithWhereWithoutUserInput | SysUserPostUpdateManyWithWhereWithoutUserInput[] deleteMany?: SysUserPostScalarWhereInput | SysUserPostScalarWhereInput[] } export type SysUserRoleCreateNestedManyWithoutRoleInput = { create?: XOR | SysUserRoleCreateWithoutRoleInput[] | SysUserRoleUncheckedCreateWithoutRoleInput[] connectOrCreate?: SysUserRoleCreateOrConnectWithoutRoleInput | SysUserRoleCreateOrConnectWithoutRoleInput[] createMany?: SysUserRoleCreateManyRoleInputEnvelope connect?: SysUserRoleWhereUniqueInput | SysUserRoleWhereUniqueInput[] } export type SysRoleMenuCreateNestedManyWithoutRoleInput = { create?: XOR | SysRoleMenuCreateWithoutRoleInput[] | SysRoleMenuUncheckedCreateWithoutRoleInput[] connectOrCreate?: SysRoleMenuCreateOrConnectWithoutRoleInput | SysRoleMenuCreateOrConnectWithoutRoleInput[] createMany?: SysRoleMenuCreateManyRoleInputEnvelope connect?: SysRoleMenuWhereUniqueInput | SysRoleMenuWhereUniqueInput[] } export type SysRoleDeptCreateNestedManyWithoutRoleInput = { create?: XOR | SysRoleDeptCreateWithoutRoleInput[] | SysRoleDeptUncheckedCreateWithoutRoleInput[] connectOrCreate?: SysRoleDeptCreateOrConnectWithoutRoleInput | SysRoleDeptCreateOrConnectWithoutRoleInput[] createMany?: SysRoleDeptCreateManyRoleInputEnvelope connect?: SysRoleDeptWhereUniqueInput | SysRoleDeptWhereUniqueInput[] } export type SysUserRoleUncheckedCreateNestedManyWithoutRoleInput = { create?: XOR | SysUserRoleCreateWithoutRoleInput[] | SysUserRoleUncheckedCreateWithoutRoleInput[] connectOrCreate?: SysUserRoleCreateOrConnectWithoutRoleInput | SysUserRoleCreateOrConnectWithoutRoleInput[] createMany?: SysUserRoleCreateManyRoleInputEnvelope connect?: SysUserRoleWhereUniqueInput | SysUserRoleWhereUniqueInput[] } export type SysRoleMenuUncheckedCreateNestedManyWithoutRoleInput = { create?: XOR | SysRoleMenuCreateWithoutRoleInput[] | SysRoleMenuUncheckedCreateWithoutRoleInput[] connectOrCreate?: SysRoleMenuCreateOrConnectWithoutRoleInput | SysRoleMenuCreateOrConnectWithoutRoleInput[] createMany?: SysRoleMenuCreateManyRoleInputEnvelope connect?: SysRoleMenuWhereUniqueInput | SysRoleMenuWhereUniqueInput[] } export type SysRoleDeptUncheckedCreateNestedManyWithoutRoleInput = { create?: XOR | SysRoleDeptCreateWithoutRoleInput[] | SysRoleDeptUncheckedCreateWithoutRoleInput[] connectOrCreate?: SysRoleDeptCreateOrConnectWithoutRoleInput | SysRoleDeptCreateOrConnectWithoutRoleInput[] createMany?: SysRoleDeptCreateManyRoleInputEnvelope connect?: SysRoleDeptWhereUniqueInput | SysRoleDeptWhereUniqueInput[] } export type SysUserRoleUpdateManyWithoutRoleNestedInput = { create?: XOR | SysUserRoleCreateWithoutRoleInput[] | SysUserRoleUncheckedCreateWithoutRoleInput[] connectOrCreate?: SysUserRoleCreateOrConnectWithoutRoleInput | SysUserRoleCreateOrConnectWithoutRoleInput[] upsert?: SysUserRoleUpsertWithWhereUniqueWithoutRoleInput | SysUserRoleUpsertWithWhereUniqueWithoutRoleInput[] createMany?: SysUserRoleCreateManyRoleInputEnvelope set?: SysUserRoleWhereUniqueInput | SysUserRoleWhereUniqueInput[] disconnect?: SysUserRoleWhereUniqueInput | SysUserRoleWhereUniqueInput[] delete?: SysUserRoleWhereUniqueInput | SysUserRoleWhereUniqueInput[] connect?: SysUserRoleWhereUniqueInput | SysUserRoleWhereUniqueInput[] update?: SysUserRoleUpdateWithWhereUniqueWithoutRoleInput | SysUserRoleUpdateWithWhereUniqueWithoutRoleInput[] updateMany?: SysUserRoleUpdateManyWithWhereWithoutRoleInput | SysUserRoleUpdateManyWithWhereWithoutRoleInput[] deleteMany?: SysUserRoleScalarWhereInput | SysUserRoleScalarWhereInput[] } export type SysRoleMenuUpdateManyWithoutRoleNestedInput = { create?: XOR | SysRoleMenuCreateWithoutRoleInput[] | SysRoleMenuUncheckedCreateWithoutRoleInput[] connectOrCreate?: SysRoleMenuCreateOrConnectWithoutRoleInput | SysRoleMenuCreateOrConnectWithoutRoleInput[] upsert?: SysRoleMenuUpsertWithWhereUniqueWithoutRoleInput | SysRoleMenuUpsertWithWhereUniqueWithoutRoleInput[] createMany?: SysRoleMenuCreateManyRoleInputEnvelope set?: SysRoleMenuWhereUniqueInput | SysRoleMenuWhereUniqueInput[] disconnect?: SysRoleMenuWhereUniqueInput | SysRoleMenuWhereUniqueInput[] delete?: SysRoleMenuWhereUniqueInput | SysRoleMenuWhereUniqueInput[] connect?: SysRoleMenuWhereUniqueInput | SysRoleMenuWhereUniqueInput[] update?: SysRoleMenuUpdateWithWhereUniqueWithoutRoleInput | SysRoleMenuUpdateWithWhereUniqueWithoutRoleInput[] updateMany?: SysRoleMenuUpdateManyWithWhereWithoutRoleInput | SysRoleMenuUpdateManyWithWhereWithoutRoleInput[] deleteMany?: SysRoleMenuScalarWhereInput | SysRoleMenuScalarWhereInput[] } export type SysRoleDeptUpdateManyWithoutRoleNestedInput = { create?: XOR | SysRoleDeptCreateWithoutRoleInput[] | SysRoleDeptUncheckedCreateWithoutRoleInput[] connectOrCreate?: SysRoleDeptCreateOrConnectWithoutRoleInput | SysRoleDeptCreateOrConnectWithoutRoleInput[] upsert?: SysRoleDeptUpsertWithWhereUniqueWithoutRoleInput | SysRoleDeptUpsertWithWhereUniqueWithoutRoleInput[] createMany?: SysRoleDeptCreateManyRoleInputEnvelope set?: SysRoleDeptWhereUniqueInput | SysRoleDeptWhereUniqueInput[] disconnect?: SysRoleDeptWhereUniqueInput | SysRoleDeptWhereUniqueInput[] delete?: SysRoleDeptWhereUniqueInput | SysRoleDeptWhereUniqueInput[] connect?: SysRoleDeptWhereUniqueInput | SysRoleDeptWhereUniqueInput[] update?: SysRoleDeptUpdateWithWhereUniqueWithoutRoleInput | SysRoleDeptUpdateWithWhereUniqueWithoutRoleInput[] updateMany?: SysRoleDeptUpdateManyWithWhereWithoutRoleInput | SysRoleDeptUpdateManyWithWhereWithoutRoleInput[] deleteMany?: SysRoleDeptScalarWhereInput | SysRoleDeptScalarWhereInput[] } export type SysUserRoleUncheckedUpdateManyWithoutRoleNestedInput = { create?: XOR | SysUserRoleCreateWithoutRoleInput[] | SysUserRoleUncheckedCreateWithoutRoleInput[] connectOrCreate?: SysUserRoleCreateOrConnectWithoutRoleInput | SysUserRoleCreateOrConnectWithoutRoleInput[] upsert?: SysUserRoleUpsertWithWhereUniqueWithoutRoleInput | SysUserRoleUpsertWithWhereUniqueWithoutRoleInput[] createMany?: SysUserRoleCreateManyRoleInputEnvelope set?: SysUserRoleWhereUniqueInput | SysUserRoleWhereUniqueInput[] disconnect?: SysUserRoleWhereUniqueInput | SysUserRoleWhereUniqueInput[] delete?: SysUserRoleWhereUniqueInput | SysUserRoleWhereUniqueInput[] connect?: SysUserRoleWhereUniqueInput | SysUserRoleWhereUniqueInput[] update?: SysUserRoleUpdateWithWhereUniqueWithoutRoleInput | SysUserRoleUpdateWithWhereUniqueWithoutRoleInput[] updateMany?: SysUserRoleUpdateManyWithWhereWithoutRoleInput | SysUserRoleUpdateManyWithWhereWithoutRoleInput[] deleteMany?: SysUserRoleScalarWhereInput | SysUserRoleScalarWhereInput[] } export type SysRoleMenuUncheckedUpdateManyWithoutRoleNestedInput = { create?: XOR | SysRoleMenuCreateWithoutRoleInput[] | SysRoleMenuUncheckedCreateWithoutRoleInput[] connectOrCreate?: SysRoleMenuCreateOrConnectWithoutRoleInput | SysRoleMenuCreateOrConnectWithoutRoleInput[] upsert?: SysRoleMenuUpsertWithWhereUniqueWithoutRoleInput | SysRoleMenuUpsertWithWhereUniqueWithoutRoleInput[] createMany?: SysRoleMenuCreateManyRoleInputEnvelope set?: SysRoleMenuWhereUniqueInput | SysRoleMenuWhereUniqueInput[] disconnect?: SysRoleMenuWhereUniqueInput | SysRoleMenuWhereUniqueInput[] delete?: SysRoleMenuWhereUniqueInput | SysRoleMenuWhereUniqueInput[] connect?: SysRoleMenuWhereUniqueInput | SysRoleMenuWhereUniqueInput[] update?: SysRoleMenuUpdateWithWhereUniqueWithoutRoleInput | SysRoleMenuUpdateWithWhereUniqueWithoutRoleInput[] updateMany?: SysRoleMenuUpdateManyWithWhereWithoutRoleInput | SysRoleMenuUpdateManyWithWhereWithoutRoleInput[] deleteMany?: SysRoleMenuScalarWhereInput | SysRoleMenuScalarWhereInput[] } export type SysRoleDeptUncheckedUpdateManyWithoutRoleNestedInput = { create?: XOR | SysRoleDeptCreateWithoutRoleInput[] | SysRoleDeptUncheckedCreateWithoutRoleInput[] connectOrCreate?: SysRoleDeptCreateOrConnectWithoutRoleInput | SysRoleDeptCreateOrConnectWithoutRoleInput[] upsert?: SysRoleDeptUpsertWithWhereUniqueWithoutRoleInput | SysRoleDeptUpsertWithWhereUniqueWithoutRoleInput[] createMany?: SysRoleDeptCreateManyRoleInputEnvelope set?: SysRoleDeptWhereUniqueInput | SysRoleDeptWhereUniqueInput[] disconnect?: SysRoleDeptWhereUniqueInput | SysRoleDeptWhereUniqueInput[] delete?: SysRoleDeptWhereUniqueInput | SysRoleDeptWhereUniqueInput[] connect?: SysRoleDeptWhereUniqueInput | SysRoleDeptWhereUniqueInput[] update?: SysRoleDeptUpdateWithWhereUniqueWithoutRoleInput | SysRoleDeptUpdateWithWhereUniqueWithoutRoleInput[] updateMany?: SysRoleDeptUpdateManyWithWhereWithoutRoleInput | SysRoleDeptUpdateManyWithWhereWithoutRoleInput[] deleteMany?: SysRoleDeptScalarWhereInput | SysRoleDeptScalarWhereInput[] } export type SysUserCreateNestedOneWithoutRolesInput = { create?: XOR connectOrCreate?: SysUserCreateOrConnectWithoutRolesInput connect?: SysUserWhereUniqueInput } export type SysRoleCreateNestedOneWithoutUsersInput = { create?: XOR connectOrCreate?: SysRoleCreateOrConnectWithoutUsersInput connect?: SysRoleWhereUniqueInput } export type SysUserUpdateOneRequiredWithoutRolesNestedInput = { create?: XOR connectOrCreate?: SysUserCreateOrConnectWithoutRolesInput upsert?: SysUserUpsertWithoutRolesInput connect?: SysUserWhereUniqueInput update?: XOR, SysUserUncheckedUpdateWithoutRolesInput> } export type SysRoleUpdateOneRequiredWithoutUsersNestedInput = { create?: XOR connectOrCreate?: SysRoleCreateOrConnectWithoutUsersInput upsert?: SysRoleUpsertWithoutUsersInput connect?: SysRoleWhereUniqueInput update?: XOR, SysRoleUncheckedUpdateWithoutUsersInput> } export type NestedIntFilter<$PrismaModel = never> = { equals?: number | IntFieldRefInput<$PrismaModel> in?: number[] notIn?: number[] lt?: number | IntFieldRefInput<$PrismaModel> lte?: number | IntFieldRefInput<$PrismaModel> gt?: number | IntFieldRefInput<$PrismaModel> gte?: number | IntFieldRefInput<$PrismaModel> not?: NestedIntFilter<$PrismaModel> | number } export type NestedStringNullableFilter<$PrismaModel = never> = { equals?: string | StringFieldRefInput<$PrismaModel> | null in?: string[] | null notIn?: string[] | null lt?: string | StringFieldRefInput<$PrismaModel> lte?: string | StringFieldRefInput<$PrismaModel> gt?: string | StringFieldRefInput<$PrismaModel> gte?: string | StringFieldRefInput<$PrismaModel> contains?: string | StringFieldRefInput<$PrismaModel> startsWith?: string | StringFieldRefInput<$PrismaModel> endsWith?: string | StringFieldRefInput<$PrismaModel> not?: NestedStringNullableFilter<$PrismaModel> | string | null } export type NestedIntWithAggregatesFilter<$PrismaModel = never> = { equals?: number | IntFieldRefInput<$PrismaModel> in?: number[] notIn?: number[] lt?: number | IntFieldRefInput<$PrismaModel> lte?: number | IntFieldRefInput<$PrismaModel> gt?: number | IntFieldRefInput<$PrismaModel> gte?: number | IntFieldRefInput<$PrismaModel> not?: NestedIntWithAggregatesFilter<$PrismaModel> | number _count?: NestedIntFilter<$PrismaModel> _avg?: NestedFloatFilter<$PrismaModel> _sum?: NestedIntFilter<$PrismaModel> _min?: NestedIntFilter<$PrismaModel> _max?: NestedIntFilter<$PrismaModel> } export type NestedFloatFilter<$PrismaModel = never> = { equals?: number | FloatFieldRefInput<$PrismaModel> in?: number[] notIn?: number[] lt?: number | FloatFieldRefInput<$PrismaModel> lte?: number | FloatFieldRefInput<$PrismaModel> gt?: number | FloatFieldRefInput<$PrismaModel> gte?: number | FloatFieldRefInput<$PrismaModel> not?: NestedFloatFilter<$PrismaModel> | number } export type NestedStringNullableWithAggregatesFilter<$PrismaModel = never> = { equals?: string | StringFieldRefInput<$PrismaModel> | null in?: string[] | null notIn?: string[] | null lt?: string | StringFieldRefInput<$PrismaModel> lte?: string | StringFieldRefInput<$PrismaModel> gt?: string | StringFieldRefInput<$PrismaModel> gte?: string | StringFieldRefInput<$PrismaModel> contains?: string | StringFieldRefInput<$PrismaModel> startsWith?: string | StringFieldRefInput<$PrismaModel> endsWith?: string | StringFieldRefInput<$PrismaModel> not?: NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null _count?: NestedIntNullableFilter<$PrismaModel> _min?: NestedStringNullableFilter<$PrismaModel> _max?: NestedStringNullableFilter<$PrismaModel> } export type NestedIntNullableFilter<$PrismaModel = never> = { equals?: number | IntFieldRefInput<$PrismaModel> | null in?: number[] | null notIn?: number[] | null lt?: number | IntFieldRefInput<$PrismaModel> lte?: number | IntFieldRefInput<$PrismaModel> gt?: number | IntFieldRefInput<$PrismaModel> gte?: number | IntFieldRefInput<$PrismaModel> not?: NestedIntNullableFilter<$PrismaModel> | number | null } export type NestedIntNullableWithAggregatesFilter<$PrismaModel = never> = { equals?: number | IntFieldRefInput<$PrismaModel> | null in?: number[] | null notIn?: number[] | null lt?: number | IntFieldRefInput<$PrismaModel> lte?: number | IntFieldRefInput<$PrismaModel> gt?: number | IntFieldRefInput<$PrismaModel> gte?: number | IntFieldRefInput<$PrismaModel> not?: NestedIntNullableWithAggregatesFilter<$PrismaModel> | number | null _count?: NestedIntNullableFilter<$PrismaModel> _avg?: NestedFloatNullableFilter<$PrismaModel> _sum?: NestedIntNullableFilter<$PrismaModel> _min?: NestedIntNullableFilter<$PrismaModel> _max?: NestedIntNullableFilter<$PrismaModel> } export type NestedFloatNullableFilter<$PrismaModel = never> = { equals?: number | FloatFieldRefInput<$PrismaModel> | null in?: number[] | null notIn?: number[] | null lt?: number | FloatFieldRefInput<$PrismaModel> lte?: number | FloatFieldRefInput<$PrismaModel> gt?: number | FloatFieldRefInput<$PrismaModel> gte?: number | FloatFieldRefInput<$PrismaModel> not?: NestedFloatNullableFilter<$PrismaModel> | number | null } export type NestedStringFilter<$PrismaModel = never> = { equals?: string | StringFieldRefInput<$PrismaModel> in?: string[] notIn?: string[] lt?: string | StringFieldRefInput<$PrismaModel> lte?: string | StringFieldRefInput<$PrismaModel> gt?: string | StringFieldRefInput<$PrismaModel> gte?: string | StringFieldRefInput<$PrismaModel> contains?: string | StringFieldRefInput<$PrismaModel> startsWith?: string | StringFieldRefInput<$PrismaModel> endsWith?: string | StringFieldRefInput<$PrismaModel> not?: NestedStringFilter<$PrismaModel> | string } export type NestedStringWithAggregatesFilter<$PrismaModel = never> = { equals?: string | StringFieldRefInput<$PrismaModel> in?: string[] notIn?: string[] lt?: string | StringFieldRefInput<$PrismaModel> lte?: string | StringFieldRefInput<$PrismaModel> gt?: string | StringFieldRefInput<$PrismaModel> gte?: string | StringFieldRefInput<$PrismaModel> contains?: string | StringFieldRefInput<$PrismaModel> startsWith?: string | StringFieldRefInput<$PrismaModel> endsWith?: string | StringFieldRefInput<$PrismaModel> not?: NestedStringWithAggregatesFilter<$PrismaModel> | string _count?: NestedIntFilter<$PrismaModel> _min?: NestedStringFilter<$PrismaModel> _max?: NestedStringFilter<$PrismaModel> } export type GenTableColumnCreateWithoutTableInput = { columnName?: string | null columnComment?: string | null columnType?: string | null javaType?: string | null javaField?: string | null isPk?: string | null isIncrement?: string | null isRequired?: string | null isInsert?: string | null isEdit?: string | null isList?: string | null isQuery?: string | null queryType?: string | null htmlType?: string | null dictType?: string | null sort?: number | null createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null } export type GenTableColumnUncheckedCreateWithoutTableInput = { columnId?: number columnName?: string | null columnComment?: string | null columnType?: string | null javaType?: string | null javaField?: string | null isPk?: string | null isIncrement?: string | null isRequired?: string | null isInsert?: string | null isEdit?: string | null isList?: string | null isQuery?: string | null queryType?: string | null htmlType?: string | null dictType?: string | null sort?: number | null createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null } export type GenTableColumnCreateOrConnectWithoutTableInput = { where: GenTableColumnWhereUniqueInput create: XOR } export type GenTableColumnCreateManyTableInputEnvelope = { data: GenTableColumnCreateManyTableInput | GenTableColumnCreateManyTableInput[] skipDuplicates?: boolean } export type GenTableColumnUpsertWithWhereUniqueWithoutTableInput = { where: GenTableColumnWhereUniqueInput update: XOR create: XOR } export type GenTableColumnUpdateWithWhereUniqueWithoutTableInput = { where: GenTableColumnWhereUniqueInput data: XOR } export type GenTableColumnUpdateManyWithWhereWithoutTableInput = { where: GenTableColumnScalarWhereInput data: XOR } export type GenTableColumnScalarWhereInput = { AND?: GenTableColumnScalarWhereInput | GenTableColumnScalarWhereInput[] OR?: GenTableColumnScalarWhereInput[] NOT?: GenTableColumnScalarWhereInput | GenTableColumnScalarWhereInput[] columnId?: IntFilter<"GenTableColumn"> | number tableId?: IntNullableFilter<"GenTableColumn"> | number | null columnName?: StringNullableFilter<"GenTableColumn"> | string | null columnComment?: StringNullableFilter<"GenTableColumn"> | string | null columnType?: StringNullableFilter<"GenTableColumn"> | string | null javaType?: StringNullableFilter<"GenTableColumn"> | string | null javaField?: StringNullableFilter<"GenTableColumn"> | string | null isPk?: StringNullableFilter<"GenTableColumn"> | string | null isIncrement?: StringNullableFilter<"GenTableColumn"> | string | null isRequired?: StringNullableFilter<"GenTableColumn"> | string | null isInsert?: StringNullableFilter<"GenTableColumn"> | string | null isEdit?: StringNullableFilter<"GenTableColumn"> | string | null isList?: StringNullableFilter<"GenTableColumn"> | string | null isQuery?: StringNullableFilter<"GenTableColumn"> | string | null queryType?: StringNullableFilter<"GenTableColumn"> | string | null htmlType?: StringNullableFilter<"GenTableColumn"> | string | null dictType?: StringNullableFilter<"GenTableColumn"> | string | null sort?: IntNullableFilter<"GenTableColumn"> | number | null createBy?: StringNullableFilter<"GenTableColumn"> | string | null createTime?: StringNullableFilter<"GenTableColumn"> | string | null updateBy?: StringNullableFilter<"GenTableColumn"> | string | null updateTime?: StringNullableFilter<"GenTableColumn"> | string | null } export type GenTableCreateWithoutTableColumnsInput = { tableName?: string | null tableComment?: string | null subTableName?: string | null subTableFkName?: string | null className?: string | null tplCategory?: string | null tplWebType?: string | null packageName?: string | null moduleName?: string | null businessName?: string | null functionName?: string | null functionAuthor?: string | null genType?: string | null genPath?: string | null options?: string | null createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null remark?: string | null } export type GenTableUncheckedCreateWithoutTableColumnsInput = { tableId?: number tableName?: string | null tableComment?: string | null subTableName?: string | null subTableFkName?: string | null className?: string | null tplCategory?: string | null tplWebType?: string | null packageName?: string | null moduleName?: string | null businessName?: string | null functionName?: string | null functionAuthor?: string | null genType?: string | null genPath?: string | null options?: string | null createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null remark?: string | null } export type GenTableCreateOrConnectWithoutTableColumnsInput = { where: GenTableWhereUniqueInput create: XOR } export type GenTableUpsertWithoutTableColumnsInput = { update: XOR create: XOR where?: GenTableWhereInput } export type GenTableUpdateToOneWithWhereWithoutTableColumnsInput = { where?: GenTableWhereInput data: XOR } export type GenTableUpdateWithoutTableColumnsInput = { tableName?: NullableStringFieldUpdateOperationsInput | string | null tableComment?: NullableStringFieldUpdateOperationsInput | string | null subTableName?: NullableStringFieldUpdateOperationsInput | string | null subTableFkName?: NullableStringFieldUpdateOperationsInput | string | null className?: NullableStringFieldUpdateOperationsInput | string | null tplCategory?: NullableStringFieldUpdateOperationsInput | string | null tplWebType?: NullableStringFieldUpdateOperationsInput | string | null packageName?: NullableStringFieldUpdateOperationsInput | string | null moduleName?: NullableStringFieldUpdateOperationsInput | string | null businessName?: NullableStringFieldUpdateOperationsInput | string | null functionName?: NullableStringFieldUpdateOperationsInput | string | null functionAuthor?: NullableStringFieldUpdateOperationsInput | string | null genType?: NullableStringFieldUpdateOperationsInput | string | null genPath?: NullableStringFieldUpdateOperationsInput | string | null options?: NullableStringFieldUpdateOperationsInput | string | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null } export type GenTableUncheckedUpdateWithoutTableColumnsInput = { tableId?: IntFieldUpdateOperationsInput | number tableName?: NullableStringFieldUpdateOperationsInput | string | null tableComment?: NullableStringFieldUpdateOperationsInput | string | null subTableName?: NullableStringFieldUpdateOperationsInput | string | null subTableFkName?: NullableStringFieldUpdateOperationsInput | string | null className?: NullableStringFieldUpdateOperationsInput | string | null tplCategory?: NullableStringFieldUpdateOperationsInput | string | null tplWebType?: NullableStringFieldUpdateOperationsInput | string | null packageName?: NullableStringFieldUpdateOperationsInput | string | null moduleName?: NullableStringFieldUpdateOperationsInput | string | null businessName?: NullableStringFieldUpdateOperationsInput | string | null functionName?: NullableStringFieldUpdateOperationsInput | string | null functionAuthor?: NullableStringFieldUpdateOperationsInput | string | null genType?: NullableStringFieldUpdateOperationsInput | string | null genPath?: NullableStringFieldUpdateOperationsInput | string | null options?: NullableStringFieldUpdateOperationsInput | string | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null } export type SysUserCreateWithoutDeptInput = { userName: string nickName: string userType?: string | null email?: string | null phonenumber?: string | null sex?: string | null avatar?: string | null password?: string | null status?: string | null loginIp?: string | null loginDate?: string | null createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null remark?: string | null roles?: SysUserRoleCreateNestedManyWithoutUserInput posts?: SysUserPostCreateNestedManyWithoutUserInput } export type SysUserUncheckedCreateWithoutDeptInput = { userId?: number userName: string nickName: string userType?: string | null email?: string | null phonenumber?: string | null sex?: string | null avatar?: string | null password?: string | null status?: string | null loginIp?: string | null loginDate?: string | null createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null remark?: string | null roles?: SysUserRoleUncheckedCreateNestedManyWithoutUserInput posts?: SysUserPostUncheckedCreateNestedManyWithoutUserInput } export type SysUserCreateOrConnectWithoutDeptInput = { where: SysUserWhereUniqueInput create: XOR } export type SysUserCreateManyDeptInputEnvelope = { data: SysUserCreateManyDeptInput | SysUserCreateManyDeptInput[] skipDuplicates?: boolean } export type SysRoleDeptCreateWithoutDeptInput = { role: SysRoleCreateNestedOneWithoutDeptsInput } export type SysRoleDeptUncheckedCreateWithoutDeptInput = { roleId: number } export type SysRoleDeptCreateOrConnectWithoutDeptInput = { where: SysRoleDeptWhereUniqueInput create: XOR } export type SysRoleDeptCreateManyDeptInputEnvelope = { data: SysRoleDeptCreateManyDeptInput | SysRoleDeptCreateManyDeptInput[] skipDuplicates?: boolean } export type SysUserUpsertWithWhereUniqueWithoutDeptInput = { where: SysUserWhereUniqueInput update: XOR create: XOR } export type SysUserUpdateWithWhereUniqueWithoutDeptInput = { where: SysUserWhereUniqueInput data: XOR } export type SysUserUpdateManyWithWhereWithoutDeptInput = { where: SysUserScalarWhereInput data: XOR } export type SysUserScalarWhereInput = { AND?: SysUserScalarWhereInput | SysUserScalarWhereInput[] OR?: SysUserScalarWhereInput[] NOT?: SysUserScalarWhereInput | SysUserScalarWhereInput[] userId?: IntFilter<"SysUser"> | number deptId?: IntNullableFilter<"SysUser"> | number | null userName?: StringFilter<"SysUser"> | string nickName?: StringFilter<"SysUser"> | string userType?: StringNullableFilter<"SysUser"> | string | null email?: StringNullableFilter<"SysUser"> | string | null phonenumber?: StringNullableFilter<"SysUser"> | string | null sex?: StringNullableFilter<"SysUser"> | string | null avatar?: StringNullableFilter<"SysUser"> | string | null password?: StringNullableFilter<"SysUser"> | string | null status?: StringNullableFilter<"SysUser"> | string | null loginIp?: StringNullableFilter<"SysUser"> | string | null loginDate?: StringNullableFilter<"SysUser"> | string | null createBy?: StringNullableFilter<"SysUser"> | string | null createTime?: StringNullableFilter<"SysUser"> | string | null updateBy?: StringNullableFilter<"SysUser"> | string | null updateTime?: StringNullableFilter<"SysUser"> | string | null remark?: StringNullableFilter<"SysUser"> | string | null } export type SysRoleDeptUpsertWithWhereUniqueWithoutDeptInput = { where: SysRoleDeptWhereUniqueInput update: XOR create: XOR } export type SysRoleDeptUpdateWithWhereUniqueWithoutDeptInput = { where: SysRoleDeptWhereUniqueInput data: XOR } export type SysRoleDeptUpdateManyWithWhereWithoutDeptInput = { where: SysRoleDeptScalarWhereInput data: XOR } export type SysRoleDeptScalarWhereInput = { AND?: SysRoleDeptScalarWhereInput | SysRoleDeptScalarWhereInput[] OR?: SysRoleDeptScalarWhereInput[] NOT?: SysRoleDeptScalarWhereInput | SysRoleDeptScalarWhereInput[] roleId?: IntFilter<"SysRoleDept"> | number deptId?: IntFilter<"SysRoleDept"> | number } export type SysDictTypeCreateWithoutDictDatasInput = { dictName?: string | null dictType?: string | null status?: string | null createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null remark?: string | null } export type SysDictTypeUncheckedCreateWithoutDictDatasInput = { dictId?: number dictName?: string | null dictType?: string | null status?: string | null createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null remark?: string | null } export type SysDictTypeCreateOrConnectWithoutDictDatasInput = { where: SysDictTypeWhereUniqueInput create: XOR } export type SysDictTypeUpsertWithoutDictDatasInput = { update: XOR create: XOR where?: SysDictTypeWhereInput } export type SysDictTypeUpdateToOneWithWhereWithoutDictDatasInput = { where?: SysDictTypeWhereInput data: XOR } export type SysDictTypeUpdateWithoutDictDatasInput = { dictName?: NullableStringFieldUpdateOperationsInput | string | null dictType?: NullableStringFieldUpdateOperationsInput | string | null status?: NullableStringFieldUpdateOperationsInput | string | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null } export type SysDictTypeUncheckedUpdateWithoutDictDatasInput = { dictId?: IntFieldUpdateOperationsInput | number dictName?: NullableStringFieldUpdateOperationsInput | string | null dictType?: NullableStringFieldUpdateOperationsInput | string | null status?: NullableStringFieldUpdateOperationsInput | string | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null } export type SysDictDataCreateWithoutSysDictTypeInput = { dictSort?: number | null dictLabel?: string | null dictValue?: string | null cssClass?: string | null listClass?: string | null isDefault?: string | null status?: string | null createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null remark?: string | null } export type SysDictDataUncheckedCreateWithoutSysDictTypeInput = { dictCode?: number dictSort?: number | null dictLabel?: string | null dictValue?: string | null cssClass?: string | null listClass?: string | null isDefault?: string | null status?: string | null createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null remark?: string | null } export type SysDictDataCreateOrConnectWithoutSysDictTypeInput = { where: SysDictDataWhereUniqueInput create: XOR } export type SysDictDataCreateManySysDictTypeInputEnvelope = { data: SysDictDataCreateManySysDictTypeInput | SysDictDataCreateManySysDictTypeInput[] skipDuplicates?: boolean } export type SysDictDataUpsertWithWhereUniqueWithoutSysDictTypeInput = { where: SysDictDataWhereUniqueInput update: XOR create: XOR } export type SysDictDataUpdateWithWhereUniqueWithoutSysDictTypeInput = { where: SysDictDataWhereUniqueInput data: XOR } export type SysDictDataUpdateManyWithWhereWithoutSysDictTypeInput = { where: SysDictDataScalarWhereInput data: XOR } export type SysDictDataScalarWhereInput = { AND?: SysDictDataScalarWhereInput | SysDictDataScalarWhereInput[] OR?: SysDictDataScalarWhereInput[] NOT?: SysDictDataScalarWhereInput | SysDictDataScalarWhereInput[] dictCode?: IntFilter<"SysDictData"> | number dictSort?: IntNullableFilter<"SysDictData"> | number | null dictLabel?: StringNullableFilter<"SysDictData"> | string | null dictValue?: StringNullableFilter<"SysDictData"> | string | null dictType?: StringNullableFilter<"SysDictData"> | string | null cssClass?: StringNullableFilter<"SysDictData"> | string | null listClass?: StringNullableFilter<"SysDictData"> | string | null isDefault?: StringNullableFilter<"SysDictData"> | string | null status?: StringNullableFilter<"SysDictData"> | string | null createBy?: StringNullableFilter<"SysDictData"> | string | null createTime?: StringNullableFilter<"SysDictData"> | string | null updateBy?: StringNullableFilter<"SysDictData"> | string | null updateTime?: StringNullableFilter<"SysDictData"> | string | null remark?: StringNullableFilter<"SysDictData"> | string | null } export type SysRoleMenuCreateWithoutMenuInput = { role: SysRoleCreateNestedOneWithoutMenusInput } export type SysRoleMenuUncheckedCreateWithoutMenuInput = { roleId: number } export type SysRoleMenuCreateOrConnectWithoutMenuInput = { where: SysRoleMenuWhereUniqueInput create: XOR } export type SysRoleMenuCreateManyMenuInputEnvelope = { data: SysRoleMenuCreateManyMenuInput | SysRoleMenuCreateManyMenuInput[] skipDuplicates?: boolean } export type SysRoleMenuUpsertWithWhereUniqueWithoutMenuInput = { where: SysRoleMenuWhereUniqueInput update: XOR create: XOR } export type SysRoleMenuUpdateWithWhereUniqueWithoutMenuInput = { where: SysRoleMenuWhereUniqueInput data: XOR } export type SysRoleMenuUpdateManyWithWhereWithoutMenuInput = { where: SysRoleMenuScalarWhereInput data: XOR } export type SysRoleMenuScalarWhereInput = { AND?: SysRoleMenuScalarWhereInput | SysRoleMenuScalarWhereInput[] OR?: SysRoleMenuScalarWhereInput[] NOT?: SysRoleMenuScalarWhereInput | SysRoleMenuScalarWhereInput[] roleId?: IntFilter<"SysRoleMenu"> | number menuId?: IntFilter<"SysRoleMenu"> | number } export type SysUserPostCreateWithoutPostInput = { user: SysUserCreateNestedOneWithoutPostsInput } export type SysUserPostUncheckedCreateWithoutPostInput = { userId: number } export type SysUserPostCreateOrConnectWithoutPostInput = { where: SysUserPostWhereUniqueInput create: XOR } export type SysUserPostCreateManyPostInputEnvelope = { data: SysUserPostCreateManyPostInput | SysUserPostCreateManyPostInput[] skipDuplicates?: boolean } export type SysUserPostUpsertWithWhereUniqueWithoutPostInput = { where: SysUserPostWhereUniqueInput update: XOR create: XOR } export type SysUserPostUpdateWithWhereUniqueWithoutPostInput = { where: SysUserPostWhereUniqueInput data: XOR } export type SysUserPostUpdateManyWithWhereWithoutPostInput = { where: SysUserPostScalarWhereInput data: XOR } export type SysUserPostScalarWhereInput = { AND?: SysUserPostScalarWhereInput | SysUserPostScalarWhereInput[] OR?: SysUserPostScalarWhereInput[] NOT?: SysUserPostScalarWhereInput | SysUserPostScalarWhereInput[] userId?: IntFilter<"SysUserPost"> | number postId?: IntFilter<"SysUserPost"> | number } export type SysUserCreateWithoutPostsInput = { userName: string nickName: string userType?: string | null email?: string | null phonenumber?: string | null sex?: string | null avatar?: string | null password?: string | null status?: string | null loginIp?: string | null loginDate?: string | null createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null remark?: string | null dept?: SysDeptCreateNestedOneWithoutUsersInput roles?: SysUserRoleCreateNestedManyWithoutUserInput } export type SysUserUncheckedCreateWithoutPostsInput = { userId?: number deptId?: number | null userName: string nickName: string userType?: string | null email?: string | null phonenumber?: string | null sex?: string | null avatar?: string | null password?: string | null status?: string | null loginIp?: string | null loginDate?: string | null createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null remark?: string | null roles?: SysUserRoleUncheckedCreateNestedManyWithoutUserInput } export type SysUserCreateOrConnectWithoutPostsInput = { where: SysUserWhereUniqueInput create: XOR } export type SysPostCreateWithoutUsersInput = { postCode: string postName: string postSort: number status?: string createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null remark?: string | null } export type SysPostUncheckedCreateWithoutUsersInput = { postId?: number postCode: string postName: string postSort: number status?: string createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null remark?: string | null } export type SysPostCreateOrConnectWithoutUsersInput = { where: SysPostWhereUniqueInput create: XOR } export type SysUserUpsertWithoutPostsInput = { update: XOR create: XOR where?: SysUserWhereInput } export type SysUserUpdateToOneWithWhereWithoutPostsInput = { where?: SysUserWhereInput data: XOR } export type SysUserUpdateWithoutPostsInput = { userName?: StringFieldUpdateOperationsInput | string nickName?: StringFieldUpdateOperationsInput | string userType?: NullableStringFieldUpdateOperationsInput | string | null email?: NullableStringFieldUpdateOperationsInput | string | null phonenumber?: NullableStringFieldUpdateOperationsInput | string | null sex?: NullableStringFieldUpdateOperationsInput | string | null avatar?: NullableStringFieldUpdateOperationsInput | string | null password?: NullableStringFieldUpdateOperationsInput | string | null status?: NullableStringFieldUpdateOperationsInput | string | null loginIp?: NullableStringFieldUpdateOperationsInput | string | null loginDate?: NullableStringFieldUpdateOperationsInput | string | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null dept?: SysDeptUpdateOneWithoutUsersNestedInput roles?: SysUserRoleUpdateManyWithoutUserNestedInput } export type SysUserUncheckedUpdateWithoutPostsInput = { userId?: IntFieldUpdateOperationsInput | number deptId?: NullableIntFieldUpdateOperationsInput | number | null userName?: StringFieldUpdateOperationsInput | string nickName?: StringFieldUpdateOperationsInput | string userType?: NullableStringFieldUpdateOperationsInput | string | null email?: NullableStringFieldUpdateOperationsInput | string | null phonenumber?: NullableStringFieldUpdateOperationsInput | string | null sex?: NullableStringFieldUpdateOperationsInput | string | null avatar?: NullableStringFieldUpdateOperationsInput | string | null password?: NullableStringFieldUpdateOperationsInput | string | null status?: NullableStringFieldUpdateOperationsInput | string | null loginIp?: NullableStringFieldUpdateOperationsInput | string | null loginDate?: NullableStringFieldUpdateOperationsInput | string | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null roles?: SysUserRoleUncheckedUpdateManyWithoutUserNestedInput } export type SysPostUpsertWithoutUsersInput = { update: XOR create: XOR where?: SysPostWhereInput } export type SysPostUpdateToOneWithWhereWithoutUsersInput = { where?: SysPostWhereInput data: XOR } export type SysPostUpdateWithoutUsersInput = { postCode?: StringFieldUpdateOperationsInput | string postName?: StringFieldUpdateOperationsInput | string postSort?: IntFieldUpdateOperationsInput | number status?: StringFieldUpdateOperationsInput | string createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null } export type SysPostUncheckedUpdateWithoutUsersInput = { postId?: IntFieldUpdateOperationsInput | number postCode?: StringFieldUpdateOperationsInput | string postName?: StringFieldUpdateOperationsInput | string postSort?: IntFieldUpdateOperationsInput | number status?: StringFieldUpdateOperationsInput | string createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null } export type SysRoleCreateWithoutDeptsInput = { roleName: string roleKey: string roleSort: number dataScope?: string | null menuCheckStrictly?: number | null deptCheckStrictly?: number | null status?: string createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null remark?: string | null users?: SysUserRoleCreateNestedManyWithoutRoleInput menus?: SysRoleMenuCreateNestedManyWithoutRoleInput } export type SysRoleUncheckedCreateWithoutDeptsInput = { roleId?: number roleName: string roleKey: string roleSort: number dataScope?: string | null menuCheckStrictly?: number | null deptCheckStrictly?: number | null status?: string createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null remark?: string | null users?: SysUserRoleUncheckedCreateNestedManyWithoutRoleInput menus?: SysRoleMenuUncheckedCreateNestedManyWithoutRoleInput } export type SysRoleCreateOrConnectWithoutDeptsInput = { where: SysRoleWhereUniqueInput create: XOR } export type SysDeptCreateWithoutRolesInput = { parentId?: number | null ancestors?: string | null deptName?: string | null orderNum?: number | null leader?: string | null phone?: string | null email?: string | null status?: string | null createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null users?: SysUserCreateNestedManyWithoutDeptInput } export type SysDeptUncheckedCreateWithoutRolesInput = { deptId?: number parentId?: number | null ancestors?: string | null deptName?: string | null orderNum?: number | null leader?: string | null phone?: string | null email?: string | null status?: string | null createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null users?: SysUserUncheckedCreateNestedManyWithoutDeptInput } export type SysDeptCreateOrConnectWithoutRolesInput = { where: SysDeptWhereUniqueInput create: XOR } export type SysRoleUpsertWithoutDeptsInput = { update: XOR create: XOR where?: SysRoleWhereInput } export type SysRoleUpdateToOneWithWhereWithoutDeptsInput = { where?: SysRoleWhereInput data: XOR } export type SysRoleUpdateWithoutDeptsInput = { roleName?: StringFieldUpdateOperationsInput | string roleKey?: StringFieldUpdateOperationsInput | string roleSort?: IntFieldUpdateOperationsInput | number dataScope?: NullableStringFieldUpdateOperationsInput | string | null menuCheckStrictly?: NullableIntFieldUpdateOperationsInput | number | null deptCheckStrictly?: NullableIntFieldUpdateOperationsInput | number | null status?: StringFieldUpdateOperationsInput | string createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null users?: SysUserRoleUpdateManyWithoutRoleNestedInput menus?: SysRoleMenuUpdateManyWithoutRoleNestedInput } export type SysRoleUncheckedUpdateWithoutDeptsInput = { roleId?: IntFieldUpdateOperationsInput | number roleName?: StringFieldUpdateOperationsInput | string roleKey?: StringFieldUpdateOperationsInput | string roleSort?: IntFieldUpdateOperationsInput | number dataScope?: NullableStringFieldUpdateOperationsInput | string | null menuCheckStrictly?: NullableIntFieldUpdateOperationsInput | number | null deptCheckStrictly?: NullableIntFieldUpdateOperationsInput | number | null status?: StringFieldUpdateOperationsInput | string createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null users?: SysUserRoleUncheckedUpdateManyWithoutRoleNestedInput menus?: SysRoleMenuUncheckedUpdateManyWithoutRoleNestedInput } export type SysDeptUpsertWithoutRolesInput = { update: XOR create: XOR where?: SysDeptWhereInput } export type SysDeptUpdateToOneWithWhereWithoutRolesInput = { where?: SysDeptWhereInput data: XOR } export type SysDeptUpdateWithoutRolesInput = { parentId?: NullableIntFieldUpdateOperationsInput | number | null ancestors?: NullableStringFieldUpdateOperationsInput | string | null deptName?: NullableStringFieldUpdateOperationsInput | string | null orderNum?: NullableIntFieldUpdateOperationsInput | number | null leader?: NullableStringFieldUpdateOperationsInput | string | null phone?: NullableStringFieldUpdateOperationsInput | string | null email?: NullableStringFieldUpdateOperationsInput | string | null status?: NullableStringFieldUpdateOperationsInput | string | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null users?: SysUserUpdateManyWithoutDeptNestedInput } export type SysDeptUncheckedUpdateWithoutRolesInput = { deptId?: IntFieldUpdateOperationsInput | number parentId?: NullableIntFieldUpdateOperationsInput | number | null ancestors?: NullableStringFieldUpdateOperationsInput | string | null deptName?: NullableStringFieldUpdateOperationsInput | string | null orderNum?: NullableIntFieldUpdateOperationsInput | number | null leader?: NullableStringFieldUpdateOperationsInput | string | null phone?: NullableStringFieldUpdateOperationsInput | string | null email?: NullableStringFieldUpdateOperationsInput | string | null status?: NullableStringFieldUpdateOperationsInput | string | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null users?: SysUserUncheckedUpdateManyWithoutDeptNestedInput } export type SysMenuCreateWithoutRolesInput = { menuName: string parentId?: number | null orderNum?: number | null path?: string | null component?: string | null query?: string | null isFrame?: number | null isCache?: number | null menuType?: string | null visible?: string | null status?: string | null perms?: string | null icon?: string | null createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null remark?: string | null } export type SysMenuUncheckedCreateWithoutRolesInput = { menuId?: number menuName: string parentId?: number | null orderNum?: number | null path?: string | null component?: string | null query?: string | null isFrame?: number | null isCache?: number | null menuType?: string | null visible?: string | null status?: string | null perms?: string | null icon?: string | null createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null remark?: string | null } export type SysMenuCreateOrConnectWithoutRolesInput = { where: SysMenuWhereUniqueInput create: XOR } export type SysRoleCreateWithoutMenusInput = { roleName: string roleKey: string roleSort: number dataScope?: string | null menuCheckStrictly?: number | null deptCheckStrictly?: number | null status?: string createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null remark?: string | null users?: SysUserRoleCreateNestedManyWithoutRoleInput depts?: SysRoleDeptCreateNestedManyWithoutRoleInput } export type SysRoleUncheckedCreateWithoutMenusInput = { roleId?: number roleName: string roleKey: string roleSort: number dataScope?: string | null menuCheckStrictly?: number | null deptCheckStrictly?: number | null status?: string createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null remark?: string | null users?: SysUserRoleUncheckedCreateNestedManyWithoutRoleInput depts?: SysRoleDeptUncheckedCreateNestedManyWithoutRoleInput } export type SysRoleCreateOrConnectWithoutMenusInput = { where: SysRoleWhereUniqueInput create: XOR } export type SysMenuUpsertWithoutRolesInput = { update: XOR create: XOR where?: SysMenuWhereInput } export type SysMenuUpdateToOneWithWhereWithoutRolesInput = { where?: SysMenuWhereInput data: XOR } export type SysMenuUpdateWithoutRolesInput = { menuName?: StringFieldUpdateOperationsInput | string parentId?: NullableIntFieldUpdateOperationsInput | number | null orderNum?: NullableIntFieldUpdateOperationsInput | number | null path?: NullableStringFieldUpdateOperationsInput | string | null component?: NullableStringFieldUpdateOperationsInput | string | null query?: NullableStringFieldUpdateOperationsInput | string | null isFrame?: NullableIntFieldUpdateOperationsInput | number | null isCache?: NullableIntFieldUpdateOperationsInput | number | null menuType?: NullableStringFieldUpdateOperationsInput | string | null visible?: NullableStringFieldUpdateOperationsInput | string | null status?: NullableStringFieldUpdateOperationsInput | string | null perms?: NullableStringFieldUpdateOperationsInput | string | null icon?: NullableStringFieldUpdateOperationsInput | string | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null } export type SysMenuUncheckedUpdateWithoutRolesInput = { menuId?: IntFieldUpdateOperationsInput | number menuName?: StringFieldUpdateOperationsInput | string parentId?: NullableIntFieldUpdateOperationsInput | number | null orderNum?: NullableIntFieldUpdateOperationsInput | number | null path?: NullableStringFieldUpdateOperationsInput | string | null component?: NullableStringFieldUpdateOperationsInput | string | null query?: NullableStringFieldUpdateOperationsInput | string | null isFrame?: NullableIntFieldUpdateOperationsInput | number | null isCache?: NullableIntFieldUpdateOperationsInput | number | null menuType?: NullableStringFieldUpdateOperationsInput | string | null visible?: NullableStringFieldUpdateOperationsInput | string | null status?: NullableStringFieldUpdateOperationsInput | string | null perms?: NullableStringFieldUpdateOperationsInput | string | null icon?: NullableStringFieldUpdateOperationsInput | string | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null } export type SysRoleUpsertWithoutMenusInput = { update: XOR create: XOR where?: SysRoleWhereInput } export type SysRoleUpdateToOneWithWhereWithoutMenusInput = { where?: SysRoleWhereInput data: XOR } export type SysRoleUpdateWithoutMenusInput = { roleName?: StringFieldUpdateOperationsInput | string roleKey?: StringFieldUpdateOperationsInput | string roleSort?: IntFieldUpdateOperationsInput | number dataScope?: NullableStringFieldUpdateOperationsInput | string | null menuCheckStrictly?: NullableIntFieldUpdateOperationsInput | number | null deptCheckStrictly?: NullableIntFieldUpdateOperationsInput | number | null status?: StringFieldUpdateOperationsInput | string createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null users?: SysUserRoleUpdateManyWithoutRoleNestedInput depts?: SysRoleDeptUpdateManyWithoutRoleNestedInput } export type SysRoleUncheckedUpdateWithoutMenusInput = { roleId?: IntFieldUpdateOperationsInput | number roleName?: StringFieldUpdateOperationsInput | string roleKey?: StringFieldUpdateOperationsInput | string roleSort?: IntFieldUpdateOperationsInput | number dataScope?: NullableStringFieldUpdateOperationsInput | string | null menuCheckStrictly?: NullableIntFieldUpdateOperationsInput | number | null deptCheckStrictly?: NullableIntFieldUpdateOperationsInput | number | null status?: StringFieldUpdateOperationsInput | string createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null users?: SysUserRoleUncheckedUpdateManyWithoutRoleNestedInput depts?: SysRoleDeptUncheckedUpdateManyWithoutRoleNestedInput } export type SysDeptCreateWithoutUsersInput = { parentId?: number | null ancestors?: string | null deptName?: string | null orderNum?: number | null leader?: string | null phone?: string | null email?: string | null status?: string | null createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null roles?: SysRoleDeptCreateNestedManyWithoutDeptInput } export type SysDeptUncheckedCreateWithoutUsersInput = { deptId?: number parentId?: number | null ancestors?: string | null deptName?: string | null orderNum?: number | null leader?: string | null phone?: string | null email?: string | null status?: string | null createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null roles?: SysRoleDeptUncheckedCreateNestedManyWithoutDeptInput } export type SysDeptCreateOrConnectWithoutUsersInput = { where: SysDeptWhereUniqueInput create: XOR } export type SysUserRoleCreateWithoutUserInput = { role: SysRoleCreateNestedOneWithoutUsersInput } export type SysUserRoleUncheckedCreateWithoutUserInput = { roleId: number } export type SysUserRoleCreateOrConnectWithoutUserInput = { where: SysUserRoleWhereUniqueInput create: XOR } export type SysUserRoleCreateManyUserInputEnvelope = { data: SysUserRoleCreateManyUserInput | SysUserRoleCreateManyUserInput[] skipDuplicates?: boolean } export type SysUserPostCreateWithoutUserInput = { post: SysPostCreateNestedOneWithoutUsersInput } export type SysUserPostUncheckedCreateWithoutUserInput = { postId: number } export type SysUserPostCreateOrConnectWithoutUserInput = { where: SysUserPostWhereUniqueInput create: XOR } export type SysUserPostCreateManyUserInputEnvelope = { data: SysUserPostCreateManyUserInput | SysUserPostCreateManyUserInput[] skipDuplicates?: boolean } export type SysDeptUpsertWithoutUsersInput = { update: XOR create: XOR where?: SysDeptWhereInput } export type SysDeptUpdateToOneWithWhereWithoutUsersInput = { where?: SysDeptWhereInput data: XOR } export type SysDeptUpdateWithoutUsersInput = { parentId?: NullableIntFieldUpdateOperationsInput | number | null ancestors?: NullableStringFieldUpdateOperationsInput | string | null deptName?: NullableStringFieldUpdateOperationsInput | string | null orderNum?: NullableIntFieldUpdateOperationsInput | number | null leader?: NullableStringFieldUpdateOperationsInput | string | null phone?: NullableStringFieldUpdateOperationsInput | string | null email?: NullableStringFieldUpdateOperationsInput | string | null status?: NullableStringFieldUpdateOperationsInput | string | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null roles?: SysRoleDeptUpdateManyWithoutDeptNestedInput } export type SysDeptUncheckedUpdateWithoutUsersInput = { deptId?: IntFieldUpdateOperationsInput | number parentId?: NullableIntFieldUpdateOperationsInput | number | null ancestors?: NullableStringFieldUpdateOperationsInput | string | null deptName?: NullableStringFieldUpdateOperationsInput | string | null orderNum?: NullableIntFieldUpdateOperationsInput | number | null leader?: NullableStringFieldUpdateOperationsInput | string | null phone?: NullableStringFieldUpdateOperationsInput | string | null email?: NullableStringFieldUpdateOperationsInput | string | null status?: NullableStringFieldUpdateOperationsInput | string | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null roles?: SysRoleDeptUncheckedUpdateManyWithoutDeptNestedInput } export type SysUserRoleUpsertWithWhereUniqueWithoutUserInput = { where: SysUserRoleWhereUniqueInput update: XOR create: XOR } export type SysUserRoleUpdateWithWhereUniqueWithoutUserInput = { where: SysUserRoleWhereUniqueInput data: XOR } export type SysUserRoleUpdateManyWithWhereWithoutUserInput = { where: SysUserRoleScalarWhereInput data: XOR } export type SysUserRoleScalarWhereInput = { AND?: SysUserRoleScalarWhereInput | SysUserRoleScalarWhereInput[] OR?: SysUserRoleScalarWhereInput[] NOT?: SysUserRoleScalarWhereInput | SysUserRoleScalarWhereInput[] userId?: IntFilter<"SysUserRole"> | number roleId?: IntFilter<"SysUserRole"> | number } export type SysUserPostUpsertWithWhereUniqueWithoutUserInput = { where: SysUserPostWhereUniqueInput update: XOR create: XOR } export type SysUserPostUpdateWithWhereUniqueWithoutUserInput = { where: SysUserPostWhereUniqueInput data: XOR } export type SysUserPostUpdateManyWithWhereWithoutUserInput = { where: SysUserPostScalarWhereInput data: XOR } export type SysUserRoleCreateWithoutRoleInput = { user: SysUserCreateNestedOneWithoutRolesInput } export type SysUserRoleUncheckedCreateWithoutRoleInput = { userId: number } export type SysUserRoleCreateOrConnectWithoutRoleInput = { where: SysUserRoleWhereUniqueInput create: XOR } export type SysUserRoleCreateManyRoleInputEnvelope = { data: SysUserRoleCreateManyRoleInput | SysUserRoleCreateManyRoleInput[] skipDuplicates?: boolean } export type SysRoleMenuCreateWithoutRoleInput = { menu: SysMenuCreateNestedOneWithoutRolesInput } export type SysRoleMenuUncheckedCreateWithoutRoleInput = { menuId: number } export type SysRoleMenuCreateOrConnectWithoutRoleInput = { where: SysRoleMenuWhereUniqueInput create: XOR } export type SysRoleMenuCreateManyRoleInputEnvelope = { data: SysRoleMenuCreateManyRoleInput | SysRoleMenuCreateManyRoleInput[] skipDuplicates?: boolean } export type SysRoleDeptCreateWithoutRoleInput = { dept: SysDeptCreateNestedOneWithoutRolesInput } export type SysRoleDeptUncheckedCreateWithoutRoleInput = { deptId: number } export type SysRoleDeptCreateOrConnectWithoutRoleInput = { where: SysRoleDeptWhereUniqueInput create: XOR } export type SysRoleDeptCreateManyRoleInputEnvelope = { data: SysRoleDeptCreateManyRoleInput | SysRoleDeptCreateManyRoleInput[] skipDuplicates?: boolean } export type SysUserRoleUpsertWithWhereUniqueWithoutRoleInput = { where: SysUserRoleWhereUniqueInput update: XOR create: XOR } export type SysUserRoleUpdateWithWhereUniqueWithoutRoleInput = { where: SysUserRoleWhereUniqueInput data: XOR } export type SysUserRoleUpdateManyWithWhereWithoutRoleInput = { where: SysUserRoleScalarWhereInput data: XOR } export type SysRoleMenuUpsertWithWhereUniqueWithoutRoleInput = { where: SysRoleMenuWhereUniqueInput update: XOR create: XOR } export type SysRoleMenuUpdateWithWhereUniqueWithoutRoleInput = { where: SysRoleMenuWhereUniqueInput data: XOR } export type SysRoleMenuUpdateManyWithWhereWithoutRoleInput = { where: SysRoleMenuScalarWhereInput data: XOR } export type SysRoleDeptUpsertWithWhereUniqueWithoutRoleInput = { where: SysRoleDeptWhereUniqueInput update: XOR create: XOR } export type SysRoleDeptUpdateWithWhereUniqueWithoutRoleInput = { where: SysRoleDeptWhereUniqueInput data: XOR } export type SysRoleDeptUpdateManyWithWhereWithoutRoleInput = { where: SysRoleDeptScalarWhereInput data: XOR } export type SysUserCreateWithoutRolesInput = { userName: string nickName: string userType?: string | null email?: string | null phonenumber?: string | null sex?: string | null avatar?: string | null password?: string | null status?: string | null loginIp?: string | null loginDate?: string | null createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null remark?: string | null dept?: SysDeptCreateNestedOneWithoutUsersInput posts?: SysUserPostCreateNestedManyWithoutUserInput } export type SysUserUncheckedCreateWithoutRolesInput = { userId?: number deptId?: number | null userName: string nickName: string userType?: string | null email?: string | null phonenumber?: string | null sex?: string | null avatar?: string | null password?: string | null status?: string | null loginIp?: string | null loginDate?: string | null createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null remark?: string | null posts?: SysUserPostUncheckedCreateNestedManyWithoutUserInput } export type SysUserCreateOrConnectWithoutRolesInput = { where: SysUserWhereUniqueInput create: XOR } export type SysRoleCreateWithoutUsersInput = { roleName: string roleKey: string roleSort: number dataScope?: string | null menuCheckStrictly?: number | null deptCheckStrictly?: number | null status?: string createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null remark?: string | null menus?: SysRoleMenuCreateNestedManyWithoutRoleInput depts?: SysRoleDeptCreateNestedManyWithoutRoleInput } export type SysRoleUncheckedCreateWithoutUsersInput = { roleId?: number roleName: string roleKey: string roleSort: number dataScope?: string | null menuCheckStrictly?: number | null deptCheckStrictly?: number | null status?: string createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null remark?: string | null menus?: SysRoleMenuUncheckedCreateNestedManyWithoutRoleInput depts?: SysRoleDeptUncheckedCreateNestedManyWithoutRoleInput } export type SysRoleCreateOrConnectWithoutUsersInput = { where: SysRoleWhereUniqueInput create: XOR } export type SysUserUpsertWithoutRolesInput = { update: XOR create: XOR where?: SysUserWhereInput } export type SysUserUpdateToOneWithWhereWithoutRolesInput = { where?: SysUserWhereInput data: XOR } export type SysUserUpdateWithoutRolesInput = { userName?: StringFieldUpdateOperationsInput | string nickName?: StringFieldUpdateOperationsInput | string userType?: NullableStringFieldUpdateOperationsInput | string | null email?: NullableStringFieldUpdateOperationsInput | string | null phonenumber?: NullableStringFieldUpdateOperationsInput | string | null sex?: NullableStringFieldUpdateOperationsInput | string | null avatar?: NullableStringFieldUpdateOperationsInput | string | null password?: NullableStringFieldUpdateOperationsInput | string | null status?: NullableStringFieldUpdateOperationsInput | string | null loginIp?: NullableStringFieldUpdateOperationsInput | string | null loginDate?: NullableStringFieldUpdateOperationsInput | string | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null dept?: SysDeptUpdateOneWithoutUsersNestedInput posts?: SysUserPostUpdateManyWithoutUserNestedInput } export type SysUserUncheckedUpdateWithoutRolesInput = { userId?: IntFieldUpdateOperationsInput | number deptId?: NullableIntFieldUpdateOperationsInput | number | null userName?: StringFieldUpdateOperationsInput | string nickName?: StringFieldUpdateOperationsInput | string userType?: NullableStringFieldUpdateOperationsInput | string | null email?: NullableStringFieldUpdateOperationsInput | string | null phonenumber?: NullableStringFieldUpdateOperationsInput | string | null sex?: NullableStringFieldUpdateOperationsInput | string | null avatar?: NullableStringFieldUpdateOperationsInput | string | null password?: NullableStringFieldUpdateOperationsInput | string | null status?: NullableStringFieldUpdateOperationsInput | string | null loginIp?: NullableStringFieldUpdateOperationsInput | string | null loginDate?: NullableStringFieldUpdateOperationsInput | string | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null posts?: SysUserPostUncheckedUpdateManyWithoutUserNestedInput } export type SysRoleUpsertWithoutUsersInput = { update: XOR create: XOR where?: SysRoleWhereInput } export type SysRoleUpdateToOneWithWhereWithoutUsersInput = { where?: SysRoleWhereInput data: XOR } export type SysRoleUpdateWithoutUsersInput = { roleName?: StringFieldUpdateOperationsInput | string roleKey?: StringFieldUpdateOperationsInput | string roleSort?: IntFieldUpdateOperationsInput | number dataScope?: NullableStringFieldUpdateOperationsInput | string | null menuCheckStrictly?: NullableIntFieldUpdateOperationsInput | number | null deptCheckStrictly?: NullableIntFieldUpdateOperationsInput | number | null status?: StringFieldUpdateOperationsInput | string createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null menus?: SysRoleMenuUpdateManyWithoutRoleNestedInput depts?: SysRoleDeptUpdateManyWithoutRoleNestedInput } export type SysRoleUncheckedUpdateWithoutUsersInput = { roleId?: IntFieldUpdateOperationsInput | number roleName?: StringFieldUpdateOperationsInput | string roleKey?: StringFieldUpdateOperationsInput | string roleSort?: IntFieldUpdateOperationsInput | number dataScope?: NullableStringFieldUpdateOperationsInput | string | null menuCheckStrictly?: NullableIntFieldUpdateOperationsInput | number | null deptCheckStrictly?: NullableIntFieldUpdateOperationsInput | number | null status?: StringFieldUpdateOperationsInput | string createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null menus?: SysRoleMenuUncheckedUpdateManyWithoutRoleNestedInput depts?: SysRoleDeptUncheckedUpdateManyWithoutRoleNestedInput } export type GenTableColumnCreateManyTableInput = { columnId?: number columnName?: string | null columnComment?: string | null columnType?: string | null javaType?: string | null javaField?: string | null isPk?: string | null isIncrement?: string | null isRequired?: string | null isInsert?: string | null isEdit?: string | null isList?: string | null isQuery?: string | null queryType?: string | null htmlType?: string | null dictType?: string | null sort?: number | null createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null } export type GenTableColumnUpdateWithoutTableInput = { columnName?: NullableStringFieldUpdateOperationsInput | string | null columnComment?: NullableStringFieldUpdateOperationsInput | string | null columnType?: NullableStringFieldUpdateOperationsInput | string | null javaType?: NullableStringFieldUpdateOperationsInput | string | null javaField?: NullableStringFieldUpdateOperationsInput | string | null isPk?: NullableStringFieldUpdateOperationsInput | string | null isIncrement?: NullableStringFieldUpdateOperationsInput | string | null isRequired?: NullableStringFieldUpdateOperationsInput | string | null isInsert?: NullableStringFieldUpdateOperationsInput | string | null isEdit?: NullableStringFieldUpdateOperationsInput | string | null isList?: NullableStringFieldUpdateOperationsInput | string | null isQuery?: NullableStringFieldUpdateOperationsInput | string | null queryType?: NullableStringFieldUpdateOperationsInput | string | null htmlType?: NullableStringFieldUpdateOperationsInput | string | null dictType?: NullableStringFieldUpdateOperationsInput | string | null sort?: NullableIntFieldUpdateOperationsInput | number | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null } export type GenTableColumnUncheckedUpdateWithoutTableInput = { columnId?: IntFieldUpdateOperationsInput | number columnName?: NullableStringFieldUpdateOperationsInput | string | null columnComment?: NullableStringFieldUpdateOperationsInput | string | null columnType?: NullableStringFieldUpdateOperationsInput | string | null javaType?: NullableStringFieldUpdateOperationsInput | string | null javaField?: NullableStringFieldUpdateOperationsInput | string | null isPk?: NullableStringFieldUpdateOperationsInput | string | null isIncrement?: NullableStringFieldUpdateOperationsInput | string | null isRequired?: NullableStringFieldUpdateOperationsInput | string | null isInsert?: NullableStringFieldUpdateOperationsInput | string | null isEdit?: NullableStringFieldUpdateOperationsInput | string | null isList?: NullableStringFieldUpdateOperationsInput | string | null isQuery?: NullableStringFieldUpdateOperationsInput | string | null queryType?: NullableStringFieldUpdateOperationsInput | string | null htmlType?: NullableStringFieldUpdateOperationsInput | string | null dictType?: NullableStringFieldUpdateOperationsInput | string | null sort?: NullableIntFieldUpdateOperationsInput | number | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null } export type GenTableColumnUncheckedUpdateManyWithoutTableInput = { columnId?: IntFieldUpdateOperationsInput | number columnName?: NullableStringFieldUpdateOperationsInput | string | null columnComment?: NullableStringFieldUpdateOperationsInput | string | null columnType?: NullableStringFieldUpdateOperationsInput | string | null javaType?: NullableStringFieldUpdateOperationsInput | string | null javaField?: NullableStringFieldUpdateOperationsInput | string | null isPk?: NullableStringFieldUpdateOperationsInput | string | null isIncrement?: NullableStringFieldUpdateOperationsInput | string | null isRequired?: NullableStringFieldUpdateOperationsInput | string | null isInsert?: NullableStringFieldUpdateOperationsInput | string | null isEdit?: NullableStringFieldUpdateOperationsInput | string | null isList?: NullableStringFieldUpdateOperationsInput | string | null isQuery?: NullableStringFieldUpdateOperationsInput | string | null queryType?: NullableStringFieldUpdateOperationsInput | string | null htmlType?: NullableStringFieldUpdateOperationsInput | string | null dictType?: NullableStringFieldUpdateOperationsInput | string | null sort?: NullableIntFieldUpdateOperationsInput | number | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null } export type SysUserCreateManyDeptInput = { userId?: number userName: string nickName: string userType?: string | null email?: string | null phonenumber?: string | null sex?: string | null avatar?: string | null password?: string | null status?: string | null loginIp?: string | null loginDate?: string | null createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null remark?: string | null } export type SysRoleDeptCreateManyDeptInput = { roleId: number } export type SysUserUpdateWithoutDeptInput = { userName?: StringFieldUpdateOperationsInput | string nickName?: StringFieldUpdateOperationsInput | string userType?: NullableStringFieldUpdateOperationsInput | string | null email?: NullableStringFieldUpdateOperationsInput | string | null phonenumber?: NullableStringFieldUpdateOperationsInput | string | null sex?: NullableStringFieldUpdateOperationsInput | string | null avatar?: NullableStringFieldUpdateOperationsInput | string | null password?: NullableStringFieldUpdateOperationsInput | string | null status?: NullableStringFieldUpdateOperationsInput | string | null loginIp?: NullableStringFieldUpdateOperationsInput | string | null loginDate?: NullableStringFieldUpdateOperationsInput | string | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null roles?: SysUserRoleUpdateManyWithoutUserNestedInput posts?: SysUserPostUpdateManyWithoutUserNestedInput } export type SysUserUncheckedUpdateWithoutDeptInput = { userId?: IntFieldUpdateOperationsInput | number userName?: StringFieldUpdateOperationsInput | string nickName?: StringFieldUpdateOperationsInput | string userType?: NullableStringFieldUpdateOperationsInput | string | null email?: NullableStringFieldUpdateOperationsInput | string | null phonenumber?: NullableStringFieldUpdateOperationsInput | string | null sex?: NullableStringFieldUpdateOperationsInput | string | null avatar?: NullableStringFieldUpdateOperationsInput | string | null password?: NullableStringFieldUpdateOperationsInput | string | null status?: NullableStringFieldUpdateOperationsInput | string | null loginIp?: NullableStringFieldUpdateOperationsInput | string | null loginDate?: NullableStringFieldUpdateOperationsInput | string | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null roles?: SysUserRoleUncheckedUpdateManyWithoutUserNestedInput posts?: SysUserPostUncheckedUpdateManyWithoutUserNestedInput } export type SysUserUncheckedUpdateManyWithoutDeptInput = { userId?: IntFieldUpdateOperationsInput | number userName?: StringFieldUpdateOperationsInput | string nickName?: StringFieldUpdateOperationsInput | string userType?: NullableStringFieldUpdateOperationsInput | string | null email?: NullableStringFieldUpdateOperationsInput | string | null phonenumber?: NullableStringFieldUpdateOperationsInput | string | null sex?: NullableStringFieldUpdateOperationsInput | string | null avatar?: NullableStringFieldUpdateOperationsInput | string | null password?: NullableStringFieldUpdateOperationsInput | string | null status?: NullableStringFieldUpdateOperationsInput | string | null loginIp?: NullableStringFieldUpdateOperationsInput | string | null loginDate?: NullableStringFieldUpdateOperationsInput | string | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null } export type SysRoleDeptUpdateWithoutDeptInput = { role?: SysRoleUpdateOneRequiredWithoutDeptsNestedInput } export type SysRoleDeptUncheckedUpdateWithoutDeptInput = { roleId?: IntFieldUpdateOperationsInput | number } export type SysRoleDeptUncheckedUpdateManyWithoutDeptInput = { roleId?: IntFieldUpdateOperationsInput | number } export type SysDictDataCreateManySysDictTypeInput = { dictCode?: number dictSort?: number | null dictLabel?: string | null dictValue?: string | null cssClass?: string | null listClass?: string | null isDefault?: string | null status?: string | null createBy?: string | null createTime?: string | null updateBy?: string | null updateTime?: string | null remark?: string | null } export type SysDictDataUpdateWithoutSysDictTypeInput = { dictSort?: NullableIntFieldUpdateOperationsInput | number | null dictLabel?: NullableStringFieldUpdateOperationsInput | string | null dictValue?: NullableStringFieldUpdateOperationsInput | string | null cssClass?: NullableStringFieldUpdateOperationsInput | string | null listClass?: NullableStringFieldUpdateOperationsInput | string | null isDefault?: NullableStringFieldUpdateOperationsInput | string | null status?: NullableStringFieldUpdateOperationsInput | string | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null } export type SysDictDataUncheckedUpdateWithoutSysDictTypeInput = { dictCode?: IntFieldUpdateOperationsInput | number dictSort?: NullableIntFieldUpdateOperationsInput | number | null dictLabel?: NullableStringFieldUpdateOperationsInput | string | null dictValue?: NullableStringFieldUpdateOperationsInput | string | null cssClass?: NullableStringFieldUpdateOperationsInput | string | null listClass?: NullableStringFieldUpdateOperationsInput | string | null isDefault?: NullableStringFieldUpdateOperationsInput | string | null status?: NullableStringFieldUpdateOperationsInput | string | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null } export type SysDictDataUncheckedUpdateManyWithoutSysDictTypeInput = { dictCode?: IntFieldUpdateOperationsInput | number dictSort?: NullableIntFieldUpdateOperationsInput | number | null dictLabel?: NullableStringFieldUpdateOperationsInput | string | null dictValue?: NullableStringFieldUpdateOperationsInput | string | null cssClass?: NullableStringFieldUpdateOperationsInput | string | null listClass?: NullableStringFieldUpdateOperationsInput | string | null isDefault?: NullableStringFieldUpdateOperationsInput | string | null status?: NullableStringFieldUpdateOperationsInput | string | null createBy?: NullableStringFieldUpdateOperationsInput | string | null createTime?: NullableStringFieldUpdateOperationsInput | string | null updateBy?: NullableStringFieldUpdateOperationsInput | string | null updateTime?: NullableStringFieldUpdateOperationsInput | string | null remark?: NullableStringFieldUpdateOperationsInput | string | null } export type SysRoleMenuCreateManyMenuInput = { roleId: number } export type SysRoleMenuUpdateWithoutMenuInput = { role?: SysRoleUpdateOneRequiredWithoutMenusNestedInput } export type SysRoleMenuUncheckedUpdateWithoutMenuInput = { roleId?: IntFieldUpdateOperationsInput | number } export type SysRoleMenuUncheckedUpdateManyWithoutMenuInput = { roleId?: IntFieldUpdateOperationsInput | number } export type SysUserPostCreateManyPostInput = { userId: number } export type SysUserPostUpdateWithoutPostInput = { user?: SysUserUpdateOneRequiredWithoutPostsNestedInput } export type SysUserPostUncheckedUpdateWithoutPostInput = { userId?: IntFieldUpdateOperationsInput | number } export type SysUserPostUncheckedUpdateManyWithoutPostInput = { userId?: IntFieldUpdateOperationsInput | number } export type SysUserRoleCreateManyUserInput = { roleId: number } export type SysUserPostCreateManyUserInput = { postId: number } export type SysUserRoleUpdateWithoutUserInput = { role?: SysRoleUpdateOneRequiredWithoutUsersNestedInput } export type SysUserRoleUncheckedUpdateWithoutUserInput = { roleId?: IntFieldUpdateOperationsInput | number } export type SysUserRoleUncheckedUpdateManyWithoutUserInput = { roleId?: IntFieldUpdateOperationsInput | number } export type SysUserPostUpdateWithoutUserInput = { post?: SysPostUpdateOneRequiredWithoutUsersNestedInput } export type SysUserPostUncheckedUpdateWithoutUserInput = { postId?: IntFieldUpdateOperationsInput | number } export type SysUserPostUncheckedUpdateManyWithoutUserInput = { postId?: IntFieldUpdateOperationsInput | number } export type SysUserRoleCreateManyRoleInput = { userId: number } export type SysRoleMenuCreateManyRoleInput = { menuId: number } export type SysRoleDeptCreateManyRoleInput = { deptId: number } export type SysUserRoleUpdateWithoutRoleInput = { user?: SysUserUpdateOneRequiredWithoutRolesNestedInput } export type SysUserRoleUncheckedUpdateWithoutRoleInput = { userId?: IntFieldUpdateOperationsInput | number } export type SysUserRoleUncheckedUpdateManyWithoutRoleInput = { userId?: IntFieldUpdateOperationsInput | number } export type SysRoleMenuUpdateWithoutRoleInput = { menu?: SysMenuUpdateOneRequiredWithoutRolesNestedInput } export type SysRoleMenuUncheckedUpdateWithoutRoleInput = { menuId?: IntFieldUpdateOperationsInput | number } export type SysRoleMenuUncheckedUpdateManyWithoutRoleInput = { menuId?: IntFieldUpdateOperationsInput | number } export type SysRoleDeptUpdateWithoutRoleInput = { dept?: SysDeptUpdateOneRequiredWithoutRolesNestedInput } export type SysRoleDeptUncheckedUpdateWithoutRoleInput = { deptId?: IntFieldUpdateOperationsInput | number } export type SysRoleDeptUncheckedUpdateManyWithoutRoleInput = { deptId?: IntFieldUpdateOperationsInput | number } /** * Aliases for legacy arg types */ /** * @deprecated Use GenTableCountOutputTypeDefaultArgs instead */ export type GenTableCountOutputTypeArgs = GenTableCountOutputTypeDefaultArgs /** * @deprecated Use SysDeptCountOutputTypeDefaultArgs instead */ export type SysDeptCountOutputTypeArgs = SysDeptCountOutputTypeDefaultArgs /** * @deprecated Use SysDictTypeCountOutputTypeDefaultArgs instead */ export type SysDictTypeCountOutputTypeArgs = SysDictTypeCountOutputTypeDefaultArgs /** * @deprecated Use SysMenuCountOutputTypeDefaultArgs instead */ export type SysMenuCountOutputTypeArgs = SysMenuCountOutputTypeDefaultArgs /** * @deprecated Use SysPostCountOutputTypeDefaultArgs instead */ export type SysPostCountOutputTypeArgs = SysPostCountOutputTypeDefaultArgs /** * @deprecated Use SysUserCountOutputTypeDefaultArgs instead */ export type SysUserCountOutputTypeArgs = SysUserCountOutputTypeDefaultArgs /** * @deprecated Use SysRoleCountOutputTypeDefaultArgs instead */ export type SysRoleCountOutputTypeArgs = SysRoleCountOutputTypeDefaultArgs /** * @deprecated Use GenTableDefaultArgs instead */ export type GenTableArgs = GenTableDefaultArgs /** * @deprecated Use GenTableColumnDefaultArgs instead */ export type GenTableColumnArgs = GenTableColumnDefaultArgs /** * @deprecated Use SysConfigDefaultArgs instead */ export type SysConfigArgs = SysConfigDefaultArgs /** * @deprecated Use SysDeptDefaultArgs instead */ export type SysDeptArgs = SysDeptDefaultArgs /** * @deprecated Use SysDictDataDefaultArgs instead */ export type SysDictDataArgs = SysDictDataDefaultArgs /** * @deprecated Use SysDictTypeDefaultArgs instead */ export type SysDictTypeArgs = SysDictTypeDefaultArgs /** * @deprecated Use SysLogininforDefaultArgs instead */ export type SysLogininforArgs = SysLogininforDefaultArgs /** * @deprecated Use SysMenuDefaultArgs instead */ export type SysMenuArgs = SysMenuDefaultArgs /** * @deprecated Use SysNoticeDefaultArgs instead */ export type SysNoticeArgs = SysNoticeDefaultArgs /** * @deprecated Use SysPostDefaultArgs instead */ export type SysPostArgs = SysPostDefaultArgs /** * @deprecated Use SysUserPostDefaultArgs instead */ export type SysUserPostArgs = SysUserPostDefaultArgs /** * @deprecated Use SysRoleDeptDefaultArgs instead */ export type SysRoleDeptArgs = SysRoleDeptDefaultArgs /** * @deprecated Use SysRoleMenuDefaultArgs instead */ export type SysRoleMenuArgs = SysRoleMenuDefaultArgs /** * @deprecated Use SysUserDefaultArgs instead */ export type SysUserArgs = SysUserDefaultArgs /** * @deprecated Use SysRoleDefaultArgs instead */ export type SysRoleArgs = SysRoleDefaultArgs /** * @deprecated Use SysUserRoleDefaultArgs instead */ export type SysUserRoleArgs = SysUserRoleDefaultArgs /** * Batch Payload for updateMany & deleteMany & createMany */ export type BatchPayload = { count: number } /** * DMMF */ export const dmmf: runtime.BaseDMMF } ================================================ FILE: server/src/common/prisma-client/index.js ================================================ Object.defineProperty(exports, "__esModule", { value: true }); const { PrismaClientKnownRequestError, PrismaClientUnknownRequestError, PrismaClientRustPanicError, PrismaClientInitializationError, PrismaClientValidationError, NotFoundError, getPrismaClient, sqltag, empty, join, raw, Decimal, Debug, objectEnumValues, makeStrictEnum, Extensions, warnOnce, defineDmmfProperty, Public, getRuntime } = require('./runtime/library.js') const Prisma = {} exports.Prisma = Prisma exports.$Enums = {} /** * Prisma Client JS version: 5.15.0 * Query Engine version: 12e25d8d06f6ea5a0252864dd9a03b1bb51f3022 */ Prisma.prismaVersion = { client: "5.15.0", engine: "12e25d8d06f6ea5a0252864dd9a03b1bb51f3022" } Prisma.PrismaClientKnownRequestError = PrismaClientKnownRequestError; Prisma.PrismaClientUnknownRequestError = PrismaClientUnknownRequestError Prisma.PrismaClientRustPanicError = PrismaClientRustPanicError Prisma.PrismaClientInitializationError = PrismaClientInitializationError Prisma.PrismaClientValidationError = PrismaClientValidationError Prisma.NotFoundError = NotFoundError Prisma.Decimal = Decimal /** * Re-export of sql-template-tag */ Prisma.sql = sqltag Prisma.empty = empty Prisma.join = join Prisma.raw = raw Prisma.validator = Public.validator /** * Extensions */ Prisma.getExtensionContext = Extensions.getExtensionContext Prisma.defineExtension = Extensions.defineExtension /** * Shorthand utilities for JSON filtering */ Prisma.DbNull = objectEnumValues.instances.DbNull Prisma.JsonNull = objectEnumValues.instances.JsonNull Prisma.AnyNull = objectEnumValues.instances.AnyNull Prisma.NullTypes = { DbNull: objectEnumValues.classes.DbNull, JsonNull: objectEnumValues.classes.JsonNull, AnyNull: objectEnumValues.classes.AnyNull } const path = require('path') /** * Enums */ exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ ReadUncommitted: 'ReadUncommitted', ReadCommitted: 'ReadCommitted', RepeatableRead: 'RepeatableRead', Serializable: 'Serializable' }); exports.Prisma.GenTableScalarFieldEnum = { tableId: 'tableId', tableName: 'tableName', tableComment: 'tableComment', subTableName: 'subTableName', subTableFkName: 'subTableFkName', className: 'className', tplCategory: 'tplCategory', tplWebType: 'tplWebType', packageName: 'packageName', moduleName: 'moduleName', businessName: 'businessName', functionName: 'functionName', functionAuthor: 'functionAuthor', genType: 'genType', genPath: 'genPath', options: 'options', createBy: 'createBy', createTime: 'createTime', updateBy: 'updateBy', updateTime: 'updateTime', remark: 'remark' }; exports.Prisma.RelationLoadStrategy = { query: 'query', join: 'join' }; exports.Prisma.GenTableColumnScalarFieldEnum = { columnId: 'columnId', tableId: 'tableId', columnName: 'columnName', columnComment: 'columnComment', columnType: 'columnType', javaType: 'javaType', javaField: 'javaField', isPk: 'isPk', isIncrement: 'isIncrement', isRequired: 'isRequired', isInsert: 'isInsert', isEdit: 'isEdit', isList: 'isList', isQuery: 'isQuery', queryType: 'queryType', htmlType: 'htmlType', dictType: 'dictType', sort: 'sort', createBy: 'createBy', createTime: 'createTime', updateBy: 'updateBy', updateTime: 'updateTime' }; exports.Prisma.SysConfigScalarFieldEnum = { configId: 'configId', configName: 'configName', configKey: 'configKey', configValue: 'configValue', configType: 'configType', createBy: 'createBy', createTime: 'createTime', updateBy: 'updateBy', updateTime: 'updateTime', remark: 'remark' }; exports.Prisma.SysDeptScalarFieldEnum = { deptId: 'deptId', parentId: 'parentId', ancestors: 'ancestors', deptName: 'deptName', orderNum: 'orderNum', leader: 'leader', phone: 'phone', email: 'email', status: 'status', createBy: 'createBy', createTime: 'createTime', updateBy: 'updateBy', updateTime: 'updateTime' }; exports.Prisma.SysDictDataScalarFieldEnum = { dictCode: 'dictCode', dictSort: 'dictSort', dictLabel: 'dictLabel', dictValue: 'dictValue', dictType: 'dictType', cssClass: 'cssClass', listClass: 'listClass', isDefault: 'isDefault', status: 'status', createBy: 'createBy', createTime: 'createTime', updateBy: 'updateBy', updateTime: 'updateTime', remark: 'remark' }; exports.Prisma.SysDictTypeScalarFieldEnum = { dictId: 'dictId', dictName: 'dictName', dictType: 'dictType', status: 'status', createBy: 'createBy', createTime: 'createTime', updateBy: 'updateBy', updateTime: 'updateTime', remark: 'remark' }; exports.Prisma.SysLogininforScalarFieldEnum = { infoId: 'infoId', userName: 'userName', ipaddr: 'ipaddr', loginLocation: 'loginLocation', browser: 'browser', os: 'os', status: 'status', msg: 'msg', loginTime: 'loginTime' }; exports.Prisma.SysMenuScalarFieldEnum = { menuId: 'menuId', menuName: 'menuName', parentId: 'parentId', orderNum: 'orderNum', path: 'path', component: 'component', query: 'query', isFrame: 'isFrame', isCache: 'isCache', menuType: 'menuType', visible: 'visible', status: 'status', perms: 'perms', icon: 'icon', createBy: 'createBy', createTime: 'createTime', updateBy: 'updateBy', updateTime: 'updateTime', remark: 'remark' }; exports.Prisma.SysNoticeScalarFieldEnum = { noticeId: 'noticeId', noticeTitle: 'noticeTitle', noticeType: 'noticeType', noticeContent: 'noticeContent', status: 'status', createBy: 'createBy', createTime: 'createTime', updateBy: 'updateBy', updateTime: 'updateTime', remark: 'remark' }; exports.Prisma.SysPostScalarFieldEnum = { postId: 'postId', postCode: 'postCode', postName: 'postName', postSort: 'postSort', status: 'status', createBy: 'createBy', createTime: 'createTime', updateBy: 'updateBy', updateTime: 'updateTime', remark: 'remark' }; exports.Prisma.SysUserPostScalarFieldEnum = { userId: 'userId', postId: 'postId' }; exports.Prisma.SysRoleDeptScalarFieldEnum = { roleId: 'roleId', deptId: 'deptId' }; exports.Prisma.SysRoleMenuScalarFieldEnum = { roleId: 'roleId', menuId: 'menuId' }; exports.Prisma.SysUserScalarFieldEnum = { userId: 'userId', deptId: 'deptId', userName: 'userName', nickName: 'nickName', userType: 'userType', email: 'email', phonenumber: 'phonenumber', sex: 'sex', avatar: 'avatar', password: 'password', status: 'status', loginIp: 'loginIp', loginDate: 'loginDate', createBy: 'createBy', createTime: 'createTime', updateBy: 'updateBy', updateTime: 'updateTime', remark: 'remark' }; exports.Prisma.SysRoleScalarFieldEnum = { roleId: 'roleId', roleName: 'roleName', roleKey: 'roleKey', roleSort: 'roleSort', dataScope: 'dataScope', menuCheckStrictly: 'menuCheckStrictly', deptCheckStrictly: 'deptCheckStrictly', status: 'status', createBy: 'createBy', createTime: 'createTime', updateBy: 'updateBy', updateTime: 'updateTime', remark: 'remark' }; exports.Prisma.SysUserRoleScalarFieldEnum = { userId: 'userId', roleId: 'roleId' }; exports.Prisma.SortOrder = { asc: 'asc', desc: 'desc' }; exports.Prisma.NullsOrder = { first: 'first', last: 'last' }; exports.Prisma.ModelName = { GenTable: 'GenTable', GenTableColumn: 'GenTableColumn', SysConfig: 'SysConfig', SysDept: 'SysDept', SysDictData: 'SysDictData', SysDictType: 'SysDictType', SysLogininfor: 'SysLogininfor', SysMenu: 'SysMenu', SysNotice: 'SysNotice', SysPost: 'SysPost', SysUserPost: 'SysUserPost', SysRoleDept: 'SysRoleDept', SysRoleMenu: 'SysRoleMenu', SysUser: 'SysUser', SysRole: 'SysRole', SysUserRole: 'SysUserRole' }; /** * Create the Client */ const config = { "generator": { "name": "client", "provider": { "fromEnvVar": null, "value": "prisma-client-js" }, "output": { "value": "/Users/carole/project/carole-admin/server/src/common/prisma-client", "fromEnvVar": null }, "config": { "engineType": "library" }, "binaryTargets": [ { "fromEnvVar": null, "value": "darwin", "native": true } ], "previewFeatures": [ "views", "relationJoins", "prismaSchemaFolder", "omitApi" ], "isCustomOutput": true }, "relativeEnvPaths": { "rootEnvPath": null, "schemaEnvPath": "../../.env" }, "relativePath": "../..", "clientVersion": "5.15.0", "engineVersion": "12e25d8d06f6ea5a0252864dd9a03b1bb51f3022", "datasourceNames": [ "db" ], "activeProvider": "mysql", "postinstall": true, "inlineDatasources": { "db": { "url": { "fromEnvVar": "DATABASE_URL", "value": null } } }, "inlineSchema": "model GenTable {\n tableId Int @id @default(autoincrement()) @map(\"table_id\") @db.UnsignedInt\n tableName String? @default(\"\") @map(\"table_name\") @db.VarChar(200)\n tableComment String? @default(\"\") @map(\"table_comment\") @db.VarChar(500)\n subTableName String? @map(\"sub_table_name\") @db.VarChar(64)\n subTableFkName String? @map(\"sub_table_fk_name\") @db.VarChar(64)\n className String? @default(\"\") @map(\"class_name\") @db.VarChar(100)\n tplCategory String? @default(\"crud\") @map(\"tpl_category\") @db.VarChar(200)\n tplWebType String? @default(\"\") @map(\"tpl_web_type\") @db.VarChar(30)\n packageName String? @map(\"package_name\") @db.VarChar(100)\n moduleName String? @map(\"module_name\") @db.VarChar(30)\n businessName String? @map(\"business_name\") @db.VarChar(30)\n functionName String? @map(\"function_name\") @db.VarChar(50)\n functionAuthor String? @map(\"function_author\") @db.VarChar(50)\n genType String? @default(\"0\") @map(\"gen_type\") @db.Char(1)\n genPath String? @default(\"/\") @map(\"gen_path\") @db.VarChar(200)\n options String? @map(\"options\") @db.VarChar(1000)\n createBy String? @default(\"\") @map(\"create_by\") @db.VarChar(64)\n createTime String? @map(\"create_time\") @db.VarChar(25)\n updateBy String? @default(\"\") @map(\"update_by\") @db.VarChar(64)\n updateTime String? @map(\"update_time\") @db.VarChar(25)\n remark String? @db.VarChar(500)\n tableColumns GenTableColumn[]\n\n @@map(\"gen_table\")\n}\n\nmodel GenTableColumn {\n columnId Int @id @default(autoincrement()) @map(\"column_id\") @db.UnsignedInt\n tableId Int? @map(\"table_id\") @db.UnsignedInt\n columnName String? @map(\"column_name\") @db.VarChar(200)\n columnComment String? @map(\"column_comment\") @db.VarChar(500)\n columnType String? @map(\"column_type\") @db.VarChar(100)\n javaType String? @map(\"java_type\") @db.VarChar(500)\n javaField String? @map(\"java_field\") @db.VarChar(200)\n isPk String? @map(\"is_pk\") @db.Char(1)\n isIncrement String? @map(\"is_increment\") @db.Char(1)\n isRequired String? @map(\"is_required\") @db.Char(1)\n isInsert String? @map(\"is_insert\") @db.Char(1)\n isEdit String? @map(\"is_edit\") @db.Char(1)\n isList String? @map(\"is_list\") @db.Char(1)\n isQuery String? @map(\"is_query\") @db.Char(1)\n queryType String? @default(\"EQ\") @map(\"query_type\") @db.VarChar(200)\n htmlType String? @map(\"html_type\") @db.VarChar(200)\n dictType String? @default(\"\") @map(\"dict_type\") @db.VarChar(200)\n sort Int? @map(\"sort\")\n createBy String? @default(\"\") @map(\"create_by\") @db.VarChar(64)\n createTime String? @map(\"create_time\") @db.VarChar(25)\n updateBy String? @default(\"\") @map(\"update_by\") @db.VarChar(64)\n updateTime String? @map(\"update_time\") @db.VarChar(25)\n table GenTable? @relation(fields: [tableId], references: [tableId])\n\n @@index([tableId])\n @@map(\"gen_table_column\")\n}\n\nmodel SysConfig {\n configId Int @id @default(autoincrement()) @map(\"config_id\")\n configName String? @default(\"\") @map(\"config_name\") @db.VarChar(100)\n configKey String? @default(\"\") @map(\"config_key\") @db.VarChar(100)\n configValue String? @default(\"\") @map(\"config_value\") @db.VarChar(500)\n configType String? @default(\"N\") @map(\"config_type\") @db.Char(1)\n createBy String? @default(\"\") @map(\"create_by\") @db.VarChar(64)\n createTime String? @map(\"create_time\") @db.VarChar(25)\n updateBy String? @default(\"\") @map(\"update_by\") @db.VarChar(64)\n updateTime String? @map(\"update_time\") @db.VarChar(25)\n remark String? @map(\"remark\") @db.VarChar(500)\n\n @@map(\"sys_config\")\n}\n\nmodel SysDept {\n deptId Int @id @default(autoincrement()) @map(\"dept_id\") @db.UnsignedInt\n parentId Int? @default(0) @map(\"parent_id\") @db.UnsignedInt\n ancestors String? @default(\"\") @map(\"ancestors\") @db.VarChar(50)\n deptName String? @default(\"\") @map(\"dept_name\") @db.VarChar(30)\n orderNum Int? @default(0) @map(\"order_num\")\n leader String? @map(\"leader\") @db.VarChar(20)\n phone String? @map(\"phone\") @db.VarChar(11)\n email String? @map(\"email\") @db.VarChar(50)\n status String? @default(\"1\") @map(\"status\") @db.Char(1)\n createBy String? @default(\"\") @map(\"create_by\") @db.VarChar(64)\n createTime String? @map(\"create_time\") @db.VarChar(25)\n updateBy String? @default(\"\") @map(\"update_by\") @db.VarChar(64)\n updateTime String? @map(\"update_time\") @db.VarChar(25)\n users SysUser[]\n roles SysRoleDept[]\n\n @@map(\"sys_dept\")\n}\n\nmodel SysDictData {\n dictCode Int @id @default(autoincrement()) @map(\"dict_code\") @db.UnsignedInt\n dictSort Int? @default(0) @map(\"dict_sort\")\n dictLabel String? @default(\"\") @map(\"dict_label\") @db.VarChar(100)\n dictValue String? @default(\"\") @map(\"dict_value\") @db.VarChar(100)\n dictType String? @default(\"\") @map(\"dict_type\") @db.VarChar(100)\n cssClass String? @map(\"css_class\") @db.VarChar(100)\n listClass String? @map(\"list_class\") @db.VarChar(100)\n isDefault String? @default(\"N\") @map(\"is_default\") @db.Char(1)\n status String? @default(\"1\") @map(\"status\") @db.Char(1)\n createBy String? @default(\"\") @map(\"create_by\") @db.VarChar(64)\n createTime String? @map(\"create_time\") @db.VarChar(25)\n updateBy String? @default(\"\") @map(\"update_by\") @db.VarChar(64)\n updateTime String? @map(\"update_time\") @db.VarChar(25)\n remark String? @map(\"remark\") @db.VarChar(500)\n sysDictType SysDictType? @relation(fields: [dictType], references: [dictType])\n\n @@index([dictType])\n @@map(\"sys_dict_data\")\n}\n\nmodel SysDictType {\n dictId Int @id @default(autoincrement()) @map(\"dict_id\") @db.UnsignedInt\n dictName String? @default(\"\") @map(\"dict_name\") @db.VarChar(100)\n dictType String? @unique(map: \"dict_type\") @default(\"\") @map(\"dict_type\") @db.VarChar(100)\n status String? @default(\"1\") @map(\"status\") @db.Char(1)\n createBy String? @default(\"\") @map(\"create_by\") @db.VarChar(64)\n createTime String? @map(\"create_time\") @db.VarChar(25)\n updateBy String? @default(\"\") @map(\"update_by\") @db.VarChar(64)\n updateTime String? @map(\"update_time\") @db.VarChar(25)\n remark String? @map(\"remark\") @db.VarChar(500)\n dictDatas SysDictData[]\n\n @@map(\"sys_dict_type\")\n}\n\nmodel SysLogininfor {\n infoId Int @id @default(autoincrement()) @map(\"info_id\") @db.UnsignedInt\n userName String? @default(\"\") @map(\"user_name\") @db.VarChar(50)\n ipaddr String? @default(\"\") @map(\"ipaddr\") @db.VarChar(128)\n loginLocation String? @default(\"\") @map(\"login_location\") @db.VarChar(255)\n browser String? @default(\"\") @map(\"browser\") @db.VarChar(50)\n os String? @default(\"\") @map(\"os\") @db.VarChar(50)\n status String? @default(\"1\") @map(\"status\") @db.Char(1)\n msg String? @default(\"\") @map(\"msg\") @db.VarChar(255)\n loginTime String? @map(\"login_time\") @db.VarChar(25)\n\n @@index([loginTime], map: \"idx_sys_logininfor_lt\")\n @@index([status], map: \"idx_sys_logininfor_s\")\n @@map(\"sys_logininfor\")\n}\n\nmodel SysMenu {\n menuId Int @id @default(autoincrement()) @map(\"menu_id\") @db.UnsignedInt\n menuName String @map(\"menu_name\") @db.VarChar(50)\n parentId Int? @default(0) @map(\"parent_id\") @db.UnsignedInt\n orderNum Int? @default(0) @map(\"order_num\")\n path String? @default(\"\") @map(\"path\") @db.VarChar(200)\n component String? @map(\"component\") @db.VarChar(255)\n query String? @map(\"query\") @db.VarChar(255)\n isFrame Int? @default(0) @map(\"is_frame\")\n isCache Int? @default(1) @map(\"is_cache\")\n menuType String? @default(\"\") @map(\"menu_type\") @db.Char(1)\n visible String? @default(\"1\") @map(\"visible\") @db.Char(1)\n status String? @default(\"1\") @map(\"status\") @db.Char(1)\n perms String? @map(\"perms\") @db.VarChar(100)\n icon String? @default(\"#\") @map(\"icon\") @db.VarChar(100)\n createBy String? @default(\"\") @map(\"create_by\") @db.VarChar(64)\n createTime String? @map(\"create_time\") @db.VarChar(25)\n updateBy String? @default(\"\") @map(\"update_by\") @db.VarChar(64)\n updateTime String? @map(\"update_time\") @db.VarChar(25)\n remark String? @default(\"\") @map(\"remark\") @db.VarChar(500)\n roles SysRoleMenu[]\n\n @@map(\"sys_menu\")\n}\n\nmodel SysNotice {\n noticeId Int @id @default(autoincrement()) @map(\"notice_id\")\n noticeTitle String @map(\"notice_title\") @db.VarChar(50)\n noticeType String @map(\"notice_type\") @db.Char(1)\n noticeContent String? @map(\"notice_content\") @db.MediumText\n status String? @default(\"1\") @map(\"status\") @db.Char(1)\n createBy String? @default(\"\") @map(\"create_by\") @db.VarChar(64)\n createTime String? @map(\"create_time\") @db.VarChar(25)\n updateBy String? @default(\"\") @map(\"update_by\") @db.VarChar(64)\n updateTime String? @map(\"update_time\") @db.VarChar(25)\n remark String? @map(\"remark\") @db.VarChar(255)\n\n @@map(\"sys_notice\")\n}\n\nmodel SysPost {\n postId Int @id @default(autoincrement()) @map(\"post_id\") @db.UnsignedInt\n postCode String @map(\"post_code\") @db.VarChar(64)\n postName String @map(\"post_name\") @db.VarChar(50)\n postSort Int @map(\"post_sort\")\n status String @default(\"1\") @map(\"status\") @db.Char(1)\n createBy String? @default(\"\") @map(\"create_by\") @db.VarChar(64)\n createTime String? @map(\"create_time\") @db.VarChar(25)\n updateBy String? @default(\"\") @map(\"update_by\") @db.VarChar(64)\n updateTime String? @map(\"update_time\") @db.VarChar(25)\n remark String? @map(\"remark\") @db.VarChar(500)\n users SysUserPost[]\n\n @@map(\"sys_post\")\n}\n\nmodel SysUserPost {\n userId Int @map(\"user_id\") @db.UnsignedInt\n postId Int @map(\"post_id\") @db.UnsignedInt\n user SysUser @relation(fields: [userId], references: [userId])\n post SysPost @relation(fields: [postId], references: [postId])\n\n @@id([userId, postId])\n @@index([postId])\n @@map(\"sys_user_post\")\n}\n\nmodel SysRoleDept {\n roleId Int @map(\"role_id\") @db.UnsignedInt\n deptId Int @map(\"dept_id\") @db.UnsignedInt\n role SysRole @relation(fields: [roleId], references: [roleId])\n dept SysDept @relation(fields: [deptId], references: [deptId])\n\n @@id([roleId, deptId])\n @@index([deptId])\n @@map(\"sys_role_dept\")\n}\n\nmodel SysRoleMenu {\n roleId Int @map(\"role_id\") @db.UnsignedInt\n menuId Int @map(\"menu_id\") @db.UnsignedInt\n menu SysMenu @relation(fields: [menuId], references: [menuId])\n role SysRole @relation(fields: [roleId], references: [roleId])\n\n @@id([roleId, menuId])\n @@index([menuId])\n @@map(\"sys_role_menu\")\n}\n\nmodel SysUser {\n userId Int @id @default(autoincrement()) @map(\"user_id\") @db.UnsignedInt\n deptId Int? @map(\"dept_id\") @db.UnsignedInt\n userName String @map(\"user_name\") @db.VarChar(30)\n nickName String @map(\"nick_name\") @db.VarChar(30)\n userType String? @default(\"00\") @map(\"user_type\") @db.VarChar(2)\n email String? @default(\"\") @map(\"email\") @db.VarChar(50)\n phonenumber String? @default(\"\") @map(\"phonenumber\") @db.VarChar(11)\n sex String? @default(\"0\") @map(\"sex\") @db.Char(1)\n avatar String? @default(\"\") @map(\"avatar\") @db.VarChar(100)\n password String? @default(\"\") @map(\"password\") @db.VarChar(100)\n status String? @default(\"1\") @map(\"status\") @db.Char(1)\n loginIp String? @default(\"\") @map(\"login_ip\") @db.VarChar(128)\n loginDate String? @map(\"login_date\") @db.VarChar(25)\n createBy String? @default(\"\") @map(\"create_by\") @db.VarChar(64)\n createTime String? @map(\"create_time\") @db.VarChar(25)\n updateBy String? @default(\"\") @map(\"update_by\") @db.VarChar(64)\n updateTime String? @map(\"update_time\") @db.VarChar(25)\n remark String? @map(\"remark\") @db.VarChar(500)\n dept SysDept? @relation(fields: [deptId], references: [deptId])\n roles SysUserRole[]\n posts SysUserPost[]\n\n @@index([deptId])\n @@map(\"sys_user\")\n}\n\nmodel SysRole {\n roleId Int @id @default(autoincrement()) @map(\"role_id\") @db.UnsignedInt\n roleName String @map(\"role_name\") @db.VarChar(30)\n roleKey String @map(\"role_key\") @db.VarChar(100)\n roleSort Int @map(\"role_sort\")\n dataScope String? @default(\"5\") @map(\"data_scope\") @db.Char(1)\n menuCheckStrictly Int? @default(1) @map(\"menu_check_strictly\") @db.TinyInt\n deptCheckStrictly Int? @default(1) @map(\"dept_check_strictly\") @db.TinyInt\n status String @default(\"1\") @map(\"status\") @db.Char(1)\n createBy String? @default(\"\") @map(\"create_by\") @db.VarChar(64)\n createTime String? @map(\"create_time\") @db.VarChar(25)\n updateBy String? @default(\"\") @map(\"update_by\") @db.VarChar(64)\n updateTime String? @map(\"update_time\") @db.VarChar(25)\n remark String? @map(\"remark\") @db.VarChar(500)\n users SysUserRole[]\n menus SysRoleMenu[]\n depts SysRoleDept[]\n\n @@map(\"sys_role\")\n}\n\nmodel SysUserRole {\n userId Int @map(\"user_id\") @db.UnsignedInt\n roleId Int @map(\"role_id\") @db.UnsignedInt\n user SysUser @relation(fields: [userId], references: [userId])\n role SysRole @relation(fields: [roleId], references: [roleId])\n\n @@id([userId, roleId])\n @@index([roleId])\n @@map(\"sys_user_role\")\n}\n\ngenerator client {\n provider = \"prisma-client-js\"\n output = \"./common/prisma-client\"\n previewFeatures = [\"views\", \"relationJoins\", \"prismaSchemaFolder\", \"omitApi\"]\n //这里可以指定平台引擎,native就是当前系统, 如果需要其他系统的自行添加,或者到目标系统执行npx prisma generate\n binaryTargets = [\"native\"]\n // binaryTargets = [\"native\", \"windows\", \"linux-musl\",\"debian-openssl-3.0.x\",\"darwin\",\"darwin-arm64\"]\n}\n\ndatasource db {\n provider = \"mysql\"\n url = env(\"DATABASE_URL\")\n relationMode = \"prisma\"\n}\n", "inlineSchemaHash": "0b0d574d7aafbd1cd7ba47583488b808df1af0e6a2ca704e20a74708d2aad32a", "copyEngine": true } const fs = require('fs') config.dirname = __dirname if (!fs.existsSync(path.join(__dirname, 'schema.prisma'))) { const alternativePaths = [ "src/common/prisma-client", "common/prisma-client", ] const alternativePath = alternativePaths.find((altPath) => { return fs.existsSync(path.join(process.cwd(), altPath, 'schema.prisma')) }) ?? alternativePaths[0] config.dirname = path.join(process.cwd(), alternativePath) config.isBundled = true } config.runtimeDataModel = JSON.parse("{\"models\":{\"GenTable\":{\"dbName\":\"gen_table\",\"fields\":[{\"name\":\"tableId\",\"dbName\":\"table_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"tableName\",\"dbName\":\"table_name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"tableComment\",\"dbName\":\"table_comment\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"subTableName\",\"dbName\":\"sub_table_name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"subTableFkName\",\"dbName\":\"sub_table_fk_name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"className\",\"dbName\":\"class_name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"tplCategory\",\"dbName\":\"tpl_category\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"crud\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"tplWebType\",\"dbName\":\"tpl_web_type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"packageName\",\"dbName\":\"package_name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"moduleName\",\"dbName\":\"module_name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"businessName\",\"dbName\":\"business_name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"functionName\",\"dbName\":\"function_name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"functionAuthor\",\"dbName\":\"function_author\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"genType\",\"dbName\":\"gen_type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"0\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"genPath\",\"dbName\":\"gen_path\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"/\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"options\",\"dbName\":\"options\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createBy\",\"dbName\":\"create_by\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createTime\",\"dbName\":\"create_time\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updateBy\",\"dbName\":\"update_by\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updateTime\",\"dbName\":\"update_time\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"remark\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"tableColumns\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"GenTableColumn\",\"relationName\":\"GenTableToGenTableColumn\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"GenTableColumn\":{\"dbName\":\"gen_table_column\",\"fields\":[{\"name\":\"columnId\",\"dbName\":\"column_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"tableId\",\"dbName\":\"table_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"columnName\",\"dbName\":\"column_name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"columnComment\",\"dbName\":\"column_comment\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"columnType\",\"dbName\":\"column_type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"javaType\",\"dbName\":\"java_type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"javaField\",\"dbName\":\"java_field\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isPk\",\"dbName\":\"is_pk\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isIncrement\",\"dbName\":\"is_increment\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isRequired\",\"dbName\":\"is_required\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isInsert\",\"dbName\":\"is_insert\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isEdit\",\"dbName\":\"is_edit\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isList\",\"dbName\":\"is_list\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isQuery\",\"dbName\":\"is_query\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"queryType\",\"dbName\":\"query_type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"EQ\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"htmlType\",\"dbName\":\"html_type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"dictType\",\"dbName\":\"dict_type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sort\",\"dbName\":\"sort\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createBy\",\"dbName\":\"create_by\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createTime\",\"dbName\":\"create_time\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updateBy\",\"dbName\":\"update_by\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updateTime\",\"dbName\":\"update_time\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"table\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"GenTable\",\"relationName\":\"GenTableToGenTableColumn\",\"relationFromFields\":[\"tableId\"],\"relationToFields\":[\"tableId\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"SysConfig\":{\"dbName\":\"sys_config\",\"fields\":[{\"name\":\"configId\",\"dbName\":\"config_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"configName\",\"dbName\":\"config_name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"configKey\",\"dbName\":\"config_key\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"configValue\",\"dbName\":\"config_value\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"configType\",\"dbName\":\"config_type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"N\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createBy\",\"dbName\":\"create_by\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createTime\",\"dbName\":\"create_time\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updateBy\",\"dbName\":\"update_by\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updateTime\",\"dbName\":\"update_time\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"remark\",\"dbName\":\"remark\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"SysDept\":{\"dbName\":\"sys_dept\",\"fields\":[{\"name\":\"deptId\",\"dbName\":\"dept_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"parentId\",\"dbName\":\"parent_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"ancestors\",\"dbName\":\"ancestors\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"deptName\",\"dbName\":\"dept_name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"orderNum\",\"dbName\":\"order_num\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"leader\",\"dbName\":\"leader\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"phone\",\"dbName\":\"phone\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"email\",\"dbName\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"dbName\":\"status\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"1\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createBy\",\"dbName\":\"create_by\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createTime\",\"dbName\":\"create_time\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updateBy\",\"dbName\":\"update_by\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updateTime\",\"dbName\":\"update_time\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"users\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SysUser\",\"relationName\":\"SysDeptToSysUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"roles\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SysRoleDept\",\"relationName\":\"SysDeptToSysRoleDept\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"SysDictData\":{\"dbName\":\"sys_dict_data\",\"fields\":[{\"name\":\"dictCode\",\"dbName\":\"dict_code\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"dictSort\",\"dbName\":\"dict_sort\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"dictLabel\",\"dbName\":\"dict_label\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"dictValue\",\"dbName\":\"dict_value\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"dictType\",\"dbName\":\"dict_type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"cssClass\",\"dbName\":\"css_class\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"listClass\",\"dbName\":\"list_class\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isDefault\",\"dbName\":\"is_default\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"N\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"dbName\":\"status\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"1\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createBy\",\"dbName\":\"create_by\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createTime\",\"dbName\":\"create_time\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updateBy\",\"dbName\":\"update_by\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updateTime\",\"dbName\":\"update_time\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"remark\",\"dbName\":\"remark\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sysDictType\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SysDictType\",\"relationName\":\"SysDictDataToSysDictType\",\"relationFromFields\":[\"dictType\"],\"relationToFields\":[\"dictType\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"SysDictType\":{\"dbName\":\"sys_dict_type\",\"fields\":[{\"name\":\"dictId\",\"dbName\":\"dict_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"dictName\",\"dbName\":\"dict_name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"dictType\",\"dbName\":\"dict_type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"dbName\":\"status\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"1\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createBy\",\"dbName\":\"create_by\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createTime\",\"dbName\":\"create_time\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updateBy\",\"dbName\":\"update_by\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updateTime\",\"dbName\":\"update_time\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"remark\",\"dbName\":\"remark\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"dictDatas\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SysDictData\",\"relationName\":\"SysDictDataToSysDictType\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"SysLogininfor\":{\"dbName\":\"sys_logininfor\",\"fields\":[{\"name\":\"infoId\",\"dbName\":\"info_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userName\",\"dbName\":\"user_name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"ipaddr\",\"dbName\":\"ipaddr\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"loginLocation\",\"dbName\":\"login_location\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"browser\",\"dbName\":\"browser\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"os\",\"dbName\":\"os\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"dbName\":\"status\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"1\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"msg\",\"dbName\":\"msg\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"loginTime\",\"dbName\":\"login_time\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"SysMenu\":{\"dbName\":\"sys_menu\",\"fields\":[{\"name\":\"menuId\",\"dbName\":\"menu_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"menuName\",\"dbName\":\"menu_name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"parentId\",\"dbName\":\"parent_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"orderNum\",\"dbName\":\"order_num\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"path\",\"dbName\":\"path\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"component\",\"dbName\":\"component\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"query\",\"dbName\":\"query\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isFrame\",\"dbName\":\"is_frame\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isCache\",\"dbName\":\"is_cache\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":1,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"menuType\",\"dbName\":\"menu_type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"visible\",\"dbName\":\"visible\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"1\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"dbName\":\"status\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"1\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"perms\",\"dbName\":\"perms\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"icon\",\"dbName\":\"icon\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"#\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createBy\",\"dbName\":\"create_by\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createTime\",\"dbName\":\"create_time\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updateBy\",\"dbName\":\"update_by\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updateTime\",\"dbName\":\"update_time\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"remark\",\"dbName\":\"remark\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"roles\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SysRoleMenu\",\"relationName\":\"SysMenuToSysRoleMenu\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"SysNotice\":{\"dbName\":\"sys_notice\",\"fields\":[{\"name\":\"noticeId\",\"dbName\":\"notice_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"noticeTitle\",\"dbName\":\"notice_title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"noticeType\",\"dbName\":\"notice_type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"noticeContent\",\"dbName\":\"notice_content\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"dbName\":\"status\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"1\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createBy\",\"dbName\":\"create_by\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createTime\",\"dbName\":\"create_time\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updateBy\",\"dbName\":\"update_by\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updateTime\",\"dbName\":\"update_time\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"remark\",\"dbName\":\"remark\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"SysPost\":{\"dbName\":\"sys_post\",\"fields\":[{\"name\":\"postId\",\"dbName\":\"post_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"postCode\",\"dbName\":\"post_code\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"postName\",\"dbName\":\"post_name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"postSort\",\"dbName\":\"post_sort\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"dbName\":\"status\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"1\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createBy\",\"dbName\":\"create_by\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createTime\",\"dbName\":\"create_time\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updateBy\",\"dbName\":\"update_by\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updateTime\",\"dbName\":\"update_time\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"remark\",\"dbName\":\"remark\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"users\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SysUserPost\",\"relationName\":\"SysPostToSysUserPost\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"SysUserPost\":{\"dbName\":\"sys_user_post\",\"fields\":[{\"name\":\"userId\",\"dbName\":\"user_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"postId\",\"dbName\":\"post_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SysUser\",\"relationName\":\"SysUserToSysUserPost\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"userId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"post\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SysPost\",\"relationName\":\"SysPostToSysUserPost\",\"relationFromFields\":[\"postId\"],\"relationToFields\":[\"postId\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":{\"name\":null,\"fields\":[\"userId\",\"postId\"]},\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"SysRoleDept\":{\"dbName\":\"sys_role_dept\",\"fields\":[{\"name\":\"roleId\",\"dbName\":\"role_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"deptId\",\"dbName\":\"dept_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"role\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SysRole\",\"relationName\":\"SysRoleToSysRoleDept\",\"relationFromFields\":[\"roleId\"],\"relationToFields\":[\"roleId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"dept\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SysDept\",\"relationName\":\"SysDeptToSysRoleDept\",\"relationFromFields\":[\"deptId\"],\"relationToFields\":[\"deptId\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":{\"name\":null,\"fields\":[\"roleId\",\"deptId\"]},\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"SysRoleMenu\":{\"dbName\":\"sys_role_menu\",\"fields\":[{\"name\":\"roleId\",\"dbName\":\"role_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"menuId\",\"dbName\":\"menu_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"menu\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SysMenu\",\"relationName\":\"SysMenuToSysRoleMenu\",\"relationFromFields\":[\"menuId\"],\"relationToFields\":[\"menuId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"role\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SysRole\",\"relationName\":\"SysRoleToSysRoleMenu\",\"relationFromFields\":[\"roleId\"],\"relationToFields\":[\"roleId\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":{\"name\":null,\"fields\":[\"roleId\",\"menuId\"]},\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"SysUser\":{\"dbName\":\"sys_user\",\"fields\":[{\"name\":\"userId\",\"dbName\":\"user_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"deptId\",\"dbName\":\"dept_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userName\",\"dbName\":\"user_name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"nickName\",\"dbName\":\"nick_name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userType\",\"dbName\":\"user_type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"00\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"email\",\"dbName\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"phonenumber\",\"dbName\":\"phonenumber\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sex\",\"dbName\":\"sex\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"0\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"avatar\",\"dbName\":\"avatar\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"password\",\"dbName\":\"password\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"dbName\":\"status\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"1\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"loginIp\",\"dbName\":\"login_ip\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"loginDate\",\"dbName\":\"login_date\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createBy\",\"dbName\":\"create_by\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createTime\",\"dbName\":\"create_time\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updateBy\",\"dbName\":\"update_by\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updateTime\",\"dbName\":\"update_time\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"remark\",\"dbName\":\"remark\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"dept\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SysDept\",\"relationName\":\"SysDeptToSysUser\",\"relationFromFields\":[\"deptId\"],\"relationToFields\":[\"deptId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"roles\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SysUserRole\",\"relationName\":\"SysUserToSysUserRole\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"posts\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SysUserPost\",\"relationName\":\"SysUserToSysUserPost\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"SysRole\":{\"dbName\":\"sys_role\",\"fields\":[{\"name\":\"roleId\",\"dbName\":\"role_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":{\"name\":\"autoincrement\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"roleName\",\"dbName\":\"role_name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"roleKey\",\"dbName\":\"role_key\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"roleSort\",\"dbName\":\"role_sort\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"dataScope\",\"dbName\":\"data_scope\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"5\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"menuCheckStrictly\",\"dbName\":\"menu_check_strictly\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":1,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"deptCheckStrictly\",\"dbName\":\"dept_check_strictly\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":1,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"dbName\":\"status\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"1\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createBy\",\"dbName\":\"create_by\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createTime\",\"dbName\":\"create_time\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updateBy\",\"dbName\":\"update_by\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":\"\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updateTime\",\"dbName\":\"update_time\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"remark\",\"dbName\":\"remark\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"users\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SysUserRole\",\"relationName\":\"SysRoleToSysUserRole\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"menus\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SysRoleMenu\",\"relationName\":\"SysRoleToSysRoleMenu\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"depts\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SysRoleDept\",\"relationName\":\"SysRoleToSysRoleDept\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"SysUserRole\":{\"dbName\":\"sys_user_role\",\"fields\":[{\"name\":\"userId\",\"dbName\":\"user_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"roleId\",\"dbName\":\"role_id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"user\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SysUser\",\"relationName\":\"SysUserToSysUserRole\",\"relationFromFields\":[\"userId\"],\"relationToFields\":[\"userId\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"role\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SysRole\",\"relationName\":\"SysRoleToSysUserRole\",\"relationFromFields\":[\"roleId\"],\"relationToFields\":[\"roleId\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":{\"name\":null,\"fields\":[\"userId\",\"roleId\"]},\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false}},\"enums\":{},\"types\":{}}") defineDmmfProperty(exports.Prisma, config.runtimeDataModel) config.engineWasm = undefined const { warnEnvConflicts } = require('./runtime/library.js') warnEnvConflicts({ rootEnvPath: config.relativeEnvPaths.rootEnvPath && path.resolve(config.dirname, config.relativeEnvPaths.rootEnvPath), schemaEnvPath: config.relativeEnvPaths.schemaEnvPath && path.resolve(config.dirname, config.relativeEnvPaths.schemaEnvPath) }) const PrismaClient = getPrismaClient(config) exports.PrismaClient = PrismaClient Object.assign(exports, Prisma) // file annotations for bundling tools to include these files path.join(__dirname, "libquery_engine-darwin.dylib.node"); path.join(process.cwd(), "src/common/prisma-client/libquery_engine-darwin.dylib.node") // file annotations for bundling tools to include these files path.join(__dirname, "schema.prisma"); path.join(process.cwd(), "src/common/prisma-client/schema.prisma") ================================================ FILE: server/src/common/prisma-client/libquery_engine-darwin.dylib.node ================================================ [File too large to display: 18.5 MB] ================================================ FILE: server/src/common/prisma-client/package.json ================================================ { "name": "prisma-client-3bb0c16fd7cfb0948e3effbc9256bc47bfb1b59de010e278f8fa903ea3ea8fa6", "main": "index.js", "types": "index.d.ts", "browser": "index-browser.js", "exports": { "./package.json": "./package.json", ".": { "require": { "node": "./index.js", "edge-light": "./wasm.js", "workerd": "./wasm.js", "worker": "./wasm.js", "browser": "./index-browser.js", "default": "./index.js" }, "import": { "node": "./index.js", "edge-light": "./wasm.js", "workerd": "./wasm.js", "worker": "./wasm.js", "browser": "./index-browser.js", "default": "./index.js" }, "default": "./index.js" }, "./edge": { "types": "./edge.d.ts", "require": "./edge.js", "import": "./edge.js", "default": "./edge.js" }, "./react-native": { "types": "./react-native.d.ts", "require": "./react-native.js", "import": "./react-native.js", "default": "./react-native.js" }, "./extension": { "types": "./extension.d.ts", "require": "./extension.js", "import": "./extension.js", "default": "./extension.js" }, "./index-browser": { "types": "./index.d.ts", "require": "./index-browser.js", "import": "./index-browser.js", "default": "./index-browser.js" }, "./index": { "types": "./index.d.ts", "require": "./index.js", "import": "./index.js", "default": "./index.js" }, "./wasm": { "types": "./wasm.d.ts", "require": "./wasm.js", "import": "./wasm.js", "default": "./wasm.js" }, "./runtime/library": { "types": "./runtime/library.d.ts", "require": "./runtime/library.js", "import": "./runtime/library.js", "default": "./runtime/library.js" }, "./runtime/binary": { "types": "./runtime/binary.d.ts", "require": "./runtime/binary.js", "import": "./runtime/binary.js", "default": "./runtime/binary.js" }, "./generator-build": { "require": "./generator-build/index.js", "import": "./generator-build/index.js", "default": "./generator-build/index.js" }, "./*": "./*" }, "version": "5.15.0", "sideEffects": false } ================================================ FILE: server/src/common/prisma-client/query_engine-windows.dll.node ================================================ [File too large to display: 18.5 MB] ================================================ FILE: server/src/common/prisma-client/runtime/edge-esm.js ================================================ var ia=Object.create;var rr=Object.defineProperty;var oa=Object.getOwnPropertyDescriptor;var sa=Object.getOwnPropertyNames;var aa=Object.getPrototypeOf,ua=Object.prototype.hasOwnProperty;var Pt=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(t,r)=>(typeof require!="undefined"?require:t)[r]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Ee=(e,t)=>()=>(e&&(t=e(e=0)),t);var Ae=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),nr=(e,t)=>{for(var r in t)rr(e,r,{get:t[r],enumerable:!0})},Qn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of sa(t))!ua.call(e,i)&&i!==r&&rr(e,i,{get:()=>t[i],enumerable:!(n=oa(t,i))||n.enumerable});return e};var Ue=(e,t,r)=>(r=e!=null?ia(aa(e)):{},Qn(t||!e||!e.__esModule?rr(r,"default",{value:e,enumerable:!0}):r,e)),Gn=e=>Qn(rr({},"__esModule",{value:!0}),e);var y,c=Ee(()=>{"use strict";y={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"]}});var Hn,b,p=Ee(()=>{"use strict";b=(Hn=globalThis.performance)!=null?Hn:(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,f=Ee(()=>{"use strict";E=()=>{};E.prototype=E});var m=Ee(()=>{"use strict"});var fi=Ae(rt=>{"use strict";d();c();p();f();m();var Zn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),la=Zn(e=>{"use strict";e.byteLength=u,e.toByteArray=g,e.fromByteArray=S;var t=[],r=[],n=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(o=0,s=i.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var k=C.indexOf("=");k===-1&&(k=A);var O=k===A?0:4-k%4;return[k,O]}function u(C){var A=a(C),k=A[0],O=A[1];return(k+O)*3/4-O}function l(C,A,k){return(A+k)*3/4-k}function g(C){var A,k=a(C),O=k[0],B=k[1],M=new n(l(C,O,B)),I=0,Z=B>0?O-4:O,L;for(L=0;L>16&255,M[I++]=A>>8&255,M[I++]=A&255;return B===2&&(A=r[C.charCodeAt(L)]<<2|r[C.charCodeAt(L+1)]>>4,M[I++]=A&255),B===1&&(A=r[C.charCodeAt(L)]<<10|r[C.charCodeAt(L+1)]<<4|r[C.charCodeAt(L+2)]>>2,M[I++]=A>>8&255,M[I++]=A&255),M}function h(C){return t[C>>18&63]+t[C>>12&63]+t[C>>6&63]+t[C&63]}function x(C,A,k){for(var O,B=[],M=A;MZ?Z:I+M));return O===1?(A=C[k-1],B.push(t[A>>2]+t[A<<4&63]+"==")):O===2&&(A=(C[k-2]<<8)+C[k-1],B.push(t[A>>10]+t[A>>4&63]+t[A<<2&63]+"=")),B.join("")}}),ca=Zn(e=>{e.read=function(t,r,n,i,o){var s,a,u=o*8-i-1,l=(1<>1,h=-7,x=n?o-1:0,S=n?-1:1,C=t[r+x];for(x+=S,s=C&(1<<-h)-1,C>>=-h,h+=u;h>0;s=s*256+t[r+x],x+=S,h-=8);for(a=s&(1<<-h)-1,s>>=-h,h+=i;h>0;a=a*256+t[r+x],x+=S,h-=8);if(s===0)s=1-g;else{if(s===l)return a?NaN:(C?-1:1)*(1/0);a=a+Math.pow(2,i),s=s-g}return(C?-1:1)*a*Math.pow(2,s-i)},e.write=function(t,r,n,i,o,s){var a,u,l,g=s*8-o-1,h=(1<>1,S=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,C=i?0:s-1,A=i?1:-1,k=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(u=isNaN(r)?1:0,a=h):(a=Math.floor(Math.log(r)/Math.LN2),r*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+x>=1?r+=S/l:r+=S*Math.pow(2,1-x),r*l>=2&&(a++,l/=2),a+x>=h?(u=0,a=h):a+x>=1?(u=(r*l-1)*Math.pow(2,o),a=a+x):(u=r*Math.pow(2,x-1)*Math.pow(2,o),a=0));o>=8;t[n+C]=u&255,C+=A,u/=256,o-=8);for(a=a<0;t[n+C]=a&255,C+=A,a/=256,g-=8);t[n+C-A]|=k*128}}),Qr=la(),et=ca(),Wn=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;rt.Buffer=T;rt.SlowBuffer=ha;rt.INSPECT_MAX_BYTES=50;var ir=2147483647;rt.kMaxLength=ir;T.TYPED_ARRAY_SUPPORT=pa();!T.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function pa(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch(e){return!1}}Object.defineProperty(T.prototype,"parent",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.buffer}});Object.defineProperty(T.prototype,"offset",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.byteOffset}});function be(e){if(e>ir)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,T.prototype),t}function T(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return Wr(e)}return Xn(e,t,r)}T.poolSize=8192;function Xn(e,t,r){if(typeof e=="string")return ma(e,t);if(ArrayBuffer.isView(e))return da(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(me(e,ArrayBuffer)||e&&me(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(me(e,SharedArrayBuffer)||e&&me(e.buffer,SharedArrayBuffer)))return ti(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return T.from(n,t,r);let i=ga(e);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return T.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}T.from=function(e,t,r){return Xn(e,t,r)};Object.setPrototypeOf(T.prototype,Uint8Array.prototype);Object.setPrototypeOf(T,Uint8Array);function ei(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function fa(e,t,r){return ei(e),e<=0?be(e):t!==void 0?typeof r=="string"?be(e).fill(t,r):be(e).fill(t):be(e)}T.alloc=function(e,t,r){return fa(e,t,r)};function Wr(e){return ei(e),be(e<0?0:Kr(e)|0)}T.allocUnsafe=function(e){return Wr(e)};T.allocUnsafeSlow=function(e){return Wr(e)};function ma(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!T.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=ri(e,t)|0,n=be(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function Gr(e){let t=e.length<0?0:Kr(e.length)|0,r=be(t);for(let n=0;n=ir)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ir.toString(16)+" bytes");return e|0}function ha(e){return+e!=e&&(e=0),T.alloc(+e)}T.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==T.prototype};T.compare=function(e,t){if(me(e,Uint8Array)&&(e=T.from(e,e.offset,e.byteLength)),me(t,Uint8Array)&&(t=T.from(t,t.offset,t.byteLength)),!T.isBuffer(e)||!T.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);in.length?(T.isBuffer(o)||(o=T.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else if(T.isBuffer(o))o.copy(n,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=o.length}return n};function ri(e,t){if(T.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||me(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return Hr(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return pi(e).length;default:if(i)return n?-1:Hr(e).length;t=(""+t).toLowerCase(),i=!0}}T.byteLength=ri;function ya(e,t,r){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return Ra(this,t,r);case"utf8":case"utf-8":return ii(this,t,r);case"ascii":return Ca(this,t,r);case"latin1":case"binary":return Aa(this,t,r);case"base64":return va(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Sa(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}T.prototype._isBuffer=!0;function Ve(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}T.prototype.swap16=function(){let e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tt&&(e+=" ... "),""};Wn&&(T.prototype[Wn]=T.prototype.inspect);T.prototype.compare=function(e,t,r,n,i){if(me(e,Uint8Array)&&(e=T.from(e,e.offset,e.byteLength)),!T.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),r===void 0&&(r=e?e.length:0),n===void 0&&(n=0),i===void 0&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;let o=i-n,s=r-t,a=Math.min(o,s),u=this.slice(n,i),l=e.slice(t,r);for(let g=0;g2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,Yr(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof t=="string"&&(t=T.from(t,n)),T.isBuffer(t))return t.length===0?-1:Kn(e,t,r,n,i);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):Kn(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function Kn(e,t,r,n,i){let o=1,s=e.length,a=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;o=2,s/=2,a/=2,r/=2}function u(g,h){return o===1?g[h]:g.readUInt16BE(h*o)}let l;if(i){let g=-1;for(l=r;ls&&(r=s-a),l=r;l>=0;l--){let g=!0;for(let h=0;hi&&(n=i)):n=i;let o=t.length;n>o/2&&(n=o/2);let s;for(s=0;s>>0,isFinite(r)?(r=r>>>0,n===void 0&&(n="utf8")):(n=r,r=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-t;if((r===void 0||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return wa(this,e,t,r);case"utf8":case"utf-8":return Ea(this,e,t,r);case"ascii":case"latin1":case"binary":return ba(this,e,t,r);case"base64":return xa(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Pa(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}};T.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function va(e,t,r){return t===0&&r===e.length?Qr.fromByteArray(e):Qr.fromByteArray(e.slice(t,r))}function ii(e,t,r){r=Math.min(e.length,r);let n=[],i=t;for(;i239?4:o>223?3:o>191?2:1;if(i+a<=r){let u,l,g,h;switch(a){case 1:o<128&&(s=o);break;case 2:u=e[i+1],(u&192)===128&&(h=(o&31)<<6|u&63,h>127&&(s=h));break;case 3:u=e[i+1],l=e[i+2],(u&192)===128&&(l&192)===128&&(h=(o&15)<<12|(u&63)<<6|l&63,h>2047&&(h<55296||h>57343)&&(s=h));break;case 4:u=e[i+1],l=e[i+2],g=e[i+3],(u&192)===128&&(l&192)===128&&(g&192)===128&&(h=(o&15)<<18|(u&63)<<12|(l&63)<<6|g&63,h>65535&&h<1114112&&(s=h))}}s===null?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),i+=a}return Ta(n)}var zn=4096;function Ta(e){let t=e.length;if(t<=zn)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn)&&(r=n);let i="";for(let o=t;or&&(e=r),t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),tr)throw new RangeError("Trying to access beyond buffer length")}T.prototype.readUintLE=T.prototype.readUIntLE=function(e,t,r){e=e>>>0,t=t>>>0,r||W(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>0,t=t>>>0,r||W(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n};T.prototype.readUint8=T.prototype.readUInt8=function(e,t){return e=e>>>0,t||W(e,1,this.length),this[e]};T.prototype.readUint16LE=T.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||W(e,2,this.length),this[e]|this[e+1]<<8};T.prototype.readUint16BE=T.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||W(e,2,this.length),this[e]<<8|this[e+1]};T.prototype.readUint32LE=T.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||W(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};T.prototype.readUint32BE=T.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||W(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};T.prototype.readBigUInt64LE=Re(function(e){e=e>>>0,tt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&vt(e,this.length-8);let n=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,i=this[++e]+this[++e]*2**8+this[++e]*2**16+r*2**24;return BigInt(n)+(BigInt(i)<>>0,tt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&vt(e,this.length-8);let n=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],i=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+r;return(BigInt(n)<>>0,t=t>>>0,r||W(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n};T.prototype.readIntBE=function(e,t,r){e=e>>>0,t=t>>>0,r||W(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o};T.prototype.readInt8=function(e,t){return e=e>>>0,t||W(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};T.prototype.readInt16LE=function(e,t){e=e>>>0,t||W(e,2,this.length);let r=this[e]|this[e+1]<<8;return r&32768?r|4294901760:r};T.prototype.readInt16BE=function(e,t){e=e>>>0,t||W(e,2,this.length);let r=this[e+1]|this[e]<<8;return r&32768?r|4294901760:r};T.prototype.readInt32LE=function(e,t){return e=e>>>0,t||W(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};T.prototype.readInt32BE=function(e,t){return e=e>>>0,t||W(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};T.prototype.readBigInt64LE=Re(function(e){e=e>>>0,tt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&vt(e,this.length-8);let n=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(r<<24);return(BigInt(n)<>>0,tt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&vt(e,this.length-8);let n=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(n)<>>0,t||W(e,4,this.length),et.read(this,e,!0,23,4)};T.prototype.readFloatBE=function(e,t){return e=e>>>0,t||W(e,4,this.length),et.read(this,e,!1,23,4)};T.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||W(e,8,this.length),et.read(this,e,!0,52,8)};T.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||W(e,8,this.length),et.read(this,e,!1,52,8)};function ie(e,t,r,n,i,o){if(!T.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}T.prototype.writeUintLE=T.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;ie(this,e,t,r,s,0)}let i=1,o=0;for(this[t]=e&255;++o>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;ie(this,e,t,r,s,0)}let i=r-1,o=1;for(this[t+i]=e&255;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r};T.prototype.writeUint8=T.prototype.writeUInt8=function(e,t,r){return e=+e,t=t>>>0,r||ie(this,e,t,1,255,0),this[t]=e&255,t+1};T.prototype.writeUint16LE=T.prototype.writeUInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||ie(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2};T.prototype.writeUint16BE=T.prototype.writeUInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||ie(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2};T.prototype.writeUint32LE=T.prototype.writeUInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||ie(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4};T.prototype.writeUint32BE=T.prototype.writeUInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||ie(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function oi(e,t,r,n,i){ci(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,r}function si(e,t,r,n,i){ci(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o=o>>8,e[r+6]=o,o=o>>8,e[r+5]=o,o=o>>8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s=s>>8,e[r+2]=s,s=s>>8,e[r+1]=s,s=s>>8,e[r]=s,r+8}T.prototype.writeBigUInt64LE=Re(function(e,t=0){return oi(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});T.prototype.writeBigUInt64BE=Re(function(e,t=0){return si(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});T.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);ie(this,e,t,r,a-1,-a)}let i=0,o=1,s=0;for(this[t]=e&255;++i>0)-s&255;return t+r};T.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);ie(this,e,t,r,a-1,-a)}let i=r-1,o=1,s=0;for(this[t+i]=e&255;--i>=0&&(o*=256);)e<0&&s===0&&this[t+i+1]!==0&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r};T.prototype.writeInt8=function(e,t,r){return e=+e,t=t>>>0,r||ie(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1};T.prototype.writeInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||ie(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2};T.prototype.writeInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||ie(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2};T.prototype.writeInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||ie(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4};T.prototype.writeInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||ie(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};T.prototype.writeBigInt64LE=Re(function(e,t=0){return oi(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});T.prototype.writeBigInt64BE=Re(function(e,t=0){return si(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ai(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function ui(e,t,r,n,i){return t=+t,r=r>>>0,i||ai(e,t,r,4,34028234663852886e22,-34028234663852886e22),et.write(e,t,r,n,23,4),r+4}T.prototype.writeFloatLE=function(e,t,r){return ui(this,e,t,!0,r)};T.prototype.writeFloatBE=function(e,t,r){return ui(this,e,t,!1,r)};function li(e,t,r,n,i){return t=+t,r=r>>>0,i||ai(e,t,r,8,17976931348623157e292,-17976931348623157e292),et.write(e,t,r,n,52,8),r+8}T.prototype.writeDoubleLE=function(e,t,r){return li(this,e,t,!0,r)};T.prototype.writeDoubleBE=function(e,t,r){return li(this,e,t,!1,r)};T.prototype.copy=function(e,t,r,n){if(!T.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),!n&&n!==0&&(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>0,r=r===void 0?this.length:r>>>0,e||(e=0);let i;if(typeof e=="number")for(i=t;i2**32?i=Yn(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=Yn(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function Yn(e){let t="",r=e.length,n=e[0]==="-"?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function Ia(e,t,r){tt(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&vt(t,e.length-(r+1))}function ci(e,t,r,n,i,o){if(e>r||e3?t===0||t===BigInt(0)?a=`>= 0${s} and < 2${s} ** ${(o+1)*8}${s}`:a=`>= -(2${s} ** ${(o+1)*8-1}${s}) and < 2 ** ${(o+1)*8-1}${s}`:a=`>= ${t}${s} and <= ${r}${s}`,new Xe.ERR_OUT_OF_RANGE("value",a,e)}Ia(n,i,o)}function tt(e,t){if(typeof e!="number")throw new Xe.ERR_INVALID_ARG_TYPE(t,"number",e)}function vt(e,t,r){throw Math.floor(e)!==e?(tt(e,r),new Xe.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new Xe.ERR_BUFFER_OUT_OF_BOUNDS:new Xe.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var Da=/[^+/0-9A-Za-z-_]/g;function ka(e){if(e=e.split("=")[0],e=e.trim().replace(Da,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function Hr(e,t){t=t||1/0;let r,n=e.length,i=null,o=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return o}function Oa(e){let t=[];for(let r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function pi(e){return Qr.toByteArray(ka(e))}function or(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function me(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function Yr(e){return e!==e}var Na=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function Re(e){return typeof BigInt>"u"?_a:e}function _a(){throw new Error("BigInt not supported")}});var w,d=Ee(()=>{"use strict";w=Ue(fi())});function Fa(){return!1}var La,Ba,wi,Ei=Ee(()=>{"use strict";d();c();p();f();m();La={},Ba={existsSync:Fa,promises:La},wi=Ba});var ki=Ae((df,Di)=>{"use strict";d();c();p();f();m();Di.exports=(en(),Gn(Xr)).format});var Xr={};nr(Xr,{default:()=>Ua,deprecate:()=>Mi,format:()=>_i,inspect:()=>Ni,promisify:()=>Oi});function Oi(e){return(...t)=>new Promise((r,n)=>{e(...t,(i,o)=>{i?n(i):r(o)})})}function Mi(e,t){return(...r)=>(console.warn(t),e(...r))}function Ni(e){return JSON.stringify(e,(t,r)=>typeof r=="function"?r.toString():typeof r=="bigint"?`${r}n`:r instanceof Error?{...r,message:r.message,stack:r.stack}:r)}var _i,qa,Ua,en=Ee(()=>{"use strict";d();c();p();f();m();_i=ki(),qa={promisify:Oi,deprecate:Mi,inspect:Ni,format:_i},Ua=qa});function Ga(...e){return e.join("/")}function Ha(...e){return e.join("/")}var ji,Wa,Ka,Ct,Ji=Ee(()=>{"use strict";d();c();p();f();m();ji="/",Wa={sep:ji},Ka={resolve:Ga,posix:Wa,join:Ha,sep:ji},Ct=Ka});var lr,Gi=Ee(()=>{"use strict";d();c();p();f();m();lr=class{constructor(){this.events={}}on(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),this}emit(t,...r){return this.events[t]?(this.events[t].forEach(n=>{n(...r)}),!0):!1}}});var Wi=Ae((bm,Hi)=>{"use strict";d();c();p();f();m();Hi.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var Yi=Ae((Om,zi)=>{"use strict";d();c();p();f();m();zi.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var Xi=Ae((Bm,Zi)=>{"use strict";d();c();p();f();m();var tu=Yi();Zi.exports=e=>typeof e=="string"?e.replace(tu(),""):e});var ro=Ae((Nh,su)=>{su.exports={name:"@prisma/engines-version",version:"5.15.0-29.12e25d8d06f6ea5a0252864dd9a03b1bb51f3022",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"12e25d8d06f6ea5a0252864dd9a03b1bb51f3022"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.33",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var no=Ae(()=>{"use strict";d();c();p();f();m()});var Fn=Ae((lR,gs)=>{"use strict";d();c();p();f();m();gs.exports=function(){function e(t,r,n,i,o){return tn?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;smi,getExtensionContext:()=>di});d();c();p();f();m();d();c();p();f();m();function mi(e){return typeof e=="function"?e:t=>t.$extends(e)}d();c();p();f();m();function di(e){return e}var yi={};nr(yi,{validator:()=>hi});d();c();p();f();m();d();c();p();f();m();function hi(...e){return t=>t}d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();var Zr,bi,xi,Pi,vi=!0;typeof y!="undefined"&&({FORCE_COLOR:Zr,NODE_DISABLE_COLORS:bi,NO_COLOR:xi,TERM:Pi}=y.env||{},vi=y.stdout&&y.stdout.isTTY);var $a={enabled:!bi&&xi==null&&Pi!=="dumb"&&(Zr!=null&&Zr!=="0"||vi)};function V(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!$a.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var Jp=V(0,0),sr=V(1,22),ar=V(2,22),Qp=V(3,23),Ti=V(4,24),Gp=V(7,27),Hp=V(8,28),Wp=V(9,29),Kp=V(30,39),nt=V(31,39),Ci=V(32,39),Ai=V(33,39),Ri=V(34,39),zp=V(35,39),Si=V(36,39),Yp=V(37,39),Ii=V(90,39),Zp=V(90,39),Xp=V(40,49),ef=V(41,49),tf=V(42,49),rf=V(43,49),nf=V(44,49),of=V(45,49),sf=V(46,49),af=V(47,49);d();c();p();f();m();var Va=100,Fi=["green","yellow","blue","magenta","cyan","red"],ur=[],Li=Date.now(),ja=0,tn=typeof y!="undefined"?y.env:{},Bi,$i;($i=globalThis.DEBUG)!=null||(globalThis.DEBUG=(Bi=tn.DEBUG)!=null?Bi:"");var qi;(qi=globalThis.DEBUG_COLORS)!=null||(globalThis.DEBUG_COLORS=tn.DEBUG_COLORS?tn.DEBUG_COLORS==="true":!0);var Tt={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let t=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=t.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=t.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...e)=>{var o;let[t,r,...n]=e,i;typeof Pt=="function"&&typeof y!="undefined"&&typeof y.stderr!="undefined"&&typeof y.stderr.write=="function"?i=(...s)=>{var a;try{let u=(en(),Gn(Xr));y.stderr.write(u.format(...s)+` `)}catch(u){i=(a=console.warn)!=null?a:console.log}}:i=(o=console.warn)!=null?o:console.log,i(`${t} ${r}`,...n)},formatters:{}};function Ja(e){let t={color:Fi[ja++%Fi.length],enabled:Tt.enabled(e),namespace:e,log:Tt.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&ur.push([o,...n]),ur.length>Va&&ur.shift(),Tt.enabled(o)||i){let u=n.map(g=>typeof g=="string"?g:Qa(g)),l=`+${Date.now()-Li}ms`;Li=Date.now(),a(o,...u,l)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var Ui=new Proxy(Ja,{get:(e,t)=>Tt[t],set:(e,t,r)=>Tt[t]=r});function Qa(e,t=2){let r=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},t)}function Vi(){ur.length=0}var re=Ui;d();c();p();f();m();d();c();p();f();m();var Qi="library";function At(e){let t=za();return t||((e==null?void 0:e.config.engineType)==="library"?"library":(e==null?void 0:e.config.engineType)==="binary"?"binary":Qi)}function za(){let e=y.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":void 0}d();c();p();f();m();d();c();p();f();m();var Se;(t=>{let e;(I=>(I.findUnique="findUnique",I.findUniqueOrThrow="findUniqueOrThrow",I.findFirst="findFirst",I.findFirstOrThrow="findFirstOrThrow",I.findMany="findMany",I.create="create",I.createMany="createMany",I.createManyAndReturn="createManyAndReturn",I.update="update",I.updateMany="updateMany",I.upsert="upsert",I.delete="delete",I.deleteMany="deleteMany",I.groupBy="groupBy",I.count="count",I.aggregate="aggregate",I.findRaw="findRaw",I.aggregateRaw="aggregateRaw"))(e=t.ModelAction||(t.ModelAction={}))})(Se||(Se={}));var it={};nr(it,{error:()=>Xa,info:()=>Za,log:()=>Ya,query:()=>eu,should:()=>Ki,tags:()=>Rt,warn:()=>rn});d();c();p();f();m();var Rt={error:nt("prisma:error"),warn:Ai("prisma:warn"),info:Si("prisma:info"),query:Ri("prisma:query")},Ki={warn:()=>!y.env.PRISMA_DISABLE_WARNINGS};function Ya(...e){console.log(...e)}function rn(e,...t){Ki.warn()&&console.warn(`${Rt.warn} ${e}`,...t)}function Za(e,...t){console.info(`${Rt.info} ${e}`,...t)}function Xa(e,...t){console.error(`${Rt.error} ${e}`,...t)}function eu(e,...t){console.log(`${Rt.query} ${e}`,...t)}d();c();p();f();m();function je(e,t){throw new Error(t)}d();c();p();f();m();function nn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}d();c();p();f();m();var on=(e,t)=>e.reduce((r,n)=>(r[t(n)]=n,r),{});d();c();p();f();m();function ot(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}d();c();p();f();m();function sn(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{eo.has(e)||(eo.add(e),rn(t,...r))};d();c();p();f();m();var z=class extends Error{constructor(t,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(t),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};_(z,"PrismaClientKnownRequestError");var Ie=class extends z{constructor(t,r){super(t,{code:"P2025",clientVersion:r}),this.name="NotFoundError"}};_(Ie,"NotFoundError");d();c();p();f();m();var G=class e extends Error{constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};_(G,"PrismaClientInitializationError");d();c();p();f();m();var De=class extends Error{constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};_(De,"PrismaClientRustPanicError");d();c();p();f();m();var ae=class extends Error{constructor(t,{clientVersion:r,batchRequestIdx:n}){super(t),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};_(ae,"PrismaClientUnknownRequestError");d();c();p();f();m();var ee=class extends Error{constructor(r,{clientVersion:n}){super(r);this.name="PrismaClientValidationError";this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};_(ee,"PrismaClientValidationError");d();c();p();f();m();var St=class{constructor(t){this._engine=t}prometheus(t){return this._engine.metrics({format:"prometheus",...t})}json(t){return this._engine.metrics({format:"json",...t})}};d();c();p();f();m();d();c();p();f();m();function It(e){let t;return{get(){return t||(t={value:e()}),t.value}}}function ru(e,t){let r=It(()=>nu(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function nu(e){return{datamodel:{models:an(e.models),enums:an(e.enums),types:an(e.types)}}}function an(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}d();c();p();f();m();var pr=Symbol(),un=new WeakMap,xe=class{constructor(t){t===pr?un.set(this,`Prisma.${this._getName()}`):un.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return un.get(this)}},Dt=class extends xe{_getNamespace(){return"NullTypes"}},kt=class extends Dt{};cn(kt,"DbNull");var Ot=class extends Dt{};cn(Ot,"JsonNull");var Mt=class extends Dt{};cn(Mt,"AnyNull");var ln={classes:{DbNull:kt,JsonNull:Ot,AnyNull:Mt},instances:{DbNull:new kt(pr),JsonNull:new Ot(pr),AnyNull:new Mt(pr)}};function cn(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();function Nt(e){return{ok:!1,error:e,map(){return Nt(e)},flatMap(){return Nt(e)}}}var pn=class{constructor(){this.registeredErrors=[]}consumeError(t){return this.registeredErrors[t]}registerNewError(t){let r=0;for(;this.registeredErrors[r]!==void 0;)r++;return this.registeredErrors[r]={error:t},r}},fn=e=>{let t=new pn,r=Je(t,e.startTransaction.bind(e)),n={adapterName:e.adapterName,errorRegistry:t,queryRaw:Je(t,e.queryRaw.bind(e)),executeRaw:Je(t,e.executeRaw.bind(e)),provider:e.provider,startTransaction:async(...i)=>(await r(...i)).map(s=>iu(t,s))};return e.getConnectionInfo&&(n.getConnectionInfo=ou(t,e.getConnectionInfo.bind(e))),n},iu=(e,t)=>({adapterName:t.adapterName,provider:t.provider,options:t.options,queryRaw:Je(e,t.queryRaw.bind(t)),executeRaw:Je(e,t.executeRaw.bind(t)),commit:Je(e,t.commit.bind(t)),rollback:Je(e,t.rollback.bind(t))});function Je(e,t){return async(...r)=>{try{return await t(...r)}catch(n){let i=e.registerNewError(n);return Nt({kind:"GenericJs",id:i})}}}function ou(e,t){return(...r)=>{try{return t(...r)}catch(n){let i=e.registerNewError(n);return Nt({kind:"GenericJs",id:i})}}}var na=Ue(ro());var yk=Ue(no());Gi();Ei();Ji();d();c();p();f();m();var ue=class e{constructor(t,r){if(t.length-1!==r.length)throw t.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${t.length} strings to have ${t.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=t[0];let i=0,o=0;for(;ie.getPropertyValue(r))},getPropertyDescriptor(r){var n;return(n=e.getPropertyDescriptor)==null?void 0:n.call(e,r)}}}d();c();p();f();m();d();c();p();f();m();var fr={enumerable:!0,configurable:!0,writable:!0};function mr(e){let t=new Set(e);return{getOwnPropertyDescriptor:()=>fr,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var so=Symbol.for("nodejs.util.inspect.custom");function ge(e,t){let r=lu(t),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=r.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){var u,l;if(n.has(s))return!0;let a=r.get(s);return a?(l=(u=a.has)==null?void 0:u.call(a,s))!=null?l:!0:Reflect.has(o,s)},ownKeys(o){let s=ao(Reflect.ownKeys(o),r),a=ao(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){var l,g;let u=r.get(s);return((g=(l=u==null?void 0:u.getPropertyDescriptor)==null?void 0:l.call(u,s))==null?void 0:g.writable)===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let u=r.get(s);return u?u.getPropertyDescriptor?{...fr,...u==null?void 0:u.getPropertyDescriptor(s)}:fr:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)}});return i[so]=function(){let o={...this};return delete o[so],o},i}function lu(e){let t=new Map;for(let r of e){let n=r.getKeys();for(let i of n)t.set(i,r)}return t}function ao(e,t){return e.filter(r=>{var i,o;let n=t.get(r);return(o=(i=n==null?void 0:n.has)==null?void 0:i.call(n,r))!=null?o:!0})}d();c();p();f();m();function st(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}d();c();p();f();m();function dr(e,t){return{batch:e,transaction:(t==null?void 0:t.kind)==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}d();c();p();f();m();d();c();p();f();m();var at=class{constructor(t=0,r){this.context=r;this.lines=[];this.currentLine="";this.currentIndent=0;this.currentIndent=t}write(t){return typeof t=="string"?this.currentLine+=t:t.write(this),this}writeJoined(t,r){let n=r.length-1;for(let i=0;i0&&this.currentIndent--,this}addMarginSymbol(t){return this.marginSymbol=t,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` `)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let t=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+t.slice(1):t}};d();c();p();f();m();d();c();p();f();m();function uo(e){return e.substring(0,1).toLowerCase()+e.substring(1)}d();c();p();f();m();function ut(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function gr(e){return e.toString()!=="Invalid Date"}d();c();p();f();m();d();c();p();f();m();var lt=9e15,Ne=1e9,mn="0123456789abcdef",yr="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",wr="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",dn={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-lt,maxE:lt,crypto:!1},fo,Pe,F=!0,br="[DecimalError] ",Me=br+"Invalid argument: ",mo=br+"Precision limit exceeded",go=br+"crypto unavailable",ho="[object Decimal]",te=Math.floor,H=Math.pow,cu=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,pu=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,fu=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,yo=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,pe=1e7,N=7,mu=9007199254740991,du=yr.length-1,gn=wr.length-1,R={toStringTag:ho};R.absoluteValue=R.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),D(e)};R.ceil=function(){return D(new this.constructor(this),this.e+1,2)};R.clampedTo=R.clamp=function(e,t){var r,n=this,i=n.constructor;if(e=new i(e),t=new i(t),!e.s||!t.s)return new i(NaN);if(e.gt(t))throw Error(Me+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new i(n)};R.comparedTo=R.cmp=function(e){var t,r,n,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,u=o.s,l=e.s;if(!s||!a)return!u||!l?NaN:u!==l?u:s===a?0:!s^u<0?1:-1;if(!s[0]||!a[0])return s[0]?u:a[0]?-l:0;if(u!==l)return u;if(o.e!==e.e)return o.e>e.e^u<0?1:-1;for(n=s.length,i=a.length,t=0,r=na[t]^u<0?1:-1;return n===i?0:n>i^u<0?1:-1};R.cosine=R.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+N,n.rounding=1,r=gu(n,Po(n,r)),n.precision=e,n.rounding=t,D(Pe==2||Pe==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};R.cubeRoot=R.cbrt=function(){var e,t,r,n,i,o,s,a,u,l,g=this,h=g.constructor;if(!g.isFinite()||g.isZero())return new h(g);for(F=!1,o=g.s*H(g.s*g,1/3),!o||Math.abs(o)==1/0?(r=Y(g.d),e=g.e,(o=(e-r.length+1)%3)&&(r+=o==1||o==-2?"0":"00"),o=H(r,1/3),e=te((e+1)/3)-(e%3==(e<0?-1:2)),o==1/0?r="5e"+e:(r=o.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),n=new h(r),n.s=g.s):n=new h(o.toString()),s=(e=h.precision)+3;;)if(a=n,u=a.times(a).times(a),l=u.plus(g),n=q(l.plus(g).times(a),l.plus(u),s+2,1),Y(a.d).slice(0,s)===(r=Y(n.d)).slice(0,s))if(r=r.slice(s-3,s+1),r=="9999"||!i&&r=="4999"){if(!i&&(D(a,e+1,0),a.times(a).times(a).eq(g))){n=a;break}s+=4,i=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(D(n,e+1,1),t=!n.times(n).times(n).eq(g));break}return F=!0,D(n,e,h.rounding,t)};R.decimalPlaces=R.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-te(this.e/N))*N,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};R.dividedBy=R.div=function(e){return q(this,new this.constructor(e))};R.dividedToIntegerBy=R.divToInt=function(e){var t=this,r=t.constructor;return D(q(t,new r(e),0,1,1),r.precision,r.rounding)};R.equals=R.eq=function(e){return this.cmp(e)===0};R.floor=function(){return D(new this.constructor(this),this.e+1,3)};R.greaterThan=R.gt=function(e){return this.cmp(e)>0};R.greaterThanOrEqualTo=R.gte=function(e){var t=this.cmp(e);return t==1||t===0};R.hyperbolicCosine=R.cosh=function(){var e,t,r,n,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;r=s.precision,n=s.rounding,s.precision=r+Math.max(o.e,o.sd())+4,s.rounding=1,i=o.d.length,i<32?(e=Math.ceil(i/3),t=(1/Pr(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=ct(s,1,o.times(t),new s(1),!0);for(var u,l=e,g=new s(8);l--;)u=o.times(o),o=a.minus(u.times(g.minus(u.times(g))));return D(o,s.precision=r,s.rounding=n,!0)};R.hyperbolicSine=R.sinh=function(){var e,t,r,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,r=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,n=i.d.length,n<3)i=ct(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/Pr(5,e)),i=ct(o,2,i,i,!0);for(var s,a=new o(5),u=new o(16),l=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(u.times(s).plus(l))))}return o.precision=t,o.rounding=r,D(i,t,r,!0)};R.hyperbolicTangent=R.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,q(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};R.inverseCosine=R.acos=function(){var e,t=this,r=t.constructor,n=t.abs().cmp(1),i=r.precision,o=r.rounding;return n!==-1?n===0?t.isNeg()?ce(r,i,o):new r(0):new r(NaN):t.isZero()?ce(r,i+4,o).times(.5):(r.precision=i+6,r.rounding=1,t=t.asin(),e=ce(r,i+4,o).times(.5),r.precision=i,r.rounding=o,e.minus(t))};R.inverseHyperbolicCosine=R.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,F=!1,r=r.times(r).minus(1).sqrt().plus(r),F=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)};R.inverseHyperbolicSine=R.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,F=!1,r=r.times(r).plus(1).sqrt().plus(r),F=!0,n.precision=e,n.rounding=t,r.ln())};R.inverseHyperbolicTangent=R.atanh=function(){var e,t,r,n,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?D(new o(i),e,t,!0):(o.precision=r=n-i.e,i=q(i.plus(1),new o(1).minus(i),r+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)};R.inverseSine=R.asin=function(){var e,t,r,n,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),r=o.precision,n=o.rounding,t!==-1?t===0?(e=ce(o,r+4,n).times(.5),e.s=i.s,e):new o(NaN):(o.precision=r+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=r,o.rounding=n,i.times(2)))};R.inverseTangent=R.atan=function(){var e,t,r,n,i,o,s,a,u,l=this,g=l.constructor,h=g.precision,x=g.rounding;if(l.isFinite()){if(l.isZero())return new g(l);if(l.abs().eq(1)&&h+4<=gn)return s=ce(g,h+4,x).times(.25),s.s=l.s,s}else{if(!l.s)return new g(NaN);if(h+4<=gn)return s=ce(g,h+4,x).times(.5),s.s=l.s,s}for(g.precision=a=h+10,g.rounding=1,r=Math.min(28,a/N+2|0),e=r;e;--e)l=l.div(l.times(l).plus(1).sqrt().plus(1));for(F=!1,t=Math.ceil(a/N),n=1,u=l.times(l),s=new g(l),i=l;e!==-1;)if(i=i.times(u),o=s.minus(i.div(n+=2)),i=i.times(u),s=o.plus(i.div(n+=2)),s.d[t]!==void 0)for(e=t;s.d[e]===o.d[e]&&e--;);return r&&(s=s.times(2<this.d.length-2};R.isNaN=function(){return!this.s};R.isNegative=R.isNeg=function(){return this.s<0};R.isPositive=R.isPos=function(){return this.s>0};R.isZero=function(){return!!this.d&&this.d[0]===0};R.lessThan=R.lt=function(e){return this.cmp(e)<0};R.lessThanOrEqualTo=R.lte=function(e){return this.cmp(e)<1};R.logarithm=R.log=function(e){var t,r,n,i,o,s,a,u,l=this,g=l.constructor,h=g.precision,x=g.rounding,S=5;if(e==null)e=new g(10),t=!0;else{if(e=new g(e),r=e.d,e.s<0||!r||!r[0]||e.eq(1))return new g(NaN);t=e.eq(10)}if(r=l.d,l.s<0||!r||!r[0]||l.eq(1))return new g(r&&!r[0]?-1/0:l.s!=1?NaN:r?0:1/0);if(t)if(r.length>1)o=!0;else{for(i=r[0];i%10===0;)i/=10;o=i!==1}if(F=!1,a=h+S,s=Oe(l,a),n=t?Er(g,a+10):Oe(e,a),u=q(s,n,a,1),Ft(u.d,i=h,x))do if(a+=10,s=Oe(l,a),n=t?Er(g,a+10):Oe(e,a),u=q(s,n,a,1),!o){+Y(u.d).slice(i+1,i+15)+1==1e14&&(u=D(u,h+1,0));break}while(Ft(u.d,i+=10,x));return F=!0,D(u,h,x)};R.minus=R.sub=function(e){var t,r,n,i,o,s,a,u,l,g,h,x,S=this,C=S.constructor;if(e=new C(e),!S.d||!e.d)return!S.s||!e.s?e=new C(NaN):S.d?e.s=-e.s:e=new C(e.d||S.s!==e.s?S:NaN),e;if(S.s!=e.s)return e.s=-e.s,S.plus(e);if(l=S.d,x=e.d,a=C.precision,u=C.rounding,!l[0]||!x[0]){if(x[0])e.s=-e.s;else if(l[0])e=new C(S);else return new C(u===3?-0:0);return F?D(e,a,u):e}if(r=te(e.e/N),g=te(S.e/N),l=l.slice(),o=g-r,o){for(h=o<0,h?(t=l,o=-o,s=x.length):(t=x,r=g,s=l.length),n=Math.max(Math.ceil(a/N),s)+2,o>n&&(o=n,t.length=1),t.reverse(),n=o;n--;)t.push(0);t.reverse()}else{for(n=l.length,s=x.length,h=n0;--n)l[s++]=0;for(n=x.length;n>o;){if(l[--n]s?o+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=l.length,i=g.length,s-i<0&&(i=s,r=g,g=l,l=r),t=0;i;)t=(l[--i]=l[i]+g[i]+t)/pe|0,l[i]%=pe;for(t&&(l.unshift(t),++n),s=l.length;l[--s]==0;)l.pop();return e.d=l,e.e=xr(l,n),F?D(e,a,u):e};R.precision=R.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Me+e);return r.d?(t=wo(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};R.round=function(){var e=this,t=e.constructor;return D(new t(e),e.e+1,t.rounding)};R.sine=R.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+N,n.rounding=1,r=yu(n,Po(n,r)),n.precision=e,n.rounding=t,D(Pe>2?r.neg():r,e,t,!0)):new n(NaN)};R.squareRoot=R.sqrt=function(){var e,t,r,n,i,o,s=this,a=s.d,u=s.e,l=s.s,g=s.constructor;if(l!==1||!a||!a[0])return new g(!l||l<0&&(!a||a[0])?NaN:a?s:1/0);for(F=!1,l=Math.sqrt(+s),l==0||l==1/0?(t=Y(a),(t.length+u)%2==0&&(t+="0"),l=Math.sqrt(t),u=te((u+1)/2)-(u<0||u%2),l==1/0?t="5e"+u:(t=l.toExponential(),t=t.slice(0,t.indexOf("e")+1)+u),n=new g(t)):n=new g(l.toString()),r=(u=g.precision)+3;;)if(o=n,n=o.plus(q(s,o,r+2,1)).times(.5),Y(o.d).slice(0,r)===(t=Y(n.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!i&&t=="4999"){if(!i&&(D(o,u+1,0),o.times(o).eq(s))){n=o;break}r+=4,i=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(D(n,u+1,1),e=!n.times(n).eq(s));break}return F=!0,D(n,u,g.rounding,e)};R.tangent=R.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,r=r.sin(),r.s=1,r=q(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,D(Pe==2||Pe==4?r.neg():r,e,t,!0)):new n(NaN)};R.times=R.mul=function(e){var t,r,n,i,o,s,a,u,l,g=this,h=g.constructor,x=g.d,S=(e=new h(e)).d;if(e.s*=g.s,!x||!x[0]||!S||!S[0])return new h(!e.s||x&&!x[0]&&!S||S&&!S[0]&&!x?NaN:!x||!S?e.s/0:e.s*0);for(r=te(g.e/N)+te(e.e/N),u=x.length,l=S.length,u=0;){for(t=0,i=u+n;i>n;)a=o[i]+S[n]*x[i-n-1]+t,o[i--]=a%pe|0,t=a/pe|0;o[i]=(o[i]+t)%pe|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=xr(o,r),F?D(e,h.precision,h.rounding):e};R.toBinary=function(e,t){return wn(this,2,e,t)};R.toDecimalPlaces=R.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(oe(e,0,Ne),t===void 0?t=n.rounding:oe(t,0,8),D(r,e+r.e+1,t))};R.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=he(n,!0):(oe(e,0,Ne),t===void 0?t=i.rounding:oe(t,0,8),n=D(new i(n),e+1,t),r=he(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};R.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?r=he(i):(oe(e,0,Ne),t===void 0?t=o.rounding:oe(t,0,8),n=D(new o(i),e+i.e+1,t),r=he(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};R.toFraction=function(e){var t,r,n,i,o,s,a,u,l,g,h,x,S=this,C=S.d,A=S.constructor;if(!C)return new A(S);if(l=r=new A(1),n=u=new A(0),t=new A(n),o=t.e=wo(C)-S.e-1,s=o%N,t.d[0]=H(10,s<0?N+s:s),e==null)e=o>0?t:l;else{if(a=new A(e),!a.isInt()||a.lt(l))throw Error(Me+a);e=a.gt(t)?o>0?t:l:a}for(F=!1,a=new A(Y(C)),g=A.precision,A.precision=o=C.length*N*2;h=q(a,t,0,1,1),i=r.plus(h.times(n)),i.cmp(e)!=1;)r=n,n=i,i=l,l=u.plus(h.times(i)),u=i,i=t,t=a.minus(h.times(i)),a=i;return i=q(e.minus(r),n,0,1,1),u=u.plus(i.times(l)),r=r.plus(i.times(n)),u.s=l.s=S.s,x=q(l,n,o,1).minus(S).abs().cmp(q(u,r,o,1).minus(S).abs())<1?[l,n]:[u,r],A.precision=g,F=!0,x};R.toHexadecimal=R.toHex=function(e,t){return wn(this,16,e,t)};R.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),e==null){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),t===void 0?t=n.rounding:oe(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(F=!1,r=q(r,e,0,t,1).times(e),F=!0,D(r)):(e.s=r.s,r=e),r};R.toNumber=function(){return+this};R.toOctal=function(e,t){return wn(this,8,e,t)};R.toPower=R.pow=function(e){var t,r,n,i,o,s,a=this,u=a.constructor,l=+(e=new u(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new u(H(+a,l));if(a=new u(a),a.eq(1))return a;if(n=u.precision,o=u.rounding,e.eq(1))return D(a,n,o);if(t=te(e.e/N),t>=e.d.length-1&&(r=l<0?-l:l)<=mu)return i=Eo(u,a,r,n),e.s<0?new u(1).div(i):D(i,n,o);if(s=a.s,s<0){if(tu.maxE+1||t0?s/0:0):(F=!1,u.rounding=a.s=1,r=Math.min(12,(t+"").length),i=hn(e.times(Oe(a,n+r)),n),i.d&&(i=D(i,n+5,1),Ft(i.d,n,o)&&(t=n+10,i=D(hn(e.times(Oe(a,t+r)),t),t+5,1),+Y(i.d).slice(n+1,n+15)+1==1e14&&(i=D(i,n+1,0)))),i.s=s,F=!0,u.rounding=o,D(i,n,o))};R.toPrecision=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=he(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(oe(e,1,Ne),t===void 0?t=i.rounding:oe(t,0,8),n=D(new i(n),e,t),r=he(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};R.toSignificantDigits=R.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(oe(e,1,Ne),t===void 0?t=n.rounding:oe(t,0,8)),D(new n(r),e,t)};R.toString=function(){var e=this,t=e.constructor,r=he(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};R.truncated=R.trunc=function(){return D(new this.constructor(this),this.e+1,1)};R.valueOf=R.toJSON=function(){var e=this,t=e.constructor,r=he(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function Y(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;tr)throw Error(Me+e)}function Ft(e,t,r,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=N,i=0):(i=Math.ceil((t+1)/N),t%=N),o=H(10,N-t),a=e[i]%o|0,n==null?t<3?(t==0?a=a/100|0:t==1&&(a=a/10|0),s=r<4&&a==99999||r>3&&a==49999||a==5e4||a==0):s=(r<4&&a+1==o||r>3&&a+1==o/2)&&(e[i+1]/o/100|0)==H(10,t-2)-1||(a==o/2||a==0)&&(e[i+1]/o/100|0)==0:t<4?(t==0?a=a/1e3|0:t==1?a=a/100|0:t==2&&(a=a/10|0),s=(n||r<4)&&a==9999||!n&&r>3&&a==4999):s=((n||r<4)&&a+1==o||!n&&r>3&&a+1==o/2)&&(e[i+1]/o/1e3|0)==H(10,t-3)-1,s}function hr(e,t,r){for(var n,i=[0],o,s=0,a=e.length;sr-1&&(i[n+1]===void 0&&(i[n+1]=0),i[n+1]+=i[n]/r|0,i[n]%=r)}return i.reverse()}function gu(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),i=(1/Pr(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=ct(e,1,t.times(i),new e(1));for(var o=r;o--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=r,t}var q=function(){function e(n,i,o){var s,a=0,u=n.length;for(n=n.slice();u--;)s=n[u]*i+a,n[u]=s%o|0,a=s/o|0;return a&&n.unshift(a),n}function t(n,i,o,s){var a,u;if(o!=s)u=o>s?1:-1;else for(a=u=0;ai[a]?1:-1;break}return u}function r(n,i,o,s){for(var a=0;o--;)n[o]-=a,a=n[o]1;)n.shift()}return function(n,i,o,s,a,u){var l,g,h,x,S,C,A,k,O,B,M,I,Z,L,Ye,Be,fe,$e,Q,Ce,qe=n.constructor,Ze=n.s==i.s?1:-1,X=n.d,U=i.d;if(!X||!X[0]||!U||!U[0])return new qe(!n.s||!i.s||(X?U&&X[0]==U[0]:!U)?NaN:X&&X[0]==0||!U?Ze*0:Ze/0);for(u?(S=1,g=n.e-i.e):(u=pe,S=N,g=te(n.e/S)-te(i.e/S)),Q=U.length,fe=X.length,O=new qe(Ze),B=O.d=[],h=0;U[h]==(X[h]||0);h++);if(U[h]>(X[h]||0)&&g--,o==null?(L=o=qe.precision,s=qe.rounding):a?L=o+(n.e-i.e)+1:L=o,L<0)B.push(1),C=!0;else{if(L=L/S+2|0,h=0,Q==1){for(x=0,U=U[0],L++;(h1&&(U=e(U,x,u),X=e(X,x,u),Q=U.length,fe=X.length),Be=Q,M=X.slice(0,Q),I=M.length;I=u/2&&++$e;do x=0,l=t(U,M,Q,I),l<0?(Z=M[0],Q!=I&&(Z=Z*u+(M[1]||0)),x=Z/$e|0,x>1?(x>=u&&(x=u-1),A=e(U,x,u),k=A.length,I=M.length,l=t(A,M,k,I),l==1&&(x--,r(A,Q=10;x/=10)h++;O.e=h+g*S-1,D(O,a?o+O.e+1:o,s,C)}return O}}();function D(e,t,r,n){var i,o,s,a,u,l,g,h,x,S=e.constructor;e:if(t!=null){if(h=e.d,!h)return e;for(i=1,a=h[0];a>=10;a/=10)i++;if(o=t-i,o<0)o+=N,s=t,g=h[x=0],u=g/H(10,i-s-1)%10|0;else if(x=Math.ceil((o+1)/N),a=h.length,x>=a)if(n){for(;a++<=x;)h.push(0);g=u=0,i=1,o%=N,s=o-N+1}else break e;else{for(g=a=h[x],i=1;a>=10;a/=10)i++;o%=N,s=o-N+i,u=s<0?0:g/H(10,i-s-1)%10|0}if(n=n||t<0||h[x+1]!==void 0||(s<0?g:g%H(10,i-s-1)),l=r<4?(u||n)&&(r==0||r==(e.s<0?3:2)):u>5||u==5&&(r==4||n||r==6&&(o>0?s>0?g/H(10,i-s):0:h[x-1])%10&1||r==(e.s<0?8:7)),t<1||!h[0])return h.length=0,l?(t-=e.e+1,h[0]=H(10,(N-t%N)%N),e.e=-t||0):h[0]=e.e=0,e;if(o==0?(h.length=x,a=1,x--):(h.length=x+1,a=H(10,N-o),h[x]=s>0?(g/H(10,i-s)%H(10,s)|0)*a:0),l)for(;;)if(x==0){for(o=1,s=h[0];s>=10;s/=10)o++;for(s=h[0]+=a,a=1;s>=10;s/=10)a++;o!=a&&(e.e++,h[0]==pe&&(h[0]=1));break}else{if(h[x]+=a,h[x]!=pe)break;h[x--]=0,a=1}for(o=h.length;h[--o]===0;)h.pop()}return F&&(e.e>S.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+ke(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+ke(-i-1)+o,r&&(n=r-s)>0&&(o+=ke(n))):i>=s?(o+=ke(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+ke(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=ke(n))),o}function xr(e,t){var r=e[0];for(t*=N;r>=10;r/=10)t++;return t}function Er(e,t,r){if(t>du)throw F=!0,r&&(e.precision=r),Error(mo);return D(new e(yr),t,1,!0)}function ce(e,t,r){if(t>gn)throw Error(mo);return D(new e(wr),t,r,!0)}function wo(e){var t=e.length-1,r=t*N+1;if(t=e[t],t){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function ke(e){for(var t="";e--;)t+="0";return t}function Eo(e,t,r,n){var i,o=new e(1),s=Math.ceil(n/N+4);for(F=!1;;){if(r%2&&(o=o.times(t),co(o.d,s)&&(i=!0)),r=te(r/2),r===0){r=o.d.length-1,i&&o.d[r]===0&&++o.d[r];break}t=t.times(t),co(t.d,s)}return F=!0,o}function lo(e){return e.d[e.d.length-1]&1}function bo(e,t,r){for(var n,i=new e(t[0]),o=0;++o17)return new x(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(F=!1,u=C):u=t,a=new x(.03125);e.e>-2;)e=e.times(a),h+=5;for(n=Math.log(H(2,h))/Math.LN10*2+5|0,u+=n,r=o=s=new x(1),x.precision=u;;){if(o=D(o.times(e),u,1),r=r.times(++g),a=s.plus(q(o,r,u,1)),Y(a.d).slice(0,u)===Y(s.d).slice(0,u)){for(i=h;i--;)s=D(s.times(s),u,1);if(t==null)if(l<3&&Ft(s.d,u-n,S,l))x.precision=u+=10,r=o=a=new x(1),g=0,l++;else return D(s,x.precision=C,S,F=!0);else return x.precision=C,s}s=a}}function Oe(e,t){var r,n,i,o,s,a,u,l,g,h,x,S=1,C=10,A=e,k=A.d,O=A.constructor,B=O.rounding,M=O.precision;if(A.s<0||!k||!k[0]||!A.e&&k[0]==1&&k.length==1)return new O(k&&!k[0]?-1/0:A.s!=1?NaN:k?0:A);if(t==null?(F=!1,g=M):g=t,O.precision=g+=C,r=Y(k),n=r.charAt(0),Math.abs(o=A.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)A=A.times(e),r=Y(A.d),n=r.charAt(0),S++;o=A.e,n>1?(A=new O("0."+r),o++):A=new O(n+"."+r.slice(1))}else return l=Er(O,g+2,M).times(o+""),A=Oe(new O(n+"."+r.slice(1)),g-C).plus(l),O.precision=M,t==null?D(A,M,B,F=!0):A;for(h=A,u=s=A=q(A.minus(1),A.plus(1),g,1),x=D(A.times(A),g,1),i=3;;){if(s=D(s.times(x),g,1),l=u.plus(q(s,new O(i),g,1)),Y(l.d).slice(0,g)===Y(u.d).slice(0,g))if(u=u.times(2),o!==0&&(u=u.plus(Er(O,g+2,M).times(o+""))),u=q(u,new O(S),g,1),t==null)if(Ft(u.d,g-C,B,a))O.precision=g+=C,l=s=A=q(h.minus(1),h.plus(1),g,1),x=D(A.times(A),g,1),i=a=1;else return D(u,O.precision=M,B,F=!0);else return O.precision=M,u;u=l,i+=2}}function xo(e){return String(e.s*e.s/0)}function yn(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;n++);for(i=t.length;t.charCodeAt(i-1)===48;--i);if(t=t.slice(n,i),t){if(i-=n,e.e=r=r-n-1,e.d=[],n=(r+1)%N,r<0&&(n+=N),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),yo.test(t))return yn(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(pu.test(t))r=16,t=t.toLowerCase();else if(cu.test(t))r=2;else if(fu.test(t))r=8;else throw Error(Me+t);for(o=t.search(/p/i),o>0?(u=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),o=t.indexOf("."),s=o>=0,n=e.constructor,s&&(t=t.replace(".",""),a=t.length,o=a-o,i=Eo(n,new n(r),o,o*2)),l=hr(t,r,pe),g=l.length-1,o=g;l[o]===0;--o)l.pop();return o<0?new n(e.s*0):(e.e=xr(l,g),e.d=l,F=!1,s&&(e=q(e,i,a*4)),u&&(e=e.times(Math.abs(u)<54?H(2,u):Ge.pow(2,u))),F=!0,e)}function yu(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:ct(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/Pr(5,r)),t=ct(e,2,t,t);for(var i,o=new e(5),s=new e(16),a=new e(20);r--;)i=t.times(t),t=t.times(o.plus(i.times(s.times(i).minus(a))));return t}function ct(e,t,r,n,i){var o,s,a,u,l=1,g=e.precision,h=Math.ceil(g/N);for(F=!1,u=r.times(r),a=new e(n);;){if(s=q(a.times(u),new e(t++*t++),g,1),a=i?n.plus(s):n.minus(s),n=q(s.times(u),new e(t++*t++),g,1),s=a.plus(n),s.d[h]!==void 0){for(o=h;s.d[o]===a.d[o]&&o--;);if(o==-1)break}o=a,a=n,n=s,s=o,l++}return F=!0,s.d.length=h+1,s}function Pr(e,t){for(var r=e;--t;)r*=e;return r}function Po(e,t){var r,n=t.s<0,i=ce(e,e.precision,1),o=i.times(.5);if(t=t.abs(),t.lte(o))return Pe=n?4:1,t;if(r=t.divToInt(i),r.isZero())Pe=n?3:2;else{if(t=t.minus(r.times(i)),t.lte(o))return Pe=lo(r)?n?2:3:n?4:1,t;Pe=lo(r)?n?1:4:n?3:2}return t.minus(i).abs()}function wn(e,t,r,n){var i,o,s,a,u,l,g,h,x,S=e.constructor,C=r!==void 0;if(C?(oe(r,1,Ne),n===void 0?n=S.rounding:oe(n,0,8)):(r=S.precision,n=S.rounding),!e.isFinite())g=xo(e);else{for(g=he(e),s=g.indexOf("."),C?(i=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):i=t,s>=0&&(g=g.replace(".",""),x=new S(1),x.e=g.length-s,x.d=hr(he(x),10,i),x.e=x.d.length),h=hr(g,10,i),o=u=h.length;h[--u]==0;)h.pop();if(!h[0])g=C?"0p+0":"0";else{if(s<0?o--:(e=new S(e),e.d=h,e.e=o,e=q(e,x,r,n,0,i),h=e.d,o=e.e,l=fo),s=h[r],a=i/2,l=l||h[r+1]!==void 0,l=n<4?(s!==void 0||l)&&(n===0||n===(e.s<0?3:2)):s>a||s===a&&(n===4||l||n===6&&h[r-1]&1||n===(e.s<0?8:7)),h.length=r,l)for(;++h[--r]>i-1;)h[r]=0,r||(++o,h.unshift(1));for(u=h.length;!h[u-1];--u);for(s=0,g="";s1)if(t==16||t==8){for(s=t==16?4:3,--u;u%s;u++)g+="0";for(h=hr(g,i,t),u=h.length;!h[u-1];--u);for(s=1,g="1.";su)for(o-=u;o--;)g+="0";else ot)return e.length=t,!0}function wu(e){return new this(e).abs()}function Eu(e){return new this(e).acos()}function bu(e){return new this(e).acosh()}function xu(e,t){return new this(e).plus(t)}function Pu(e){return new this(e).asin()}function vu(e){return new this(e).asinh()}function Tu(e){return new this(e).atan()}function Cu(e){return new this(e).atanh()}function Au(e,t){e=new this(e),t=new this(t);var r,n=this.precision,i=this.rounding,o=n+4;return!e.s||!t.s?r=new this(NaN):!e.d&&!t.d?(r=ce(this,o,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?ce(this,n,i):new this(0),r.s=e.s):!e.d||t.isZero()?(r=ce(this,o,1).times(.5),r.s=e.s):t.s<0?(this.precision=o,this.rounding=1,r=this.atan(q(e,t,o,1)),t=ce(this,o,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(q(e,t,o,1)),r}function Ru(e){return new this(e).cbrt()}function Su(e){return D(e=new this(e),e.e+1,2)}function Iu(e,t,r){return new this(e).clamp(t,r)}function Du(e){if(!e||typeof e!="object")throw Error(br+"Object expected");var t,r,n,i=e.defaults===!0,o=["precision",1,Ne,"rounding",0,8,"toExpNeg",-lt,0,"toExpPos",0,lt,"maxE",0,lt,"minE",-lt,0,"modulo",0,9];for(t=0;t=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error(Me+r+": "+n);if(r="crypto",i&&(this[r]=dn[r]),(n=e[r])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto!="undefined"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(go);else this[r]=!1;else throw Error(Me+r+": "+n);return this}function ku(e){return new this(e).cos()}function Ou(e){return new this(e).cosh()}function vo(e){var t,r,n;function i(o){var s,a,u,l=this;if(!(l instanceof i))return new i(o);if(l.constructor=i,po(o)){l.s=o.s,F?!o.d||o.e>i.maxE?(l.e=NaN,l.d=null):o.e=10;a/=10)s++;F?s>i.maxE?(l.e=NaN,l.d=null):s=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:a[o++]=i%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(n*=4);o=214e7?crypto.randomBytes(4).copy(t,o):(a.push(i%1e7),o+=4);o=n/4}else throw Error(go);else for(;o=10;i/=10)n++;n`}};function ft(e){return e instanceof Lt}d();c();p();f();m();d();c();p();f();m();var vr=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};d();c();p();f();m();var Tr=e=>e,Cr={bold:Tr,red:Tr,green:Tr,dim:Tr,enabled:!1},To={bold:sr,red:nt,green:Ci,dim:ar,enabled:!0},mt={write(e){e.writeLine(",")}};d();c();p();f();m();var ye=class{constructor(t){this.contents=t;this.isUnderlined=!1;this.color=t=>t}underline(){return this.isUnderlined=!0,this}setColor(t){return this.color=t,this}write(t){let r=t.getCurrentLineLength();t.write(this.color(this.contents)),this.isUnderlined&&t.afterNextNewline(()=>{t.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};d();c();p();f();m();var _e=class{constructor(){this.hasError=!1}markAsError(){return this.hasError=!0,this}};var dt=class extends _e{constructor(){super(...arguments);this.items=[]}addItem(r){return this.items.push(new vr(r)),this}getField(r){return this.items[r]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(n=>n.value.getPrintWidth()))+2}write(r){if(this.items.length===0){this.writeEmpty(r);return}this.writeWithItems(r)}writeEmpty(r){let n=new ye("[]");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithItems(r){let{colors:n}=r.context;r.writeLine("[").withIndent(()=>r.writeJoined(mt,this.items).newLine()).write("]"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(n.red("~".repeat(this.getPrintWidth())))})}asObject(){}};d();c();p();f();m();var Co=": ",Ar=class{constructor(t,r){this.name=t;this.value=r;this.hasError=!1}markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+Co.length}write(t){let r=new ye(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(Co).write(this.value)}};d();c();p();f();m();var Rr=class e extends _e{constructor(){super(...arguments);this.fields={};this.suggestions=[]}addField(r){this.fields[r.name]=r}addSuggestion(r){this.suggestions.push(r)}getField(r){return this.fields[r]}getDeepField(r){let[n,...i]=r,o=this.getField(n);if(!o)return;let s=o;for(let a of i){let u;if(s.value instanceof e?u=s.value.getField(a):s.value instanceof dt&&(u=s.value.getField(Number(a))),!u)return;s=u}return s}getDeepFieldValue(r){var n;return r.length===0?this:(n=this.getDeepField(r))==null?void 0:n.value}hasField(r){return!!this.getField(r)}removeAllFields(){this.fields={}}removeField(r){delete this.fields[r]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(r){var n;return(n=this.getField(r))==null?void 0:n.value}getDeepSubSelectionValue(r){let n=this;for(let i of r){if(!(n instanceof e))return;let o=n.getSubSelectionValue(i);if(!o)return;n=o}return n}getDeepSelectionParent(r){let n=this.getSelectionParent();if(!n)return;let i=n;for(let o of r){let s=i.value.getFieldValue(o);if(!s||!(s instanceof e))return;let a=s.getSelectionParent();if(!a)return;i=a}return i}getSelectionParent(){var i,o;let r=(i=this.getField("select"))==null?void 0:i.value.asObject();if(r)return{kind:"select",value:r};let n=(o=this.getField("include"))==null?void 0:o.value.asObject();if(n)return{kind:"include",value:n}}getSubSelectionValue(r){var n;return(n=this.getSelectionParent())==null?void 0:n.value.fields[r].value}getPrintWidth(){let r=Object.values(this.fields);return r.length==0?2:Math.max(...r.map(i=>i.getPrintWidth()))+2}write(r){let n=Object.values(this.fields);if(n.length===0&&this.suggestions.length===0){this.writeEmpty(r);return}this.writeWithContents(r,n)}asObject(){return this}writeEmpty(r){let n=new ye("{}");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithContents(r,n){r.writeLine("{").withIndent(()=>{r.writeJoined(mt,[...n,...this.suggestions]).newLine()}),r.write("}"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(r.context.colors.red("~".repeat(this.getPrintWidth())))})}};d();c();p();f();m();var K=class extends _e{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new ye(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};var En=class{constructor(t){this.errorMessages=[];this.arguments=t}write(t){t.write(this.arguments)}addErrorMessage(t){this.errorMessages.push(t)}renderAllMessages(t){return this.errorMessages.map(r=>r(t)).join(` `)}};function Sr(e){return new En(Ao(e))}function Ao(e){let t=new Rr;for(let[r,n]of Object.entries(e)){let i=new Ar(r,Ro(n));t.addField(i)}return t}function Ro(e){if(typeof e=="string")return new K(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new K(String(e));if(typeof e=="bigint")return new K(`${e}n`);if(e===null)return new K("null");if(e===void 0)return new K("undefined");if(pt(e))return new K(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return w.Buffer.isBuffer(e)?new K(`Buffer.alloc(${e.byteLength})`):new K(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=gr(e)?e.toISOString():"Invalid Date";return new K(`new Date("${t}")`)}return e instanceof xe?new K(`Prisma.${e._getName()}`):ft(e)?new K(`prisma.${uo(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?il(e):typeof e=="object"?Ao(e):new K(Object.prototype.toString.call(e))}function il(e){let t=new dt;for(let r of e)t.addItem(Ro(r));return t}function So(e){if(e===void 0)return"";let t=Sr(e);return new at(0,{colors:Cr}).write(t).toString()}d();c();p();f();m();var ol="P2037";function Bt({error:e,user_facing_error:t},r,n){return t.error_code?new z(sl(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new ae(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function sl(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===ol&&(r+=` Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();var bn=class{getLocation(){return null}};function Fe(e){return typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new bn}d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();var Io={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function gt(e={}){let t=ul(e);return Object.entries(t).reduce((n,[i,o])=>(Io[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function ul(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function Ir(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function Do(e,t){let r=Ir(e);return t({action:"aggregate",unpacker:r,argsMapper:gt})(e)}d();c();p();f();m();function ll(e={}){let{select:t,...r}=e;return typeof t=="object"?gt({...r,_count:t}):gt({...r,_count:{_all:!0}})}function cl(e={}){return typeof e.select=="object"?t=>Ir(e)(t)._count:t=>Ir(e)(t)._count._all}function ko(e,t){return t({action:"count",unpacker:cl(e),argsMapper:ll})(e)}d();c();p();f();m();function pl(e={}){let t=gt(e);if(Array.isArray(t.by))for(let r of t.by)typeof r=="string"&&(t.select[r]=!0);else typeof t.by=="string"&&(t.select[t.by]=!0);return t}function fl(e={}){return t=>(typeof(e==null?void 0:e._count)=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function Oo(e,t){return t({action:"groupBy",unpacker:fl(e),argsMapper:pl})(e)}function Mo(e,t,r){if(t==="aggregate")return n=>Do(n,r);if(t==="count")return n=>ko(n,r);if(t==="groupBy")return n=>Oo(n,r)}d();c();p();f();m();function No(e,t){let r=t.fields.filter(i=>!i.relationName),n=on(r,i=>i.name);return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new Lt(e,o,s.type,s.isList,s.kind==="enum")},...mr(Object.keys(n))})}d();c();p();f();m();d();c();p();f();m();var _o=e=>Array.isArray(e)?e:e.split("."),xn=(e,t)=>_o(t).reduce((r,n)=>r&&r[n],e),Fo=(e,t,r)=>_o(t).reduceRight((n,i,o,s)=>Object.assign({},xn(e,s.slice(0,o)),{[i]:n}),r);function ml(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function dl(e,t,r){return t===void 0?e!=null?e:{}:Fo(t,r,e||!0)}function Pn(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((u,l)=>({...u,[l.name]:l}),{});return u=>{let l=Fe(e._errorFormat),g=ml(n,i),h=dl(u,o,g),x=r({dataPath:g,callsite:l})(h),S=gl(e,t);return new Proxy(x,{get(C,A){if(!S.includes(A))return C[A];let O=[a[A].type,r,A],B=[g,h];return Pn(e,...O,...B)},...mr([...S,...Object.getOwnPropertyNames(x)])})}}function gl(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}d();c();p();f();m();d();c();p();f();m();var hl=Ue(Wi());var yl={red:nt,gray:Ii,dim:ar,bold:sr,underline:Ti,highlightSource:e=>e.highlight()},wl={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function El({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r!=null?r:!1,callArguments:n}}function bl({functionName:e,location:t,message:r,isPanic:n,contextLines:i,callArguments:o},s){let a=[""],u=t?" in":":";if(n?(a.push(s.red(`Oops, an unknown error occurred! This is ${s.bold("on us")}, you did nothing wrong.`)),a.push(s.red(`It occurred in the ${s.bold(`\`${e}\``)} invocation${u}`))):a.push(s.red(`Invalid ${s.bold(`\`${e}\``)} invocation${u}`)),t&&a.push(s.underline(xl(t))),i){a.push("");let l=[i.toString()];o&&(l.push(o),l.push(s.dim(")"))),a.push(l.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(` `)}function xl(e){let t=[e.fileName];return e.lineNumber&&t.push(String(e.lineNumber)),e.columnNumber&&t.push(String(e.columnNumber)),t.join(":")}function ht(e){let t=e.showColors?yl:wl,r;return typeof $getTemplateParameters!="undefined"?r=$getTemplateParameters(e,t):r=El(e),bl(r,t)}function Lo(e,t,r,n){return e===Se.ModelAction.findFirstOrThrow||e===Se.ModelAction.findUniqueOrThrow?Pl(t,r,n):n}function Pl(e,t,r){return async n=>{if("rejectOnNotFound"in n.args){let o=ht({originalMethod:n.clientMethod,callsite:n.callsite,message:"'rejectOnNotFound' option is not supported"});throw new ee(o,{clientVersion:t})}return await r(n).catch(o=>{throw o instanceof z&&o.code==="P2025"?new Ie(`No ${e} found`,t):o})}}d();c();p();f();m();function we(e){return e.replace(/^./,t=>t.toLowerCase())}var vl=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],Tl=["aggregate","count","groupBy"];function vn(e,t){var i;let r=(i=e._extensions.getAllModelExtensions(t))!=null?i:{},n=[Cl(e,t),Rl(e,t),_t(r),ne("name",()=>t),ne("$name",()=>t),ne("$parent",()=>e._appliedParent)];return ge({},n)}function Cl(e,t){let r=we(t),n=Object.keys(Se.ModelAction).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=u=>e._request(u);s=Lo(o,t,e._clientVersion,s);let a=u=>l=>{let g=Fe(e._errorFormat);return e._createPrismaPromise(h=>{let x={args:l,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:h,callsite:g};return s({...x,...u})})};return vl.includes(o)?Pn(e,t,a):Al(i)?Mo(e,i,a):a({})}}}function Al(e){return Tl.includes(e)}function Rl(e,t){return Qe(ne("fields",()=>{let r=e._runtimeDataModel.models[t];return No(t,r)}))}d();c();p();f();m();function Bo(e){return e.replace(/^./,t=>t.toUpperCase())}var Tn=Symbol();function $t(e){let t=[Sl(e),ne(Tn,()=>e),ne("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(_t(r)),ge(e,t)}function Sl(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(we),n=[...new Set(t.concat(r))];return Qe({getKeys(){return n},getPropertyValue(i){let o=Bo(i);if(e._runtimeDataModel.models[o]!==void 0)return vn(e,o);if(e._runtimeDataModel.models[i]!==void 0)return vn(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function $o(e){return e[Tn]?e[Tn]:e}function qo(e){var r;if(typeof e=="function")return e(this);if((r=e.client)!=null&&r.__AccelerateEngine){let n=e.client.__AccelerateEngine;this._originalClient._engine=new n(this._originalClient._accelerateEngineConfig)}let t=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$use:{value:void 0},$on:{value:void 0}});return $t(t)}d();c();p();f();m();d();c();p();f();m();function Uo({result:e,modelName:t,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(t);if(!o)return e;let s=[],a=[];for(let u of Object.values(o)){if(n){if(n[u.name])continue;let l=u.needs.filter(g=>n[g]);l.length>0&&a.push(st(l))}else if(r){if(!r[u.name])continue;let l=u.needs.filter(g=>!r[g]);l.length>0&&a.push(st(l))}Il(e,u.needs)&&s.push(Dl(u,ge(e,s)))}return s.length>0||a.length>0?ge(e,[...s,...a]):e}function Il(e,t){return t.every(r=>nn(e,r))}function Dl(e,t){return Qe(ne(e.name,()=>e.compute(t)))}d();c();p();f();m();function Dr({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){var s;if(Array.isArray(t)){for(let a=0;ag.name===o);if(!u||u.kind!=="object"||!u.relationName)continue;let l=typeof s=="object"?s:{};t[o]=Dr({visitor:i,result:t[o],args:l,modelName:u.type,runtimeDataModel:n})}}function jo({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:Dr({result:e,args:r!=null?r:{},modelName:t,runtimeDataModel:i,visitor:(s,a,u)=>Uo({result:s,modelName:we(a),select:u.select,omit:u.omit,extensions:n})})}d();c();p();f();m();d();c();p();f();m();function Jo(e){if(e instanceof ue)return kl(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n{var s,a;let o=t.customDataProxyFetch;return"transaction"in t&&i!==void 0&&(((s=t.transaction)==null?void 0:s.kind)==="batch"&&t.transaction.lock.then(),t.transaction=i),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.model?t.action:t.clientMethod,args:Jo((a=t.args)!=null?a:{}),__internalParams:t,query:(u,l=t)=>{let g=l.customDataProxyFetch;return l.customDataProxyFetch=zo(o,g),l.args=u,Go(e,l,r,n+1)}})})}function Ho(e,t){let{jsModelName:r,action:n,clientMethod:i}=t,o=r?n:i;if(e._extensions.isEmpty())return e._executeRequest(t);let s=e._extensions.getAllQueryCallbacks(r!=null?r:"$none",o);return Go(e,t,s)}function Wo(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?Ko(r,n,0,e):e(r)}}function Ko(e,t,r,n){if(r===t.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return t[r]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let u=a.customDataProxyFetch;return a.customDataProxyFetch=zo(i,u),Ko(a,t,r+1,n)}})}var Qo=e=>e;function zo(e=Qo,t=Qo){return r=>e(t(r))}d();c();p();f();m();d();c();p();f();m();function Zo(e,t,r){let n=we(r);return!t.result||!(t.result.$allModels||t.result[n])?e:Ol({...e,...Yo(t.name,e,t.result.$allModels),...Yo(t.name,e,t.result[n])})}function Ol(e){let t=new de,r=(n,i)=>t.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>r(o,i)):[n]));return ot(e,n=>({...n,needs:r(n.name,new Set)}))}function Yo(e,t,r){return r?ot(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:Ml(t,o,i)})):{}}function Ml(e,t,r){var i;let n=(i=e==null?void 0:e[t])==null?void 0:i.compute;return n?o=>r({...o,[t]:n(o)}):r}function Xo(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let i of n.needs)r[i]=!0;return r}function es(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(!e[n.name])for(let i of n.needs)delete r[i];return r}var kr=class{constructor(t,r){this.extension=t;this.previous=r;this.computedFieldsCache=new de;this.modelExtensionsCache=new de;this.queryCallbacksCache=new de;this.clientExtensions=It(()=>{var t,r;return this.extension.client?{...(r=this.previous)==null?void 0:r.getAllClientExtensions(),...this.extension.client}:(t=this.previous)==null?void 0:t.getAllClientExtensions()});this.batchCallbacks=It(()=>{var n,i,o;let t=(i=(n=this.previous)==null?void 0:n.getAllBatchQueryCallbacks())!=null?i:[],r=(o=this.extension.query)==null?void 0:o.$__internalBatch;return r?t.concat(r):t})}getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>{var r;return Zo((r=this.previous)==null?void 0:r.getAllComputedFields(t),this.extension,t)})}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{var n,i;let r=we(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?(n=this.previous)==null?void 0:n.getAllModelExtensions(t):{...(i=this.previous)==null?void 0:i.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{var s,a;let n=(a=(s=this.previous)==null?void 0:s.getAllQueryCallbacks(t,r))!=null?a:[],i=[],o=this.extension.query;return!o||!(o[t]||o.$allModels||o[r]||o.$allOperations)?n:(o[t]!==void 0&&(o[t][r]!==void 0&&i.push(o[t][r]),o[t].$allOperations!==void 0&&i.push(o[t].$allOperations)),t!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},Or=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new kr(t))}isEmpty(){return this.head===void 0}append(t){return new e(new kr(t,this.head))}getAllComputedFields(t){var r;return(r=this.head)==null?void 0:r.getAllComputedFields(t)}getAllClientExtensions(){var t;return(t=this.head)==null?void 0:t.getAllClientExtensions()}getAllModelExtensions(t){var r;return(r=this.head)==null?void 0:r.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){var n,i;return(i=(n=this.head)==null?void 0:n.getAllQueryCallbacks(t,r))!=null?i:[]}getAllBatchQueryCallbacks(){var t,r;return(r=(t=this.head)==null?void 0:t.getAllBatchQueryCallbacks())!=null?r:[]}};d();c();p();f();m();var ts=re("prisma:client"),rs={Vercel:"vercel","Netlify CI":"netlify"};function ns({postinstall:e,ciName:t,clientVersion:r}){if(ts("checkPlatformCaching:postinstall",e),ts("checkPlatformCaching:ciName",t),e===!0&&t&&t in rs){let n=`Prisma has detected that this project was built on ${t}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. Learn how: https://pris.ly/d/${rs[t]}-build`;throw console.error(n),new G(n,r)}}d();c();p();f();m();function is(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();var Nl="Cloudflare-Workers",_l="node";function os(){var e,t,r;return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":((e=globalThis.navigator)==null?void 0:e.userAgent)===Nl?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":((r=(t=globalThis.process)==null?void 0:t.release)==null?void 0:r.name)===_l?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}var Fl={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Vercel Edge Functions or Edge Middleware"};function Cn(){let e=os();return{id:e,prettyName:Fl[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();function yt({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){var u,l;let i,o=Object.keys(e)[0],s=(u=e[o])==null?void 0:u.url,a=(l=t[o])==null?void 0:l.url;if(o===void 0?i=void 0:a?i=a:s!=null&&s.value?i=s.value:s!=null&&s.fromEnvVar&&(i=r[s.fromEnvVar]),(s==null?void 0:s.fromEnvVar)!==void 0&&i===void 0)throw Cn().id==="workerd"?new G(`error: Environment variable not found: ${s.fromEnvVar}. In Cloudflare module Workers, environment variables are available only in the Worker's \`env\` parameter of \`fetch\`. To solve this, provide the connection string directly: https://pris.ly/d/cloudflare-datasource-url`,n):new G(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new G("error: Missing URL environment variable, value, or override.",n);return i}d();c();p();f();m();d();c();p();f();m();var Mr=class extends Error{constructor(t,r){super(t),this.clientVersion=r.clientVersion,this.cause=r.cause}get[Symbol.toStringTag](){return this.name}};var se=class extends Mr{constructor(t,r){var n;super(t,r),this.isRetryable=(n=r.isRetryable)!=null?n:!0}};d();c();p();f();m();d();c();p();f();m();function $(e,t){return{...e,isRetryable:t}}var wt=class extends se{constructor(r){super("This request must be retried",$(r,!0));this.name="ForcedRetryError";this.code="P5001"}};_(wt,"ForcedRetryError");d();c();p();f();m();var He=class extends se{constructor(r,n){super(r,$(n,!1));this.name="InvalidDatasourceError";this.code="P6001"}};_(He,"InvalidDatasourceError");d();c();p();f();m();var We=class extends se{constructor(r,n){super(r,$(n,!1));this.name="NotImplementedYetError";this.code="P5004"}};_(We,"NotImplementedYetError");d();c();p();f();m();d();c();p();f();m();var j=class extends se{constructor(t,r){super(t,r),this.response=r.response;let n=this.response.headers.get("prisma-request-id");if(n){let i=`(The request id was: ${n})`;this.message=this.message+" "+i}}};var Ke=class extends j{constructor(r){super("Schema needs to be uploaded",$(r,!0));this.name="SchemaMissingError";this.code="P5005"}};_(Ke,"SchemaMissingError");d();c();p();f();m();d();c();p();f();m();var An="This request could not be understood by the server",Ut=class extends j{constructor(r,n,i){super(n||An,$(r,!1));this.name="BadRequestError";this.code="P5000";i&&(this.code=i)}};_(Ut,"BadRequestError");d();c();p();f();m();var Vt=class extends j{constructor(r,n){super("Engine not started: healthcheck timeout",$(r,!0));this.name="HealthcheckTimeoutError";this.code="P5013";this.logs=n}};_(Vt,"HealthcheckTimeoutError");d();c();p();f();m();var jt=class extends j{constructor(r,n,i){super(n,$(r,!0));this.name="EngineStartupError";this.code="P5014";this.logs=i}};_(jt,"EngineStartupError");d();c();p();f();m();var Jt=class extends j{constructor(r){super("Engine version is not supported",$(r,!1));this.name="EngineVersionNotSupportedError";this.code="P5012"}};_(Jt,"EngineVersionNotSupportedError");d();c();p();f();m();var Rn="Request timed out",Qt=class extends j{constructor(r,n=Rn){super(n,$(r,!1));this.name="GatewayTimeoutError";this.code="P5009"}};_(Qt,"GatewayTimeoutError");d();c();p();f();m();var Ll="Interactive transaction error",Gt=class extends j{constructor(r,n=Ll){super(n,$(r,!1));this.name="InteractiveTransactionError";this.code="P5015"}};_(Gt,"InteractiveTransactionError");d();c();p();f();m();var Bl="Request parameters are invalid",Ht=class extends j{constructor(r,n=Bl){super(n,$(r,!1));this.name="InvalidRequestError";this.code="P5011"}};_(Ht,"InvalidRequestError");d();c();p();f();m();var Sn="Requested resource does not exist",Wt=class extends j{constructor(r,n=Sn){super(n,$(r,!1));this.name="NotFoundError";this.code="P5003"}};_(Wt,"NotFoundError");d();c();p();f();m();var In="Unknown server error",Et=class extends j{constructor(r,n,i){super(n||In,$(r,!0));this.name="ServerError";this.code="P5006";this.logs=i}};_(Et,"ServerError");d();c();p();f();m();var Dn="Unauthorized, check your connection string",Kt=class extends j{constructor(r,n=Dn){super(n,$(r,!1));this.name="UnauthorizedError";this.code="P5007"}};_(Kt,"UnauthorizedError");d();c();p();f();m();var kn="Usage exceeded, retry again later",zt=class extends j{constructor(r,n=kn){super(n,$(r,!0));this.name="UsageExceededError";this.code="P5008"}};_(zt,"UsageExceededError");async function $l(e){let t;try{t=await e.text()}catch(r){return{type:"EmptyError"}}try{let r=JSON.parse(t);if(typeof r=="string")switch(r){case"InternalDataProxyError":return{type:"DataProxyError",body:r};default:return{type:"UnknownTextError",body:r}}if(typeof r=="object"&&r!==null){if("is_panic"in r&&"message"in r&&"error_code"in r)return{type:"QueryEngineError",body:r};if("EngineNotStarted"in r||"InteractiveTransactionMisrouted"in r||"InvalidRequestError"in r){let n=Object.values(r)[0].reason;return typeof n=="string"&&!["SchemaMissing","EngineVersionNotSupported"].includes(n)?{type:"UnknownJsonError",body:r}:{type:"DataProxyError",body:r}}}return{type:"UnknownJsonError",body:r}}catch(r){return t===""?{type:"EmptyError"}:{type:"UnknownTextError",body:t}}}async function Yt(e,t){if(e.ok)return;let r={clientVersion:t,response:e},n=await $l(e);if(n.type==="QueryEngineError")throw new z(n.body.message,{code:n.body.error_code,clientVersion:t});if(n.type==="DataProxyError"){if(n.body==="InternalDataProxyError")throw new Et(r,"Internal Data Proxy error");if("EngineNotStarted"in n.body){if(n.body.EngineNotStarted.reason==="SchemaMissing")return new Ke(r);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new Jt(r);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new jt(r,i,o)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,error_code:o}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new G(i,t,o)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:i}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new Vt(r,i)}}if("InteractiveTransactionMisrouted"in n.body){let i={IDParseError:"Could not parse interactive transaction ID",NoQueryEngineFoundError:"Could not find Query Engine for the specified host and transaction ID",TransactionStartError:"Could not start interactive transaction"};throw new Gt(r,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new Ht(r,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new Kt(r,bt(Dn,n));if(e.status===404)return new Wt(r,bt(Sn,n));if(e.status===429)throw new zt(r,bt(kn,n));if(e.status===504)throw new Qt(r,bt(Rn,n));if(e.status>=500)throw new Et(r,bt(In,n));if(e.status>=400)throw new Ut(r,bt(An,n))}function bt(e,t){return t.type==="EmptyError"?e:`${e}: ${JSON.stringify(t)}`}d();c();p();f();m();function ss(e){let t=Math.pow(2,e)*50,r=Math.ceil(Math.random()*t)-Math.ceil(t/2),n=t+r;return new Promise(i=>setTimeout(()=>i(n),n))}d();c();p();f();m();var Te="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function as(e){let t=new TextEncoder().encode(e),r="",n=t.byteLength,i=n%3,o=n-i,s,a,u,l,g;for(let h=0;h>18,a=(g&258048)>>12,u=(g&4032)>>6,l=g&63,r+=Te[s]+Te[a]+Te[u]+Te[l];return i==1?(g=t[o],s=(g&252)>>2,a=(g&3)<<4,r+=Te[s]+Te[a]+"=="):i==2&&(g=t[o]<<8|t[o+1],s=(g&64512)>>10,a=(g&1008)>>4,u=(g&15)<<2,r+=Te[s]+Te[a]+Te[u]+"="),r}d();c();p();f();m();function us(e){var r;if(!!((r=e.generator)!=null&&r.previewFeatures.some(n=>n.toLowerCase().includes("metrics"))))throw new G("The `metrics` preview feature is not yet available with Accelerate.\nPlease remove `metrics` from the `previewFeatures` in your schema.\n\nMore information about Accelerate: https://pris.ly/d/accelerate",e.clientVersion)}d();c();p();f();m();function ql(e){return e[0]*1e3+e[1]/1e6}function ls(e){return new Date(ql(e))}d();c();p();f();m();var cs={"@prisma/debug":"workspace:*","@prisma/engines-version":"5.15.0-29.12e25d8d06f6ea5a0252864dd9a03b1bb51f3022","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};d();c();p();f();m();d();c();p();f();m();var Zt=class extends se{constructor(r,n){super(`Cannot fetch data from service: ${r}`,$(n,!0));this.name="RequestError";this.code="P5010"}};_(Zt,"RequestError");async function ze(e,t,r=n=>n){var i;let n=t.clientVersion;try{return typeof fetch=="function"?await r(fetch)(e,t):await r(On)(e,t)}catch(o){let s=(i=o.message)!=null?i:"Unknown error";throw new Zt(s,{clientVersion:n})}}function Vl(e){return{...e.headers,"Content-Type":"application/json"}}function jl(e){return{method:e.method,headers:Vl(e)}}function Jl(e,t){return{text:()=>Promise.resolve(w.Buffer.concat(e).toString()),json:()=>Promise.resolve().then(()=>JSON.parse(w.Buffer.concat(e).toString())),ok:t.statusCode>=200&&t.statusCode<=299,status:t.statusCode,url:t.url,headers:new Mn(t.headers)}}async function On(e,t={}){let r=Ql("https"),n=jl(t),i=[],{origin:o}=new URL(e);return new Promise((s,a)=>{var l;let u=r.request(e,n,g=>{let{statusCode:h,headers:{location:x}}=g;h>=301&&h<=399&&x&&(x.startsWith("http")===!1?s(On(`${o}${x}`,t)):s(On(x,t))),g.on("data",S=>i.push(S)),g.on("end",()=>s(Jl(i,g))),g.on("error",a)});u.on("error",a),u.end((l=t.body)!=null?l:"")})}var Ql=typeof Pt!="undefined"?Pt:()=>{},Mn=class{constructor(t={}){this.headers=new Map;for(let[r,n]of Object.entries(t))if(typeof n=="string")this.headers.set(r,n);else if(Array.isArray(n))for(let i of n)this.headers.set(r,i)}append(t,r){this.headers.set(t,r)}delete(t){this.headers.delete(t)}get(t){var r;return(r=this.headers.get(t))!=null?r:null}has(t){return this.headers.has(t)}set(t,r){this.headers.set(t,r)}forEach(t,r){for(let[n,i]of this.headers)t.call(r,i,n,this)}};var Gl=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,ps=re("prisma:client:dataproxyEngine");async function Hl(e,t){var s,a,u;let r=cs["@prisma/engines-version"],n=(s=t.clientVersion)!=null?s:"unknown";if(y.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION)return y.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION;if(e.includes("accelerate")&&n!=="0.0.0"&&n!=="in-memory")return n;let[i,o]=(a=n==null?void 0:n.split("-"))!=null?a:[];if(o===void 0&&Gl.test(i))return i;if(o!==void 0||n==="0.0.0"||n==="in-memory"){if(e.startsWith("localhost")||e.startsWith("127.0.0.1"))return"0.0.0";let[l]=(u=r.split("-"))!=null?u:[],[g,h,x]=l.split("."),S=Wl(`<=${g}.${h}.${x}`),C=await ze(S,{clientVersion:n});if(!C.ok)throw new Error(`Failed to fetch stable Prisma version, unpkg.com status ${C.status} ${C.statusText}, response body: ${await C.text()||""}`);let A=await C.text();ps("length of body fetched from unpkg.com",A.length);let k;try{k=JSON.parse(A)}catch(O){throw console.error("JSON.parse error: body fetched from unpkg.com: ",A),O}return k.version}throw new We("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function fs(e,t){let r=await Hl(e,t);return ps("version",r),r}function Wl(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var ms=3,Nn=re("prisma:client:dataproxyEngine"),_n=class{constructor({apiKey:t,tracingHelper:r,logLevel:n,logQueries:i,engineHash:o}){this.apiKey=t,this.tracingHelper=r,this.logLevel=n,this.logQueries=i,this.engineHash=o}build({traceparent:t,interactiveTransaction:r}={}){let n={Authorization:`Bearer ${this.apiKey}`,"Prisma-Engine-Hash":this.engineHash};this.tracingHelper.isEnabled()&&(n.traceparent=t!=null?t:this.tracingHelper.getTraceParent()),r&&(n["X-transaction-id"]=r.id);let i=this.buildCaptureSettings();return i.length>0&&(n["X-capture-telemetry"]=i.join(", ")),n}buildCaptureSettings(){let t=[];return this.tracingHelper.isEnabled()&&t.push("tracing"),this.logLevel&&t.push(this.logLevel),this.logQueries&&t.push("query"),t}},Xt=class{constructor(t){this.name="DataProxyEngine";us(t),this.config=t,this.env={...t.env,...typeof y!="undefined"?y.env:{}},this.inlineSchema=as(t.inlineSchema),this.inlineDatasources=t.inlineDatasources,this.inlineSchemaHash=t.inlineSchemaHash,this.clientVersion=t.clientVersion,this.engineHash=t.engineVersion,this.logEmitter=t.logEmitter,this.tracingHelper=t.tracingHelper}apiKey(){return this.headerBuilder.apiKey}version(){return this.engineHash}async start(){this.startPromise!==void 0&&await this.startPromise,this.startPromise=(async()=>{let[t,r]=this.extractHostAndApiKey();this.host=t,this.headerBuilder=new _n({apiKey:r,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel,logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await fs(t,this.config),Nn("host",this.host)})(),await this.startPromise}async stop(){}propagateResponseExtensions(t){var r,n;(r=t==null?void 0:t.logs)!=null&&r.length&&t.logs.forEach(i=>{switch(i.level){case"debug":case"error":case"trace":case"warn":case"info":break;case"query":{let o=typeof i.attributes.query=="string"?i.attributes.query:"";if(!this.tracingHelper.isEnabled()){let[s]=o.split("/* traceparent");o=s}this.logEmitter.emit("query",{query:o,timestamp:ls(i.timestamp),duration:Number(i.attributes.duration_ms),params:i.attributes.params,target:i.attributes.target})}}}),(n=t==null?void 0:t.traces)!=null&&n.length&&this.tracingHelper.createEngineSpan({span:!0,spans:t.traces})}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the remote query engine')}async url(t){return await this.start(),`https://${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${t}`}async uploadSchema(){let t={name:"schemaUpload",internal:!0};return this.tracingHelper.runInChildSpan(t,async()=>{let r=await ze(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});r.ok||Nn("schema response status",r.status);let n=await Yt(r,this.clientVersion);if(n)throw this.logEmitter.emit("warn",{message:`Error while uploading schema: ${n.message}`,timestamp:new Date,target:""}),n;this.logEmitter.emit("info",{message:`Schema (re)uploaded (hash: ${this.inlineSchemaHash})`,timestamp:new Date,target:""})})}request(t,{traceparent:r,interactiveTransaction:n,customDataProxyFetch:i}){return this.requestInternal({body:t,traceparent:r,interactiveTransaction:n,customDataProxyFetch:i})}async requestBatch(t,{traceparent:r,transaction:n,customDataProxyFetch:i}){let o=(n==null?void 0:n.kind)==="itx"?n.options:void 0,s=dr(t,n),{batchResult:a,elapsed:u}=await this.requestInternal({body:s,customDataProxyFetch:i,interactiveTransaction:o,traceparent:r});return a.map(l=>"errors"in l&&l.errors.length>0?Bt(l.errors[0],this.clientVersion,this.config.activeProvider):{data:l,elapsed:u})}requestInternal({body:t,traceparent:r,customDataProxyFetch:n,interactiveTransaction:i}){return this.withRetry({actionGerund:"querying",callback:async({logHttpCall:o})=>{let s=i?`${i.payload.endpoint}/graphql`:await this.url("graphql");o(s);let a=await ze(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r,interactiveTransaction:i}),body:JSON.stringify(t),clientVersion:this.clientVersion},n);a.ok||Nn("graphql response status",a.status),await this.handleError(await Yt(a,this.clientVersion));let u=await a.json(),l=u.extensions;if(l&&this.propagateResponseExtensions(l),u.errors)throw u.errors.length===1?Bt(u.errors[0],this.config.clientVersion,this.config.activeProvider):new ae(u.errors,{clientVersion:this.config.clientVersion});return u}})}async transaction(t,r,n){let i={start:"starting",commit:"committing",rollback:"rolling back"};return this.withRetry({actionGerund:`${i[t]} transaction`,callback:async({logHttpCall:o})=>{if(t==="start"){let s=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel}),a=await this.url("transaction/start");o(a);let u=await ze(a,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await Yt(u,this.clientVersion));let l=await u.json(),g=l.extensions;g&&this.propagateResponseExtensions(g);let h=l.id,x=l["data-proxy"].endpoint;return{id:h,payload:{endpoint:x}}}else{let s=`${n.payload.endpoint}/${t}`;o(s);let a=await ze(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),clientVersion:this.clientVersion});await this.handleError(await Yt(a,this.clientVersion));let l=(await a.json()).extensions;l&&this.propagateResponseExtensions(l);return}}})}extractHostAndApiKey(){let t={clientVersion:this.clientVersion},r=Object.keys(this.inlineDatasources)[0],n=yt({inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources,clientVersion:this.clientVersion,env:this.env}),i;try{i=new URL(n)}catch(l){throw new He(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t)}let{protocol:o,host:s,searchParams:a}=i;if(o!=="prisma:")throw new He(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t);let u=a.get("api_key");if(u===null||u.length<1)throw new He(`Error validating datasource \`${r}\`: the URL must contain a valid API key`,t);return[s,u]}metrics(){throw new We("Metrics are not yet supported for Accelerate",{clientVersion:this.clientVersion})}async withRetry(t){var r;for(let n=0;;n++){let i=o=>{this.logEmitter.emit("info",{message:`Calling ${o} (n=${n})`,timestamp:new Date,target:""})};try{return await t.callback({logHttpCall:i})}catch(o){if(!(o instanceof se)||!o.isRetryable)throw o;if(n>=ms)throw o instanceof wt?o.cause:o;this.logEmitter.emit("warn",{message:`Attempt ${n+1}/${ms} failed for ${t.actionGerund}: ${(r=o.message)!=null?r:"(unknown)"}`,timestamp:new Date,target:""});let s=await ss(n);this.logEmitter.emit("warn",{message:`Retrying after ${s}ms`,timestamp:new Date,target:""})}}}async handleError(t){if(t instanceof Ke)throw await this.uploadSchema(),new wt({clientVersion:this.clientVersion,cause:t});if(t)throw t}applyPendingMigrations(){throw new Error("Method not implemented.")}};function ds({copyEngine:e=!0},t){let r;try{r=yt({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...y.env},clientVersion:t.clientVersion})}catch(u){}e&&(r!=null&&r.startsWith("prisma://"))&&cr("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let n=At(t.generator),i=!!(r!=null&&r.startsWith("prisma://")||!e),o=!!t.adapter,s=n==="library",a=n==="binary";if(i&&o||o){let u;throw u=["Prisma Client was configured to use the `adapter` option but it was imported via its `/edge` endpoint.","Please either remove the `/edge` endpoint or remove the `adapter` from the Prisma Client constructor."],new ee(u.join(` `),{clientVersion:t.clientVersion})}if(i)return new Xt(t);throw new ee("Invalid client engine type, please use `library` or `binary`",{clientVersion:t.clientVersion})}d();c();p();f();m();function Nr({generator:e}){var t;return(t=e==null?void 0:e.previewFeatures)!=null?t:[]}d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();var bs=Ue(Fn());d();c();p();f();m();function ws(e,t){let r=Es(e),n=Kl(r),i=Yl(n);i?_r(i,t):t.addErrorMessage(()=>"Unknown error")}function Es(e){return e.errors.flatMap(t=>t.kind==="Union"?Es(t):[t])}function Kl(e){let t=new Map,r=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=t.get(i);o?t.set(i,{...n,argument:{...n.argument,typeNames:zl(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function zl(e,t){return[...new Set(e.concat(t))]}function Yl(e){return sn(e,(t,r)=>{let n=hs(t),i=hs(r);return n!==i?n-i:ys(t)-ys(r)})}function hs(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function ys(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}d();c();p();f();m();var le=class{constructor(t,r){this.name=t;this.value=r;this.isRequired=!1}makeRequired(){return this.isRequired=!0,this}write(t){let{colors:{green:r}}=t.context;t.addMarginSymbol(r(this.isRequired?"+":"?")),t.write(r(this.name)),this.isRequired||t.write(r("?")),t.write(r(": ")),typeof this.value=="string"?t.write(r(this.value)):t.write(this.value)}};d();c();p();f();m();var Fr=class{constructor(){this.fields=[]}addField(t,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(mt,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function _r(e,t){switch(e.kind){case"MutuallyExclusiveFields":Zl(e,t);break;case"IncludeOnScalar":Xl(e,t);break;case"EmptySelection":ec(e,t);break;case"UnknownSelectionField":nc(e,t);break;case"UnknownArgument":ic(e,t);break;case"UnknownInputField":oc(e,t);break;case"RequiredArgumentMissing":sc(e,t);break;case"InvalidArgumentType":ac(e,t);break;case"InvalidArgumentValue":uc(e,t);break;case"ValueTooLarge":lc(e,t);break;case"SomeFieldsMissing":cc(e,t);break;case"TooManyFieldsGiven":pc(e,t);break;case"Union":ws(e,t);break;default:throw new Error("not implemented: "+e.kind)}}function Zl(e,t){var n,i,o;let r=(n=t.arguments.getDeepSubSelectionValue(e.selectionPath))==null?void 0:n.asObject();r&&((i=r.getField(e.firstField))==null||i.markAsError(),(o=r.getField(e.secondField))==null||o.markAsError()),t.addErrorMessage(s=>`Please ${s.bold("either")} use ${s.green(`\`${e.firstField}\``)} or ${s.green(`\`${e.secondField}\``)}, but ${s.red("not both")} at the same time.`)}function Xl(e,t){var s,a;let[r,n]=Lr(e.selectionPath),i=e.outputType,o=(s=t.arguments.getDeepSelectionParent(r))==null?void 0:s.value;if(o&&((a=o.getField(n))==null||a.markAsError(),i))for(let u of i.fields)u.isRelation&&o.addSuggestion(new le(u.name,"true"));t.addErrorMessage(u=>{let l=`Invalid scalar field ${u.red(`\`${n}\``)} for ${u.bold("include")} statement`;return i?l+=` on model ${u.bold(i.name)}. ${er(u)}`:l+=".",l+=` Note that ${u.bold("include")} statements only accept relation fields.`,l})}function ec(e,t){var n,i;let r=(n=t.arguments.getDeepSubSelectionValue(e.selectionPath))==null?void 0:n.asObject();if(r){let o=(i=r.getField("omit"))==null?void 0:i.value.asObject();if(o){tc(e,t,o);return}}rc(e,t)}function tc(e,t,r){r.removeAllFields();for(let n of e.outputType.fields)r.addSuggestion(new le(n.name,"false"));t.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function rc(e,t){var o,s;let r=e.outputType,n=(o=t.arguments.getDeepSelectionParent(e.selectionPath))==null?void 0:o.value,i=(s=n==null?void 0:n.isEmpty())!=null?s:!1;n&&(n.removeAllFields(),vs(n,r)),t.addErrorMessage(a=>i?`The ${a.red("`select`")} statement for type ${a.bold(r.name)} must not be empty. ${er(a)}`:`The ${a.red("`select`")} statement for type ${a.bold(r.name)} needs ${a.bold("at least one truthy value")}.`)}function nc(e,t){var s,a,u,l,g,h,x;let[r,n]=Lr(e.selectionPath),i=(s=t.arguments.getDeepSubSelectionValue(r))==null?void 0:s.asObject(),o;if(i){let S=(a=i.getFieldValue("select"))==null?void 0:a.asObject(),C=(u=i.getFieldValue("include"))==null?void 0:u.asObject(),A=(l=i.getFieldValue("omit"))==null?void 0:l.asObject();S!=null&&S.hasField(n)?(o="select",(g=S.getField(n))==null||g.markAsError(),vs(S,e.outputType)):C!=null&&C.hasField(n)?(o="include",(h=C.getField(n))==null||h.markAsError(),fc(C,e.outputType)):A!=null&&A.hasField(n)&&(o="omit",(x=A.getField(n))==null||x.markAsError(),mc(A,e.outputType))}t.addErrorMessage(S=>{let C=[`Unknown field ${S.red(`\`${n}\``)}`];return o&&C.push(`for ${S.bold(o)} statement`),C.push(`on model ${S.bold(`\`${e.outputType.name}\``)}.`),C.push(er(S)),C.join(" ")})}function ic(e,t){var i,o;let r=e.argumentPath[0],n=(i=t.arguments.getDeepSubSelectionValue(e.selectionPath))==null?void 0:i.asObject();n&&((o=n.getField(r))==null||o.markAsError(),dc(n,e.arguments)),t.addErrorMessage(s=>xs(s,r,e.arguments.map(a=>a.name)))}function oc(e,t){var o,s,a;let[r,n]=Lr(e.argumentPath),i=(o=t.arguments.getDeepSubSelectionValue(e.selectionPath))==null?void 0:o.asObject();if(i){(s=i.getDeepField(e.argumentPath))==null||s.markAsError();let u=(a=i.getDeepFieldValue(r))==null?void 0:a.asObject();u&&Ts(u,e.inputType)}t.addErrorMessage(u=>xs(u,n,e.inputType.fields.map(l=>l.name)))}function xs(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=hc(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(er(e)),n.join(" ")}function sc(e,t){var u,l;let r;t.addErrorMessage(g=>(r==null?void 0:r.value)instanceof K&&r.value.text==="null"?`Argument \`${g.green(o)}\` must not be ${g.red("null")}.`:`Argument \`${g.green(o)}\` is missing.`);let n=(u=t.arguments.getDeepSubSelectionValue(e.selectionPath))==null?void 0:u.asObject();if(!n)return;let[i,o]=Lr(e.argumentPath),s=new Fr,a=(l=n.getDeepFieldValue(i))==null?void 0:l.asObject();if(a)if(r=a.getField(o),r&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let g of e.inputTypes[0].fields)s.addField(g.name,g.typeNames.join(" | "));a.addSuggestion(new le(o,s).makeRequired())}else{let g=e.inputTypes.map(Ps).join(" | ");a.addSuggestion(new le(o,g).makeRequired())}}function Ps(e){return e.kind==="list"?`${Ps(e.elementType)}[]`:e.name}function ac(e,t){var i,o;let r=e.argument.name,n=(i=t.arguments.getDeepSubSelectionValue(e.selectionPath))==null?void 0:i.asObject();n&&((o=n.getDeepFieldValue(e.argumentPath))==null||o.markAsError()),t.addErrorMessage(s=>{let a=Br("or",e.argument.typeNames.map(u=>s.green(u)));return`Argument \`${s.bold(r)}\`: Invalid value provided. Expected ${a}, provided ${s.red(e.inferredType)}.`})}function uc(e,t){var i,o;let r=e.argument.name,n=(i=t.arguments.getDeepSubSelectionValue(e.selectionPath))==null?void 0:i.asObject();n&&((o=n.getDeepFieldValue(e.argumentPath))==null||o.markAsError()),t.addErrorMessage(s=>{let a=[`Invalid value for argument \`${s.bold(r)}\``];if(e.underlyingError&&a.push(`: ${e.underlyingError}`),a.push("."),e.argument.typeNames.length>0){let u=Br("or",e.argument.typeNames.map(l=>s.green(l)));a.push(` Expected ${u}.`)}return a.join("")})}function lc(e,t){var o;let r=e.argument.name,n=(o=t.arguments.getDeepSubSelectionValue(e.selectionPath))==null?void 0:o.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath),a=s==null?void 0:s.value;a==null||a.markAsError(),a instanceof K&&(i=a.text)}t.addErrorMessage(s=>{let a=["Unable to fit value"];return i&&a.push(s.red(i)),a.push(`into a 64-bit signed integer for field \`${s.bold(r)}\``),a.join(" ")})}function cc(e,t){var i,o;let r=e.argumentPath[e.argumentPath.length-1],n=(i=t.arguments.getDeepSubSelectionValue(e.selectionPath))==null?void 0:i.asObject();if(n){let s=(o=n.getDeepFieldValue(e.argumentPath))==null?void 0:o.asObject();s&&Ts(s,e.inputType)}t.addErrorMessage(s=>{let a=[`Argument \`${s.bold(r)}\` of type ${s.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?a.push(`${s.green("at least one of")} ${Br("or",e.constraints.requiredFields.map(u=>`\`${s.bold(u)}\``))} arguments.`):a.push(`${s.green("at least one")} argument.`):a.push(`${s.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),a.push(er(s)),a.join(" ")})}function pc(e,t){var o,s;let r=e.argumentPath[e.argumentPath.length-1],n=(o=t.arguments.getDeepSubSelectionValue(e.selectionPath))==null?void 0:o.asObject(),i=[];if(n){let a=(s=n.getDeepFieldValue(e.argumentPath))==null?void 0:s.asObject();a&&(a.markAsError(),i=Object.keys(a.getFields()))}t.addErrorMessage(a=>{let u=[`Argument \`${a.bold(r)}\` of type ${a.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?u.push(`${a.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?u.push(`${a.green("at most one")} argument,`):u.push(`${a.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),u.push(`but you provided ${Br("and",i.map(l=>a.red(l)))}. Please choose`),e.constraints.maxFieldCount===1?u.push("one."):u.push(`${e.constraints.maxFieldCount}.`),u.join(" ")})}function vs(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new le(r.name,"true"))}function fc(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new le(r.name,"true"))}function mc(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new le(r.name,"true"))}function dc(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new le(r.name,r.typeNames.join(" | ")))}function Ts(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new le(r.name,r.typeNames.join(" | ")))}function Lr(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function er({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function Br(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var gc=3;function hc(e,t){let r=1/0,n;for(let i of t){let o=(0,bs.default)(e,i);o>gc||o({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(t){return this.params.previewFeatures.includes(t)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){var r;return(r=this.model)==null?void 0:r.fields.find(n=>n.name===t)}nestSelection(t){let r=this.findField(t),n=(r==null?void 0:r.kind)==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};d();c();p();f();m();var Ss=e=>({command:e});d();c();p();f();m();d();c();p();f();m();var Is=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);d();c();p();f();m();function tr(e){try{return Ds(e,"fast")}catch(t){return Ds(e,"slow")}}function Ds(e,t){return JSON.stringify(e.map(r=>Ac(r,t)))}function Ac(e,t){return typeof e=="bigint"?{prisma__type:"bigint",prisma__value:e.toString()}:ut(e)?{prisma__type:"date",prisma__value:e.toJSON()}:ve.isDecimal(e)?{prisma__type:"decimal",prisma__value:e.toJSON()}:w.Buffer.isBuffer(e)?{prisma__type:"bytes",prisma__value:e.toString("base64")}:Rc(e)||ArrayBuffer.isView(e)?{prisma__type:"bytes",prisma__value:w.Buffer.from(e).toString("base64")}:typeof e=="object"&&t==="slow"?Os(e):e}function Rc(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Os(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(ks);let t={};for(let r of Object.keys(e))t[r]=ks(e[r]);return t}function ks(e){return typeof e=="bigint"?e.toString():Os(e)}var Sc=/^(\s*alter\s)/i,Ms=re("prisma:client");function $n(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&Sc.exec(t))throw new Error(`Running ALTER using ${n} is not supported Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. Example: await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) More Information: https://pris.ly/d/execute-raw `)}var qn=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:tr(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:tr(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:tr(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=Is(r),i={values:tr(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i!=null&&i.values?Ms(`prisma.${e}(${n}, ${i.values})`):Ms(`prisma.${e}(${n})`),{query:n,parameters:i}},Ns={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new ue(t,r)}},_s={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};d();c();p();f();m();function Un(e){return function(r){let n,i=(o=e)=>{try{return o===void 0||(o==null?void 0:o.kind)==="itx"?n!=null?n:n=Fs(r(o)):Fs(r(o))}catch(s){return Promise.reject(s)}};return{then(o,s){return i().then(o,s)},catch(o){return i().catch(o)},finally(o){return i().finally(o)},requestTransaction(o){let s=i(o);return s.requestTransaction?s.requestTransaction(o):s},[Symbol.toStringTag]:"PrismaPromise"}}}function Fs(e){return typeof e.then=="function"?e:Promise.resolve(e)}d();c();p();f();m();var Ls={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},async createEngineSpan(){},getActiveContext(){},runInChildSpan(e,t){return t()}},Vn=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}createEngineSpan(t){return this.getGlobalTracingHelper().createEngineSpan(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){var t,r;return(r=(t=globalThis.PRISMA_INSTRUMENTATION)==null?void 0:t.helper)!=null?r:Ls}};function Bs(e){return e.includes("tracing")?new Vn:Ls}d();c();p();f();m();function $s(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i==null?void 0:i(n)}}}d();c();p();f();m();var Ic=["$connect","$disconnect","$on","$transaction","$use","$extends"],qs=Ic;d();c();p();f();m();function Us(e){return typeof e=="string"?e:e.reduce((t,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?t:t&&(r==="info"||t==="info")?"info":n},void 0)}d();c();p();f();m();var qr=class{constructor(){this._middlewares=[]}use(t){this._middlewares.push(t)}get(t){return this._middlewares[t]}has(t){return!!this._middlewares[t]}length(){return this._middlewares.length}};d();c();p();f();m();var js=Ue(Xi());d();c();p();f();m();function Ur(e){return typeof e.batchRequestIdx=="number"}d();c();p();f();m();function Vr(e){return e===null?e:Array.isArray(e)?e.map(Vr):typeof e=="object"?Dc(e)?kc(e):ot(e,Vr):e}function Dc(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function kc({$type:e,value:t}){switch(e){case"BigInt":return BigInt(t);case"Bytes":return w.Buffer.from(t,"base64");case"DateTime":return new Date(t);case"Decimal":return new ve(t);case"Json":return JSON.parse(t);default:je(t,"Unknown tagged value")}}d();c();p();f();m();function Vs(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(jn(e.query.arguments)),t.push(jn(e.query.selection)),t.join("")}function jn(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${jn(n)})`:r}).join(" ")})`}d();c();p();f();m();var Oc={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateOne:!0,upsertOne:!0};function Jn(e){return Oc[e]}d();c();p();f();m();var jr=class{constructor(t){this.options=t;this.tickActive=!1;this.batches={}}request(t){let r=this.options.batchBy(t);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,y.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:t,resolve:n,reject:i})})):this.options.singleLoader(t)}dispatchBatches(){for(let t in this.batches){let r=this.batches[t];delete this.batches[t],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;i{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(h=>h.protocolQuery),u=this.client._tracingHelper.getTraceParent(s),l=n.some(h=>Jn(h.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:u,transaction:Nc(o),containsWrite:l,customDataProxyFetch:i})).map((h,x)=>{if(h instanceof Error)return h;try{return this.mapQueryEngineResult(n[x],h)}catch(S){return S}})}),singleLoader:async n=>{var s;let i=((s=n.transaction)==null?void 0:s.kind)==="itx"?Js(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:Jn(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>{var i;return(i=n.transaction)!=null&&i.id?`transaction-${n.transaction.id}`:Vs(n.protocolQuery)},batchOrder(n,i){var o,s;return((o=n.transaction)==null?void 0:o.kind)==="batch"&&((s=i.transaction)==null?void 0:s.kind)==="batch"?n.transaction.index-i.transaction.index:0}})}async request(t){try{return await this.dataloader.request(t)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let i=n==null?void 0:n.data,o=n==null?void 0:n.elapsed,s=this.unpack(i,t,r);return y.env.PRISMA_CLIENT_GET_TIME?{data:s,elapsed:o}:s}handleAndLogRequestError(t){try{this.handleRequestError(t)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:t.clientMethod,timestamp:new Date}),r}}handleRequestError({error:t,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s}){if(Mc(t),_c(t,i)||t instanceof Ie)throw t;if(t instanceof z&&Fc(t)){let u=Qs(t.meta);$r({args:o,errors:[u],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion})}let a=t.message;if(n&&(a=ht({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:a})),a=this.sanitizeMessage(a),t.code){let u=s?{modelName:s,...t.meta}:t.meta;throw new z(a,{code:t.code,clientVersion:this.client._clientVersion,meta:u,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new De(a,this.client._clientVersion);if(t instanceof ae)throw new ae(a,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof G)throw new G(a,this.client._clientVersion);if(t instanceof De)throw new De(a,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,js.default)(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let i=Object.values(t)[0],o=r.filter(a=>a!=="select"&&a!=="include"),s=Vr(xn(i,o));return n?n(s):s}get[Symbol.toStringTag](){return"RequestHandler"}};function Nc(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:Js(e)};je(e,"Unknown transaction kind")}}function Js(e){return{id:e.id,payload:e.payload}}function _c(e,t){return Ur(e)&&(t==null?void 0:t.kind)==="batch"&&e.batchRequestIdx!==t.index}function Fc(e){return e.code==="P2009"||e.code==="P2012"}function Qs(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(Qs)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}d();c();p();f();m();var Gs="5.15.0";var Hs=Gs;d();c();p();f();m();function Ws(e){return e.map(t=>{let r={};for(let n of Object.keys(t))r[n]=Ks(t[n]);return r})}function Ks({prisma__type:e,prisma__value:t}){switch(e){case"bigint":return BigInt(t);case"bytes":return w.Buffer.from(t,"base64");case"decimal":return new ve(t);case"datetime":case"date":return new Date(t);case"time":return new Date(`1970-01-01T${t}Z`);case"array":return t.map(Ks);default:return t}}d();c();p();f();m();var Xs=Ue(Fn());d();c();p();f();m();var J=class extends Error{constructor(t){super(t+` Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};_(J,"PrismaClientConstructorValidationError");var zs=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","__internal"],Ys=["pretty","colorless","minimal"],Zs=["info","query","warn","error"],Bc={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new J(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(e)){if(!t.includes(r)){let i=xt(r,t)||` Available datasources: ${t.join(", ")}`;throw new J(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new J(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new J(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new J(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,t)=>{if(e===null)return;if(e===void 0)throw new J('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!Nr(t).includes("driverAdapters"))throw new J('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(At()==="binary")throw new J('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')},datasourceUrl:e=>{if(typeof e!="undefined"&&typeof e!="string")throw new J(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new J(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!Ys.includes(e)){let t=xt(e,Ys);throw new J(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new J(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!Zs.includes(r)){let n=xt(r,Zs);throw new J(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of e){t(r);let n={level:t,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=xt(i,o);throw new J(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[i,o]of Object.entries(r))if(n[i])n[i](o);else throw new J(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let t=e.maxWait;if(t!=null&&t<=0)throw new J(`Invalid value ${t} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let r=e.timeout;if(r!=null&&r<=0)throw new J(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new J(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=xt(r,t);throw new J(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function ea(e,t){for(let[r,n]of Object.entries(e)){if(!zs.includes(r)){let i=xt(r,zs);throw new J(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}Bc[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new J('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function xt(e,t){if(t.length===0||typeof e!="string")return"";let r=$c(e,t);return r?` Did you mean "${r}"?`:""}function $c(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,Xs.default)(e,i)}));r.sort((i,o)=>i.distance{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?r(i):t(n)))},u=l=>{o||(o=!0,r(l))};for(let l=0;l{n[l]=g,a()},g=>{if(!Ur(g)){u(g);return}g.batchRequestIdx===l?u(g):(i||(i=g),a())})})}var Le=re("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var qc={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},Uc=Symbol.for("prisma.client.transaction.id"),Vc={id:0,nextId(){return++this.id}};function jc(e){class t{constructor(n){this._originalClient=this;this._middlewares=new qr;this._createPrismaPromise=Un();this.$extends=qo;var u,l,g,h,x,S,C,A,k,O,B,M,I,Z;e=(g=(l=(u=n==null?void 0:n.__internal)==null?void 0:u.configOverride)==null?void 0:l.call(u,e))!=null?g:e,ns(e),n&&ea(n,e);let i=n!=null&&n.adapter?fn(n.adapter):void 0,o=new lr().on("error",()=>{});this._extensions=Or.empty(),this._previewFeatures=Nr(e),this._clientVersion=(h=e.clientVersion)!=null?h:Hs,this._activeProvider=e.activeProvider,this._tracingHelper=Bs(this._previewFeatures);let s={rootEnvPath:e.relativeEnvPaths.rootEnvPath&&Ct.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&Ct.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},a=(x=e.injectableEdgeEnv)==null?void 0:x.call(e);try{let L=n!=null?n:{},Ye=(S=L.__internal)!=null?S:{},Be=Ye.debug===!0;Be&&re.enable("prisma:client");let fe=Ct.resolve(e.dirname,e.relativePath);wi.existsSync(fe)||(fe=e.dirname),Le("dirname",e.dirname),Le("relativePath",e.relativePath),Le("cwd",fe);let $e=Ye.engine||{};if(L.errorFormat?this._errorFormat=L.errorFormat:y.env.NODE_ENV==="production"?this._errorFormat="minimal":y.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:fe,dirname:e.dirname,enableDebugLogs:Be,allowTriggerPanic:$e.allowTriggerPanic,datamodelPath:Ct.join(e.dirname,(C=e.filename)!=null?C:"schema.prisma"),prismaPath:(A=$e.binaryPath)!=null?A:void 0,engineEndpoint:$e.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:L.log&&Us(L.log),logQueries:L.log&&!!(typeof L.log=="string"?L.log==="query":L.log.find(Q=>typeof Q=="string"?Q==="query":Q.level==="query")),env:(k=a==null?void 0:a.parsed)!=null?k:{},flags:[],engineWasm:e.engineWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:is(L,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:(B=(O=L.transactionOptions)==null?void 0:O.maxWait)!=null?B:2e3,timeout:(I=(M=L.transactionOptions)==null?void 0:M.timeout)!=null?I:5e3,isolationLevel:(Z=L.transactionOptions)==null?void 0:Z.isolationLevel},logEmitter:o,isBundled:e.isBundled,adapter:i},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:yt,getBatchRequestPayload:dr,prismaGraphQLToJSError:Bt,PrismaClientUnknownRequestError:ae,PrismaClientInitializationError:G,PrismaClientKnownRequestError:z,debug:re("prisma:client:accelerateEngine"),engineVersion:na.version,clientVersion:e.clientVersion}},Le("clientVersion",e.clientVersion),this._engine=ds(e,this._engineConfig),this._requestHandler=new Jr(this,o),L.log)for(let Q of L.log){let Ce=typeof Q=="string"?Q:Q.emit==="stdout"?Q.level:null;Ce&&this.$on(Ce,qe=>{var Ze;it.log(`${(Ze=it.tags[Ce])!=null?Ze:""}`,qe.message||qe.query)})}this._metrics=new St(this._engine)}catch(L){throw L.clientVersion=this._clientVersion,L}return this._appliedParent=$t(this)}get[Symbol.toStringTag](){return"PrismaClient"}$use(n){this._middlewares.use(n)}$on(n,i){n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i)}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{Vi()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:qn({clientMethod:i,activeProvider:a}),callsite:Fe(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=ra(n,i);return $n(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new ee("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>($n(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new ee(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:Ss,callsite:Fe(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:qn({clientMethod:i,activeProvider:a}),callsite:Fe(this._errorFormat),dataPath:[],middlewareArgsMapper:s}).then(Ws)}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...ra(n,i));throw new ee("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=Vc.nextId(),s=$s(n.length),a=n.map((u,l)=>{var x,S,C;if((u==null?void 0:u[Symbol.toStringTag])!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let g=(x=i==null?void 0:i.isolationLevel)!=null?x:this._engineConfig.transactionOptions.isolationLevel,h={kind:"batch",id:o,index:l,isolationLevel:g,lock:s};return(C=(S=u.requestTransaction)==null?void 0:S.call(u,h))!=null?C:u});return ta(a)}async _transactionWithCallback({callback:n,options:i}){var l,g,h;let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:(l=i==null?void 0:i.maxWait)!=null?l:this._engineConfig.transactionOptions.maxWait,timeout:(g=i==null?void 0:i.timeout)!=null?g:this._engineConfig.transactionOptions.timeout,isolationLevel:(h=i==null?void 0:i.isolationLevel)!=null?h:this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),u;try{let x={kind:"itx",...a};u=await n(this._createItxClient(x)),await this._engine.transaction("commit",o,a)}catch(x){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),x}return u}_createItxClient(n){return $t(ge($o(this),[ne("_appliedParent",()=>this._appliedParent._createItxClient(n)),ne("_createPrismaPromise",()=>Un(n)),ne(Uc,()=>n.id),st(qs)]))}$transaction(n,i){var a;let o;typeof n=="function"?((a=this._engineConfig.adapter)==null?void 0:a.adapterName)==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){var l;n.otelParentCtx=this._tracingHelper.getActiveContext();let i=(l=n.middlewareArgsMapper)!=null?l:qc,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={middleware:{name:"middleware",middleware:!0,attributes:{method:"$use"},active:!1},operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=-1,u=async g=>{let h=this._middlewares.get(++a);if(h)return this._tracingHelper.runInChildSpan(s.middleware,O=>h(g,B=>(O==null||O.end(),u(B))));let{runInTransaction:x,args:S,...C}=g,A={...n,...C};S&&(A.args=i.middlewareArgsToRequestArgs(S)),n.transaction!==void 0&&x===!1&&delete A.transaction;let k=await Ho(this,A);return A.model?jo({result:k,modelName:A.model,args:A.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel}):k};return this._tracingHelper.runInChildSpan(s.operation,()=>u(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:u,argsMapper:l,transaction:g,unpacker:h,otelParentCtx:x,customDataProxyFetch:S}){try{n=l?l(n):n;let C={name:"serialize"},A=this._tracingHelper.runInChildSpan(C,()=>Cs({modelName:u,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures}));return re.enabled("prisma:client")&&(Le("Prisma Client call:"),Le(`prisma.${i}(${So(n)})`),Le("Generated request:"),Le(JSON.stringify(A,null,2)+` `)),(g==null?void 0:g.kind)==="batch"&&await g.lock,this._requestHandler.request({protocolQuery:A,modelName:u,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:g,unpacker:h,otelParentCtx:x,otelChildCtx:this._tracingHelper.getActiveContext(),customDataProxyFetch:S})}catch(C){throw C.clientVersion=this._clientVersion,C}}get $metrics(){if(!this._hasPreviewFlag("metrics"))throw new ee("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:this._clientVersion});return this._metrics}_hasPreviewFlag(n){var i;return!!((i=this._engineConfig.previewFeatures)!=null&&i.includes(n))}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}}return t}function ra(e,t){return Jc(e)?[new ue(e,t),Ns]:[e,_s]}function Jc(e){return Array.isArray(e)&&Array.isArray(e.raw)}d();c();p();f();m();var Qc=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Gc(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!Qc.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}d();c();p();f();m();var export_warnEnvConflicts=void 0;export{Ui as Debug,ve as Decimal,gi as Extensions,St as MetricsClient,Ie as NotFoundError,G as PrismaClientInitializationError,z as PrismaClientKnownRequestError,De as PrismaClientRustPanicError,ae as PrismaClientUnknownRequestError,ee as PrismaClientValidationError,yi as Public,ue as Sql,ru as defineDmmfProperty,uu as empty,jc as getPrismaClient,Cn as getRuntime,au as join,Gc as makeStrictEnum,ln as objectEnumValues,io as raw,oo as sqltag,export_warnEnvConflicts as warnEnvConflicts,cr as warnOnce}; //# sourceMappingURL=edge-esm.js.map ================================================ FILE: server/src/common/prisma-client/runtime/edge.js ================================================ "use strict";var la=Object.create;var nr=Object.defineProperty;var ca=Object.getOwnPropertyDescriptor;var pa=Object.getOwnPropertyNames;var fa=Object.getPrototypeOf,ma=Object.prototype.hasOwnProperty;var be=(e,t)=>()=>(e&&(t=e(e=0)),t);var Se=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),vt=(e,t)=>{for(var r in t)nr(e,r,{get:t[r],enumerable:!0})},zn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of pa(t))!ma.call(e,i)&&i!==r&&nr(e,i,{get:()=>t[i],enumerable:!(n=ca(t,i))||n.enumerable});return e};var Ue=(e,t,r)=>(r=e!=null?la(fa(e)):{},zn(t||!e||!e.__esModule?nr(r,"default",{value:e,enumerable:!0}):r,e)),Gr=e=>zn(nr({},"__esModule",{value:!0}),e);var y,c=be(()=>{"use strict";y={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"]}});var Yn,b,p=be(()=>{"use strict";b=(Yn=globalThis.performance)!=null?Yn:(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,f=be(()=>{"use strict";E=()=>{};E.prototype=E});var m=be(()=>{"use strict"});var hi=Se(rt=>{"use strict";d();c();p();f();m();var ri=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),da=ri(e=>{"use strict";e.byteLength=u,e.toByteArray=g,e.fromByteArray=S;var t=[],r=[],n=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(o=0,s=i.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var k=C.indexOf("=");k===-1&&(k=A);var O=k===A?0:4-k%4;return[k,O]}function u(C){var A=a(C),k=A[0],O=A[1];return(k+O)*3/4-O}function l(C,A,k){return(A+k)*3/4-k}function g(C){var A,k=a(C),O=k[0],B=k[1],M=new n(l(C,O,B)),I=0,X=B>0?O-4:O,L;for(L=0;L>16&255,M[I++]=A>>8&255,M[I++]=A&255;return B===2&&(A=r[C.charCodeAt(L)]<<2|r[C.charCodeAt(L+1)]>>4,M[I++]=A&255),B===1&&(A=r[C.charCodeAt(L)]<<10|r[C.charCodeAt(L+1)]<<4|r[C.charCodeAt(L+2)]>>2,M[I++]=A>>8&255,M[I++]=A&255),M}function h(C){return t[C>>18&63]+t[C>>12&63]+t[C>>6&63]+t[C&63]}function x(C,A,k){for(var O,B=[],M=A;MX?X:I+M));return O===1?(A=C[k-1],B.push(t[A>>2]+t[A<<4&63]+"==")):O===2&&(A=(C[k-2]<<8)+C[k-1],B.push(t[A>>10]+t[A>>4&63]+t[A<<2&63]+"=")),B.join("")}}),ga=ri(e=>{e.read=function(t,r,n,i,o){var s,a,u=o*8-i-1,l=(1<>1,h=-7,x=n?o-1:0,S=n?-1:1,C=t[r+x];for(x+=S,s=C&(1<<-h)-1,C>>=-h,h+=u;h>0;s=s*256+t[r+x],x+=S,h-=8);for(a=s&(1<<-h)-1,s>>=-h,h+=i;h>0;a=a*256+t[r+x],x+=S,h-=8);if(s===0)s=1-g;else{if(s===l)return a?NaN:(C?-1:1)*(1/0);a=a+Math.pow(2,i),s=s-g}return(C?-1:1)*a*Math.pow(2,s-i)},e.write=function(t,r,n,i,o,s){var a,u,l,g=s*8-o-1,h=(1<>1,S=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,C=i?0:s-1,A=i?1:-1,k=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(u=isNaN(r)?1:0,a=h):(a=Math.floor(Math.log(r)/Math.LN2),r*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+x>=1?r+=S/l:r+=S*Math.pow(2,1-x),r*l>=2&&(a++,l/=2),a+x>=h?(u=0,a=h):a+x>=1?(u=(r*l-1)*Math.pow(2,o),a=a+x):(u=r*Math.pow(2,x-1)*Math.pow(2,o),a=0));o>=8;t[n+C]=u&255,C+=A,u/=256,o-=8);for(a=a<0;t[n+C]=a&255,C+=A,a/=256,g-=8);t[n+C-A]|=k*128}}),Hr=da(),et=ga(),Zn=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;rt.Buffer=T;rt.SlowBuffer=xa;rt.INSPECT_MAX_BYTES=50;var ir=2147483647;rt.kMaxLength=ir;T.TYPED_ARRAY_SUPPORT=ha();!T.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function ha(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch(e){return!1}}Object.defineProperty(T.prototype,"parent",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.buffer}});Object.defineProperty(T.prototype,"offset",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.byteOffset}});function xe(e){if(e>ir)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,T.prototype),t}function T(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return zr(e)}return ni(e,t,r)}T.poolSize=8192;function ni(e,t,r){if(typeof e=="string")return wa(e,t);if(ArrayBuffer.isView(e))return Ea(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(me(e,ArrayBuffer)||e&&me(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(me(e,SharedArrayBuffer)||e&&me(e.buffer,SharedArrayBuffer)))return oi(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return T.from(n,t,r);let i=ba(e);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return T.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}T.from=function(e,t,r){return ni(e,t,r)};Object.setPrototypeOf(T.prototype,Uint8Array.prototype);Object.setPrototypeOf(T,Uint8Array);function ii(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function ya(e,t,r){return ii(e),e<=0?xe(e):t!==void 0?typeof r=="string"?xe(e).fill(t,r):xe(e).fill(t):xe(e)}T.alloc=function(e,t,r){return ya(e,t,r)};function zr(e){return ii(e),xe(e<0?0:Yr(e)|0)}T.allocUnsafe=function(e){return zr(e)};T.allocUnsafeSlow=function(e){return zr(e)};function wa(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!T.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=si(e,t)|0,n=xe(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function Wr(e){let t=e.length<0?0:Yr(e.length)|0,r=xe(t);for(let n=0;n=ir)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ir.toString(16)+" bytes");return e|0}function xa(e){return+e!=e&&(e=0),T.alloc(+e)}T.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==T.prototype};T.compare=function(e,t){if(me(e,Uint8Array)&&(e=T.from(e,e.offset,e.byteLength)),me(t,Uint8Array)&&(t=T.from(t,t.offset,t.byteLength)),!T.isBuffer(e)||!T.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);in.length?(T.isBuffer(o)||(o=T.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else if(T.isBuffer(o))o.copy(n,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=o.length}return n};function si(e,t){if(T.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||me(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return Kr(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return gi(e).length;default:if(i)return n?-1:Kr(e).length;t=(""+t).toLowerCase(),i=!0}}T.byteLength=si;function Pa(e,t,r){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return Oa(this,t,r);case"utf8":case"utf-8":return ui(this,t,r);case"ascii":return Da(this,t,r);case"latin1":case"binary":return ka(this,t,r);case"base64":return Sa(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ma(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}T.prototype._isBuffer=!0;function Ve(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}T.prototype.swap16=function(){let e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tt&&(e+=" ... "),""};Zn&&(T.prototype[Zn]=T.prototype.inspect);T.prototype.compare=function(e,t,r,n,i){if(me(e,Uint8Array)&&(e=T.from(e,e.offset,e.byteLength)),!T.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),r===void 0&&(r=e?e.length:0),n===void 0&&(n=0),i===void 0&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;let o=i-n,s=r-t,a=Math.min(o,s),u=this.slice(n,i),l=e.slice(t,r);for(let g=0;g2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,Xr(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof t=="string"&&(t=T.from(t,n)),T.isBuffer(t))return t.length===0?-1:Xn(e,t,r,n,i);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):Xn(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function Xn(e,t,r,n,i){let o=1,s=e.length,a=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;o=2,s/=2,a/=2,r/=2}function u(g,h){return o===1?g[h]:g.readUInt16BE(h*o)}let l;if(i){let g=-1;for(l=r;ls&&(r=s-a),l=r;l>=0;l--){let g=!0;for(let h=0;hi&&(n=i)):n=i;let o=t.length;n>o/2&&(n=o/2);let s;for(s=0;s>>0,isFinite(r)?(r=r>>>0,n===void 0&&(n="utf8")):(n=r,r=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-t;if((r===void 0||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return va(this,e,t,r);case"utf8":case"utf-8":return Ta(this,e,t,r);case"ascii":case"latin1":case"binary":return Ca(this,e,t,r);case"base64":return Aa(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ra(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}};T.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Sa(e,t,r){return t===0&&r===e.length?Hr.fromByteArray(e):Hr.fromByteArray(e.slice(t,r))}function ui(e,t,r){r=Math.min(e.length,r);let n=[],i=t;for(;i239?4:o>223?3:o>191?2:1;if(i+a<=r){let u,l,g,h;switch(a){case 1:o<128&&(s=o);break;case 2:u=e[i+1],(u&192)===128&&(h=(o&31)<<6|u&63,h>127&&(s=h));break;case 3:u=e[i+1],l=e[i+2],(u&192)===128&&(l&192)===128&&(h=(o&15)<<12|(u&63)<<6|l&63,h>2047&&(h<55296||h>57343)&&(s=h));break;case 4:u=e[i+1],l=e[i+2],g=e[i+3],(u&192)===128&&(l&192)===128&&(g&192)===128&&(h=(o&15)<<18|(u&63)<<12|(l&63)<<6|g&63,h>65535&&h<1114112&&(s=h))}}s===null?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),i+=a}return Ia(n)}var ei=4096;function Ia(e){let t=e.length;if(t<=ei)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn)&&(r=n);let i="";for(let o=t;or&&(e=r),t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),tr)throw new RangeError("Trying to access beyond buffer length")}T.prototype.readUintLE=T.prototype.readUIntLE=function(e,t,r){e=e>>>0,t=t>>>0,r||W(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>0,t=t>>>0,r||W(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n};T.prototype.readUint8=T.prototype.readUInt8=function(e,t){return e=e>>>0,t||W(e,1,this.length),this[e]};T.prototype.readUint16LE=T.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||W(e,2,this.length),this[e]|this[e+1]<<8};T.prototype.readUint16BE=T.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||W(e,2,this.length),this[e]<<8|this[e+1]};T.prototype.readUint32LE=T.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||W(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};T.prototype.readUint32BE=T.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||W(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};T.prototype.readBigUInt64LE=Ie(function(e){e=e>>>0,tt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Tt(e,this.length-8);let n=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,i=this[++e]+this[++e]*2**8+this[++e]*2**16+r*2**24;return BigInt(n)+(BigInt(i)<>>0,tt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Tt(e,this.length-8);let n=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],i=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+r;return(BigInt(n)<>>0,t=t>>>0,r||W(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n};T.prototype.readIntBE=function(e,t,r){e=e>>>0,t=t>>>0,r||W(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o};T.prototype.readInt8=function(e,t){return e=e>>>0,t||W(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};T.prototype.readInt16LE=function(e,t){e=e>>>0,t||W(e,2,this.length);let r=this[e]|this[e+1]<<8;return r&32768?r|4294901760:r};T.prototype.readInt16BE=function(e,t){e=e>>>0,t||W(e,2,this.length);let r=this[e+1]|this[e]<<8;return r&32768?r|4294901760:r};T.prototype.readInt32LE=function(e,t){return e=e>>>0,t||W(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};T.prototype.readInt32BE=function(e,t){return e=e>>>0,t||W(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};T.prototype.readBigInt64LE=Ie(function(e){e=e>>>0,tt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Tt(e,this.length-8);let n=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(r<<24);return(BigInt(n)<>>0,tt(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&Tt(e,this.length-8);let n=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(n)<>>0,t||W(e,4,this.length),et.read(this,e,!0,23,4)};T.prototype.readFloatBE=function(e,t){return e=e>>>0,t||W(e,4,this.length),et.read(this,e,!1,23,4)};T.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||W(e,8,this.length),et.read(this,e,!0,52,8)};T.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||W(e,8,this.length),et.read(this,e,!1,52,8)};function ie(e,t,r,n,i,o){if(!T.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}T.prototype.writeUintLE=T.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;ie(this,e,t,r,s,0)}let i=1,o=0;for(this[t]=e&255;++o>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;ie(this,e,t,r,s,0)}let i=r-1,o=1;for(this[t+i]=e&255;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r};T.prototype.writeUint8=T.prototype.writeUInt8=function(e,t,r){return e=+e,t=t>>>0,r||ie(this,e,t,1,255,0),this[t]=e&255,t+1};T.prototype.writeUint16LE=T.prototype.writeUInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||ie(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2};T.prototype.writeUint16BE=T.prototype.writeUInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||ie(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2};T.prototype.writeUint32LE=T.prototype.writeUInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||ie(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4};T.prototype.writeUint32BE=T.prototype.writeUInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||ie(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function li(e,t,r,n,i){di(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,r}function ci(e,t,r,n,i){di(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o=o>>8,e[r+6]=o,o=o>>8,e[r+5]=o,o=o>>8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s=s>>8,e[r+2]=s,s=s>>8,e[r+1]=s,s=s>>8,e[r]=s,r+8}T.prototype.writeBigUInt64LE=Ie(function(e,t=0){return li(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});T.prototype.writeBigUInt64BE=Ie(function(e,t=0){return ci(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});T.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);ie(this,e,t,r,a-1,-a)}let i=0,o=1,s=0;for(this[t]=e&255;++i>0)-s&255;return t+r};T.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);ie(this,e,t,r,a-1,-a)}let i=r-1,o=1,s=0;for(this[t+i]=e&255;--i>=0&&(o*=256);)e<0&&s===0&&this[t+i+1]!==0&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r};T.prototype.writeInt8=function(e,t,r){return e=+e,t=t>>>0,r||ie(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1};T.prototype.writeInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||ie(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2};T.prototype.writeInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||ie(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2};T.prototype.writeInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||ie(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4};T.prototype.writeInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||ie(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};T.prototype.writeBigInt64LE=Ie(function(e,t=0){return li(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});T.prototype.writeBigInt64BE=Ie(function(e,t=0){return ci(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function pi(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function fi(e,t,r,n,i){return t=+t,r=r>>>0,i||pi(e,t,r,4,34028234663852886e22,-34028234663852886e22),et.write(e,t,r,n,23,4),r+4}T.prototype.writeFloatLE=function(e,t,r){return fi(this,e,t,!0,r)};T.prototype.writeFloatBE=function(e,t,r){return fi(this,e,t,!1,r)};function mi(e,t,r,n,i){return t=+t,r=r>>>0,i||pi(e,t,r,8,17976931348623157e292,-17976931348623157e292),et.write(e,t,r,n,52,8),r+8}T.prototype.writeDoubleLE=function(e,t,r){return mi(this,e,t,!0,r)};T.prototype.writeDoubleBE=function(e,t,r){return mi(this,e,t,!1,r)};T.prototype.copy=function(e,t,r,n){if(!T.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),!n&&n!==0&&(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>0,r=r===void 0?this.length:r>>>0,e||(e=0);let i;if(typeof e=="number")for(i=t;i2**32?i=ti(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=ti(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function ti(e){let t="",r=e.length,n=e[0]==="-"?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function Na(e,t,r){tt(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&Tt(t,e.length-(r+1))}function di(e,t,r,n,i,o){if(e>r||e3?t===0||t===BigInt(0)?a=`>= 0${s} and < 2${s} ** ${(o+1)*8}${s}`:a=`>= -(2${s} ** ${(o+1)*8-1}${s}) and < 2 ** ${(o+1)*8-1}${s}`:a=`>= ${t}${s} and <= ${r}${s}`,new Xe.ERR_OUT_OF_RANGE("value",a,e)}Na(n,i,o)}function tt(e,t){if(typeof e!="number")throw new Xe.ERR_INVALID_ARG_TYPE(t,"number",e)}function Tt(e,t,r){throw Math.floor(e)!==e?(tt(e,r),new Xe.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new Xe.ERR_BUFFER_OUT_OF_BOUNDS:new Xe.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var _a=/[^+/0-9A-Za-z-_]/g;function Fa(e){if(e=e.split("=")[0],e=e.trim().replace(_a,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function Kr(e,t){t=t||1/0;let r,n=e.length,i=null,o=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return o}function La(e){let t=[];for(let r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function gi(e){return Hr.toByteArray(Fa(e))}function or(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function me(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function Xr(e){return e!==e}var $a=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function Ie(e){return typeof BigInt>"u"?qa:e}function qa(){throw new Error("BigInt not supported")}});var w,d=be(()=>{"use strict";w=Ue(hi())});function Ua(){return!1}var Va,ja,bi,xi=be(()=>{"use strict";d();c();p();f();m();Va={},ja={existsSync:Ua,promises:Va},bi=ja});var Mi=Se((df,Oi)=>{"use strict";d();c();p();f();m();Oi.exports=(on(),Gr(nn)).format});var nn={};vt(nn,{default:()=>Ga,deprecate:()=>_i,format:()=>Li,inspect:()=>Fi,promisify:()=>Ni});function Ni(e){return(...t)=>new Promise((r,n)=>{e(...t,(i,o)=>{i?n(i):r(o)})})}function _i(e,t){return(...r)=>(console.warn(t),e(...r))}function Fi(e){return JSON.stringify(e,(t,r)=>typeof r=="function"?r.toString():typeof r=="bigint"?`${r}n`:r instanceof Error?{...r,message:r.message,stack:r.stack}:r)}var Li,Qa,Ga,on=be(()=>{"use strict";d();c();p();f();m();Li=Mi(),Qa={promisify:Ni,deprecate:_i,inspect:Fi,format:Li},Ga=Qa});function Ya(...e){return e.join("/")}function Za(...e){return e.join("/")}var Ji,Xa,eu,At,Qi=be(()=>{"use strict";d();c();p();f();m();Ji="/",Xa={sep:Ji},eu={resolve:Ya,posix:Xa,join:Za,sep:Ji},At=eu});var lr,Hi=be(()=>{"use strict";d();c();p();f();m();lr=class{constructor(){this.events={}}on(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),this}emit(t,...r){return this.events[t]?(this.events[t].forEach(n=>{n(...r)}),!0):!1}}});var Ki=Se((Em,Wi)=>{"use strict";d();c();p();f();m();Wi.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var Zi=Se((km,Yi)=>{"use strict";d();c();p();f();m();Yi.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var eo=Se((Lm,Xi)=>{"use strict";d();c();p();f();m();var su=Zi();Xi.exports=e=>typeof e=="string"?e.replace(su(),""):e});var io=Se((Mh,cu)=>{cu.exports={name:"@prisma/engines-version",version:"5.15.0-29.12e25d8d06f6ea5a0252864dd9a03b1bb51f3022",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"12e25d8d06f6ea5a0252864dd9a03b1bb51f3022"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.33",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var oo=Se(()=>{"use strict";d();c();p();f();m()});var Un=Se((aR,ys)=>{"use strict";d();c();p();f();m();ys.exports=function(){function e(t,r,n,i,o){return tn?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;san,Decimal:()=>ye,Extensions:()=>en,MetricsClient:()=>st,NotFoundError:()=>Pe,PrismaClientInitializationError:()=>G,PrismaClientKnownRequestError:()=>K,PrismaClientRustPanicError:()=>ve,PrismaClientUnknownRequestError:()=>oe,PrismaClientValidationError:()=>Y,Public:()=>tn,Sql:()=>se,defineDmmfProperty:()=>no,empty:()=>ao,getPrismaClient:()=>sa,getRuntime:()=>Mr,join:()=>so,makeStrictEnum:()=>aa,objectEnumValues:()=>pr,raw:()=>yn,sqltag:()=>wn,warnEnvConflicts:()=>void 0,warnOnce:()=>It});module.exports=Gr(Hc);d();c();p();f();m();var en={};vt(en,{defineExtension:()=>yi,getExtensionContext:()=>wi});d();c();p();f();m();d();c();p();f();m();function yi(e){return typeof e=="function"?e:t=>t.$extends(e)}d();c();p();f();m();function wi(e){return e}var tn={};vt(tn,{validator:()=>Ei});d();c();p();f();m();d();c();p();f();m();function Ei(...e){return t=>t}d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();var rn,Pi,vi,Ti,Ci=!0;typeof y!="undefined"&&({FORCE_COLOR:rn,NODE_DISABLE_COLORS:Pi,NO_COLOR:vi,TERM:Ti}=y.env||{},Ci=y.stdout&&y.stdout.isTTY);var Ja={enabled:!Pi&&vi==null&&Ti!=="dumb"&&(rn!=null&&rn!=="0"||Ci)};function V(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!Ja.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var Jp=V(0,0),sr=V(1,22),ar=V(2,22),Qp=V(3,23),Ai=V(4,24),Gp=V(7,27),Hp=V(8,28),Wp=V(9,29),Kp=V(30,39),nt=V(31,39),Ri=V(32,39),Si=V(33,39),Ii=V(34,39),zp=V(35,39),Di=V(36,39),Yp=V(37,39),ki=V(90,39),Zp=V(90,39),Xp=V(40,49),ef=V(41,49),tf=V(42,49),rf=V(43,49),nf=V(44,49),of=V(45,49),sf=V(46,49),af=V(47,49);d();c();p();f();m();var Ha=100,Bi=["green","yellow","blue","magenta","cyan","red"],ur=[],$i=Date.now(),Wa=0,sn=typeof y!="undefined"?y.env:{},qi,Ui;(Ui=globalThis.DEBUG)!=null||(globalThis.DEBUG=(qi=sn.DEBUG)!=null?qi:"");var Vi;(Vi=globalThis.DEBUG_COLORS)!=null||(globalThis.DEBUG_COLORS=sn.DEBUG_COLORS?sn.DEBUG_COLORS==="true":!0);var Ct={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let t=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=t.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=t.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...e)=>{var o;let[t,r,...n]=e,i;typeof require=="function"&&typeof y!="undefined"&&typeof y.stderr!="undefined"&&typeof y.stderr.write=="function"?i=(...s)=>{var a;try{let u=(on(),Gr(nn));y.stderr.write(u.format(...s)+` `)}catch(u){i=(a=console.warn)!=null?a:console.log}}:i=(o=console.warn)!=null?o:console.log,i(`${t} ${r}`,...n)},formatters:{}};function Ka(e){let t={color:Bi[Wa++%Bi.length],enabled:Ct.enabled(e),namespace:e,log:Ct.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&ur.push([o,...n]),ur.length>Ha&&ur.shift(),Ct.enabled(o)||i){let u=n.map(g=>typeof g=="string"?g:za(g)),l=`+${Date.now()-$i}ms`;$i=Date.now(),a(o,...u,l)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var an=new Proxy(Ka,{get:(e,t)=>Ct[t],set:(e,t,r)=>Ct[t]=r});function za(e,t=2){let r=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},t)}function ji(){ur.length=0}var re=an;d();c();p();f();m();d();c();p();f();m();var Gi="library";function Rt(e){let t=tu();return t||((e==null?void 0:e.config.engineType)==="library"?"library":(e==null?void 0:e.config.engineType)==="binary"?"binary":Gi)}function tu(){let e=y.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":void 0}d();c();p();f();m();d();c();p();f();m();var De;(t=>{let e;(I=>(I.findUnique="findUnique",I.findUniqueOrThrow="findUniqueOrThrow",I.findFirst="findFirst",I.findFirstOrThrow="findFirstOrThrow",I.findMany="findMany",I.create="create",I.createMany="createMany",I.createManyAndReturn="createManyAndReturn",I.update="update",I.updateMany="updateMany",I.upsert="upsert",I.delete="delete",I.deleteMany="deleteMany",I.groupBy="groupBy",I.count="count",I.aggregate="aggregate",I.findRaw="findRaw",I.aggregateRaw="aggregateRaw"))(e=t.ModelAction||(t.ModelAction={}))})(De||(De={}));var it={};vt(it,{error:()=>iu,info:()=>nu,log:()=>ru,query:()=>ou,should:()=>zi,tags:()=>St,warn:()=>un});d();c();p();f();m();var St={error:nt("prisma:error"),warn:Si("prisma:warn"),info:Di("prisma:info"),query:Ii("prisma:query")},zi={warn:()=>!y.env.PRISMA_DISABLE_WARNINGS};function ru(...e){console.log(...e)}function un(e,...t){zi.warn()&&console.warn(`${St.warn} ${e}`,...t)}function nu(e,...t){console.info(`${St.info} ${e}`,...t)}function iu(e,...t){console.error(`${St.error} ${e}`,...t)}function ou(e,...t){console.log(`${St.query} ${e}`,...t)}d();c();p();f();m();function je(e,t){throw new Error(t)}d();c();p();f();m();function ln(e,t){return Object.prototype.hasOwnProperty.call(e,t)}d();c();p();f();m();var cn=(e,t)=>e.reduce((r,n)=>(r[t(n)]=n,r),{});d();c();p();f();m();function ot(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}d();c();p();f();m();function pn(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{to.has(e)||(to.add(e),un(t,...r))};d();c();p();f();m();var K=class extends Error{constructor(t,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(t),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};_(K,"PrismaClientKnownRequestError");var Pe=class extends K{constructor(t,r){super(t,{code:"P2025",clientVersion:r}),this.name="NotFoundError"}};_(Pe,"NotFoundError");d();c();p();f();m();var G=class e extends Error{constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};_(G,"PrismaClientInitializationError");d();c();p();f();m();var ve=class extends Error{constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};_(ve,"PrismaClientRustPanicError");d();c();p();f();m();var oe=class extends Error{constructor(t,{clientVersion:r,batchRequestIdx:n}){super(t),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};_(oe,"PrismaClientUnknownRequestError");d();c();p();f();m();var Y=class extends Error{constructor(r,{clientVersion:n}){super(r);this.name="PrismaClientValidationError";this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};_(Y,"PrismaClientValidationError");d();c();p();f();m();var st=class{constructor(t){this._engine=t}prometheus(t){return this._engine.metrics({format:"prometheus",...t})}json(t){return this._engine.metrics({format:"json",...t})}};d();c();p();f();m();d();c();p();f();m();function Dt(e){let t;return{get(){return t||(t={value:e()}),t.value}}}function no(e,t){let r=Dt(()=>au(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function au(e){return{datamodel:{models:fn(e.models),enums:fn(e.enums),types:fn(e.types)}}}function fn(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}d();c();p();f();m();var cr=Symbol(),mn=new WeakMap,Te=class{constructor(t){t===cr?mn.set(this,`Prisma.${this._getName()}`):mn.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return mn.get(this)}},kt=class extends Te{_getNamespace(){return"NullTypes"}},Ot=class extends kt{};dn(Ot,"DbNull");var Mt=class extends kt{};dn(Mt,"JsonNull");var Nt=class extends kt{};dn(Nt,"AnyNull");var pr={classes:{DbNull:Ot,JsonNull:Mt,AnyNull:Nt},instances:{DbNull:new Ot(cr),JsonNull:new Mt(cr),AnyNull:new Nt(cr)}};function dn(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();function _t(e){return{ok:!1,error:e,map(){return _t(e)},flatMap(){return _t(e)}}}var gn=class{constructor(){this.registeredErrors=[]}consumeError(t){return this.registeredErrors[t]}registerNewError(t){let r=0;for(;this.registeredErrors[r]!==void 0;)r++;return this.registeredErrors[r]={error:t},r}},hn=e=>{let t=new gn,r=Je(t,e.startTransaction.bind(e)),n={adapterName:e.adapterName,errorRegistry:t,queryRaw:Je(t,e.queryRaw.bind(e)),executeRaw:Je(t,e.executeRaw.bind(e)),provider:e.provider,startTransaction:async(...i)=>(await r(...i)).map(s=>uu(t,s))};return e.getConnectionInfo&&(n.getConnectionInfo=lu(t,e.getConnectionInfo.bind(e))),n},uu=(e,t)=>({adapterName:t.adapterName,provider:t.provider,options:t.options,queryRaw:Je(e,t.queryRaw.bind(t)),executeRaw:Je(e,t.executeRaw.bind(t)),commit:Je(e,t.commit.bind(t)),rollback:Je(e,t.rollback.bind(t))});function Je(e,t){return async(...r)=>{try{return await t(...r)}catch(n){let i=e.registerNewError(n);return _t({kind:"GenericJs",id:i})}}}function lu(e,t){return(...r)=>{try{return t(...r)}catch(n){let i=e.registerNewError(n);return _t({kind:"GenericJs",id:i})}}}var oa=Ue(io());var gk=Ue(oo());Hi();xi();Qi();d();c();p();f();m();var se=class e{constructor(t,r){if(t.length-1!==r.length)throw t.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${t.length} strings to have ${t.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=t[0];let i=0,o=0;for(;ie.getPropertyValue(r))},getPropertyDescriptor(r){var n;return(n=e.getPropertyDescriptor)==null?void 0:n.call(e,r)}}}d();c();p();f();m();d();c();p();f();m();var fr={enumerable:!0,configurable:!0,writable:!0};function mr(e){let t=new Set(e);return{getOwnPropertyDescriptor:()=>fr,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var uo=Symbol.for("nodejs.util.inspect.custom");function ge(e,t){let r=pu(t),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=r.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){var u,l;if(n.has(s))return!0;let a=r.get(s);return a?(l=(u=a.has)==null?void 0:u.call(a,s))!=null?l:!0:Reflect.has(o,s)},ownKeys(o){let s=lo(Reflect.ownKeys(o),r),a=lo(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){var l,g;let u=r.get(s);return((g=(l=u==null?void 0:u.getPropertyDescriptor)==null?void 0:l.call(u,s))==null?void 0:g.writable)===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let u=r.get(s);return u?u.getPropertyDescriptor?{...fr,...u==null?void 0:u.getPropertyDescriptor(s)}:fr:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)}});return i[uo]=function(){let o={...this};return delete o[uo],o},i}function pu(e){let t=new Map;for(let r of e){let n=r.getKeys();for(let i of n)t.set(i,r)}return t}function lo(e,t){return e.filter(r=>{var i,o;let n=t.get(r);return(o=(i=n==null?void 0:n.has)==null?void 0:i.call(n,r))!=null?o:!0})}d();c();p();f();m();function at(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}d();c();p();f();m();function dr(e,t){return{batch:e,transaction:(t==null?void 0:t.kind)==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}d();c();p();f();m();d();c();p();f();m();var ut=class{constructor(t=0,r){this.context=r;this.lines=[];this.currentLine="";this.currentIndent=0;this.currentIndent=t}write(t){return typeof t=="string"?this.currentLine+=t:t.write(this),this}writeJoined(t,r){let n=r.length-1;for(let i=0;i0&&this.currentIndent--,this}addMarginSymbol(t){return this.marginSymbol=t,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` `)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let t=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+t.slice(1):t}};d();c();p();f();m();d();c();p();f();m();function co(e){return e.substring(0,1).toLowerCase()+e.substring(1)}d();c();p();f();m();function lt(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function gr(e){return e.toString()!=="Invalid Date"}d();c();p();f();m();d();c();p();f();m();var ct=9e15,Ne=1e9,En="0123456789abcdef",yr="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",wr="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",bn={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-ct,maxE:ct,crypto:!1},go,Ce,F=!0,br="[DecimalError] ",Me=br+"Invalid argument: ",ho=br+"Precision limit exceeded",yo=br+"crypto unavailable",wo="[object Decimal]",te=Math.floor,H=Math.pow,fu=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,mu=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,du=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Eo=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,pe=1e7,N=7,gu=9007199254740991,hu=yr.length-1,xn=wr.length-1,R={toStringTag:wo};R.absoluteValue=R.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),D(e)};R.ceil=function(){return D(new this.constructor(this),this.e+1,2)};R.clampedTo=R.clamp=function(e,t){var r,n=this,i=n.constructor;if(e=new i(e),t=new i(t),!e.s||!t.s)return new i(NaN);if(e.gt(t))throw Error(Me+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new i(n)};R.comparedTo=R.cmp=function(e){var t,r,n,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,u=o.s,l=e.s;if(!s||!a)return!u||!l?NaN:u!==l?u:s===a?0:!s^u<0?1:-1;if(!s[0]||!a[0])return s[0]?u:a[0]?-l:0;if(u!==l)return u;if(o.e!==e.e)return o.e>e.e^u<0?1:-1;for(n=s.length,i=a.length,t=0,r=na[t]^u<0?1:-1;return n===i?0:n>i^u<0?1:-1};R.cosine=R.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+N,n.rounding=1,r=yu(n,To(n,r)),n.precision=e,n.rounding=t,D(Ce==2||Ce==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};R.cubeRoot=R.cbrt=function(){var e,t,r,n,i,o,s,a,u,l,g=this,h=g.constructor;if(!g.isFinite()||g.isZero())return new h(g);for(F=!1,o=g.s*H(g.s*g,1/3),!o||Math.abs(o)==1/0?(r=Z(g.d),e=g.e,(o=(e-r.length+1)%3)&&(r+=o==1||o==-2?"0":"00"),o=H(r,1/3),e=te((e+1)/3)-(e%3==(e<0?-1:2)),o==1/0?r="5e"+e:(r=o.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),n=new h(r),n.s=g.s):n=new h(o.toString()),s=(e=h.precision)+3;;)if(a=n,u=a.times(a).times(a),l=u.plus(g),n=q(l.plus(g).times(a),l.plus(u),s+2,1),Z(a.d).slice(0,s)===(r=Z(n.d)).slice(0,s))if(r=r.slice(s-3,s+1),r=="9999"||!i&&r=="4999"){if(!i&&(D(a,e+1,0),a.times(a).times(a).eq(g))){n=a;break}s+=4,i=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(D(n,e+1,1),t=!n.times(n).times(n).eq(g));break}return F=!0,D(n,e,h.rounding,t)};R.decimalPlaces=R.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-te(this.e/N))*N,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};R.dividedBy=R.div=function(e){return q(this,new this.constructor(e))};R.dividedToIntegerBy=R.divToInt=function(e){var t=this,r=t.constructor;return D(q(t,new r(e),0,1,1),r.precision,r.rounding)};R.equals=R.eq=function(e){return this.cmp(e)===0};R.floor=function(){return D(new this.constructor(this),this.e+1,3)};R.greaterThan=R.gt=function(e){return this.cmp(e)>0};R.greaterThanOrEqualTo=R.gte=function(e){var t=this.cmp(e);return t==1||t===0};R.hyperbolicCosine=R.cosh=function(){var e,t,r,n,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;r=s.precision,n=s.rounding,s.precision=r+Math.max(o.e,o.sd())+4,s.rounding=1,i=o.d.length,i<32?(e=Math.ceil(i/3),t=(1/Pr(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=pt(s,1,o.times(t),new s(1),!0);for(var u,l=e,g=new s(8);l--;)u=o.times(o),o=a.minus(u.times(g.minus(u.times(g))));return D(o,s.precision=r,s.rounding=n,!0)};R.hyperbolicSine=R.sinh=function(){var e,t,r,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,r=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,n=i.d.length,n<3)i=pt(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/Pr(5,e)),i=pt(o,2,i,i,!0);for(var s,a=new o(5),u=new o(16),l=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(u.times(s).plus(l))))}return o.precision=t,o.rounding=r,D(i,t,r,!0)};R.hyperbolicTangent=R.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,q(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};R.inverseCosine=R.acos=function(){var e,t=this,r=t.constructor,n=t.abs().cmp(1),i=r.precision,o=r.rounding;return n!==-1?n===0?t.isNeg()?ce(r,i,o):new r(0):new r(NaN):t.isZero()?ce(r,i+4,o).times(.5):(r.precision=i+6,r.rounding=1,t=t.asin(),e=ce(r,i+4,o).times(.5),r.precision=i,r.rounding=o,e.minus(t))};R.inverseHyperbolicCosine=R.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,F=!1,r=r.times(r).minus(1).sqrt().plus(r),F=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)};R.inverseHyperbolicSine=R.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,F=!1,r=r.times(r).plus(1).sqrt().plus(r),F=!0,n.precision=e,n.rounding=t,r.ln())};R.inverseHyperbolicTangent=R.atanh=function(){var e,t,r,n,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?D(new o(i),e,t,!0):(o.precision=r=n-i.e,i=q(i.plus(1),new o(1).minus(i),r+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)};R.inverseSine=R.asin=function(){var e,t,r,n,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),r=o.precision,n=o.rounding,t!==-1?t===0?(e=ce(o,r+4,n).times(.5),e.s=i.s,e):new o(NaN):(o.precision=r+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=r,o.rounding=n,i.times(2)))};R.inverseTangent=R.atan=function(){var e,t,r,n,i,o,s,a,u,l=this,g=l.constructor,h=g.precision,x=g.rounding;if(l.isFinite()){if(l.isZero())return new g(l);if(l.abs().eq(1)&&h+4<=xn)return s=ce(g,h+4,x).times(.25),s.s=l.s,s}else{if(!l.s)return new g(NaN);if(h+4<=xn)return s=ce(g,h+4,x).times(.5),s.s=l.s,s}for(g.precision=a=h+10,g.rounding=1,r=Math.min(28,a/N+2|0),e=r;e;--e)l=l.div(l.times(l).plus(1).sqrt().plus(1));for(F=!1,t=Math.ceil(a/N),n=1,u=l.times(l),s=new g(l),i=l;e!==-1;)if(i=i.times(u),o=s.minus(i.div(n+=2)),i=i.times(u),s=o.plus(i.div(n+=2)),s.d[t]!==void 0)for(e=t;s.d[e]===o.d[e]&&e--;);return r&&(s=s.times(2<this.d.length-2};R.isNaN=function(){return!this.s};R.isNegative=R.isNeg=function(){return this.s<0};R.isPositive=R.isPos=function(){return this.s>0};R.isZero=function(){return!!this.d&&this.d[0]===0};R.lessThan=R.lt=function(e){return this.cmp(e)<0};R.lessThanOrEqualTo=R.lte=function(e){return this.cmp(e)<1};R.logarithm=R.log=function(e){var t,r,n,i,o,s,a,u,l=this,g=l.constructor,h=g.precision,x=g.rounding,S=5;if(e==null)e=new g(10),t=!0;else{if(e=new g(e),r=e.d,e.s<0||!r||!r[0]||e.eq(1))return new g(NaN);t=e.eq(10)}if(r=l.d,l.s<0||!r||!r[0]||l.eq(1))return new g(r&&!r[0]?-1/0:l.s!=1?NaN:r?0:1/0);if(t)if(r.length>1)o=!0;else{for(i=r[0];i%10===0;)i/=10;o=i!==1}if(F=!1,a=h+S,s=Oe(l,a),n=t?Er(g,a+10):Oe(e,a),u=q(s,n,a,1),Lt(u.d,i=h,x))do if(a+=10,s=Oe(l,a),n=t?Er(g,a+10):Oe(e,a),u=q(s,n,a,1),!o){+Z(u.d).slice(i+1,i+15)+1==1e14&&(u=D(u,h+1,0));break}while(Lt(u.d,i+=10,x));return F=!0,D(u,h,x)};R.minus=R.sub=function(e){var t,r,n,i,o,s,a,u,l,g,h,x,S=this,C=S.constructor;if(e=new C(e),!S.d||!e.d)return!S.s||!e.s?e=new C(NaN):S.d?e.s=-e.s:e=new C(e.d||S.s!==e.s?S:NaN),e;if(S.s!=e.s)return e.s=-e.s,S.plus(e);if(l=S.d,x=e.d,a=C.precision,u=C.rounding,!l[0]||!x[0]){if(x[0])e.s=-e.s;else if(l[0])e=new C(S);else return new C(u===3?-0:0);return F?D(e,a,u):e}if(r=te(e.e/N),g=te(S.e/N),l=l.slice(),o=g-r,o){for(h=o<0,h?(t=l,o=-o,s=x.length):(t=x,r=g,s=l.length),n=Math.max(Math.ceil(a/N),s)+2,o>n&&(o=n,t.length=1),t.reverse(),n=o;n--;)t.push(0);t.reverse()}else{for(n=l.length,s=x.length,h=n0;--n)l[s++]=0;for(n=x.length;n>o;){if(l[--n]s?o+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=l.length,i=g.length,s-i<0&&(i=s,r=g,g=l,l=r),t=0;i;)t=(l[--i]=l[i]+g[i]+t)/pe|0,l[i]%=pe;for(t&&(l.unshift(t),++n),s=l.length;l[--s]==0;)l.pop();return e.d=l,e.e=xr(l,n),F?D(e,a,u):e};R.precision=R.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Me+e);return r.d?(t=bo(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};R.round=function(){var e=this,t=e.constructor;return D(new t(e),e.e+1,t.rounding)};R.sine=R.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+N,n.rounding=1,r=Eu(n,To(n,r)),n.precision=e,n.rounding=t,D(Ce>2?r.neg():r,e,t,!0)):new n(NaN)};R.squareRoot=R.sqrt=function(){var e,t,r,n,i,o,s=this,a=s.d,u=s.e,l=s.s,g=s.constructor;if(l!==1||!a||!a[0])return new g(!l||l<0&&(!a||a[0])?NaN:a?s:1/0);for(F=!1,l=Math.sqrt(+s),l==0||l==1/0?(t=Z(a),(t.length+u)%2==0&&(t+="0"),l=Math.sqrt(t),u=te((u+1)/2)-(u<0||u%2),l==1/0?t="5e"+u:(t=l.toExponential(),t=t.slice(0,t.indexOf("e")+1)+u),n=new g(t)):n=new g(l.toString()),r=(u=g.precision)+3;;)if(o=n,n=o.plus(q(s,o,r+2,1)).times(.5),Z(o.d).slice(0,r)===(t=Z(n.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!i&&t=="4999"){if(!i&&(D(o,u+1,0),o.times(o).eq(s))){n=o;break}r+=4,i=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(D(n,u+1,1),e=!n.times(n).eq(s));break}return F=!0,D(n,u,g.rounding,e)};R.tangent=R.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,r=r.sin(),r.s=1,r=q(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,D(Ce==2||Ce==4?r.neg():r,e,t,!0)):new n(NaN)};R.times=R.mul=function(e){var t,r,n,i,o,s,a,u,l,g=this,h=g.constructor,x=g.d,S=(e=new h(e)).d;if(e.s*=g.s,!x||!x[0]||!S||!S[0])return new h(!e.s||x&&!x[0]&&!S||S&&!S[0]&&!x?NaN:!x||!S?e.s/0:e.s*0);for(r=te(g.e/N)+te(e.e/N),u=x.length,l=S.length,u=0;){for(t=0,i=u+n;i>n;)a=o[i]+S[n]*x[i-n-1]+t,o[i--]=a%pe|0,t=a/pe|0;o[i]=(o[i]+t)%pe|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=xr(o,r),F?D(e,h.precision,h.rounding):e};R.toBinary=function(e,t){return Tn(this,2,e,t)};R.toDecimalPlaces=R.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(ae(e,0,Ne),t===void 0?t=n.rounding:ae(t,0,8),D(r,e+r.e+1,t))};R.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=he(n,!0):(ae(e,0,Ne),t===void 0?t=i.rounding:ae(t,0,8),n=D(new i(n),e+1,t),r=he(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};R.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?r=he(i):(ae(e,0,Ne),t===void 0?t=o.rounding:ae(t,0,8),n=D(new o(i),e+i.e+1,t),r=he(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};R.toFraction=function(e){var t,r,n,i,o,s,a,u,l,g,h,x,S=this,C=S.d,A=S.constructor;if(!C)return new A(S);if(l=r=new A(1),n=u=new A(0),t=new A(n),o=t.e=bo(C)-S.e-1,s=o%N,t.d[0]=H(10,s<0?N+s:s),e==null)e=o>0?t:l;else{if(a=new A(e),!a.isInt()||a.lt(l))throw Error(Me+a);e=a.gt(t)?o>0?t:l:a}for(F=!1,a=new A(Z(C)),g=A.precision,A.precision=o=C.length*N*2;h=q(a,t,0,1,1),i=r.plus(h.times(n)),i.cmp(e)!=1;)r=n,n=i,i=l,l=u.plus(h.times(i)),u=i,i=t,t=a.minus(h.times(i)),a=i;return i=q(e.minus(r),n,0,1,1),u=u.plus(i.times(l)),r=r.plus(i.times(n)),u.s=l.s=S.s,x=q(l,n,o,1).minus(S).abs().cmp(q(u,r,o,1).minus(S).abs())<1?[l,n]:[u,r],A.precision=g,F=!0,x};R.toHexadecimal=R.toHex=function(e,t){return Tn(this,16,e,t)};R.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),e==null){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),t===void 0?t=n.rounding:ae(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(F=!1,r=q(r,e,0,t,1).times(e),F=!0,D(r)):(e.s=r.s,r=e),r};R.toNumber=function(){return+this};R.toOctal=function(e,t){return Tn(this,8,e,t)};R.toPower=R.pow=function(e){var t,r,n,i,o,s,a=this,u=a.constructor,l=+(e=new u(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new u(H(+a,l));if(a=new u(a),a.eq(1))return a;if(n=u.precision,o=u.rounding,e.eq(1))return D(a,n,o);if(t=te(e.e/N),t>=e.d.length-1&&(r=l<0?-l:l)<=gu)return i=xo(u,a,r,n),e.s<0?new u(1).div(i):D(i,n,o);if(s=a.s,s<0){if(tu.maxE+1||t0?s/0:0):(F=!1,u.rounding=a.s=1,r=Math.min(12,(t+"").length),i=Pn(e.times(Oe(a,n+r)),n),i.d&&(i=D(i,n+5,1),Lt(i.d,n,o)&&(t=n+10,i=D(Pn(e.times(Oe(a,t+r)),t),t+5,1),+Z(i.d).slice(n+1,n+15)+1==1e14&&(i=D(i,n+1,0)))),i.s=s,F=!0,u.rounding=o,D(i,n,o))};R.toPrecision=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=he(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(ae(e,1,Ne),t===void 0?t=i.rounding:ae(t,0,8),n=D(new i(n),e,t),r=he(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};R.toSignificantDigits=R.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(ae(e,1,Ne),t===void 0?t=n.rounding:ae(t,0,8)),D(new n(r),e,t)};R.toString=function(){var e=this,t=e.constructor,r=he(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};R.truncated=R.trunc=function(){return D(new this.constructor(this),this.e+1,1)};R.valueOf=R.toJSON=function(){var e=this,t=e.constructor,r=he(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function Z(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;tr)throw Error(Me+e)}function Lt(e,t,r,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=N,i=0):(i=Math.ceil((t+1)/N),t%=N),o=H(10,N-t),a=e[i]%o|0,n==null?t<3?(t==0?a=a/100|0:t==1&&(a=a/10|0),s=r<4&&a==99999||r>3&&a==49999||a==5e4||a==0):s=(r<4&&a+1==o||r>3&&a+1==o/2)&&(e[i+1]/o/100|0)==H(10,t-2)-1||(a==o/2||a==0)&&(e[i+1]/o/100|0)==0:t<4?(t==0?a=a/1e3|0:t==1?a=a/100|0:t==2&&(a=a/10|0),s=(n||r<4)&&a==9999||!n&&r>3&&a==4999):s=((n||r<4)&&a+1==o||!n&&r>3&&a+1==o/2)&&(e[i+1]/o/1e3|0)==H(10,t-3)-1,s}function hr(e,t,r){for(var n,i=[0],o,s=0,a=e.length;sr-1&&(i[n+1]===void 0&&(i[n+1]=0),i[n+1]+=i[n]/r|0,i[n]%=r)}return i.reverse()}function yu(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),i=(1/Pr(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=pt(e,1,t.times(i),new e(1));for(var o=r;o--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=r,t}var q=function(){function e(n,i,o){var s,a=0,u=n.length;for(n=n.slice();u--;)s=n[u]*i+a,n[u]=s%o|0,a=s/o|0;return a&&n.unshift(a),n}function t(n,i,o,s){var a,u;if(o!=s)u=o>s?1:-1;else for(a=u=0;ai[a]?1:-1;break}return u}function r(n,i,o,s){for(var a=0;o--;)n[o]-=a,a=n[o]1;)n.shift()}return function(n,i,o,s,a,u){var l,g,h,x,S,C,A,k,O,B,M,I,X,L,Ye,Be,fe,$e,Q,Re,qe=n.constructor,Ze=n.s==i.s?1:-1,ee=n.d,U=i.d;if(!ee||!ee[0]||!U||!U[0])return new qe(!n.s||!i.s||(ee?U&&ee[0]==U[0]:!U)?NaN:ee&&ee[0]==0||!U?Ze*0:Ze/0);for(u?(S=1,g=n.e-i.e):(u=pe,S=N,g=te(n.e/S)-te(i.e/S)),Q=U.length,fe=ee.length,O=new qe(Ze),B=O.d=[],h=0;U[h]==(ee[h]||0);h++);if(U[h]>(ee[h]||0)&&g--,o==null?(L=o=qe.precision,s=qe.rounding):a?L=o+(n.e-i.e)+1:L=o,L<0)B.push(1),C=!0;else{if(L=L/S+2|0,h=0,Q==1){for(x=0,U=U[0],L++;(h1&&(U=e(U,x,u),ee=e(ee,x,u),Q=U.length,fe=ee.length),Be=Q,M=ee.slice(0,Q),I=M.length;I=u/2&&++$e;do x=0,l=t(U,M,Q,I),l<0?(X=M[0],Q!=I&&(X=X*u+(M[1]||0)),x=X/$e|0,x>1?(x>=u&&(x=u-1),A=e(U,x,u),k=A.length,I=M.length,l=t(A,M,k,I),l==1&&(x--,r(A,Q=10;x/=10)h++;O.e=h+g*S-1,D(O,a?o+O.e+1:o,s,C)}return O}}();function D(e,t,r,n){var i,o,s,a,u,l,g,h,x,S=e.constructor;e:if(t!=null){if(h=e.d,!h)return e;for(i=1,a=h[0];a>=10;a/=10)i++;if(o=t-i,o<0)o+=N,s=t,g=h[x=0],u=g/H(10,i-s-1)%10|0;else if(x=Math.ceil((o+1)/N),a=h.length,x>=a)if(n){for(;a++<=x;)h.push(0);g=u=0,i=1,o%=N,s=o-N+1}else break e;else{for(g=a=h[x],i=1;a>=10;a/=10)i++;o%=N,s=o-N+i,u=s<0?0:g/H(10,i-s-1)%10|0}if(n=n||t<0||h[x+1]!==void 0||(s<0?g:g%H(10,i-s-1)),l=r<4?(u||n)&&(r==0||r==(e.s<0?3:2)):u>5||u==5&&(r==4||n||r==6&&(o>0?s>0?g/H(10,i-s):0:h[x-1])%10&1||r==(e.s<0?8:7)),t<1||!h[0])return h.length=0,l?(t-=e.e+1,h[0]=H(10,(N-t%N)%N),e.e=-t||0):h[0]=e.e=0,e;if(o==0?(h.length=x,a=1,x--):(h.length=x+1,a=H(10,N-o),h[x]=s>0?(g/H(10,i-s)%H(10,s)|0)*a:0),l)for(;;)if(x==0){for(o=1,s=h[0];s>=10;s/=10)o++;for(s=h[0]+=a,a=1;s>=10;s/=10)a++;o!=a&&(e.e++,h[0]==pe&&(h[0]=1));break}else{if(h[x]+=a,h[x]!=pe)break;h[x--]=0,a=1}for(o=h.length;h[--o]===0;)h.pop()}return F&&(e.e>S.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+ke(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+ke(-i-1)+o,r&&(n=r-s)>0&&(o+=ke(n))):i>=s?(o+=ke(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+ke(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=ke(n))),o}function xr(e,t){var r=e[0];for(t*=N;r>=10;r/=10)t++;return t}function Er(e,t,r){if(t>hu)throw F=!0,r&&(e.precision=r),Error(ho);return D(new e(yr),t,1,!0)}function ce(e,t,r){if(t>xn)throw Error(ho);return D(new e(wr),t,r,!0)}function bo(e){var t=e.length-1,r=t*N+1;if(t=e[t],t){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function ke(e){for(var t="";e--;)t+="0";return t}function xo(e,t,r,n){var i,o=new e(1),s=Math.ceil(n/N+4);for(F=!1;;){if(r%2&&(o=o.times(t),fo(o.d,s)&&(i=!0)),r=te(r/2),r===0){r=o.d.length-1,i&&o.d[r]===0&&++o.d[r];break}t=t.times(t),fo(t.d,s)}return F=!0,o}function po(e){return e.d[e.d.length-1]&1}function Po(e,t,r){for(var n,i=new e(t[0]),o=0;++o17)return new x(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(F=!1,u=C):u=t,a=new x(.03125);e.e>-2;)e=e.times(a),h+=5;for(n=Math.log(H(2,h))/Math.LN10*2+5|0,u+=n,r=o=s=new x(1),x.precision=u;;){if(o=D(o.times(e),u,1),r=r.times(++g),a=s.plus(q(o,r,u,1)),Z(a.d).slice(0,u)===Z(s.d).slice(0,u)){for(i=h;i--;)s=D(s.times(s),u,1);if(t==null)if(l<3&&Lt(s.d,u-n,S,l))x.precision=u+=10,r=o=a=new x(1),g=0,l++;else return D(s,x.precision=C,S,F=!0);else return x.precision=C,s}s=a}}function Oe(e,t){var r,n,i,o,s,a,u,l,g,h,x,S=1,C=10,A=e,k=A.d,O=A.constructor,B=O.rounding,M=O.precision;if(A.s<0||!k||!k[0]||!A.e&&k[0]==1&&k.length==1)return new O(k&&!k[0]?-1/0:A.s!=1?NaN:k?0:A);if(t==null?(F=!1,g=M):g=t,O.precision=g+=C,r=Z(k),n=r.charAt(0),Math.abs(o=A.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)A=A.times(e),r=Z(A.d),n=r.charAt(0),S++;o=A.e,n>1?(A=new O("0."+r),o++):A=new O(n+"."+r.slice(1))}else return l=Er(O,g+2,M).times(o+""),A=Oe(new O(n+"."+r.slice(1)),g-C).plus(l),O.precision=M,t==null?D(A,M,B,F=!0):A;for(h=A,u=s=A=q(A.minus(1),A.plus(1),g,1),x=D(A.times(A),g,1),i=3;;){if(s=D(s.times(x),g,1),l=u.plus(q(s,new O(i),g,1)),Z(l.d).slice(0,g)===Z(u.d).slice(0,g))if(u=u.times(2),o!==0&&(u=u.plus(Er(O,g+2,M).times(o+""))),u=q(u,new O(S),g,1),t==null)if(Lt(u.d,g-C,B,a))O.precision=g+=C,l=s=A=q(h.minus(1),h.plus(1),g,1),x=D(A.times(A),g,1),i=a=1;else return D(u,O.precision=M,B,F=!0);else return O.precision=M,u;u=l,i+=2}}function vo(e){return String(e.s*e.s/0)}function vn(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;n++);for(i=t.length;t.charCodeAt(i-1)===48;--i);if(t=t.slice(n,i),t){if(i-=n,e.e=r=r-n-1,e.d=[],n=(r+1)%N,r<0&&(n+=N),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),Eo.test(t))return vn(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(mu.test(t))r=16,t=t.toLowerCase();else if(fu.test(t))r=2;else if(du.test(t))r=8;else throw Error(Me+t);for(o=t.search(/p/i),o>0?(u=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),o=t.indexOf("."),s=o>=0,n=e.constructor,s&&(t=t.replace(".",""),a=t.length,o=a-o,i=xo(n,new n(r),o,o*2)),l=hr(t,r,pe),g=l.length-1,o=g;l[o]===0;--o)l.pop();return o<0?new n(e.s*0):(e.e=xr(l,g),e.d=l,F=!1,s&&(e=q(e,i,a*4)),u&&(e=e.times(Math.abs(u)<54?H(2,u):Ge.pow(2,u))),F=!0,e)}function Eu(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:pt(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/Pr(5,r)),t=pt(e,2,t,t);for(var i,o=new e(5),s=new e(16),a=new e(20);r--;)i=t.times(t),t=t.times(o.plus(i.times(s.times(i).minus(a))));return t}function pt(e,t,r,n,i){var o,s,a,u,l=1,g=e.precision,h=Math.ceil(g/N);for(F=!1,u=r.times(r),a=new e(n);;){if(s=q(a.times(u),new e(t++*t++),g,1),a=i?n.plus(s):n.minus(s),n=q(s.times(u),new e(t++*t++),g,1),s=a.plus(n),s.d[h]!==void 0){for(o=h;s.d[o]===a.d[o]&&o--;);if(o==-1)break}o=a,a=n,n=s,s=o,l++}return F=!0,s.d.length=h+1,s}function Pr(e,t){for(var r=e;--t;)r*=e;return r}function To(e,t){var r,n=t.s<0,i=ce(e,e.precision,1),o=i.times(.5);if(t=t.abs(),t.lte(o))return Ce=n?4:1,t;if(r=t.divToInt(i),r.isZero())Ce=n?3:2;else{if(t=t.minus(r.times(i)),t.lte(o))return Ce=po(r)?n?2:3:n?4:1,t;Ce=po(r)?n?1:4:n?3:2}return t.minus(i).abs()}function Tn(e,t,r,n){var i,o,s,a,u,l,g,h,x,S=e.constructor,C=r!==void 0;if(C?(ae(r,1,Ne),n===void 0?n=S.rounding:ae(n,0,8)):(r=S.precision,n=S.rounding),!e.isFinite())g=vo(e);else{for(g=he(e),s=g.indexOf("."),C?(i=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):i=t,s>=0&&(g=g.replace(".",""),x=new S(1),x.e=g.length-s,x.d=hr(he(x),10,i),x.e=x.d.length),h=hr(g,10,i),o=u=h.length;h[--u]==0;)h.pop();if(!h[0])g=C?"0p+0":"0";else{if(s<0?o--:(e=new S(e),e.d=h,e.e=o,e=q(e,x,r,n,0,i),h=e.d,o=e.e,l=go),s=h[r],a=i/2,l=l||h[r+1]!==void 0,l=n<4?(s!==void 0||l)&&(n===0||n===(e.s<0?3:2)):s>a||s===a&&(n===4||l||n===6&&h[r-1]&1||n===(e.s<0?8:7)),h.length=r,l)for(;++h[--r]>i-1;)h[r]=0,r||(++o,h.unshift(1));for(u=h.length;!h[u-1];--u);for(s=0,g="";s1)if(t==16||t==8){for(s=t==16?4:3,--u;u%s;u++)g+="0";for(h=hr(g,i,t),u=h.length;!h[u-1];--u);for(s=1,g="1.";su)for(o-=u;o--;)g+="0";else ot)return e.length=t,!0}function bu(e){return new this(e).abs()}function xu(e){return new this(e).acos()}function Pu(e){return new this(e).acosh()}function vu(e,t){return new this(e).plus(t)}function Tu(e){return new this(e).asin()}function Cu(e){return new this(e).asinh()}function Au(e){return new this(e).atan()}function Ru(e){return new this(e).atanh()}function Su(e,t){e=new this(e),t=new this(t);var r,n=this.precision,i=this.rounding,o=n+4;return!e.s||!t.s?r=new this(NaN):!e.d&&!t.d?(r=ce(this,o,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?ce(this,n,i):new this(0),r.s=e.s):!e.d||t.isZero()?(r=ce(this,o,1).times(.5),r.s=e.s):t.s<0?(this.precision=o,this.rounding=1,r=this.atan(q(e,t,o,1)),t=ce(this,o,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(q(e,t,o,1)),r}function Iu(e){return new this(e).cbrt()}function Du(e){return D(e=new this(e),e.e+1,2)}function ku(e,t,r){return new this(e).clamp(t,r)}function Ou(e){if(!e||typeof e!="object")throw Error(br+"Object expected");var t,r,n,i=e.defaults===!0,o=["precision",1,Ne,"rounding",0,8,"toExpNeg",-ct,0,"toExpPos",0,ct,"maxE",0,ct,"minE",-ct,0,"modulo",0,9];for(t=0;t=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error(Me+r+": "+n);if(r="crypto",i&&(this[r]=bn[r]),(n=e[r])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto!="undefined"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(yo);else this[r]=!1;else throw Error(Me+r+": "+n);return this}function Mu(e){return new this(e).cos()}function Nu(e){return new this(e).cosh()}function Co(e){var t,r,n;function i(o){var s,a,u,l=this;if(!(l instanceof i))return new i(o);if(l.constructor=i,mo(o)){l.s=o.s,F?!o.d||o.e>i.maxE?(l.e=NaN,l.d=null):o.e=10;a/=10)s++;F?s>i.maxE?(l.e=NaN,l.d=null):s=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:a[o++]=i%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(n*=4);o=214e7?crypto.randomBytes(4).copy(t,o):(a.push(i%1e7),o+=4);o=n/4}else throw Error(yo);else for(;o=10;i/=10)n++;n`}};function mt(e){return e instanceof Bt}d();c();p();f();m();d();c();p();f();m();var vr=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};d();c();p();f();m();var Tr=e=>e,Cr={bold:Tr,red:Tr,green:Tr,dim:Tr,enabled:!1},Ao={bold:sr,red:nt,green:Ri,dim:ar,enabled:!0},dt={write(e){e.writeLine(",")}};d();c();p();f();m();var we=class{constructor(t){this.contents=t;this.isUnderlined=!1;this.color=t=>t}underline(){return this.isUnderlined=!0,this}setColor(t){return this.color=t,this}write(t){let r=t.getCurrentLineLength();t.write(this.color(this.contents)),this.isUnderlined&&t.afterNextNewline(()=>{t.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};d();c();p();f();m();var _e=class{constructor(){this.hasError=!1}markAsError(){return this.hasError=!0,this}};var gt=class extends _e{constructor(){super(...arguments);this.items=[]}addItem(r){return this.items.push(new vr(r)),this}getField(r){return this.items[r]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(n=>n.value.getPrintWidth()))+2}write(r){if(this.items.length===0){this.writeEmpty(r);return}this.writeWithItems(r)}writeEmpty(r){let n=new we("[]");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithItems(r){let{colors:n}=r.context;r.writeLine("[").withIndent(()=>r.writeJoined(dt,this.items).newLine()).write("]"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(n.red("~".repeat(this.getPrintWidth())))})}asObject(){}};d();c();p();f();m();var Ro=": ",Ar=class{constructor(t,r){this.name=t;this.value=r;this.hasError=!1}markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+Ro.length}write(t){let r=new we(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(Ro).write(this.value)}};d();c();p();f();m();var Rr=class e extends _e{constructor(){super(...arguments);this.fields={};this.suggestions=[]}addField(r){this.fields[r.name]=r}addSuggestion(r){this.suggestions.push(r)}getField(r){return this.fields[r]}getDeepField(r){let[n,...i]=r,o=this.getField(n);if(!o)return;let s=o;for(let a of i){let u;if(s.value instanceof e?u=s.value.getField(a):s.value instanceof gt&&(u=s.value.getField(Number(a))),!u)return;s=u}return s}getDeepFieldValue(r){var n;return r.length===0?this:(n=this.getDeepField(r))==null?void 0:n.value}hasField(r){return!!this.getField(r)}removeAllFields(){this.fields={}}removeField(r){delete this.fields[r]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(r){var n;return(n=this.getField(r))==null?void 0:n.value}getDeepSubSelectionValue(r){let n=this;for(let i of r){if(!(n instanceof e))return;let o=n.getSubSelectionValue(i);if(!o)return;n=o}return n}getDeepSelectionParent(r){let n=this.getSelectionParent();if(!n)return;let i=n;for(let o of r){let s=i.value.getFieldValue(o);if(!s||!(s instanceof e))return;let a=s.getSelectionParent();if(!a)return;i=a}return i}getSelectionParent(){var i,o;let r=(i=this.getField("select"))==null?void 0:i.value.asObject();if(r)return{kind:"select",value:r};let n=(o=this.getField("include"))==null?void 0:o.value.asObject();if(n)return{kind:"include",value:n}}getSubSelectionValue(r){var n;return(n=this.getSelectionParent())==null?void 0:n.value.fields[r].value}getPrintWidth(){let r=Object.values(this.fields);return r.length==0?2:Math.max(...r.map(i=>i.getPrintWidth()))+2}write(r){let n=Object.values(this.fields);if(n.length===0&&this.suggestions.length===0){this.writeEmpty(r);return}this.writeWithContents(r,n)}asObject(){return this}writeEmpty(r){let n=new we("{}");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithContents(r,n){r.writeLine("{").withIndent(()=>{r.writeJoined(dt,[...n,...this.suggestions]).newLine()}),r.write("}"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(r.context.colors.red("~".repeat(this.getPrintWidth())))})}};d();c();p();f();m();var z=class extends _e{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new we(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};var Cn=class{constructor(t){this.errorMessages=[];this.arguments=t}write(t){t.write(this.arguments)}addErrorMessage(t){this.errorMessages.push(t)}renderAllMessages(t){return this.errorMessages.map(r=>r(t)).join(` `)}};function Sr(e){return new Cn(So(e))}function So(e){let t=new Rr;for(let[r,n]of Object.entries(e)){let i=new Ar(r,Io(n));t.addField(i)}return t}function Io(e){if(typeof e=="string")return new z(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new z(String(e));if(typeof e=="bigint")return new z(`${e}n`);if(e===null)return new z("null");if(e===void 0)return new z("undefined");if(ft(e))return new z(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return w.Buffer.isBuffer(e)?new z(`Buffer.alloc(${e.byteLength})`):new z(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=gr(e)?e.toISOString():"Invalid Date";return new z(`new Date("${t}")`)}return e instanceof Te?new z(`Prisma.${e._getName()}`):mt(e)?new z(`prisma.${co(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?sl(e):typeof e=="object"?So(e):new z(Object.prototype.toString.call(e))}function sl(e){let t=new gt;for(let r of e)t.addItem(Io(r));return t}function Do(e){if(e===void 0)return"";let t=Sr(e);return new ut(0,{colors:Cr}).write(t).toString()}d();c();p();f();m();var al="P2037";function $t({error:e,user_facing_error:t},r,n){return t.error_code?new K(ul(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new oe(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function ul(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===al&&(r+=` Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();var An=class{getLocation(){return null}};function Fe(e){return typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new An}d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();var ko={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function ht(e={}){let t=cl(e);return Object.entries(t).reduce((n,[i,o])=>(ko[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function cl(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function Ir(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function Oo(e,t){let r=Ir(e);return t({action:"aggregate",unpacker:r,argsMapper:ht})(e)}d();c();p();f();m();function pl(e={}){let{select:t,...r}=e;return typeof t=="object"?ht({...r,_count:t}):ht({...r,_count:{_all:!0}})}function fl(e={}){return typeof e.select=="object"?t=>Ir(e)(t)._count:t=>Ir(e)(t)._count._all}function Mo(e,t){return t({action:"count",unpacker:fl(e),argsMapper:pl})(e)}d();c();p();f();m();function ml(e={}){let t=ht(e);if(Array.isArray(t.by))for(let r of t.by)typeof r=="string"&&(t.select[r]=!0);else typeof t.by=="string"&&(t.select[t.by]=!0);return t}function dl(e={}){return t=>(typeof(e==null?void 0:e._count)=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function No(e,t){return t({action:"groupBy",unpacker:dl(e),argsMapper:ml})(e)}function _o(e,t,r){if(t==="aggregate")return n=>Oo(n,r);if(t==="count")return n=>Mo(n,r);if(t==="groupBy")return n=>No(n,r)}d();c();p();f();m();function Fo(e,t){let r=t.fields.filter(i=>!i.relationName),n=cn(r,i=>i.name);return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new Bt(e,o,s.type,s.isList,s.kind==="enum")},...mr(Object.keys(n))})}d();c();p();f();m();d();c();p();f();m();var Lo=e=>Array.isArray(e)?e:e.split("."),Rn=(e,t)=>Lo(t).reduce((r,n)=>r&&r[n],e),Bo=(e,t,r)=>Lo(t).reduceRight((n,i,o,s)=>Object.assign({},Rn(e,s.slice(0,o)),{[i]:n}),r);function gl(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function hl(e,t,r){return t===void 0?e!=null?e:{}:Bo(t,r,e||!0)}function Sn(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((u,l)=>({...u,[l.name]:l}),{});return u=>{let l=Fe(e._errorFormat),g=gl(n,i),h=hl(u,o,g),x=r({dataPath:g,callsite:l})(h),S=yl(e,t);return new Proxy(x,{get(C,A){if(!S.includes(A))return C[A];let O=[a[A].type,r,A],B=[g,h];return Sn(e,...O,...B)},...mr([...S,...Object.getOwnPropertyNames(x)])})}}function yl(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}d();c();p();f();m();d();c();p();f();m();var wl=Ue(Ki());var El={red:nt,gray:ki,dim:ar,bold:sr,underline:Ai,highlightSource:e=>e.highlight()},bl={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function xl({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r!=null?r:!1,callArguments:n}}function Pl({functionName:e,location:t,message:r,isPanic:n,contextLines:i,callArguments:o},s){let a=[""],u=t?" in":":";if(n?(a.push(s.red(`Oops, an unknown error occurred! This is ${s.bold("on us")}, you did nothing wrong.`)),a.push(s.red(`It occurred in the ${s.bold(`\`${e}\``)} invocation${u}`))):a.push(s.red(`Invalid ${s.bold(`\`${e}\``)} invocation${u}`)),t&&a.push(s.underline(vl(t))),i){a.push("");let l=[i.toString()];o&&(l.push(o),l.push(s.dim(")"))),a.push(l.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(` `)}function vl(e){let t=[e.fileName];return e.lineNumber&&t.push(String(e.lineNumber)),e.columnNumber&&t.push(String(e.columnNumber)),t.join(":")}function yt(e){let t=e.showColors?El:bl,r;return typeof $getTemplateParameters!="undefined"?r=$getTemplateParameters(e,t):r=xl(e),Pl(r,t)}function $o(e,t,r,n){return e===De.ModelAction.findFirstOrThrow||e===De.ModelAction.findUniqueOrThrow?Tl(t,r,n):n}function Tl(e,t,r){return async n=>{if("rejectOnNotFound"in n.args){let o=yt({originalMethod:n.clientMethod,callsite:n.callsite,message:"'rejectOnNotFound' option is not supported"});throw new Y(o,{clientVersion:t})}return await r(n).catch(o=>{throw o instanceof K&&o.code==="P2025"?new Pe(`No ${e} found`,t):o})}}d();c();p();f();m();function Ee(e){return e.replace(/^./,t=>t.toLowerCase())}var Cl=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],Al=["aggregate","count","groupBy"];function In(e,t){var i;let r=(i=e._extensions.getAllModelExtensions(t))!=null?i:{},n=[Rl(e,t),Il(e,t),Ft(r),ne("name",()=>t),ne("$name",()=>t),ne("$parent",()=>e._appliedParent)];return ge({},n)}function Rl(e,t){let r=Ee(t),n=Object.keys(De.ModelAction).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=u=>e._request(u);s=$o(o,t,e._clientVersion,s);let a=u=>l=>{let g=Fe(e._errorFormat);return e._createPrismaPromise(h=>{let x={args:l,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:h,callsite:g};return s({...x,...u})})};return Cl.includes(o)?Sn(e,t,a):Sl(i)?_o(e,i,a):a({})}}}function Sl(e){return Al.includes(e)}function Il(e,t){return Qe(ne("fields",()=>{let r=e._runtimeDataModel.models[t];return Fo(t,r)}))}d();c();p();f();m();function qo(e){return e.replace(/^./,t=>t.toUpperCase())}var Dn=Symbol();function qt(e){let t=[Dl(e),ne(Dn,()=>e),ne("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(Ft(r)),ge(e,t)}function Dl(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(Ee),n=[...new Set(t.concat(r))];return Qe({getKeys(){return n},getPropertyValue(i){let o=qo(i);if(e._runtimeDataModel.models[o]!==void 0)return In(e,o);if(e._runtimeDataModel.models[i]!==void 0)return In(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function Uo(e){return e[Dn]?e[Dn]:e}function Vo(e){var r;if(typeof e=="function")return e(this);if((r=e.client)!=null&&r.__AccelerateEngine){let n=e.client.__AccelerateEngine;this._originalClient._engine=new n(this._originalClient._accelerateEngineConfig)}let t=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$use:{value:void 0},$on:{value:void 0}});return qt(t)}d();c();p();f();m();d();c();p();f();m();function jo({result:e,modelName:t,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(t);if(!o)return e;let s=[],a=[];for(let u of Object.values(o)){if(n){if(n[u.name])continue;let l=u.needs.filter(g=>n[g]);l.length>0&&a.push(at(l))}else if(r){if(!r[u.name])continue;let l=u.needs.filter(g=>!r[g]);l.length>0&&a.push(at(l))}kl(e,u.needs)&&s.push(Ol(u,ge(e,s)))}return s.length>0||a.length>0?ge(e,[...s,...a]):e}function kl(e,t){return t.every(r=>ln(e,r))}function Ol(e,t){return Qe(ne(e.name,()=>e.compute(t)))}d();c();p();f();m();function Dr({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){var s;if(Array.isArray(t)){for(let a=0;ag.name===o);if(!u||u.kind!=="object"||!u.relationName)continue;let l=typeof s=="object"?s:{};t[o]=Dr({visitor:i,result:t[o],args:l,modelName:u.type,runtimeDataModel:n})}}function Qo({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:Dr({result:e,args:r!=null?r:{},modelName:t,runtimeDataModel:i,visitor:(s,a,u)=>jo({result:s,modelName:Ee(a),select:u.select,omit:u.omit,extensions:n})})}d();c();p();f();m();d();c();p();f();m();function Go(e){if(e instanceof se)return Ml(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n{var s,a;let o=t.customDataProxyFetch;return"transaction"in t&&i!==void 0&&(((s=t.transaction)==null?void 0:s.kind)==="batch"&&t.transaction.lock.then(),t.transaction=i),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.model?t.action:t.clientMethod,args:Go((a=t.args)!=null?a:{}),__internalParams:t,query:(u,l=t)=>{let g=l.customDataProxyFetch;return l.customDataProxyFetch=Zo(o,g),l.args=u,Wo(e,l,r,n+1)}})})}function Ko(e,t){let{jsModelName:r,action:n,clientMethod:i}=t,o=r?n:i;if(e._extensions.isEmpty())return e._executeRequest(t);let s=e._extensions.getAllQueryCallbacks(r!=null?r:"$none",o);return Wo(e,t,s)}function zo(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?Yo(r,n,0,e):e(r)}}function Yo(e,t,r,n){if(r===t.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return t[r]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let u=a.customDataProxyFetch;return a.customDataProxyFetch=Zo(i,u),Yo(a,t,r+1,n)}})}var Ho=e=>e;function Zo(e=Ho,t=Ho){return r=>e(t(r))}d();c();p();f();m();d();c();p();f();m();function es(e,t,r){let n=Ee(r);return!t.result||!(t.result.$allModels||t.result[n])?e:Nl({...e,...Xo(t.name,e,t.result.$allModels),...Xo(t.name,e,t.result[n])})}function Nl(e){let t=new de,r=(n,i)=>t.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>r(o,i)):[n]));return ot(e,n=>({...n,needs:r(n.name,new Set)}))}function Xo(e,t,r){return r?ot(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:_l(t,o,i)})):{}}function _l(e,t,r){var i;let n=(i=e==null?void 0:e[t])==null?void 0:i.compute;return n?o=>r({...o,[t]:n(o)}):r}function ts(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let i of n.needs)r[i]=!0;return r}function rs(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(!e[n.name])for(let i of n.needs)delete r[i];return r}var kr=class{constructor(t,r){this.extension=t;this.previous=r;this.computedFieldsCache=new de;this.modelExtensionsCache=new de;this.queryCallbacksCache=new de;this.clientExtensions=Dt(()=>{var t,r;return this.extension.client?{...(r=this.previous)==null?void 0:r.getAllClientExtensions(),...this.extension.client}:(t=this.previous)==null?void 0:t.getAllClientExtensions()});this.batchCallbacks=Dt(()=>{var n,i,o;let t=(i=(n=this.previous)==null?void 0:n.getAllBatchQueryCallbacks())!=null?i:[],r=(o=this.extension.query)==null?void 0:o.$__internalBatch;return r?t.concat(r):t})}getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>{var r;return es((r=this.previous)==null?void 0:r.getAllComputedFields(t),this.extension,t)})}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{var n,i;let r=Ee(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?(n=this.previous)==null?void 0:n.getAllModelExtensions(t):{...(i=this.previous)==null?void 0:i.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{var s,a;let n=(a=(s=this.previous)==null?void 0:s.getAllQueryCallbacks(t,r))!=null?a:[],i=[],o=this.extension.query;return!o||!(o[t]||o.$allModels||o[r]||o.$allOperations)?n:(o[t]!==void 0&&(o[t][r]!==void 0&&i.push(o[t][r]),o[t].$allOperations!==void 0&&i.push(o[t].$allOperations)),t!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},Or=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new kr(t))}isEmpty(){return this.head===void 0}append(t){return new e(new kr(t,this.head))}getAllComputedFields(t){var r;return(r=this.head)==null?void 0:r.getAllComputedFields(t)}getAllClientExtensions(){var t;return(t=this.head)==null?void 0:t.getAllClientExtensions()}getAllModelExtensions(t){var r;return(r=this.head)==null?void 0:r.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){var n,i;return(i=(n=this.head)==null?void 0:n.getAllQueryCallbacks(t,r))!=null?i:[]}getAllBatchQueryCallbacks(){var t,r;return(r=(t=this.head)==null?void 0:t.getAllBatchQueryCallbacks())!=null?r:[]}};d();c();p();f();m();var ns=re("prisma:client"),is={Vercel:"vercel","Netlify CI":"netlify"};function os({postinstall:e,ciName:t,clientVersion:r}){if(ns("checkPlatformCaching:postinstall",e),ns("checkPlatformCaching:ciName",t),e===!0&&t&&t in is){let n=`Prisma has detected that this project was built on ${t}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. Learn how: https://pris.ly/d/${is[t]}-build`;throw console.error(n),new G(n,r)}}d();c();p();f();m();function ss(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();var Fl="Cloudflare-Workers",Ll="node";function as(){var e,t,r;return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":((e=globalThis.navigator)==null?void 0:e.userAgent)===Fl?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":((r=(t=globalThis.process)==null?void 0:t.release)==null?void 0:r.name)===Ll?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}var Bl={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Vercel Edge Functions or Edge Middleware"};function Mr(){let e=as();return{id:e,prettyName:Bl[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();function wt({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){var u,l;let i,o=Object.keys(e)[0],s=(u=e[o])==null?void 0:u.url,a=(l=t[o])==null?void 0:l.url;if(o===void 0?i=void 0:a?i=a:s!=null&&s.value?i=s.value:s!=null&&s.fromEnvVar&&(i=r[s.fromEnvVar]),(s==null?void 0:s.fromEnvVar)!==void 0&&i===void 0)throw Mr().id==="workerd"?new G(`error: Environment variable not found: ${s.fromEnvVar}. In Cloudflare module Workers, environment variables are available only in the Worker's \`env\` parameter of \`fetch\`. To solve this, provide the connection string directly: https://pris.ly/d/cloudflare-datasource-url`,n):new G(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new G("error: Missing URL environment variable, value, or override.",n);return i}d();c();p();f();m();d();c();p();f();m();var Nr=class extends Error{constructor(t,r){super(t),this.clientVersion=r.clientVersion,this.cause=r.cause}get[Symbol.toStringTag](){return this.name}};var ue=class extends Nr{constructor(t,r){var n;super(t,r),this.isRetryable=(n=r.isRetryable)!=null?n:!0}};d();c();p();f();m();d();c();p();f();m();function $(e,t){return{...e,isRetryable:t}}var Et=class extends ue{constructor(r){super("This request must be retried",$(r,!0));this.name="ForcedRetryError";this.code="P5001"}};_(Et,"ForcedRetryError");d();c();p();f();m();var He=class extends ue{constructor(r,n){super(r,$(n,!1));this.name="InvalidDatasourceError";this.code="P6001"}};_(He,"InvalidDatasourceError");d();c();p();f();m();var We=class extends ue{constructor(r,n){super(r,$(n,!1));this.name="NotImplementedYetError";this.code="P5004"}};_(We,"NotImplementedYetError");d();c();p();f();m();d();c();p();f();m();var j=class extends ue{constructor(t,r){super(t,r),this.response=r.response;let n=this.response.headers.get("prisma-request-id");if(n){let i=`(The request id was: ${n})`;this.message=this.message+" "+i}}};var Ke=class extends j{constructor(r){super("Schema needs to be uploaded",$(r,!0));this.name="SchemaMissingError";this.code="P5005"}};_(Ke,"SchemaMissingError");d();c();p();f();m();d();c();p();f();m();var kn="This request could not be understood by the server",Vt=class extends j{constructor(r,n,i){super(n||kn,$(r,!1));this.name="BadRequestError";this.code="P5000";i&&(this.code=i)}};_(Vt,"BadRequestError");d();c();p();f();m();var jt=class extends j{constructor(r,n){super("Engine not started: healthcheck timeout",$(r,!0));this.name="HealthcheckTimeoutError";this.code="P5013";this.logs=n}};_(jt,"HealthcheckTimeoutError");d();c();p();f();m();var Jt=class extends j{constructor(r,n,i){super(n,$(r,!0));this.name="EngineStartupError";this.code="P5014";this.logs=i}};_(Jt,"EngineStartupError");d();c();p();f();m();var Qt=class extends j{constructor(r){super("Engine version is not supported",$(r,!1));this.name="EngineVersionNotSupportedError";this.code="P5012"}};_(Qt,"EngineVersionNotSupportedError");d();c();p();f();m();var On="Request timed out",Gt=class extends j{constructor(r,n=On){super(n,$(r,!1));this.name="GatewayTimeoutError";this.code="P5009"}};_(Gt,"GatewayTimeoutError");d();c();p();f();m();var $l="Interactive transaction error",Ht=class extends j{constructor(r,n=$l){super(n,$(r,!1));this.name="InteractiveTransactionError";this.code="P5015"}};_(Ht,"InteractiveTransactionError");d();c();p();f();m();var ql="Request parameters are invalid",Wt=class extends j{constructor(r,n=ql){super(n,$(r,!1));this.name="InvalidRequestError";this.code="P5011"}};_(Wt,"InvalidRequestError");d();c();p();f();m();var Mn="Requested resource does not exist",Kt=class extends j{constructor(r,n=Mn){super(n,$(r,!1));this.name="NotFoundError";this.code="P5003"}};_(Kt,"NotFoundError");d();c();p();f();m();var Nn="Unknown server error",bt=class extends j{constructor(r,n,i){super(n||Nn,$(r,!0));this.name="ServerError";this.code="P5006";this.logs=i}};_(bt,"ServerError");d();c();p();f();m();var _n="Unauthorized, check your connection string",zt=class extends j{constructor(r,n=_n){super(n,$(r,!1));this.name="UnauthorizedError";this.code="P5007"}};_(zt,"UnauthorizedError");d();c();p();f();m();var Fn="Usage exceeded, retry again later",Yt=class extends j{constructor(r,n=Fn){super(n,$(r,!0));this.name="UsageExceededError";this.code="P5008"}};_(Yt,"UsageExceededError");async function Ul(e){let t;try{t=await e.text()}catch(r){return{type:"EmptyError"}}try{let r=JSON.parse(t);if(typeof r=="string")switch(r){case"InternalDataProxyError":return{type:"DataProxyError",body:r};default:return{type:"UnknownTextError",body:r}}if(typeof r=="object"&&r!==null){if("is_panic"in r&&"message"in r&&"error_code"in r)return{type:"QueryEngineError",body:r};if("EngineNotStarted"in r||"InteractiveTransactionMisrouted"in r||"InvalidRequestError"in r){let n=Object.values(r)[0].reason;return typeof n=="string"&&!["SchemaMissing","EngineVersionNotSupported"].includes(n)?{type:"UnknownJsonError",body:r}:{type:"DataProxyError",body:r}}}return{type:"UnknownJsonError",body:r}}catch(r){return t===""?{type:"EmptyError"}:{type:"UnknownTextError",body:t}}}async function Zt(e,t){if(e.ok)return;let r={clientVersion:t,response:e},n=await Ul(e);if(n.type==="QueryEngineError")throw new K(n.body.message,{code:n.body.error_code,clientVersion:t});if(n.type==="DataProxyError"){if(n.body==="InternalDataProxyError")throw new bt(r,"Internal Data Proxy error");if("EngineNotStarted"in n.body){if(n.body.EngineNotStarted.reason==="SchemaMissing")return new Ke(r);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new Qt(r);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new Jt(r,i,o)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,error_code:o}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new G(i,t,o)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:i}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new jt(r,i)}}if("InteractiveTransactionMisrouted"in n.body){let i={IDParseError:"Could not parse interactive transaction ID",NoQueryEngineFoundError:"Could not find Query Engine for the specified host and transaction ID",TransactionStartError:"Could not start interactive transaction"};throw new Ht(r,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new Wt(r,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new zt(r,xt(_n,n));if(e.status===404)return new Kt(r,xt(Mn,n));if(e.status===429)throw new Yt(r,xt(Fn,n));if(e.status===504)throw new Gt(r,xt(On,n));if(e.status>=500)throw new bt(r,xt(Nn,n));if(e.status>=400)throw new Vt(r,xt(kn,n))}function xt(e,t){return t.type==="EmptyError"?e:`${e}: ${JSON.stringify(t)}`}d();c();p();f();m();function us(e){let t=Math.pow(2,e)*50,r=Math.ceil(Math.random()*t)-Math.ceil(t/2),n=t+r;return new Promise(i=>setTimeout(()=>i(n),n))}d();c();p();f();m();var Ae="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function ls(e){let t=new TextEncoder().encode(e),r="",n=t.byteLength,i=n%3,o=n-i,s,a,u,l,g;for(let h=0;h>18,a=(g&258048)>>12,u=(g&4032)>>6,l=g&63,r+=Ae[s]+Ae[a]+Ae[u]+Ae[l];return i==1?(g=t[o],s=(g&252)>>2,a=(g&3)<<4,r+=Ae[s]+Ae[a]+"=="):i==2&&(g=t[o]<<8|t[o+1],s=(g&64512)>>10,a=(g&1008)>>4,u=(g&15)<<2,r+=Ae[s]+Ae[a]+Ae[u]+"="),r}d();c();p();f();m();function cs(e){var r;if(!!((r=e.generator)!=null&&r.previewFeatures.some(n=>n.toLowerCase().includes("metrics"))))throw new G("The `metrics` preview feature is not yet available with Accelerate.\nPlease remove `metrics` from the `previewFeatures` in your schema.\n\nMore information about Accelerate: https://pris.ly/d/accelerate",e.clientVersion)}d();c();p();f();m();function Vl(e){return e[0]*1e3+e[1]/1e6}function ps(e){return new Date(Vl(e))}d();c();p();f();m();var fs={"@prisma/debug":"workspace:*","@prisma/engines-version":"5.15.0-29.12e25d8d06f6ea5a0252864dd9a03b1bb51f3022","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};d();c();p();f();m();d();c();p();f();m();var Xt=class extends ue{constructor(r,n){super(`Cannot fetch data from service: ${r}`,$(n,!0));this.name="RequestError";this.code="P5010"}};_(Xt,"RequestError");async function ze(e,t,r=n=>n){var i;let n=t.clientVersion;try{return typeof fetch=="function"?await r(fetch)(e,t):await r(Ln)(e,t)}catch(o){let s=(i=o.message)!=null?i:"Unknown error";throw new Xt(s,{clientVersion:n})}}function Jl(e){return{...e.headers,"Content-Type":"application/json"}}function Ql(e){return{method:e.method,headers:Jl(e)}}function Gl(e,t){return{text:()=>Promise.resolve(w.Buffer.concat(e).toString()),json:()=>Promise.resolve().then(()=>JSON.parse(w.Buffer.concat(e).toString())),ok:t.statusCode>=200&&t.statusCode<=299,status:t.statusCode,url:t.url,headers:new Bn(t.headers)}}async function Ln(e,t={}){let r=Hl("https"),n=Ql(t),i=[],{origin:o}=new URL(e);return new Promise((s,a)=>{var l;let u=r.request(e,n,g=>{let{statusCode:h,headers:{location:x}}=g;h>=301&&h<=399&&x&&(x.startsWith("http")===!1?s(Ln(`${o}${x}`,t)):s(Ln(x,t))),g.on("data",S=>i.push(S)),g.on("end",()=>s(Gl(i,g))),g.on("error",a)});u.on("error",a),u.end((l=t.body)!=null?l:"")})}var Hl=typeof require!="undefined"?require:()=>{},Bn=class{constructor(t={}){this.headers=new Map;for(let[r,n]of Object.entries(t))if(typeof n=="string")this.headers.set(r,n);else if(Array.isArray(n))for(let i of n)this.headers.set(r,i)}append(t,r){this.headers.set(t,r)}delete(t){this.headers.delete(t)}get(t){var r;return(r=this.headers.get(t))!=null?r:null}has(t){return this.headers.has(t)}set(t,r){this.headers.set(t,r)}forEach(t,r){for(let[n,i]of this.headers)t.call(r,i,n,this)}};var Wl=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,ms=re("prisma:client:dataproxyEngine");async function Kl(e,t){var s,a,u;let r=fs["@prisma/engines-version"],n=(s=t.clientVersion)!=null?s:"unknown";if(y.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION)return y.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION;if(e.includes("accelerate")&&n!=="0.0.0"&&n!=="in-memory")return n;let[i,o]=(a=n==null?void 0:n.split("-"))!=null?a:[];if(o===void 0&&Wl.test(i))return i;if(o!==void 0||n==="0.0.0"||n==="in-memory"){if(e.startsWith("localhost")||e.startsWith("127.0.0.1"))return"0.0.0";let[l]=(u=r.split("-"))!=null?u:[],[g,h,x]=l.split("."),S=zl(`<=${g}.${h}.${x}`),C=await ze(S,{clientVersion:n});if(!C.ok)throw new Error(`Failed to fetch stable Prisma version, unpkg.com status ${C.status} ${C.statusText}, response body: ${await C.text()||""}`);let A=await C.text();ms("length of body fetched from unpkg.com",A.length);let k;try{k=JSON.parse(A)}catch(O){throw console.error("JSON.parse error: body fetched from unpkg.com: ",A),O}return k.version}throw new We("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function ds(e,t){let r=await Kl(e,t);return ms("version",r),r}function zl(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var gs=3,$n=re("prisma:client:dataproxyEngine"),qn=class{constructor({apiKey:t,tracingHelper:r,logLevel:n,logQueries:i,engineHash:o}){this.apiKey=t,this.tracingHelper=r,this.logLevel=n,this.logQueries=i,this.engineHash=o}build({traceparent:t,interactiveTransaction:r}={}){let n={Authorization:`Bearer ${this.apiKey}`,"Prisma-Engine-Hash":this.engineHash};this.tracingHelper.isEnabled()&&(n.traceparent=t!=null?t:this.tracingHelper.getTraceParent()),r&&(n["X-transaction-id"]=r.id);let i=this.buildCaptureSettings();return i.length>0&&(n["X-capture-telemetry"]=i.join(", ")),n}buildCaptureSettings(){let t=[];return this.tracingHelper.isEnabled()&&t.push("tracing"),this.logLevel&&t.push(this.logLevel),this.logQueries&&t.push("query"),t}},er=class{constructor(t){this.name="DataProxyEngine";cs(t),this.config=t,this.env={...t.env,...typeof y!="undefined"?y.env:{}},this.inlineSchema=ls(t.inlineSchema),this.inlineDatasources=t.inlineDatasources,this.inlineSchemaHash=t.inlineSchemaHash,this.clientVersion=t.clientVersion,this.engineHash=t.engineVersion,this.logEmitter=t.logEmitter,this.tracingHelper=t.tracingHelper}apiKey(){return this.headerBuilder.apiKey}version(){return this.engineHash}async start(){this.startPromise!==void 0&&await this.startPromise,this.startPromise=(async()=>{let[t,r]=this.extractHostAndApiKey();this.host=t,this.headerBuilder=new qn({apiKey:r,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel,logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await ds(t,this.config),$n("host",this.host)})(),await this.startPromise}async stop(){}propagateResponseExtensions(t){var r,n;(r=t==null?void 0:t.logs)!=null&&r.length&&t.logs.forEach(i=>{switch(i.level){case"debug":case"error":case"trace":case"warn":case"info":break;case"query":{let o=typeof i.attributes.query=="string"?i.attributes.query:"";if(!this.tracingHelper.isEnabled()){let[s]=o.split("/* traceparent");o=s}this.logEmitter.emit("query",{query:o,timestamp:ps(i.timestamp),duration:Number(i.attributes.duration_ms),params:i.attributes.params,target:i.attributes.target})}}}),(n=t==null?void 0:t.traces)!=null&&n.length&&this.tracingHelper.createEngineSpan({span:!0,spans:t.traces})}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the remote query engine')}async url(t){return await this.start(),`https://${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${t}`}async uploadSchema(){let t={name:"schemaUpload",internal:!0};return this.tracingHelper.runInChildSpan(t,async()=>{let r=await ze(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});r.ok||$n("schema response status",r.status);let n=await Zt(r,this.clientVersion);if(n)throw this.logEmitter.emit("warn",{message:`Error while uploading schema: ${n.message}`,timestamp:new Date,target:""}),n;this.logEmitter.emit("info",{message:`Schema (re)uploaded (hash: ${this.inlineSchemaHash})`,timestamp:new Date,target:""})})}request(t,{traceparent:r,interactiveTransaction:n,customDataProxyFetch:i}){return this.requestInternal({body:t,traceparent:r,interactiveTransaction:n,customDataProxyFetch:i})}async requestBatch(t,{traceparent:r,transaction:n,customDataProxyFetch:i}){let o=(n==null?void 0:n.kind)==="itx"?n.options:void 0,s=dr(t,n),{batchResult:a,elapsed:u}=await this.requestInternal({body:s,customDataProxyFetch:i,interactiveTransaction:o,traceparent:r});return a.map(l=>"errors"in l&&l.errors.length>0?$t(l.errors[0],this.clientVersion,this.config.activeProvider):{data:l,elapsed:u})}requestInternal({body:t,traceparent:r,customDataProxyFetch:n,interactiveTransaction:i}){return this.withRetry({actionGerund:"querying",callback:async({logHttpCall:o})=>{let s=i?`${i.payload.endpoint}/graphql`:await this.url("graphql");o(s);let a=await ze(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r,interactiveTransaction:i}),body:JSON.stringify(t),clientVersion:this.clientVersion},n);a.ok||$n("graphql response status",a.status),await this.handleError(await Zt(a,this.clientVersion));let u=await a.json(),l=u.extensions;if(l&&this.propagateResponseExtensions(l),u.errors)throw u.errors.length===1?$t(u.errors[0],this.config.clientVersion,this.config.activeProvider):new oe(u.errors,{clientVersion:this.config.clientVersion});return u}})}async transaction(t,r,n){let i={start:"starting",commit:"committing",rollback:"rolling back"};return this.withRetry({actionGerund:`${i[t]} transaction`,callback:async({logHttpCall:o})=>{if(t==="start"){let s=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel}),a=await this.url("transaction/start");o(a);let u=await ze(a,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await Zt(u,this.clientVersion));let l=await u.json(),g=l.extensions;g&&this.propagateResponseExtensions(g);let h=l.id,x=l["data-proxy"].endpoint;return{id:h,payload:{endpoint:x}}}else{let s=`${n.payload.endpoint}/${t}`;o(s);let a=await ze(s,{method:"POST",headers:this.headerBuilder.build({traceparent:r.traceparent}),clientVersion:this.clientVersion});await this.handleError(await Zt(a,this.clientVersion));let l=(await a.json()).extensions;l&&this.propagateResponseExtensions(l);return}}})}extractHostAndApiKey(){let t={clientVersion:this.clientVersion},r=Object.keys(this.inlineDatasources)[0],n=wt({inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources,clientVersion:this.clientVersion,env:this.env}),i;try{i=new URL(n)}catch(l){throw new He(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t)}let{protocol:o,host:s,searchParams:a}=i;if(o!=="prisma:")throw new He(`Error validating datasource \`${r}\`: the URL must start with the protocol \`prisma://\``,t);let u=a.get("api_key");if(u===null||u.length<1)throw new He(`Error validating datasource \`${r}\`: the URL must contain a valid API key`,t);return[s,u]}metrics(){throw new We("Metrics are not yet supported for Accelerate",{clientVersion:this.clientVersion})}async withRetry(t){var r;for(let n=0;;n++){let i=o=>{this.logEmitter.emit("info",{message:`Calling ${o} (n=${n})`,timestamp:new Date,target:""})};try{return await t.callback({logHttpCall:i})}catch(o){if(!(o instanceof ue)||!o.isRetryable)throw o;if(n>=gs)throw o instanceof Et?o.cause:o;this.logEmitter.emit("warn",{message:`Attempt ${n+1}/${gs} failed for ${t.actionGerund}: ${(r=o.message)!=null?r:"(unknown)"}`,timestamp:new Date,target:""});let s=await us(n);this.logEmitter.emit("warn",{message:`Retrying after ${s}ms`,timestamp:new Date,target:""})}}}async handleError(t){if(t instanceof Ke)throw await this.uploadSchema(),new Et({clientVersion:this.clientVersion,cause:t});if(t)throw t}applyPendingMigrations(){throw new Error("Method not implemented.")}};function hs({copyEngine:e=!0},t){let r;try{r=wt({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...y.env},clientVersion:t.clientVersion})}catch(u){}e&&(r!=null&&r.startsWith("prisma://"))&&It("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let n=Rt(t.generator),i=!!(r!=null&&r.startsWith("prisma://")||!e),o=!!t.adapter,s=n==="library",a=n==="binary";if(i&&o||o){let u;throw u=["Prisma Client was configured to use the `adapter` option but it was imported via its `/edge` endpoint.","Please either remove the `/edge` endpoint or remove the `adapter` from the Prisma Client constructor."],new Y(u.join(` `),{clientVersion:t.clientVersion})}if(i)return new er(t);throw new Y("Invalid client engine type, please use `library` or `binary`",{clientVersion:t.clientVersion})}d();c();p();f();m();function _r({generator:e}){var t;return(t=e==null?void 0:e.previewFeatures)!=null?t:[]}d();c();p();f();m();d();c();p();f();m();d();c();p();f();m();var Ps=Ue(Un());d();c();p();f();m();function bs(e,t){let r=xs(e),n=Yl(r),i=Xl(n);i?Fr(i,t):t.addErrorMessage(()=>"Unknown error")}function xs(e){return e.errors.flatMap(t=>t.kind==="Union"?xs(t):[t])}function Yl(e){let t=new Map,r=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=t.get(i);o?t.set(i,{...n,argument:{...n.argument,typeNames:Zl(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function Zl(e,t){return[...new Set(e.concat(t))]}function Xl(e){return pn(e,(t,r)=>{let n=ws(t),i=ws(r);return n!==i?n-i:Es(t)-Es(r)})}function ws(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function Es(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}d();c();p();f();m();var le=class{constructor(t,r){this.name=t;this.value=r;this.isRequired=!1}makeRequired(){return this.isRequired=!0,this}write(t){let{colors:{green:r}}=t.context;t.addMarginSymbol(r(this.isRequired?"+":"?")),t.write(r(this.name)),this.isRequired||t.write(r("?")),t.write(r(": ")),typeof this.value=="string"?t.write(r(this.value)):t.write(this.value)}};d();c();p();f();m();var Lr=class{constructor(){this.fields=[]}addField(t,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(dt,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function Fr(e,t){switch(e.kind){case"MutuallyExclusiveFields":ec(e,t);break;case"IncludeOnScalar":tc(e,t);break;case"EmptySelection":rc(e,t);break;case"UnknownSelectionField":oc(e,t);break;case"UnknownArgument":sc(e,t);break;case"UnknownInputField":ac(e,t);break;case"RequiredArgumentMissing":uc(e,t);break;case"InvalidArgumentType":lc(e,t);break;case"InvalidArgumentValue":cc(e,t);break;case"ValueTooLarge":pc(e,t);break;case"SomeFieldsMissing":fc(e,t);break;case"TooManyFieldsGiven":mc(e,t);break;case"Union":bs(e,t);break;default:throw new Error("not implemented: "+e.kind)}}function ec(e,t){var n,i,o;let r=(n=t.arguments.getDeepSubSelectionValue(e.selectionPath))==null?void 0:n.asObject();r&&((i=r.getField(e.firstField))==null||i.markAsError(),(o=r.getField(e.secondField))==null||o.markAsError()),t.addErrorMessage(s=>`Please ${s.bold("either")} use ${s.green(`\`${e.firstField}\``)} or ${s.green(`\`${e.secondField}\``)}, but ${s.red("not both")} at the same time.`)}function tc(e,t){var s,a;let[r,n]=Br(e.selectionPath),i=e.outputType,o=(s=t.arguments.getDeepSelectionParent(r))==null?void 0:s.value;if(o&&((a=o.getField(n))==null||a.markAsError(),i))for(let u of i.fields)u.isRelation&&o.addSuggestion(new le(u.name,"true"));t.addErrorMessage(u=>{let l=`Invalid scalar field ${u.red(`\`${n}\``)} for ${u.bold("include")} statement`;return i?l+=` on model ${u.bold(i.name)}. ${tr(u)}`:l+=".",l+=` Note that ${u.bold("include")} statements only accept relation fields.`,l})}function rc(e,t){var n,i;let r=(n=t.arguments.getDeepSubSelectionValue(e.selectionPath))==null?void 0:n.asObject();if(r){let o=(i=r.getField("omit"))==null?void 0:i.value.asObject();if(o){nc(e,t,o);return}}ic(e,t)}function nc(e,t,r){r.removeAllFields();for(let n of e.outputType.fields)r.addSuggestion(new le(n.name,"false"));t.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function ic(e,t){var o,s;let r=e.outputType,n=(o=t.arguments.getDeepSelectionParent(e.selectionPath))==null?void 0:o.value,i=(s=n==null?void 0:n.isEmpty())!=null?s:!1;n&&(n.removeAllFields(),Cs(n,r)),t.addErrorMessage(a=>i?`The ${a.red("`select`")} statement for type ${a.bold(r.name)} must not be empty. ${tr(a)}`:`The ${a.red("`select`")} statement for type ${a.bold(r.name)} needs ${a.bold("at least one truthy value")}.`)}function oc(e,t){var s,a,u,l,g,h,x;let[r,n]=Br(e.selectionPath),i=(s=t.arguments.getDeepSubSelectionValue(r))==null?void 0:s.asObject(),o;if(i){let S=(a=i.getFieldValue("select"))==null?void 0:a.asObject(),C=(u=i.getFieldValue("include"))==null?void 0:u.asObject(),A=(l=i.getFieldValue("omit"))==null?void 0:l.asObject();S!=null&&S.hasField(n)?(o="select",(g=S.getField(n))==null||g.markAsError(),Cs(S,e.outputType)):C!=null&&C.hasField(n)?(o="include",(h=C.getField(n))==null||h.markAsError(),dc(C,e.outputType)):A!=null&&A.hasField(n)&&(o="omit",(x=A.getField(n))==null||x.markAsError(),gc(A,e.outputType))}t.addErrorMessage(S=>{let C=[`Unknown field ${S.red(`\`${n}\``)}`];return o&&C.push(`for ${S.bold(o)} statement`),C.push(`on model ${S.bold(`\`${e.outputType.name}\``)}.`),C.push(tr(S)),C.join(" ")})}function sc(e,t){var i,o;let r=e.argumentPath[0],n=(i=t.arguments.getDeepSubSelectionValue(e.selectionPath))==null?void 0:i.asObject();n&&((o=n.getField(r))==null||o.markAsError(),hc(n,e.arguments)),t.addErrorMessage(s=>vs(s,r,e.arguments.map(a=>a.name)))}function ac(e,t){var o,s,a;let[r,n]=Br(e.argumentPath),i=(o=t.arguments.getDeepSubSelectionValue(e.selectionPath))==null?void 0:o.asObject();if(i){(s=i.getDeepField(e.argumentPath))==null||s.markAsError();let u=(a=i.getDeepFieldValue(r))==null?void 0:a.asObject();u&&As(u,e.inputType)}t.addErrorMessage(u=>vs(u,n,e.inputType.fields.map(l=>l.name)))}function vs(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=wc(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(tr(e)),n.join(" ")}function uc(e,t){var u,l;let r;t.addErrorMessage(g=>(r==null?void 0:r.value)instanceof z&&r.value.text==="null"?`Argument \`${g.green(o)}\` must not be ${g.red("null")}.`:`Argument \`${g.green(o)}\` is missing.`);let n=(u=t.arguments.getDeepSubSelectionValue(e.selectionPath))==null?void 0:u.asObject();if(!n)return;let[i,o]=Br(e.argumentPath),s=new Lr,a=(l=n.getDeepFieldValue(i))==null?void 0:l.asObject();if(a)if(r=a.getField(o),r&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let g of e.inputTypes[0].fields)s.addField(g.name,g.typeNames.join(" | "));a.addSuggestion(new le(o,s).makeRequired())}else{let g=e.inputTypes.map(Ts).join(" | ");a.addSuggestion(new le(o,g).makeRequired())}}function Ts(e){return e.kind==="list"?`${Ts(e.elementType)}[]`:e.name}function lc(e,t){var i,o;let r=e.argument.name,n=(i=t.arguments.getDeepSubSelectionValue(e.selectionPath))==null?void 0:i.asObject();n&&((o=n.getDeepFieldValue(e.argumentPath))==null||o.markAsError()),t.addErrorMessage(s=>{let a=$r("or",e.argument.typeNames.map(u=>s.green(u)));return`Argument \`${s.bold(r)}\`: Invalid value provided. Expected ${a}, provided ${s.red(e.inferredType)}.`})}function cc(e,t){var i,o;let r=e.argument.name,n=(i=t.arguments.getDeepSubSelectionValue(e.selectionPath))==null?void 0:i.asObject();n&&((o=n.getDeepFieldValue(e.argumentPath))==null||o.markAsError()),t.addErrorMessage(s=>{let a=[`Invalid value for argument \`${s.bold(r)}\``];if(e.underlyingError&&a.push(`: ${e.underlyingError}`),a.push("."),e.argument.typeNames.length>0){let u=$r("or",e.argument.typeNames.map(l=>s.green(l)));a.push(` Expected ${u}.`)}return a.join("")})}function pc(e,t){var o;let r=e.argument.name,n=(o=t.arguments.getDeepSubSelectionValue(e.selectionPath))==null?void 0:o.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath),a=s==null?void 0:s.value;a==null||a.markAsError(),a instanceof z&&(i=a.text)}t.addErrorMessage(s=>{let a=["Unable to fit value"];return i&&a.push(s.red(i)),a.push(`into a 64-bit signed integer for field \`${s.bold(r)}\``),a.join(" ")})}function fc(e,t){var i,o;let r=e.argumentPath[e.argumentPath.length-1],n=(i=t.arguments.getDeepSubSelectionValue(e.selectionPath))==null?void 0:i.asObject();if(n){let s=(o=n.getDeepFieldValue(e.argumentPath))==null?void 0:o.asObject();s&&As(s,e.inputType)}t.addErrorMessage(s=>{let a=[`Argument \`${s.bold(r)}\` of type ${s.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?a.push(`${s.green("at least one of")} ${$r("or",e.constraints.requiredFields.map(u=>`\`${s.bold(u)}\``))} arguments.`):a.push(`${s.green("at least one")} argument.`):a.push(`${s.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),a.push(tr(s)),a.join(" ")})}function mc(e,t){var o,s;let r=e.argumentPath[e.argumentPath.length-1],n=(o=t.arguments.getDeepSubSelectionValue(e.selectionPath))==null?void 0:o.asObject(),i=[];if(n){let a=(s=n.getDeepFieldValue(e.argumentPath))==null?void 0:s.asObject();a&&(a.markAsError(),i=Object.keys(a.getFields()))}t.addErrorMessage(a=>{let u=[`Argument \`${a.bold(r)}\` of type ${a.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?u.push(`${a.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?u.push(`${a.green("at most one")} argument,`):u.push(`${a.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),u.push(`but you provided ${$r("and",i.map(l=>a.red(l)))}. Please choose`),e.constraints.maxFieldCount===1?u.push("one."):u.push(`${e.constraints.maxFieldCount}.`),u.join(" ")})}function Cs(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new le(r.name,"true"))}function dc(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new le(r.name,"true"))}function gc(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new le(r.name,"true"))}function hc(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new le(r.name,r.typeNames.join(" | ")))}function As(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new le(r.name,r.typeNames.join(" | ")))}function Br(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function tr({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function $r(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var yc=3;function wc(e,t){let r=1/0,n;for(let i of t){let o=(0,Ps.default)(e,i);o>yc||o({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(t){return this.params.previewFeatures.includes(t)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){var r;return(r=this.model)==null?void 0:r.fields.find(n=>n.name===t)}nestSelection(t){let r=this.findField(t),n=(r==null?void 0:r.kind)==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};d();c();p();f();m();var Ds=e=>({command:e});d();c();p();f();m();d();c();p();f();m();var ks=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);d();c();p();f();m();function rr(e){try{return Os(e,"fast")}catch(t){return Os(e,"slow")}}function Os(e,t){return JSON.stringify(e.map(r=>Sc(r,t)))}function Sc(e,t){return typeof e=="bigint"?{prisma__type:"bigint",prisma__value:e.toString()}:lt(e)?{prisma__type:"date",prisma__value:e.toJSON()}:ye.isDecimal(e)?{prisma__type:"decimal",prisma__value:e.toJSON()}:w.Buffer.isBuffer(e)?{prisma__type:"bytes",prisma__value:e.toString("base64")}:Ic(e)||ArrayBuffer.isView(e)?{prisma__type:"bytes",prisma__value:w.Buffer.from(e).toString("base64")}:typeof e=="object"&&t==="slow"?Ns(e):e}function Ic(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Ns(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(Ms);let t={};for(let r of Object.keys(e))t[r]=Ms(e[r]);return t}function Ms(e){return typeof e=="bigint"?e.toString():Ns(e)}var Dc=/^(\s*alter\s)/i,_s=re("prisma:client");function Jn(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&Dc.exec(t))throw new Error(`Running ALTER using ${n} is not supported Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. Example: await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) More Information: https://pris.ly/d/execute-raw `)}var Qn=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:rr(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:rr(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:rr(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=ks(r),i={values:rr(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i!=null&&i.values?_s(`prisma.${e}(${n}, ${i.values})`):_s(`prisma.${e}(${n})`),{query:n,parameters:i}},Fs={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new se(t,r)}},Ls={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};d();c();p();f();m();function Gn(e){return function(r){let n,i=(o=e)=>{try{return o===void 0||(o==null?void 0:o.kind)==="itx"?n!=null?n:n=Bs(r(o)):Bs(r(o))}catch(s){return Promise.reject(s)}};return{then(o,s){return i().then(o,s)},catch(o){return i().catch(o)},finally(o){return i().finally(o)},requestTransaction(o){let s=i(o);return s.requestTransaction?s.requestTransaction(o):s},[Symbol.toStringTag]:"PrismaPromise"}}}function Bs(e){return typeof e.then=="function"?e:Promise.resolve(e)}d();c();p();f();m();var $s={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},async createEngineSpan(){},getActiveContext(){},runInChildSpan(e,t){return t()}},Hn=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}createEngineSpan(t){return this.getGlobalTracingHelper().createEngineSpan(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){var t,r;return(r=(t=globalThis.PRISMA_INSTRUMENTATION)==null?void 0:t.helper)!=null?r:$s}};function qs(e){return e.includes("tracing")?new Hn:$s}d();c();p();f();m();function Us(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i==null?void 0:i(n)}}}d();c();p();f();m();var kc=["$connect","$disconnect","$on","$transaction","$use","$extends"],Vs=kc;d();c();p();f();m();function js(e){return typeof e=="string"?e:e.reduce((t,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?t:t&&(r==="info"||t==="info")?"info":n},void 0)}d();c();p();f();m();var Ur=class{constructor(){this._middlewares=[]}use(t){this._middlewares.push(t)}get(t){return this._middlewares[t]}has(t){return!!this._middlewares[t]}length(){return this._middlewares.length}};d();c();p();f();m();var Qs=Ue(eo());d();c();p();f();m();function Vr(e){return typeof e.batchRequestIdx=="number"}d();c();p();f();m();function jr(e){return e===null?e:Array.isArray(e)?e.map(jr):typeof e=="object"?Oc(e)?Mc(e):ot(e,jr):e}function Oc(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function Mc({$type:e,value:t}){switch(e){case"BigInt":return BigInt(t);case"Bytes":return w.Buffer.from(t,"base64");case"DateTime":return new Date(t);case"Decimal":return new ye(t);case"Json":return JSON.parse(t);default:je(t,"Unknown tagged value")}}d();c();p();f();m();function Js(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(Wn(e.query.arguments)),t.push(Wn(e.query.selection)),t.join("")}function Wn(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${Wn(n)})`:r}).join(" ")})`}d();c();p();f();m();var Nc={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateOne:!0,upsertOne:!0};function Kn(e){return Nc[e]}d();c();p();f();m();var Jr=class{constructor(t){this.options=t;this.tickActive=!1;this.batches={}}request(t){let r=this.options.batchBy(t);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,y.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:t,resolve:n,reject:i})})):this.options.singleLoader(t)}dispatchBatches(){for(let t in this.batches){let r=this.batches[t];delete this.batches[t],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;i{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(h=>h.protocolQuery),u=this.client._tracingHelper.getTraceParent(s),l=n.some(h=>Kn(h.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:u,transaction:Fc(o),containsWrite:l,customDataProxyFetch:i})).map((h,x)=>{if(h instanceof Error)return h;try{return this.mapQueryEngineResult(n[x],h)}catch(S){return S}})}),singleLoader:async n=>{var s;let i=((s=n.transaction)==null?void 0:s.kind)==="itx"?Gs(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:Kn(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>{var i;return(i=n.transaction)!=null&&i.id?`transaction-${n.transaction.id}`:Js(n.protocolQuery)},batchOrder(n,i){var o,s;return((o=n.transaction)==null?void 0:o.kind)==="batch"&&((s=i.transaction)==null?void 0:s.kind)==="batch"?n.transaction.index-i.transaction.index:0}})}async request(t){try{return await this.dataloader.request(t)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let i=n==null?void 0:n.data,o=n==null?void 0:n.elapsed,s=this.unpack(i,t,r);return y.env.PRISMA_CLIENT_GET_TIME?{data:s,elapsed:o}:s}handleAndLogRequestError(t){try{this.handleRequestError(t)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:t.clientMethod,timestamp:new Date}),r}}handleRequestError({error:t,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s}){if(_c(t),Lc(t,i)||t instanceof Pe)throw t;if(t instanceof K&&Bc(t)){let u=Hs(t.meta);qr({args:o,errors:[u],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion})}let a=t.message;if(n&&(a=yt({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:a})),a=this.sanitizeMessage(a),t.code){let u=s?{modelName:s,...t.meta}:t.meta;throw new K(a,{code:t.code,clientVersion:this.client._clientVersion,meta:u,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new ve(a,this.client._clientVersion);if(t instanceof oe)throw new oe(a,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof G)throw new G(a,this.client._clientVersion);if(t instanceof ve)throw new ve(a,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,Qs.default)(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let i=Object.values(t)[0],o=r.filter(a=>a!=="select"&&a!=="include"),s=jr(Rn(i,o));return n?n(s):s}get[Symbol.toStringTag](){return"RequestHandler"}};function Fc(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:Gs(e)};je(e,"Unknown transaction kind")}}function Gs(e){return{id:e.id,payload:e.payload}}function Lc(e,t){return Vr(e)&&(t==null?void 0:t.kind)==="batch"&&e.batchRequestIdx!==t.index}function Bc(e){return e.code==="P2009"||e.code==="P2012"}function Hs(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(Hs)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}d();c();p();f();m();var Ws="5.15.0";var Ks=Ws;d();c();p();f();m();function zs(e){return e.map(t=>{let r={};for(let n of Object.keys(t))r[n]=Ys(t[n]);return r})}function Ys({prisma__type:e,prisma__value:t}){switch(e){case"bigint":return BigInt(t);case"bytes":return w.Buffer.from(t,"base64");case"decimal":return new ye(t);case"datetime":case"date":return new Date(t);case"time":return new Date(`1970-01-01T${t}Z`);case"array":return t.map(Ys);default:return t}}d();c();p();f();m();var ta=Ue(Un());d();c();p();f();m();var J=class extends Error{constructor(t){super(t+` Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};_(J,"PrismaClientConstructorValidationError");var Zs=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","__internal"],Xs=["pretty","colorless","minimal"],ea=["info","query","warn","error"],qc={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new J(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(e)){if(!t.includes(r)){let i=Pt(r,t)||` Available datasources: ${t.join(", ")}`;throw new J(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new J(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new J(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new J(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,t)=>{if(e===null)return;if(e===void 0)throw new J('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!_r(t).includes("driverAdapters"))throw new J('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(Rt()==="binary")throw new J('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')},datasourceUrl:e=>{if(typeof e!="undefined"&&typeof e!="string")throw new J(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new J(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!Xs.includes(e)){let t=Pt(e,Xs);throw new J(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new J(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!ea.includes(r)){let n=Pt(r,ea);throw new J(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of e){t(r);let n={level:t,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=Pt(i,o);throw new J(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[i,o]of Object.entries(r))if(n[i])n[i](o);else throw new J(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let t=e.maxWait;if(t!=null&&t<=0)throw new J(`Invalid value ${t} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let r=e.timeout;if(r!=null&&r<=0)throw new J(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new J(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=Pt(r,t);throw new J(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function ra(e,t){for(let[r,n]of Object.entries(e)){if(!Zs.includes(r)){let i=Pt(r,Zs);throw new J(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}qc[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new J('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function Pt(e,t){if(t.length===0||typeof e!="string")return"";let r=Uc(e,t);return r?` Did you mean "${r}"?`:""}function Uc(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,ta.default)(e,i)}));r.sort((i,o)=>i.distance{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?r(i):t(n)))},u=l=>{o||(o=!0,r(l))};for(let l=0;l{n[l]=g,a()},g=>{if(!Vr(g)){u(g);return}g.batchRequestIdx===l?u(g):(i||(i=g),a())})})}var Le=re("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var Vc={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},jc=Symbol.for("prisma.client.transaction.id"),Jc={id:0,nextId(){return++this.id}};function sa(e){class t{constructor(n){this._originalClient=this;this._middlewares=new Ur;this._createPrismaPromise=Gn();this.$extends=Vo;var u,l,g,h,x,S,C,A,k,O,B,M,I,X;e=(g=(l=(u=n==null?void 0:n.__internal)==null?void 0:u.configOverride)==null?void 0:l.call(u,e))!=null?g:e,os(e),n&&ra(n,e);let i=n!=null&&n.adapter?hn(n.adapter):void 0,o=new lr().on("error",()=>{});this._extensions=Or.empty(),this._previewFeatures=_r(e),this._clientVersion=(h=e.clientVersion)!=null?h:Ks,this._activeProvider=e.activeProvider,this._tracingHelper=qs(this._previewFeatures);let s={rootEnvPath:e.relativeEnvPaths.rootEnvPath&&At.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&At.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},a=(x=e.injectableEdgeEnv)==null?void 0:x.call(e);try{let L=n!=null?n:{},Ye=(S=L.__internal)!=null?S:{},Be=Ye.debug===!0;Be&&re.enable("prisma:client");let fe=At.resolve(e.dirname,e.relativePath);bi.existsSync(fe)||(fe=e.dirname),Le("dirname",e.dirname),Le("relativePath",e.relativePath),Le("cwd",fe);let $e=Ye.engine||{};if(L.errorFormat?this._errorFormat=L.errorFormat:y.env.NODE_ENV==="production"?this._errorFormat="minimal":y.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:fe,dirname:e.dirname,enableDebugLogs:Be,allowTriggerPanic:$e.allowTriggerPanic,datamodelPath:At.join(e.dirname,(C=e.filename)!=null?C:"schema.prisma"),prismaPath:(A=$e.binaryPath)!=null?A:void 0,engineEndpoint:$e.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:L.log&&js(L.log),logQueries:L.log&&!!(typeof L.log=="string"?L.log==="query":L.log.find(Q=>typeof Q=="string"?Q==="query":Q.level==="query")),env:(k=a==null?void 0:a.parsed)!=null?k:{},flags:[],engineWasm:e.engineWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:ss(L,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:(B=(O=L.transactionOptions)==null?void 0:O.maxWait)!=null?B:2e3,timeout:(I=(M=L.transactionOptions)==null?void 0:M.timeout)!=null?I:5e3,isolationLevel:(X=L.transactionOptions)==null?void 0:X.isolationLevel},logEmitter:o,isBundled:e.isBundled,adapter:i},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:wt,getBatchRequestPayload:dr,prismaGraphQLToJSError:$t,PrismaClientUnknownRequestError:oe,PrismaClientInitializationError:G,PrismaClientKnownRequestError:K,debug:re("prisma:client:accelerateEngine"),engineVersion:oa.version,clientVersion:e.clientVersion}},Le("clientVersion",e.clientVersion),this._engine=hs(e,this._engineConfig),this._requestHandler=new Qr(this,o),L.log)for(let Q of L.log){let Re=typeof Q=="string"?Q:Q.emit==="stdout"?Q.level:null;Re&&this.$on(Re,qe=>{var Ze;it.log(`${(Ze=it.tags[Re])!=null?Ze:""}`,qe.message||qe.query)})}this._metrics=new st(this._engine)}catch(L){throw L.clientVersion=this._clientVersion,L}return this._appliedParent=qt(this)}get[Symbol.toStringTag](){return"PrismaClient"}$use(n){this._middlewares.use(n)}$on(n,i){n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i)}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{ji()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:Qn({clientMethod:i,activeProvider:a}),callsite:Fe(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=ia(n,i);return Jn(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new Y("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(Jn(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new Y(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:Ds,callsite:Fe(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:Qn({clientMethod:i,activeProvider:a}),callsite:Fe(this._errorFormat),dataPath:[],middlewareArgsMapper:s}).then(zs)}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...ia(n,i));throw new Y("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=Jc.nextId(),s=Us(n.length),a=n.map((u,l)=>{var x,S,C;if((u==null?void 0:u[Symbol.toStringTag])!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let g=(x=i==null?void 0:i.isolationLevel)!=null?x:this._engineConfig.transactionOptions.isolationLevel,h={kind:"batch",id:o,index:l,isolationLevel:g,lock:s};return(C=(S=u.requestTransaction)==null?void 0:S.call(u,h))!=null?C:u});return na(a)}async _transactionWithCallback({callback:n,options:i}){var l,g,h;let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:(l=i==null?void 0:i.maxWait)!=null?l:this._engineConfig.transactionOptions.maxWait,timeout:(g=i==null?void 0:i.timeout)!=null?g:this._engineConfig.transactionOptions.timeout,isolationLevel:(h=i==null?void 0:i.isolationLevel)!=null?h:this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),u;try{let x={kind:"itx",...a};u=await n(this._createItxClient(x)),await this._engine.transaction("commit",o,a)}catch(x){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),x}return u}_createItxClient(n){return qt(ge(Uo(this),[ne("_appliedParent",()=>this._appliedParent._createItxClient(n)),ne("_createPrismaPromise",()=>Gn(n)),ne(jc,()=>n.id),at(Vs)]))}$transaction(n,i){var a;let o;typeof n=="function"?((a=this._engineConfig.adapter)==null?void 0:a.adapterName)==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){var l;n.otelParentCtx=this._tracingHelper.getActiveContext();let i=(l=n.middlewareArgsMapper)!=null?l:Vc,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={middleware:{name:"middleware",middleware:!0,attributes:{method:"$use"},active:!1},operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=-1,u=async g=>{let h=this._middlewares.get(++a);if(h)return this._tracingHelper.runInChildSpan(s.middleware,O=>h(g,B=>(O==null||O.end(),u(B))));let{runInTransaction:x,args:S,...C}=g,A={...n,...C};S&&(A.args=i.middlewareArgsToRequestArgs(S)),n.transaction!==void 0&&x===!1&&delete A.transaction;let k=await Ko(this,A);return A.model?Qo({result:k,modelName:A.model,args:A.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel}):k};return this._tracingHelper.runInChildSpan(s.operation,()=>u(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:u,argsMapper:l,transaction:g,unpacker:h,otelParentCtx:x,customDataProxyFetch:S}){try{n=l?l(n):n;let C={name:"serialize"},A=this._tracingHelper.runInChildSpan(C,()=>Rs({modelName:u,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures}));return re.enabled("prisma:client")&&(Le("Prisma Client call:"),Le(`prisma.${i}(${Do(n)})`),Le("Generated request:"),Le(JSON.stringify(A,null,2)+` `)),(g==null?void 0:g.kind)==="batch"&&await g.lock,this._requestHandler.request({protocolQuery:A,modelName:u,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:g,unpacker:h,otelParentCtx:x,otelChildCtx:this._tracingHelper.getActiveContext(),customDataProxyFetch:S})}catch(C){throw C.clientVersion=this._clientVersion,C}}get $metrics(){if(!this._hasPreviewFlag("metrics"))throw new Y("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:this._clientVersion});return this._metrics}_hasPreviewFlag(n){var i;return!!((i=this._engineConfig.previewFeatures)!=null&&i.includes(n))}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}}return t}function ia(e,t){return Qc(e)?[new se(e,t),Fs]:[e,Ls]}function Qc(e){return Array.isArray(e)&&Array.isArray(e.raw)}d();c();p();f();m();var Gc=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function aa(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!Gc.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}d();c();p();f();m();0&&(module.exports={Debug,Decimal,Extensions,MetricsClient,NotFoundError,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,defineDmmfProperty,empty,getPrismaClient,getRuntime,join,makeStrictEnum,objectEnumValues,raw,sqltag,warnEnvConflicts,warnOnce}); //# sourceMappingURL=edge.js.map ================================================ FILE: server/src/common/prisma-client/runtime/index-browser.d.ts ================================================ declare class AnyNull extends NullTypesEnumValue { } declare type Args = T extends { [K: symbol]: { types: { operations: { [K in F]: { args: any; }; }; }; }; } ? T[symbol]['types']['operations'][F]['args'] : any; declare class DbNull extends NullTypesEnumValue { } export declare namespace Decimal { export type Constructor = typeof Decimal; export type Instance = Decimal; export type Rounding = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8; export type Modulo = Rounding | 9; export type Value = string | number | Decimal; // http://mikemcl.github.io/decimal.js/#constructor-properties export interface Config { precision?: number; rounding?: Rounding; toExpNeg?: number; toExpPos?: number; minE?: number; maxE?: number; crypto?: boolean; modulo?: Modulo; defaults?: boolean; } } export declare class Decimal { readonly d: number[]; readonly e: number; readonly s: number; constructor(n: Decimal.Value); absoluteValue(): Decimal; abs(): Decimal; ceil(): Decimal; clampedTo(min: Decimal.Value, max: Decimal.Value): Decimal; clamp(min: Decimal.Value, max: Decimal.Value): Decimal; comparedTo(n: Decimal.Value): number; cmp(n: Decimal.Value): number; cosine(): Decimal; cos(): Decimal; cubeRoot(): Decimal; cbrt(): Decimal; decimalPlaces(): number; dp(): number; dividedBy(n: Decimal.Value): Decimal; div(n: Decimal.Value): Decimal; dividedToIntegerBy(n: Decimal.Value): Decimal; divToInt(n: Decimal.Value): Decimal; equals(n: Decimal.Value): boolean; eq(n: Decimal.Value): boolean; floor(): Decimal; greaterThan(n: Decimal.Value): boolean; gt(n: Decimal.Value): boolean; greaterThanOrEqualTo(n: Decimal.Value): boolean; gte(n: Decimal.Value): boolean; hyperbolicCosine(): Decimal; cosh(): Decimal; hyperbolicSine(): Decimal; sinh(): Decimal; hyperbolicTangent(): Decimal; tanh(): Decimal; inverseCosine(): Decimal; acos(): Decimal; inverseHyperbolicCosine(): Decimal; acosh(): Decimal; inverseHyperbolicSine(): Decimal; asinh(): Decimal; inverseHyperbolicTangent(): Decimal; atanh(): Decimal; inverseSine(): Decimal; asin(): Decimal; inverseTangent(): Decimal; atan(): Decimal; isFinite(): boolean; isInteger(): boolean; isInt(): boolean; isNaN(): boolean; isNegative(): boolean; isNeg(): boolean; isPositive(): boolean; isPos(): boolean; isZero(): boolean; lessThan(n: Decimal.Value): boolean; lt(n: Decimal.Value): boolean; lessThanOrEqualTo(n: Decimal.Value): boolean; lte(n: Decimal.Value): boolean; logarithm(n?: Decimal.Value): Decimal; log(n?: Decimal.Value): Decimal; minus(n: Decimal.Value): Decimal; sub(n: Decimal.Value): Decimal; modulo(n: Decimal.Value): Decimal; mod(n: Decimal.Value): Decimal; naturalExponential(): Decimal; exp(): Decimal; naturalLogarithm(): Decimal; ln(): Decimal; negated(): Decimal; neg(): Decimal; plus(n: Decimal.Value): Decimal; add(n: Decimal.Value): Decimal; precision(includeZeros?: boolean): number; sd(includeZeros?: boolean): number; round(): Decimal; sine() : Decimal; sin() : Decimal; squareRoot(): Decimal; sqrt(): Decimal; tangent() : Decimal; tan() : Decimal; times(n: Decimal.Value): Decimal; mul(n: Decimal.Value) : Decimal; toBinary(significantDigits?: number): string; toBinary(significantDigits: number, rounding: Decimal.Rounding): string; toDecimalPlaces(decimalPlaces?: number): Decimal; toDecimalPlaces(decimalPlaces: number, rounding: Decimal.Rounding): Decimal; toDP(decimalPlaces?: number): Decimal; toDP(decimalPlaces: number, rounding: Decimal.Rounding): Decimal; toExponential(decimalPlaces?: number): string; toExponential(decimalPlaces: number, rounding: Decimal.Rounding): string; toFixed(decimalPlaces?: number): string; toFixed(decimalPlaces: number, rounding: Decimal.Rounding): string; toFraction(max_denominator?: Decimal.Value): Decimal[]; toHexadecimal(significantDigits?: number): string; toHexadecimal(significantDigits: number, rounding: Decimal.Rounding): string; toHex(significantDigits?: number): string; toHex(significantDigits: number, rounding?: Decimal.Rounding): string; toJSON(): string; toNearest(n: Decimal.Value, rounding?: Decimal.Rounding): Decimal; toNumber(): number; toOctal(significantDigits?: number): string; toOctal(significantDigits: number, rounding: Decimal.Rounding): string; toPower(n: Decimal.Value): Decimal; pow(n: Decimal.Value): Decimal; toPrecision(significantDigits?: number): string; toPrecision(significantDigits: number, rounding: Decimal.Rounding): string; toSignificantDigits(significantDigits?: number): Decimal; toSignificantDigits(significantDigits: number, rounding: Decimal.Rounding): Decimal; toSD(significantDigits?: number): Decimal; toSD(significantDigits: number, rounding: Decimal.Rounding): Decimal; toString(): string; truncated(): Decimal; trunc(): Decimal; valueOf(): string; static abs(n: Decimal.Value): Decimal; static acos(n: Decimal.Value): Decimal; static acosh(n: Decimal.Value): Decimal; static add(x: Decimal.Value, y: Decimal.Value): Decimal; static asin(n: Decimal.Value): Decimal; static asinh(n: Decimal.Value): Decimal; static atan(n: Decimal.Value): Decimal; static atanh(n: Decimal.Value): Decimal; static atan2(y: Decimal.Value, x: Decimal.Value): Decimal; static cbrt(n: Decimal.Value): Decimal; static ceil(n: Decimal.Value): Decimal; static clamp(n: Decimal.Value, min: Decimal.Value, max: Decimal.Value): Decimal; static clone(object?: Decimal.Config): Decimal.Constructor; static config(object: Decimal.Config): Decimal.Constructor; static cos(n: Decimal.Value): Decimal; static cosh(n: Decimal.Value): Decimal; static div(x: Decimal.Value, y: Decimal.Value): Decimal; static exp(n: Decimal.Value): Decimal; static floor(n: Decimal.Value): Decimal; static hypot(...n: Decimal.Value[]): Decimal; static isDecimal(object: any): object is Decimal; static ln(n: Decimal.Value): Decimal; static log(n: Decimal.Value, base?: Decimal.Value): Decimal; static log2(n: Decimal.Value): Decimal; static log10(n: Decimal.Value): Decimal; static max(...n: Decimal.Value[]): Decimal; static min(...n: Decimal.Value[]): Decimal; static mod(x: Decimal.Value, y: Decimal.Value): Decimal; static mul(x: Decimal.Value, y: Decimal.Value): Decimal; static noConflict(): Decimal.Constructor; // Browser only static pow(base: Decimal.Value, exponent: Decimal.Value): Decimal; static random(significantDigits?: number): Decimal; static round(n: Decimal.Value): Decimal; static set(object: Decimal.Config): Decimal.Constructor; static sign(n: Decimal.Value): number; static sin(n: Decimal.Value): Decimal; static sinh(n: Decimal.Value): Decimal; static sqrt(n: Decimal.Value): Decimal; static sub(x: Decimal.Value, y: Decimal.Value): Decimal; static sum(...n: Decimal.Value[]): Decimal; static tan(n: Decimal.Value): Decimal; static tanh(n: Decimal.Value): Decimal; static trunc(n: Decimal.Value): Decimal; static readonly default?: Decimal.Constructor; static readonly Decimal?: Decimal.Constructor; static readonly precision: number; static readonly rounding: Decimal.Rounding; static readonly toExpNeg: number; static readonly toExpPos: number; static readonly minE: number; static readonly maxE: number; static readonly crypto: boolean; static readonly modulo: Decimal.Modulo; static readonly ROUND_UP: 0; static readonly ROUND_DOWN: 1; static readonly ROUND_CEIL: 2; static readonly ROUND_FLOOR: 3; static readonly ROUND_HALF_UP: 4; static readonly ROUND_HALF_DOWN: 5; static readonly ROUND_HALF_EVEN: 6; static readonly ROUND_HALF_CEIL: 7; static readonly ROUND_HALF_FLOOR: 8; static readonly EUCLID: 9; } declare type Exact = (A extends unknown ? (W extends A ? { [K in keyof A]: Exact; } : W) : never) | (A extends Narrowable ? A : never); export declare function getRuntime(): GetRuntimeOutput; declare type GetRuntimeOutput = { id: Runtime; prettyName: string; isEdge: boolean; }; declare class JsonNull extends NullTypesEnumValue { } /** * Generates more strict variant of an enum which, unlike regular enum, * throws on non-existing property access. This can be useful in following situations: * - we have an API, that accepts both `undefined` and `SomeEnumType` as an input * - enum values are generated dynamically from DMMF. * * In that case, if using normal enums and no compile-time typechecking, using non-existing property * will result in `undefined` value being used, which will be accepted. Using strict enum * in this case will help to have a runtime exception, telling you that you are probably doing something wrong. * * Note: if you need to check for existence of a value in the enum you can still use either * `in` operator or `hasOwnProperty` function. * * @param definition * @returns */ export declare function makeStrictEnum>(definition: T): T; declare type Narrowable = string | number | bigint | boolean | []; declare class NullTypesEnumValue extends ObjectEnumValue { _getNamespace(): string; } /** * Base class for unique values of object-valued enums. */ declare abstract class ObjectEnumValue { constructor(arg?: symbol); abstract _getNamespace(): string; _getName(): string; toString(): string; } export declare const objectEnumValues: { classes: { DbNull: typeof DbNull; JsonNull: typeof JsonNull; AnyNull: typeof AnyNull; }; instances: { DbNull: DbNull; JsonNull: JsonNull; AnyNull: AnyNull; }; }; declare type Operation = 'findFirst' | 'findFirstOrThrow' | 'findUnique' | 'findUniqueOrThrow' | 'findMany' | 'create' | 'createMany' | 'createManyAndReturn' | 'update' | 'updateMany' | 'upsert' | 'delete' | 'deleteMany' | 'aggregate' | 'count' | 'groupBy' | '$queryRaw' | '$executeRaw' | '$queryRawUnsafe' | '$executeRawUnsafe' | 'findRaw' | 'aggregateRaw' | '$runCommandRaw'; declare namespace Public { export { validator } } export { Public } declare type Runtime = "edge-routine" | "workerd" | "deno" | "lagon" | "react-native" | "netlify" | "electron" | "node" | "bun" | "edge-light" | "fastly" | "unknown"; declare function validator(): (select: Exact) => S; declare function validator, O extends keyof C[M] & Operation>(client: C, model: M, operation: O): (select: Exact>) => S; declare function validator, O extends keyof C[M] & Operation, P extends keyof Args>(client: C, model: M, operation: O, prop: P): (select: Exact[P]>) => S; export { } ================================================ FILE: server/src/common/prisma-client/runtime/index-browser.js ================================================ "use strict";var de=Object.defineProperty;var Ge=Object.getOwnPropertyDescriptor;var Je=Object.getOwnPropertyNames;var je=Object.prototype.hasOwnProperty;var Ce=(e,n)=>{for(var i in n)de(e,i,{get:n[i],enumerable:!0})},Xe=(e,n,i,t)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of Je(n))!je.call(e,r)&&r!==i&&de(e,r,{get:()=>n[r],enumerable:!(t=Ge(n,r))||t.enumerable});return e};var Ke=e=>Xe(de({},"__esModule",{value:!0}),e);var Xn={};Ce(Xn,{Decimal:()=>We,Public:()=>he,getRuntime:()=>Ae,makeStrictEnum:()=>Pe,objectEnumValues:()=>Oe});module.exports=Ke(Xn);var he={};Ce(he,{validator:()=>Me});function Me(...e){return n=>n}var ne=Symbol(),pe=new WeakMap,ge=class{constructor(n){n===ne?pe.set(this,"Prisma.".concat(this._getName())):pe.set(this,"new Prisma.".concat(this._getNamespace(),".").concat(this._getName(),"()"))}_getName(){return this.constructor.name}toString(){return pe.get(this)}},J=class extends ge{_getNamespace(){return"NullTypes"}},j=class extends J{};me(j,"DbNull");var X=class extends J{};me(X,"JsonNull");var K=class extends J{};me(K,"AnyNull");var Oe={classes:{DbNull:j,JsonNull:X,AnyNull:K},instances:{DbNull:new j(ne),JsonNull:new X(ne),AnyNull:new K(ne)}};function me(e,n){Object.defineProperty(e,"name",{value:n,configurable:!0})}var Qe=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Pe(e){return new Proxy(e,{get(n,i){if(i in n)return n[i];if(!Qe.has(i))throw new TypeError("Invalid enum value: ".concat(String(i)))}})}var Ye="Cloudflare-Workers",xe="node";function be(){var e,n,i;return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":((e=globalThis.navigator)==null?void 0:e.userAgent)===Ye?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":((i=(n=globalThis.process)==null?void 0:n.release)==null?void 0:i.name)===xe?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}var ze={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Vercel Edge Functions or Edge Middleware"};function Ae(){let e=be();return{id:e,prettyName:ze[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}var H=9e15,V=1e9,we="0123456789abcdef",te="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",re="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Ne={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-H,maxE:H,crypto:!1},Te,Z,w=!0,oe="[DecimalError] ",$=oe+"Invalid argument: ",Le=oe+"Precision limit exceeded",De=oe+"crypto unavailable",Fe="[object Decimal]",A=Math.floor,M=Math.pow,ye=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,en=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,nn=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Ie=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,D=1e7,m=7,tn=9007199254740991,rn=te.length-1,ve=re.length-1,h={toStringTag:Fe};h.absoluteValue=h.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),p(e)};h.ceil=function(){return p(new this.constructor(this),this.e+1,2)};h.clampedTo=h.clamp=function(e,n){var i,t=this,r=t.constructor;if(e=new r(e),n=new r(n),!e.s||!n.s)return new r(NaN);if(e.gt(n))throw Error($+n);return i=t.cmp(e),i<0?e:t.cmp(n)>0?n:new r(t)};h.comparedTo=h.cmp=function(e){var n,i,t,r,s=this,o=s.d,u=(e=new s.constructor(e)).d,l=s.s,f=e.s;if(!o||!u)return!l||!f?NaN:l!==f?l:o===u?0:!o^l<0?1:-1;if(!o[0]||!u[0])return o[0]?l:u[0]?-f:0;if(l!==f)return l;if(s.e!==e.e)return s.e>e.e^l<0?1:-1;for(t=o.length,r=u.length,n=0,i=tu[n]^l<0?1:-1;return t===r?0:t>r^l<0?1:-1};h.cosine=h.cos=function(){var e,n,i=this,t=i.constructor;return i.d?i.d[0]?(e=t.precision,n=t.rounding,t.precision=e+Math.max(i.e,i.sd())+m,t.rounding=1,i=sn(t,Ve(t,i)),t.precision=e,t.rounding=n,p(Z==2||Z==3?i.neg():i,e,n,!0)):new t(1):new t(NaN)};h.cubeRoot=h.cbrt=function(){var e,n,i,t,r,s,o,u,l,f,c=this,a=c.constructor;if(!c.isFinite()||c.isZero())return new a(c);for(w=!1,s=c.s*M(c.s*c,1/3),!s||Math.abs(s)==1/0?(i=O(c.d),e=c.e,(s=(e-i.length+1)%3)&&(i+=s==1||s==-2?"0":"00"),s=M(i,1/3),e=A((e+1)/3)-(e%3==(e<0?-1:2)),s==1/0?i="5e"+e:(i=s.toExponential(),i=i.slice(0,i.indexOf("e")+1)+e),t=new a(i),t.s=c.s):t=new a(s.toString()),o=(e=a.precision)+3;;)if(u=t,l=u.times(u).times(u),f=l.plus(c),t=S(f.plus(c).times(u),f.plus(l),o+2,1),O(u.d).slice(0,o)===(i=O(t.d)).slice(0,o))if(i=i.slice(o-3,o+1),i=="9999"||!r&&i=="4999"){if(!r&&(p(u,e+1,0),u.times(u).times(u).eq(c))){t=u;break}o+=4,r=1}else{(!+i||!+i.slice(1)&&i.charAt(0)=="5")&&(p(t,e+1,1),n=!t.times(t).times(t).eq(c));break}return w=!0,p(t,e,a.rounding,n)};h.decimalPlaces=h.dp=function(){var e,n=this.d,i=NaN;if(n){if(e=n.length-1,i=(e-A(this.e/m))*m,e=n[e],e)for(;e%10==0;e/=10)i--;i<0&&(i=0)}return i};h.dividedBy=h.div=function(e){return S(this,new this.constructor(e))};h.dividedToIntegerBy=h.divToInt=function(e){var n=this,i=n.constructor;return p(S(n,new i(e),0,1,1),i.precision,i.rounding)};h.equals=h.eq=function(e){return this.cmp(e)===0};h.floor=function(){return p(new this.constructor(this),this.e+1,3)};h.greaterThan=h.gt=function(e){return this.cmp(e)>0};h.greaterThanOrEqualTo=h.gte=function(e){var n=this.cmp(e);return n==1||n===0};h.hyperbolicCosine=h.cosh=function(){var e,n,i,t,r,s=this,o=s.constructor,u=new o(1);if(!s.isFinite())return new o(s.s?1/0:NaN);if(s.isZero())return u;i=o.precision,t=o.rounding,o.precision=i+Math.max(s.e,s.sd())+4,o.rounding=1,r=s.d.length,r<32?(e=Math.ceil(r/3),n=(1/fe(4,e)).toString()):(e=16,n="2.3283064365386962890625e-10"),s=W(o,1,s.times(n),new o(1),!0);for(var l,f=e,c=new o(8);f--;)l=s.times(s),s=u.minus(l.times(c.minus(l.times(c))));return p(s,o.precision=i,o.rounding=t,!0)};h.hyperbolicSine=h.sinh=function(){var e,n,i,t,r=this,s=r.constructor;if(!r.isFinite()||r.isZero())return new s(r);if(n=s.precision,i=s.rounding,s.precision=n+Math.max(r.e,r.sd())+4,s.rounding=1,t=r.d.length,t<3)r=W(s,2,r,r,!0);else{e=1.4*Math.sqrt(t),e=e>16?16:e|0,r=r.times(1/fe(5,e)),r=W(s,2,r,r,!0);for(var o,u=new s(5),l=new s(16),f=new s(20);e--;)o=r.times(r),r=r.times(u.plus(o.times(l.times(o).plus(f))))}return s.precision=n,s.rounding=i,p(r,n,i,!0)};h.hyperbolicTangent=h.tanh=function(){var e,n,i=this,t=i.constructor;return i.isFinite()?i.isZero()?new t(i):(e=t.precision,n=t.rounding,t.precision=e+7,t.rounding=1,S(i.sinh(),i.cosh(),t.precision=e,t.rounding=n)):new t(i.s)};h.inverseCosine=h.acos=function(){var e,n=this,i=n.constructor,t=n.abs().cmp(1),r=i.precision,s=i.rounding;return t!==-1?t===0?n.isNeg()?L(i,r,s):new i(0):new i(NaN):n.isZero()?L(i,r+4,s).times(.5):(i.precision=r+6,i.rounding=1,n=n.asin(),e=L(i,r+4,s).times(.5),i.precision=r,i.rounding=s,e.minus(n))};h.inverseHyperbolicCosine=h.acosh=function(){var e,n,i=this,t=i.constructor;return i.lte(1)?new t(i.eq(1)?0:NaN):i.isFinite()?(e=t.precision,n=t.rounding,t.precision=e+Math.max(Math.abs(i.e),i.sd())+4,t.rounding=1,w=!1,i=i.times(i).minus(1).sqrt().plus(i),w=!0,t.precision=e,t.rounding=n,i.ln()):new t(i)};h.inverseHyperbolicSine=h.asinh=function(){var e,n,i=this,t=i.constructor;return!i.isFinite()||i.isZero()?new t(i):(e=t.precision,n=t.rounding,t.precision=e+2*Math.max(Math.abs(i.e),i.sd())+6,t.rounding=1,w=!1,i=i.times(i).plus(1).sqrt().plus(i),w=!0,t.precision=e,t.rounding=n,i.ln())};h.inverseHyperbolicTangent=h.atanh=function(){var e,n,i,t,r=this,s=r.constructor;return r.isFinite()?r.e>=0?new s(r.abs().eq(1)?r.s/0:r.isZero()?r:NaN):(e=s.precision,n=s.rounding,t=r.sd(),Math.max(t,e)<2*-r.e-1?p(new s(r),e,n,!0):(s.precision=i=t-r.e,r=S(r.plus(1),new s(1).minus(r),i+e,1),s.precision=e+4,s.rounding=1,r=r.ln(),s.precision=e,s.rounding=n,r.times(.5))):new s(NaN)};h.inverseSine=h.asin=function(){var e,n,i,t,r=this,s=r.constructor;return r.isZero()?new s(r):(n=r.abs().cmp(1),i=s.precision,t=s.rounding,n!==-1?n===0?(e=L(s,i+4,t).times(.5),e.s=r.s,e):new s(NaN):(s.precision=i+6,s.rounding=1,r=r.div(new s(1).minus(r.times(r)).sqrt().plus(1)).atan(),s.precision=i,s.rounding=t,r.times(2)))};h.inverseTangent=h.atan=function(){var e,n,i,t,r,s,o,u,l,f=this,c=f.constructor,a=c.precision,d=c.rounding;if(f.isFinite()){if(f.isZero())return new c(f);if(f.abs().eq(1)&&a+4<=ve)return o=L(c,a+4,d).times(.25),o.s=f.s,o}else{if(!f.s)return new c(NaN);if(a+4<=ve)return o=L(c,a+4,d).times(.5),o.s=f.s,o}for(c.precision=u=a+10,c.rounding=1,i=Math.min(28,u/m+2|0),e=i;e;--e)f=f.div(f.times(f).plus(1).sqrt().plus(1));for(w=!1,n=Math.ceil(u/m),t=1,l=f.times(f),o=new c(f),r=f;e!==-1;)if(r=r.times(l),s=o.minus(r.div(t+=2)),r=r.times(l),o=s.plus(r.div(t+=2)),o.d[n]!==void 0)for(e=n;o.d[e]===s.d[e]&&e--;);return i&&(o=o.times(2<this.d.length-2};h.isNaN=function(){return!this.s};h.isNegative=h.isNeg=function(){return this.s<0};h.isPositive=h.isPos=function(){return this.s>0};h.isZero=function(){return!!this.d&&this.d[0]===0};h.lessThan=h.lt=function(e){return this.cmp(e)<0};h.lessThanOrEqualTo=h.lte=function(e){return this.cmp(e)<1};h.logarithm=h.log=function(e){var n,i,t,r,s,o,u,l,f=this,c=f.constructor,a=c.precision,d=c.rounding,g=5;if(e==null)e=new c(10),n=!0;else{if(e=new c(e),i=e.d,e.s<0||!i||!i[0]||e.eq(1))return new c(NaN);n=e.eq(10)}if(i=f.d,f.s<0||!i||!i[0]||f.eq(1))return new c(i&&!i[0]?-1/0:f.s!=1?NaN:i?0:1/0);if(n)if(i.length>1)s=!0;else{for(r=i[0];r%10===0;)r/=10;s=r!==1}if(w=!1,u=a+g,o=B(f,u),t=n?se(c,u+10):B(e,u),l=S(o,t,u,1),Q(l.d,r=a,d))do if(u+=10,o=B(f,u),t=n?se(c,u+10):B(e,u),l=S(o,t,u,1),!s){+O(l.d).slice(r+1,r+15)+1==1e14&&(l=p(l,a+1,0));break}while(Q(l.d,r+=10,d));return w=!0,p(l,a,d)};h.minus=h.sub=function(e){var n,i,t,r,s,o,u,l,f,c,a,d,g=this,v=g.constructor;if(e=new v(e),!g.d||!e.d)return!g.s||!e.s?e=new v(NaN):g.d?e.s=-e.s:e=new v(e.d||g.s!==e.s?g:NaN),e;if(g.s!=e.s)return e.s=-e.s,g.plus(e);if(f=g.d,d=e.d,u=v.precision,l=v.rounding,!f[0]||!d[0]){if(d[0])e.s=-e.s;else if(f[0])e=new v(g);else return new v(l===3?-0:0);return w?p(e,u,l):e}if(i=A(e.e/m),c=A(g.e/m),f=f.slice(),s=c-i,s){for(a=s<0,a?(n=f,s=-s,o=d.length):(n=d,i=c,o=f.length),t=Math.max(Math.ceil(u/m),o)+2,s>t&&(s=t,n.length=1),n.reverse(),t=s;t--;)n.push(0);n.reverse()}else{for(t=f.length,o=d.length,a=t0;--t)f[o++]=0;for(t=d.length;t>s;){if(f[--t]o?s+1:o+1,r>o&&(r=o,i.length=1),i.reverse();r--;)i.push(0);i.reverse()}for(o=f.length,r=c.length,o-r<0&&(r=o,i=c,c=f,f=i),n=0;r;)n=(f[--r]=f[r]+c[r]+n)/D|0,f[r]%=D;for(n&&(f.unshift(n),++t),o=f.length;f[--o]==0;)f.pop();return e.d=f,e.e=ue(f,t),w?p(e,u,l):e};h.precision=h.sd=function(e){var n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error($+e);return i.d?(n=Ze(i.d),e&&i.e+1>n&&(n=i.e+1)):n=NaN,n};h.round=function(){var e=this,n=e.constructor;return p(new n(e),e.e+1,n.rounding)};h.sine=h.sin=function(){var e,n,i=this,t=i.constructor;return i.isFinite()?i.isZero()?new t(i):(e=t.precision,n=t.rounding,t.precision=e+Math.max(i.e,i.sd())+m,t.rounding=1,i=un(t,Ve(t,i)),t.precision=e,t.rounding=n,p(Z>2?i.neg():i,e,n,!0)):new t(NaN)};h.squareRoot=h.sqrt=function(){var e,n,i,t,r,s,o=this,u=o.d,l=o.e,f=o.s,c=o.constructor;if(f!==1||!u||!u[0])return new c(!f||f<0&&(!u||u[0])?NaN:u?o:1/0);for(w=!1,f=Math.sqrt(+o),f==0||f==1/0?(n=O(u),(n.length+l)%2==0&&(n+="0"),f=Math.sqrt(n),l=A((l+1)/2)-(l<0||l%2),f==1/0?n="5e"+l:(n=f.toExponential(),n=n.slice(0,n.indexOf("e")+1)+l),t=new c(n)):t=new c(f.toString()),i=(l=c.precision)+3;;)if(s=t,t=s.plus(S(o,s,i+2,1)).times(.5),O(s.d).slice(0,i)===(n=O(t.d)).slice(0,i))if(n=n.slice(i-3,i+1),n=="9999"||!r&&n=="4999"){if(!r&&(p(s,l+1,0),s.times(s).eq(o))){t=s;break}i+=4,r=1}else{(!+n||!+n.slice(1)&&n.charAt(0)=="5")&&(p(t,l+1,1),e=!t.times(t).eq(o));break}return w=!0,p(t,l,c.rounding,e)};h.tangent=h.tan=function(){var e,n,i=this,t=i.constructor;return i.isFinite()?i.isZero()?new t(i):(e=t.precision,n=t.rounding,t.precision=e+10,t.rounding=1,i=i.sin(),i.s=1,i=S(i,new t(1).minus(i.times(i)).sqrt(),e+10,0),t.precision=e,t.rounding=n,p(Z==2||Z==4?i.neg():i,e,n,!0)):new t(NaN)};h.times=h.mul=function(e){var n,i,t,r,s,o,u,l,f,c=this,a=c.constructor,d=c.d,g=(e=new a(e)).d;if(e.s*=c.s,!d||!d[0]||!g||!g[0])return new a(!e.s||d&&!d[0]&&!g||g&&!g[0]&&!d?NaN:!d||!g?e.s/0:e.s*0);for(i=A(c.e/m)+A(e.e/m),l=d.length,f=g.length,l=0;){for(n=0,r=l+t;r>t;)u=s[r]+g[t]*d[r-t-1]+n,s[r--]=u%D|0,n=u/D|0;s[r]=(s[r]+n)%D|0}for(;!s[--o];)s.pop();return n?++i:s.shift(),e.d=s,e.e=ue(s,i),w?p(e,a.precision,a.rounding):e};h.toBinary=function(e,n){return ke(this,2,e,n)};h.toDecimalPlaces=h.toDP=function(e,n){var i=this,t=i.constructor;return i=new t(i),e===void 0?i:(R(e,0,V),n===void 0?n=t.rounding:R(n,0,8),p(i,e+i.e+1,n))};h.toExponential=function(e,n){var i,t=this,r=t.constructor;return e===void 0?i=F(t,!0):(R(e,0,V),n===void 0?n=r.rounding:R(n,0,8),t=p(new r(t),e+1,n),i=F(t,!0,e+1)),t.isNeg()&&!t.isZero()?"-"+i:i};h.toFixed=function(e,n){var i,t,r=this,s=r.constructor;return e===void 0?i=F(r):(R(e,0,V),n===void 0?n=s.rounding:R(n,0,8),t=p(new s(r),e+r.e+1,n),i=F(t,!1,e+t.e+1)),r.isNeg()&&!r.isZero()?"-"+i:i};h.toFraction=function(e){var n,i,t,r,s,o,u,l,f,c,a,d,g=this,v=g.d,N=g.constructor;if(!v)return new N(g);if(f=i=new N(1),t=l=new N(0),n=new N(t),s=n.e=Ze(v)-g.e-1,o=s%m,n.d[0]=M(10,o<0?m+o:o),e==null)e=s>0?n:f;else{if(u=new N(e),!u.isInt()||u.lt(f))throw Error($+u);e=u.gt(n)?s>0?n:f:u}for(w=!1,u=new N(O(v)),c=N.precision,N.precision=s=v.length*m*2;a=S(u,n,0,1,1),r=i.plus(a.times(t)),r.cmp(e)!=1;)i=t,t=r,r=f,f=l.plus(a.times(r)),l=r,r=n,n=u.minus(a.times(r)),u=r;return r=S(e.minus(i),t,0,1,1),l=l.plus(r.times(f)),i=i.plus(r.times(t)),l.s=f.s=g.s,d=S(f,t,s,1).minus(g).abs().cmp(S(l,i,s,1).minus(g).abs())<1?[f,t]:[l,i],N.precision=c,w=!0,d};h.toHexadecimal=h.toHex=function(e,n){return ke(this,16,e,n)};h.toNearest=function(e,n){var i=this,t=i.constructor;if(i=new t(i),e==null){if(!i.d)return i;e=new t(1),n=t.rounding}else{if(e=new t(e),n===void 0?n=t.rounding:R(n,0,8),!i.d)return e.s?i:e;if(!e.d)return e.s&&(e.s=i.s),e}return e.d[0]?(w=!1,i=S(i,e,0,n,1).times(e),w=!0,p(i)):(e.s=i.s,i=e),i};h.toNumber=function(){return+this};h.toOctal=function(e,n){return ke(this,8,e,n)};h.toPower=h.pow=function(e){var n,i,t,r,s,o,u=this,l=u.constructor,f=+(e=new l(e));if(!u.d||!e.d||!u.d[0]||!e.d[0])return new l(M(+u,f));if(u=new l(u),u.eq(1))return u;if(t=l.precision,s=l.rounding,e.eq(1))return p(u,t,s);if(n=A(e.e/m),n>=e.d.length-1&&(i=f<0?-f:f)<=tn)return r=Ue(l,u,i,t),e.s<0?new l(1).div(r):p(r,t,s);if(o=u.s,o<0){if(nl.maxE+1||n0?o/0:0):(w=!1,l.rounding=u.s=1,i=Math.min(12,(n+"").length),r=Ee(e.times(B(u,t+i)),t),r.d&&(r=p(r,t+5,1),Q(r.d,t,s)&&(n=t+10,r=p(Ee(e.times(B(u,n+i)),n),n+5,1),+O(r.d).slice(t+1,t+15)+1==1e14&&(r=p(r,t+1,0)))),r.s=o,w=!0,l.rounding=s,p(r,t,s))};h.toPrecision=function(e,n){var i,t=this,r=t.constructor;return e===void 0?i=F(t,t.e<=r.toExpNeg||t.e>=r.toExpPos):(R(e,1,V),n===void 0?n=r.rounding:R(n,0,8),t=p(new r(t),e,n),i=F(t,e<=t.e||t.e<=r.toExpNeg,e)),t.isNeg()&&!t.isZero()?"-"+i:i};h.toSignificantDigits=h.toSD=function(e,n){var i=this,t=i.constructor;return e===void 0?(e=t.precision,n=t.rounding):(R(e,1,V),n===void 0?n=t.rounding:R(n,0,8)),p(new t(i),e,n)};h.toString=function(){var e=this,n=e.constructor,i=F(e,e.e<=n.toExpNeg||e.e>=n.toExpPos);return e.isNeg()&&!e.isZero()?"-"+i:i};h.truncated=h.trunc=function(){return p(new this.constructor(this),this.e+1,1)};h.valueOf=h.toJSON=function(){var e=this,n=e.constructor,i=F(e,e.e<=n.toExpNeg||e.e>=n.toExpPos);return e.isNeg()?"-"+i:i};function O(e){var n,i,t,r=e.length-1,s="",o=e[0];if(r>0){for(s+=o,n=1;ni)throw Error($+e)}function Q(e,n,i,t){var r,s,o,u;for(s=e[0];s>=10;s/=10)--n;return--n<0?(n+=m,r=0):(r=Math.ceil((n+1)/m),n%=m),s=M(10,m-n),u=e[r]%s|0,t==null?n<3?(n==0?u=u/100|0:n==1&&(u=u/10|0),o=i<4&&u==99999||i>3&&u==49999||u==5e4||u==0):o=(i<4&&u+1==s||i>3&&u+1==s/2)&&(e[r+1]/s/100|0)==M(10,n-2)-1||(u==s/2||u==0)&&(e[r+1]/s/100|0)==0:n<4?(n==0?u=u/1e3|0:n==1?u=u/100|0:n==2&&(u=u/10|0),o=(t||i<4)&&u==9999||!t&&i>3&&u==4999):o=((t||i<4)&&u+1==s||!t&&i>3&&u+1==s/2)&&(e[r+1]/s/1e3|0)==M(10,n-3)-1,o}function ie(e,n,i){for(var t,r=[0],s,o=0,u=e.length;oi-1&&(r[t+1]===void 0&&(r[t+1]=0),r[t+1]+=r[t]/i|0,r[t]%=i)}return r.reverse()}function sn(e,n){var i,t,r;if(n.isZero())return n;t=n.d.length,t<32?(i=Math.ceil(t/3),r=(1/fe(4,i)).toString()):(i=16,r="2.3283064365386962890625e-10"),e.precision+=i,n=W(e,1,n.times(r),new e(1));for(var s=i;s--;){var o=n.times(n);n=o.times(o).minus(o).times(8).plus(1)}return e.precision-=i,n}var S=function(){function e(t,r,s){var o,u=0,l=t.length;for(t=t.slice();l--;)o=t[l]*r+u,t[l]=o%s|0,u=o/s|0;return u&&t.unshift(u),t}function n(t,r,s,o){var u,l;if(s!=o)l=s>o?1:-1;else for(u=l=0;ur[u]?1:-1;break}return l}function i(t,r,s,o){for(var u=0;s--;)t[s]-=u,u=t[s]1;)t.shift()}return function(t,r,s,o,u,l){var f,c,a,d,g,v,N,_,C,q,E,P,x,I,le,z,G,ce,T,y,ee=t.constructor,ae=t.s==r.s?1:-1,b=t.d,k=r.d;if(!b||!b[0]||!k||!k[0])return new ee(!t.s||!r.s||(b?k&&b[0]==k[0]:!k)?NaN:b&&b[0]==0||!k?ae*0:ae/0);for(l?(g=1,c=t.e-r.e):(l=D,g=m,c=A(t.e/g)-A(r.e/g)),T=k.length,G=b.length,C=new ee(ae),q=C.d=[],a=0;k[a]==(b[a]||0);a++);if(k[a]>(b[a]||0)&&c--,s==null?(I=s=ee.precision,o=ee.rounding):u?I=s+(t.e-r.e)+1:I=s,I<0)q.push(1),v=!0;else{if(I=I/g+2|0,a=0,T==1){for(d=0,k=k[0],I++;(a1&&(k=e(k,d,l),b=e(b,d,l),T=k.length,G=b.length),z=T,E=b.slice(0,T),P=E.length;P=l/2&&++ce;do d=0,f=n(k,E,T,P),f<0?(x=E[0],T!=P&&(x=x*l+(E[1]||0)),d=x/ce|0,d>1?(d>=l&&(d=l-1),N=e(k,d,l),_=N.length,P=E.length,f=n(N,E,_,P),f==1&&(d--,i(N,T<_?y:k,_,l))):(d==0&&(f=d=1),N=k.slice()),_=N.length,_=10;d/=10)a++;C.e=a+c*g-1,p(C,u?s+C.e+1:s,o,v)}return C}}();function p(e,n,i,t){var r,s,o,u,l,f,c,a,d,g=e.constructor;e:if(n!=null){if(a=e.d,!a)return e;for(r=1,u=a[0];u>=10;u/=10)r++;if(s=n-r,s<0)s+=m,o=n,c=a[d=0],l=c/M(10,r-o-1)%10|0;else if(d=Math.ceil((s+1)/m),u=a.length,d>=u)if(t){for(;u++<=d;)a.push(0);c=l=0,r=1,s%=m,o=s-m+1}else break e;else{for(c=u=a[d],r=1;u>=10;u/=10)r++;s%=m,o=s-m+r,l=o<0?0:c/M(10,r-o-1)%10|0}if(t=t||n<0||a[d+1]!==void 0||(o<0?c:c%M(10,r-o-1)),f=i<4?(l||t)&&(i==0||i==(e.s<0?3:2)):l>5||l==5&&(i==4||t||i==6&&(s>0?o>0?c/M(10,r-o):0:a[d-1])%10&1||i==(e.s<0?8:7)),n<1||!a[0])return a.length=0,f?(n-=e.e+1,a[0]=M(10,(m-n%m)%m),e.e=-n||0):a[0]=e.e=0,e;if(s==0?(a.length=d,u=1,d--):(a.length=d+1,u=M(10,m-s),a[d]=o>0?(c/M(10,r-o)%M(10,o)|0)*u:0),f)for(;;)if(d==0){for(s=1,o=a[0];o>=10;o/=10)s++;for(o=a[0]+=u,u=1;o>=10;o/=10)u++;s!=u&&(e.e++,a[0]==D&&(a[0]=1));break}else{if(a[d]+=u,a[d]!=D)break;a[d--]=0,u=1}for(s=a.length;a[--s]===0;)a.pop()}return w&&(e.e>g.maxE?(e.d=null,e.e=NaN):e.e0?s=s.charAt(0)+"."+s.slice(1)+U(t):o>1&&(s=s.charAt(0)+"."+s.slice(1)),s=s+(e.e<0?"e":"e+")+e.e):r<0?(s="0."+U(-r-1)+s,i&&(t=i-o)>0&&(s+=U(t))):r>=o?(s+=U(r+1-o),i&&(t=i-r-1)>0&&(s=s+"."+U(t))):((t=r+1)0&&(r+1===o&&(s+="."),s+=U(t))),s}function ue(e,n){var i=e[0];for(n*=m;i>=10;i/=10)n++;return n}function se(e,n,i){if(n>rn)throw w=!0,i&&(e.precision=i),Error(Le);return p(new e(te),n,1,!0)}function L(e,n,i){if(n>ve)throw Error(Le);return p(new e(re),n,i,!0)}function Ze(e){var n=e.length-1,i=n*m+1;if(n=e[n],n){for(;n%10==0;n/=10)i--;for(n=e[0];n>=10;n/=10)i++}return i}function U(e){for(var n="";e--;)n+="0";return n}function Ue(e,n,i,t){var r,s=new e(1),o=Math.ceil(t/m+4);for(w=!1;;){if(i%2&&(s=s.times(n),Re(s.d,o)&&(r=!0)),i=A(i/2),i===0){i=s.d.length-1,r&&s.d[i]===0&&++s.d[i];break}n=n.times(n),Re(n.d,o)}return w=!0,s}function _e(e){return e.d[e.d.length-1]&1}function Be(e,n,i){for(var t,r=new e(n[0]),s=0;++s17)return new d(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(n==null?(w=!1,l=v):l=n,u=new d(.03125);e.e>-2;)e=e.times(u),a+=5;for(t=Math.log(M(2,a))/Math.LN10*2+5|0,l+=t,i=s=o=new d(1),d.precision=l;;){if(s=p(s.times(e),l,1),i=i.times(++c),u=o.plus(S(s,i,l,1)),O(u.d).slice(0,l)===O(o.d).slice(0,l)){for(r=a;r--;)o=p(o.times(o),l,1);if(n==null)if(f<3&&Q(o.d,l-t,g,f))d.precision=l+=10,i=s=u=new d(1),c=0,f++;else return p(o,d.precision=v,g,w=!0);else return d.precision=v,o}o=u}}function B(e,n){var i,t,r,s,o,u,l,f,c,a,d,g=1,v=10,N=e,_=N.d,C=N.constructor,q=C.rounding,E=C.precision;if(N.s<0||!_||!_[0]||!N.e&&_[0]==1&&_.length==1)return new C(_&&!_[0]?-1/0:N.s!=1?NaN:_?0:N);if(n==null?(w=!1,c=E):c=n,C.precision=c+=v,i=O(_),t=i.charAt(0),Math.abs(s=N.e)<15e14){for(;t<7&&t!=1||t==1&&i.charAt(1)>3;)N=N.times(e),i=O(N.d),t=i.charAt(0),g++;s=N.e,t>1?(N=new C("0."+i),s++):N=new C(t+"."+i.slice(1))}else return f=se(C,c+2,E).times(s+""),N=B(new C(t+"."+i.slice(1)),c-v).plus(f),C.precision=E,n==null?p(N,E,q,w=!0):N;for(a=N,l=o=N=S(N.minus(1),N.plus(1),c,1),d=p(N.times(N),c,1),r=3;;){if(o=p(o.times(d),c,1),f=l.plus(S(o,new C(r),c,1)),O(f.d).slice(0,c)===O(l.d).slice(0,c))if(l=l.times(2),s!==0&&(l=l.plus(se(C,c+2,E).times(s+""))),l=S(l,new C(g),c,1),n==null)if(Q(l.d,c-v,q,u))C.precision=c+=v,f=o=N=S(a.minus(1),a.plus(1),c,1),d=p(N.times(N),c,1),r=u=1;else return p(l,C.precision=E,q,w=!0);else return C.precision=E,l;l=f,r+=2}}function $e(e){return String(e.s*e.s/0)}function Se(e,n){var i,t,r;for((i=n.indexOf("."))>-1&&(n=n.replace(".","")),(t=n.search(/e/i))>0?(i<0&&(i=t),i+=+n.slice(t+1),n=n.substring(0,t)):i<0&&(i=n.length),t=0;n.charCodeAt(t)===48;t++);for(r=n.length;n.charCodeAt(r-1)===48;--r);if(n=n.slice(t,r),n){if(r-=t,e.e=i=i-t-1,e.d=[],t=(i+1)%m,i<0&&(t+=m),te.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(n=n.replace(/(\d)_(?=\d)/g,"$1"),Ie.test(n))return Se(e,n)}else if(n==="Infinity"||n==="NaN")return+n||(e.s=NaN),e.e=NaN,e.d=null,e;if(en.test(n))i=16,n=n.toLowerCase();else if(ye.test(n))i=2;else if(nn.test(n))i=8;else throw Error($+n);for(s=n.search(/p/i),s>0?(l=+n.slice(s+1),n=n.substring(2,s)):n=n.slice(2),s=n.indexOf("."),o=s>=0,t=e.constructor,o&&(n=n.replace(".",""),u=n.length,s=u-s,r=Ue(t,new t(i),s,s*2)),f=ie(n,i,D),c=f.length-1,s=c;f[s]===0;--s)f.pop();return s<0?new t(e.s*0):(e.e=ue(f,c),e.d=f,w=!1,o&&(e=S(e,r,u*4)),l&&(e=e.times(Math.abs(l)<54?M(2,l):Y.pow(2,l))),w=!0,e)}function un(e,n){var i,t=n.d.length;if(t<3)return n.isZero()?n:W(e,2,n,n);i=1.4*Math.sqrt(t),i=i>16?16:i|0,n=n.times(1/fe(5,i)),n=W(e,2,n,n);for(var r,s=new e(5),o=new e(16),u=new e(20);i--;)r=n.times(n),n=n.times(s.plus(r.times(o.times(r).minus(u))));return n}function W(e,n,i,t,r){var s,o,u,l,f=1,c=e.precision,a=Math.ceil(c/m);for(w=!1,l=i.times(i),u=new e(t);;){if(o=S(u.times(l),new e(n++*n++),c,1),u=r?t.plus(o):t.minus(o),t=S(o.times(l),new e(n++*n++),c,1),o=u.plus(t),o.d[a]!==void 0){for(s=a;o.d[s]===u.d[s]&&s--;);if(s==-1)break}s=u,u=t,t=o,o=s,f++}return w=!0,o.d.length=a+1,o}function fe(e,n){for(var i=e;--n;)i*=e;return i}function Ve(e,n){var i,t=n.s<0,r=L(e,e.precision,1),s=r.times(.5);if(n=n.abs(),n.lte(s))return Z=t?4:1,n;if(i=n.divToInt(r),i.isZero())Z=t?3:2;else{if(n=n.minus(i.times(r)),n.lte(s))return Z=_e(i)?t?2:3:t?4:1,n;Z=_e(i)?t?1:4:t?3:2}return n.minus(r).abs()}function ke(e,n,i,t){var r,s,o,u,l,f,c,a,d,g=e.constructor,v=i!==void 0;if(v?(R(i,1,V),t===void 0?t=g.rounding:R(t,0,8)):(i=g.precision,t=g.rounding),!e.isFinite())c=$e(e);else{for(c=F(e),o=c.indexOf("."),v?(r=2,n==16?i=i*4-3:n==8&&(i=i*3-2)):r=n,o>=0&&(c=c.replace(".",""),d=new g(1),d.e=c.length-o,d.d=ie(F(d),10,r),d.e=d.d.length),a=ie(c,10,r),s=l=a.length;a[--l]==0;)a.pop();if(!a[0])c=v?"0p+0":"0";else{if(o<0?s--:(e=new g(e),e.d=a,e.e=s,e=S(e,d,i,t,0,r),a=e.d,s=e.e,f=Te),o=a[i],u=r/2,f=f||a[i+1]!==void 0,f=t<4?(o!==void 0||f)&&(t===0||t===(e.s<0?3:2)):o>u||o===u&&(t===4||f||t===6&&a[i-1]&1||t===(e.s<0?8:7)),a.length=i,f)for(;++a[--i]>r-1;)a[i]=0,i||(++s,a.unshift(1));for(l=a.length;!a[l-1];--l);for(o=0,c="";o1)if(n==16||n==8){for(o=n==16?4:3,--l;l%o;l++)c+="0";for(a=ie(c,r,n),l=a.length;!a[l-1];--l);for(o=1,c="1.";ol)for(s-=l;s--;)c+="0";else sn)return e.length=n,!0}function fn(e){return new this(e).abs()}function ln(e){return new this(e).acos()}function cn(e){return new this(e).acosh()}function an(e,n){return new this(e).plus(n)}function dn(e){return new this(e).asin()}function hn(e){return new this(e).asinh()}function pn(e){return new this(e).atan()}function gn(e){return new this(e).atanh()}function mn(e,n){e=new this(e),n=new this(n);var i,t=this.precision,r=this.rounding,s=t+4;return!e.s||!n.s?i=new this(NaN):!e.d&&!n.d?(i=L(this,s,1).times(n.s>0?.25:.75),i.s=e.s):!n.d||e.isZero()?(i=n.s<0?L(this,t,r):new this(0),i.s=e.s):!e.d||n.isZero()?(i=L(this,s,1).times(.5),i.s=e.s):n.s<0?(this.precision=s,this.rounding=1,i=this.atan(S(e,n,s,1)),n=L(this,s,1),this.precision=t,this.rounding=r,i=e.s<0?i.minus(n):i.plus(n)):i=this.atan(S(e,n,s,1)),i}function wn(e){return new this(e).cbrt()}function Nn(e){return p(e=new this(e),e.e+1,2)}function vn(e,n,i){return new this(e).clamp(n,i)}function En(e){if(!e||typeof e!="object")throw Error(oe+"Object expected");var n,i,t,r=e.defaults===!0,s=["precision",1,V,"rounding",0,8,"toExpNeg",-H,0,"toExpPos",0,H,"maxE",0,H,"minE",-H,0,"modulo",0,9];for(n=0;n=s[n+1]&&t<=s[n+2])this[i]=t;else throw Error($+i+": "+t);if(i="crypto",r&&(this[i]=Ne[i]),(t=e[i])!==void 0)if(t===!0||t===!1||t===0||t===1)if(t)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[i]=!0;else throw Error(De);else this[i]=!1;else throw Error($+i+": "+t);return this}function Sn(e){return new this(e).cos()}function kn(e){return new this(e).cosh()}function He(e){var n,i,t;function r(s){var o,u,l,f=this;if(!(f instanceof r))return new r(s);if(f.constructor=r,qe(s)){f.s=s.s,w?!s.d||s.e>r.maxE?(f.e=NaN,f.d=null):s.e=10;u/=10)o++;w?o>r.maxE?(f.e=NaN,f.d=null):o=429e7?n[s]=crypto.getRandomValues(new Uint32Array(1))[0]:u[s++]=r%1e7;else if(crypto.randomBytes){for(n=crypto.randomBytes(t*=4);s=214e7?crypto.randomBytes(4).copy(n,s):(u.push(r%1e7),s+=4);s=t/4}else throw Error(De);else for(;s=10;r/=10)t++;t * MIT Licence *) */ //# sourceMappingURL=index-browser.js.map ================================================ FILE: server/src/common/prisma-client/runtime/library.d.ts ================================================ /** * @param this */ declare function $extends(this: Client, extension: ExtensionArgs | ((client: Client) => Client)): Client; declare type AccelerateEngineConfig = { inlineSchema: EngineConfig['inlineSchema']; inlineSchemaHash: EngineConfig['inlineSchemaHash']; env: EngineConfig['env']; generator?: { previewFeatures: string[]; }; inlineDatasources: EngineConfig['inlineDatasources']; overrideDatasources: EngineConfig['overrideDatasources']; clientVersion: EngineConfig['clientVersion']; engineVersion: EngineConfig['engineVersion']; logEmitter: EngineConfig['logEmitter']; logQueries?: EngineConfig['logQueries']; logLevel?: EngineConfig['logLevel']; tracingHelper: EngineConfig['tracingHelper']; accelerateUtils?: EngineConfig['accelerateUtils']; }; export declare type Action = keyof typeof DMMF.ModelAction | 'executeRaw' | 'queryRaw' | 'runCommandRaw'; export declare type Aggregate = '_count' | '_max' | '_min' | '_avg' | '_sum'; export declare type AllModelsToStringIndex, K extends PropertyKey> = Args extends { [P in K]: { $allModels: infer AllModels; }; } ? { [P in K]: Record; } : {}; declare class AnyNull extends NullTypesEnumValue { } export declare type Args = T extends { [K: symbol]: { types: { operations: { [K in F]: { args: any; }; }; }; }; } ? T[symbol]['types']['operations'][F]['args'] : any; export declare type Args_3 = Args; /** * Attributes is a map from string to attribute values. * * Note: only the own enumerable keys are counted as valid attribute keys. */ declare interface Attributes { [attributeKey: string]: AttributeValue | undefined; } /** * Attribute values may be any non-nullish primitive value except an object. * * null or undefined attribute values are invalid and will result in undefined behavior. */ declare type AttributeValue = string | number | boolean | Array | Array | Array; export declare type BaseDMMF = Pick; declare type BatchArgs = { queries: BatchQuery[]; transaction?: { isolationLevel?: IsolationLevel; }; }; declare type BatchInternalParams = { requests: RequestParams[]; customDataProxyFetch?: CustomDataProxyFetch; }; declare type BatchQuery = { model: string | undefined; operation: string; args: JsArgs | RawQueryArgs; }; declare type BatchQueryEngineResult = QueryEngineResult | Error; declare type BatchQueryOptionsCb = (args: BatchQueryOptionsCbArgs) => Promise; declare type BatchQueryOptionsCbArgs = { args: BatchArgs; query: (args: BatchArgs, __internalParams?: BatchInternalParams) => Promise; __internalParams: BatchInternalParams; }; declare type BatchTransactionOptions = { isolationLevel?: Transaction_2.IsolationLevel; }; declare interface BinaryTargetsEnvValue { fromEnvVar: string | null; value: string; native?: boolean; } export declare type Call = (F & { params: P; })['returns']; declare interface CallSite { getLocation(): LocationInFile | null; } export declare type Cast = A extends W ? A : W; declare type Client = ReturnType extends new () => infer T ? T : never; export declare type ClientArg = { [MethodName in string]: unknown; }; export declare type ClientArgs = { client: ClientArg; }; export declare type ClientBuiltInProp = keyof DynamicClientExtensionThisBuiltin; declare type ColumnType = (typeof ColumnTypeEnum)[keyof typeof ColumnTypeEnum]; declare const ColumnTypeEnum: { readonly Int32: 0; readonly Int64: 1; readonly Float: 2; readonly Double: 3; readonly Numeric: 4; readonly Boolean: 5; readonly Character: 6; readonly Text: 7; readonly Date: 8; readonly Time: 9; readonly DateTime: 10; readonly Json: 11; readonly Enum: 12; readonly Bytes: 13; readonly Set: 14; readonly Uuid: 15; readonly Int32Array: 64; readonly Int64Array: 65; readonly FloatArray: 66; readonly DoubleArray: 67; readonly NumericArray: 68; readonly BooleanArray: 69; readonly CharacterArray: 70; readonly TextArray: 71; readonly DateArray: 72; readonly TimeArray: 73; readonly DateTimeArray: 74; readonly JsonArray: 75; readonly EnumArray: 76; readonly BytesArray: 77; readonly UuidArray: 78; readonly UnknownNumber: 128; }; export declare type Compute = T extends Function ? T : { [K in keyof T]: T[K]; } & unknown; export declare type ComputeDeep = T extends Function ? T : { [K in keyof T]: ComputeDeep; } & unknown; declare type ComputedField = { name: string; needs: string[]; compute: ResultArgsFieldCompute; }; declare type ComputedFieldsMap = { [fieldName: string]: ComputedField; }; declare type ConnectionInfo = { schemaName?: string; maxBindValues?: number; }; declare interface Context { /** * Get a value from the context. * * @param key key which identifies a context value */ getValue(key: symbol): unknown; /** * Create a new context which inherits from this context and has * the given key set to the given value. * * @param key context key for which to set the value * @param value value to set for the given key */ setValue(key: symbol, value: unknown): Context; /** * Return a new context which inherits from this context but does * not contain a value for the given key. * * @param key context key for which to clear a value */ deleteValue(key: symbol): Context; } declare type Context_2 = T extends { [K: symbol]: { ctx: infer C; }; } ? C & T & { /** * @deprecated Use `$name` instead. */ name?: string; $name?: string; $parent?: unknown; } : T & { /** * @deprecated Use `$name` instead. */ name?: string; $name?: string; $parent?: unknown; }; export declare type Count = { [K in keyof O]: Count; } & {}; declare type CustomDataProxyFetch = (fetch: Fetch) => Fetch; declare class DataLoader { private options; batches: { [key: string]: Job[]; }; private tickActive; constructor(options: DataLoaderOptions); request(request: T): Promise; private dispatchBatches; get [Symbol.toStringTag](): string; } declare type DataLoaderOptions = { singleLoader: (request: T) => Promise; batchLoader: (request: T[]) => Promise; batchBy: (request: T) => string | undefined; batchOrder: (requestA: T, requestB: T) => number; }; declare type Datasource = { url?: string; }; declare type Datasources = { [name in string]: Datasource; }; declare class DbNull extends NullTypesEnumValue { } export declare const Debug: typeof debugCreate & { enable(namespace: any): void; disable(): any; enabled(namespace: string): boolean; log: (...args: string[]) => void; formatters: {}; }; /** * Create a new debug instance with the given namespace. * * @example * ```ts * import Debug from '@prisma/debug' * const debug = Debug('prisma:client') * debug('Hello World') * ``` */ declare function debugCreate(namespace: string): ((...args: any[]) => void) & { color: string; enabled: boolean; namespace: string; log: (...args: string[]) => void; extend: () => void; }; export declare namespace Decimal { export type Constructor = typeof Decimal; export type Instance = Decimal; export type Rounding = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8; export type Modulo = Rounding | 9; export type Value = string | number | Decimal; // http://mikemcl.github.io/decimal.js/#constructor-properties export interface Config { precision?: number; rounding?: Rounding; toExpNeg?: number; toExpPos?: number; minE?: number; maxE?: number; crypto?: boolean; modulo?: Modulo; defaults?: boolean; } } export declare class Decimal { readonly d: number[]; readonly e: number; readonly s: number; constructor(n: Decimal.Value); absoluteValue(): Decimal; abs(): Decimal; ceil(): Decimal; clampedTo(min: Decimal.Value, max: Decimal.Value): Decimal; clamp(min: Decimal.Value, max: Decimal.Value): Decimal; comparedTo(n: Decimal.Value): number; cmp(n: Decimal.Value): number; cosine(): Decimal; cos(): Decimal; cubeRoot(): Decimal; cbrt(): Decimal; decimalPlaces(): number; dp(): number; dividedBy(n: Decimal.Value): Decimal; div(n: Decimal.Value): Decimal; dividedToIntegerBy(n: Decimal.Value): Decimal; divToInt(n: Decimal.Value): Decimal; equals(n: Decimal.Value): boolean; eq(n: Decimal.Value): boolean; floor(): Decimal; greaterThan(n: Decimal.Value): boolean; gt(n: Decimal.Value): boolean; greaterThanOrEqualTo(n: Decimal.Value): boolean; gte(n: Decimal.Value): boolean; hyperbolicCosine(): Decimal; cosh(): Decimal; hyperbolicSine(): Decimal; sinh(): Decimal; hyperbolicTangent(): Decimal; tanh(): Decimal; inverseCosine(): Decimal; acos(): Decimal; inverseHyperbolicCosine(): Decimal; acosh(): Decimal; inverseHyperbolicSine(): Decimal; asinh(): Decimal; inverseHyperbolicTangent(): Decimal; atanh(): Decimal; inverseSine(): Decimal; asin(): Decimal; inverseTangent(): Decimal; atan(): Decimal; isFinite(): boolean; isInteger(): boolean; isInt(): boolean; isNaN(): boolean; isNegative(): boolean; isNeg(): boolean; isPositive(): boolean; isPos(): boolean; isZero(): boolean; lessThan(n: Decimal.Value): boolean; lt(n: Decimal.Value): boolean; lessThanOrEqualTo(n: Decimal.Value): boolean; lte(n: Decimal.Value): boolean; logarithm(n?: Decimal.Value): Decimal; log(n?: Decimal.Value): Decimal; minus(n: Decimal.Value): Decimal; sub(n: Decimal.Value): Decimal; modulo(n: Decimal.Value): Decimal; mod(n: Decimal.Value): Decimal; naturalExponential(): Decimal; exp(): Decimal; naturalLogarithm(): Decimal; ln(): Decimal; negated(): Decimal; neg(): Decimal; plus(n: Decimal.Value): Decimal; add(n: Decimal.Value): Decimal; precision(includeZeros?: boolean): number; sd(includeZeros?: boolean): number; round(): Decimal; sine() : Decimal; sin() : Decimal; squareRoot(): Decimal; sqrt(): Decimal; tangent() : Decimal; tan() : Decimal; times(n: Decimal.Value): Decimal; mul(n: Decimal.Value) : Decimal; toBinary(significantDigits?: number): string; toBinary(significantDigits: number, rounding: Decimal.Rounding): string; toDecimalPlaces(decimalPlaces?: number): Decimal; toDecimalPlaces(decimalPlaces: number, rounding: Decimal.Rounding): Decimal; toDP(decimalPlaces?: number): Decimal; toDP(decimalPlaces: number, rounding: Decimal.Rounding): Decimal; toExponential(decimalPlaces?: number): string; toExponential(decimalPlaces: number, rounding: Decimal.Rounding): string; toFixed(decimalPlaces?: number): string; toFixed(decimalPlaces: number, rounding: Decimal.Rounding): string; toFraction(max_denominator?: Decimal.Value): Decimal[]; toHexadecimal(significantDigits?: number): string; toHexadecimal(significantDigits: number, rounding: Decimal.Rounding): string; toHex(significantDigits?: number): string; toHex(significantDigits: number, rounding?: Decimal.Rounding): string; toJSON(): string; toNearest(n: Decimal.Value, rounding?: Decimal.Rounding): Decimal; toNumber(): number; toOctal(significantDigits?: number): string; toOctal(significantDigits: number, rounding: Decimal.Rounding): string; toPower(n: Decimal.Value): Decimal; pow(n: Decimal.Value): Decimal; toPrecision(significantDigits?: number): string; toPrecision(significantDigits: number, rounding: Decimal.Rounding): string; toSignificantDigits(significantDigits?: number): Decimal; toSignificantDigits(significantDigits: number, rounding: Decimal.Rounding): Decimal; toSD(significantDigits?: number): Decimal; toSD(significantDigits: number, rounding: Decimal.Rounding): Decimal; toString(): string; truncated(): Decimal; trunc(): Decimal; valueOf(): string; static abs(n: Decimal.Value): Decimal; static acos(n: Decimal.Value): Decimal; static acosh(n: Decimal.Value): Decimal; static add(x: Decimal.Value, y: Decimal.Value): Decimal; static asin(n: Decimal.Value): Decimal; static asinh(n: Decimal.Value): Decimal; static atan(n: Decimal.Value): Decimal; static atanh(n: Decimal.Value): Decimal; static atan2(y: Decimal.Value, x: Decimal.Value): Decimal; static cbrt(n: Decimal.Value): Decimal; static ceil(n: Decimal.Value): Decimal; static clamp(n: Decimal.Value, min: Decimal.Value, max: Decimal.Value): Decimal; static clone(object?: Decimal.Config): Decimal.Constructor; static config(object: Decimal.Config): Decimal.Constructor; static cos(n: Decimal.Value): Decimal; static cosh(n: Decimal.Value): Decimal; static div(x: Decimal.Value, y: Decimal.Value): Decimal; static exp(n: Decimal.Value): Decimal; static floor(n: Decimal.Value): Decimal; static hypot(...n: Decimal.Value[]): Decimal; static isDecimal(object: any): object is Decimal; static ln(n: Decimal.Value): Decimal; static log(n: Decimal.Value, base?: Decimal.Value): Decimal; static log2(n: Decimal.Value): Decimal; static log10(n: Decimal.Value): Decimal; static max(...n: Decimal.Value[]): Decimal; static min(...n: Decimal.Value[]): Decimal; static mod(x: Decimal.Value, y: Decimal.Value): Decimal; static mul(x: Decimal.Value, y: Decimal.Value): Decimal; static noConflict(): Decimal.Constructor; // Browser only static pow(base: Decimal.Value, exponent: Decimal.Value): Decimal; static random(significantDigits?: number): Decimal; static round(n: Decimal.Value): Decimal; static set(object: Decimal.Config): Decimal.Constructor; static sign(n: Decimal.Value): number; static sin(n: Decimal.Value): Decimal; static sinh(n: Decimal.Value): Decimal; static sqrt(n: Decimal.Value): Decimal; static sub(x: Decimal.Value, y: Decimal.Value): Decimal; static sum(...n: Decimal.Value[]): Decimal; static tan(n: Decimal.Value): Decimal; static tanh(n: Decimal.Value): Decimal; static trunc(n: Decimal.Value): Decimal; static readonly default?: Decimal.Constructor; static readonly Decimal?: Decimal.Constructor; static readonly precision: number; static readonly rounding: Decimal.Rounding; static readonly toExpNeg: number; static readonly toExpPos: number; static readonly minE: number; static readonly maxE: number; static readonly crypto: boolean; static readonly modulo: Decimal.Modulo; static readonly ROUND_UP: 0; static readonly ROUND_DOWN: 1; static readonly ROUND_CEIL: 2; static readonly ROUND_FLOOR: 3; static readonly ROUND_HALF_UP: 4; static readonly ROUND_HALF_DOWN: 5; static readonly ROUND_HALF_EVEN: 6; static readonly ROUND_HALF_CEIL: 7; static readonly ROUND_HALF_FLOOR: 8; static readonly EUCLID: 9; } /** * Interface for any Decimal.js-like library * Allows us to accept Decimal.js from different * versions and some compatible alternatives */ export declare interface DecimalJsLike { d: number[]; e: number; s: number; toFixed(): string; } export declare type DefaultArgs = InternalArgs<{}, {}, {}, {}>; export declare type DefaultSelection

= UnwrapPayload<{ default: P; }>['default']; export declare function defineDmmfProperty(target: object, runtimeDataModel: RuntimeDataModel): void; declare function defineExtension(ext: ExtensionArgs | ((client: Client) => Client)): (client: Client) => Client; declare const denylist: readonly ["$connect", "$disconnect", "$on", "$transaction", "$use", "$extends"]; export declare type DevTypeMapDef = { meta: { modelProps: string; }; model: { [Model in PropertyKey]: { [Operation in PropertyKey]: DevTypeMapFnDef; }; }; other: { [Operation in PropertyKey]: DevTypeMapFnDef; }; }; export declare type DevTypeMapFnDef = { args: any; result: any; payload: OperationPayload; }; export declare namespace DMMF { export type Document = ReadonlyDeep_2<{ datamodel: Datamodel; schema: Schema; mappings: Mappings; }>; export type Mappings = ReadonlyDeep_2<{ modelOperations: ModelMapping[]; otherOperations: { read: string[]; write: string[]; }; }>; export type OtherOperationMappings = ReadonlyDeep_2<{ read: string[]; write: string[]; }>; export type DatamodelEnum = ReadonlyDeep_2<{ name: string; values: EnumValue[]; dbName?: string | null; documentation?: string; }>; export type SchemaEnum = ReadonlyDeep_2<{ name: string; values: string[]; }>; export type EnumValue = ReadonlyDeep_2<{ name: string; dbName: string | null; }>; export type Datamodel = ReadonlyDeep_2<{ models: Model[]; enums: DatamodelEnum[]; types: Model[]; }>; export type uniqueIndex = ReadonlyDeep_2<{ name: string; fields: string[]; }>; export type PrimaryKey = ReadonlyDeep_2<{ name: string | null; fields: string[]; }>; export type Model = ReadonlyDeep_2<{ name: string; dbName: string | null; fields: Field[]; uniqueFields: string[][]; uniqueIndexes: uniqueIndex[]; documentation?: string; primaryKey: PrimaryKey | null; isGenerated?: boolean; }>; export type FieldKind = 'scalar' | 'object' | 'enum' | 'unsupported'; export type FieldNamespace = 'model' | 'prisma'; export type FieldLocation = 'scalar' | 'inputObjectTypes' | 'outputObjectTypes' | 'enumTypes' | 'fieldRefTypes'; export type Field = ReadonlyDeep_2<{ kind: FieldKind; name: string; isRequired: boolean; isList: boolean; isUnique: boolean; isId: boolean; isReadOnly: boolean; isGenerated?: boolean; isUpdatedAt?: boolean; /** * Describes the data type in the same the way it is defined in the Prisma schema: * BigInt, Boolean, Bytes, DateTime, Decimal, Float, Int, JSON, String, $ModelName */ type: string; dbName?: string | null; hasDefaultValue: boolean; default?: FieldDefault | FieldDefaultScalar | FieldDefaultScalar[]; relationFromFields?: string[]; relationToFields?: string[]; relationOnDelete?: string; relationName?: string; documentation?: string; }>; export type FieldDefault = ReadonlyDeep_2<{ name: string; args: any[]; }>; export type FieldDefaultScalar = string | boolean | number; export type Schema = ReadonlyDeep_2<{ rootQueryType?: string; rootMutationType?: string; inputObjectTypes: { model?: InputType[]; prisma: InputType[]; }; outputObjectTypes: { model: OutputType[]; prisma: OutputType[]; }; enumTypes: { model?: SchemaEnum[]; prisma: SchemaEnum[]; }; fieldRefTypes: { prisma?: FieldRefType[]; }; }>; export type Query = ReadonlyDeep_2<{ name: string; args: SchemaArg[]; output: QueryOutput; }>; export type QueryOutput = ReadonlyDeep_2<{ name: string; isRequired: boolean; isList: boolean; }>; export type TypeRef = { isList: boolean; type: string; location: AllowedLocations; namespace?: FieldNamespace; }; export type InputTypeRef = TypeRef<'scalar' | 'inputObjectTypes' | 'enumTypes' | 'fieldRefTypes'>; export type SchemaArg = ReadonlyDeep_2<{ name: string; comment?: string; isNullable: boolean; isRequired: boolean; inputTypes: InputTypeRef[]; deprecation?: Deprecation; }>; export type OutputType = ReadonlyDeep_2<{ name: string; fields: SchemaField[]; }>; export type SchemaField = ReadonlyDeep_2<{ name: string; isNullable?: boolean; outputType: OutputTypeRef; args: SchemaArg[]; deprecation?: Deprecation; documentation?: string; }>; export type OutputTypeRef = TypeRef<'scalar' | 'outputObjectTypes' | 'enumTypes'>; export type Deprecation = ReadonlyDeep_2<{ sinceVersion: string; reason: string; plannedRemovalVersion?: string; }>; export type InputType = ReadonlyDeep_2<{ name: string; constraints: { maxNumFields: number | null; minNumFields: number | null; fields?: string[]; }; meta?: { source?: string; }; fields: SchemaArg[]; }>; export type FieldRefType = ReadonlyDeep_2<{ name: string; allowTypes: FieldRefAllowType[]; fields: SchemaArg[]; }>; export type FieldRefAllowType = TypeRef<'scalar' | 'enumTypes'>; export type ModelMapping = ReadonlyDeep_2<{ model: string; plural: string; findUnique?: string | null; findUniqueOrThrow?: string | null; findFirst?: string | null; findFirstOrThrow?: string | null; findMany?: string | null; create?: string | null; createMany?: string | null; createManyAndReturn?: string | null; update?: string | null; updateMany?: string | null; upsert?: string | null; delete?: string | null; deleteMany?: string | null; aggregate?: string | null; groupBy?: string | null; count?: string | null; findRaw?: string | null; aggregateRaw?: string | null; }>; export enum ModelAction { findUnique = "findUnique", findUniqueOrThrow = "findUniqueOrThrow", findFirst = "findFirst", findFirstOrThrow = "findFirstOrThrow", findMany = "findMany", create = "create", createMany = "createMany", createManyAndReturn = "createManyAndReturn", update = "update", updateMany = "updateMany", upsert = "upsert", delete = "delete", deleteMany = "deleteMany", groupBy = "groupBy", count = "count",// TODO: count does not actually exist, why? aggregate = "aggregate", findRaw = "findRaw", aggregateRaw = "aggregateRaw" } } export declare interface DriverAdapter extends Queryable { /** * Starts new transaction. */ startTransaction(): Promise>; /** * Optional method that returns extra connection info */ getConnectionInfo?(): Result_4; } /** Client */ export declare type DynamicClientExtensionArgs> = { [P in keyof C_]: unknown; } & { [K: symbol]: { ctx: Optional, ITXClientDenyList> & { $parent: Optional, ITXClientDenyList>; }; }; }; export declare type DynamicClientExtensionThis> = { [P in keyof ExtArgs['client']]: Return; } & { [P in Exclude]: DynamicModelExtensionThis, ExtArgs>; } & { [P in Exclude]: >(...args: ToTuple) => PrismaPromise; } & { [P in Exclude]: DynamicClientExtensionThisBuiltin[P]; } & { [K: symbol]: { types: TypeMap['other']; }; }; export declare type DynamicClientExtensionThisBuiltin> = { $extends: ExtendsHook<'extends', TypeMapCb, ExtArgs>; $transaction

[]>(arg: [...P], options?: { isolationLevel?: TypeMap['meta']['txIsolationLevel']; }): Promise>; $transaction(fn: (client: Omit, ITXClientDenyList>) => Promise, options?: { maxWait?: number; timeout?: number; isolationLevel?: TypeMap['meta']['txIsolationLevel']; }): Promise; $disconnect(): Promise; $connect(): Promise; }; /** Model */ export declare type DynamicModelExtensionArgs> = { [K in keyof M_]: K extends '$allModels' ? { [P in keyof M_[K]]?: unknown; } & { [K: symbol]: {}; } : K extends TypeMap['meta']['modelProps'] ? { [P in keyof M_[K]]?: unknown; } & { [K: symbol]: { ctx: DynamicModelExtensionThis, ExtArgs> & { $parent: DynamicClientExtensionThis; } & { $name: ModelKey; } & { /** * @deprecated Use `$name` instead. */ name: ModelKey; }; }; } : never; }; export declare type DynamicModelExtensionFluentApi = { [K in keyof TypeMap['model'][M]['payload']['objects']]: (args?: Exact>) => PrismaPromise, [K]> | Null> & DynamicModelExtensionFluentApi>; }; export declare type DynamicModelExtensionFnResult> = P extends FluentOperation ? DynamicModelExtensionFluentApi & PrismaPromise | Null> : PrismaPromise>; export declare type DynamicModelExtensionFnResultBase = GetResult; export declare type DynamicModelExtensionFnResultNull

= P extends 'findUnique' | 'findFirst' ? null : never; export declare type DynamicModelExtensionOperationFn = {} extends TypeMap['model'][M]['operations'][P]['args'] ? (args?: Exact) => DynamicModelExtensionFnResult : (args: Exact) => DynamicModelExtensionFnResult; export declare type DynamicModelExtensionThis> = { [P in keyof ExtArgs['model'][Uncapitalize]]: Return][P]>; } & { [P in Exclude]>]: DynamicModelExtensionOperationFn; } & { [P in Exclude<'fields', keyof ExtArgs['model'][Uncapitalize]>]: TypeMap['model'][M]['fields']; } & { [K: symbol]: { types: TypeMap['model'][M]; }; }; /** Query */ export declare type DynamicQueryExtensionArgs = { [K in keyof Q_]: K extends '$allOperations' ? (args: { model?: string; operation: string; args: any; query: (args: any) => PrismaPromise; }) => Promise : K extends '$allModels' ? { [P in keyof Q_[K] | keyof TypeMap['model'][keyof TypeMap['model']]['operations'] | '$allOperations']?: P extends '$allOperations' ? DynamicQueryExtensionCb : P extends keyof TypeMap['model'][keyof TypeMap['model']]['operations'] ? DynamicQueryExtensionCb : never; } : K extends TypeMap['meta']['modelProps'] ? { [P in keyof Q_[K] | keyof TypeMap['model'][ModelKey]['operations'] | '$allOperations']?: P extends '$allOperations' ? DynamicQueryExtensionCb, keyof TypeMap['model'][ModelKey]['operations']> : P extends keyof TypeMap['model'][ModelKey]['operations'] ? DynamicQueryExtensionCb, P> : never; } : K extends keyof TypeMap['other']['operations'] ? DynamicQueryExtensionCb<[TypeMap], 0, 'other', K> : never; }; export declare type DynamicQueryExtensionCb = >(args: A) => Promise; export declare type DynamicQueryExtensionCbArgs = (_1 extends unknown ? _2 extends unknown ? { args: DynamicQueryExtensionCbArgsArgs; model: _0 extends 0 ? undefined : _1; operation: _2; query: >(args: A) => PrismaPromise; } : never : never) & { query: (args: DynamicQueryExtensionCbArgsArgs) => PrismaPromise; }; export declare type DynamicQueryExtensionCbArgsArgs = _2 extends '$queryRaw' | '$executeRaw' ? Sql : TypeMap[_0][_1]['operations'][_2]['args']; /** Result */ export declare type DynamicResultExtensionArgs = { [K in keyof R_]: { [P in keyof R_[K]]?: { needs?: DynamicResultExtensionNeeds, R_[K][P]>; compute(data: DynamicResultExtensionData, R_[K][P]>): any; }; }; }; export declare type DynamicResultExtensionData = GetFindResult; export declare type DynamicResultExtensionNeeds = { [K in keyof S]: K extends keyof TypeMap['model'][M]['payload']['scalars'] ? S[K] : never; } & { [N in keyof TypeMap['model'][M]['payload']['scalars']]?: boolean; }; /** * Placeholder value for "no text". */ export declare const empty: Sql; export declare type EmptyToUnknown = T; declare interface Engine { /** The name of the engine. This is meant to be consumed externally */ readonly name: string; onBeforeExit(callback: () => Promise): void; start(): Promise; stop(): Promise; version(forceRun?: boolean): Promise | string; request(query: JsonQuery, options: RequestOptions_2): Promise>; requestBatch(queries: JsonQuery[], options: RequestBatchOptions): Promise[]>; transaction(action: 'start', headers: Transaction_2.TransactionHeaders, options: Transaction_2.Options): Promise>; transaction(action: 'commit', headers: Transaction_2.TransactionHeaders, info: Transaction_2.InteractiveTransactionInfo): Promise; transaction(action: 'rollback', headers: Transaction_2.TransactionHeaders, info: Transaction_2.InteractiveTransactionInfo): Promise; metrics(options: MetricsOptionsJson): Promise; metrics(options: MetricsOptionsPrometheus): Promise; applyPendingMigrations(): Promise; } declare interface EngineConfig { cwd: string; dirname: string; datamodelPath: string; enableDebugLogs?: boolean; allowTriggerPanic?: boolean; prismaPath?: string; generator?: GeneratorConfig; overrideDatasources: Datasources; showColors?: boolean; logQueries?: boolean; logLevel?: 'info' | 'warn'; env: Record; flags?: string[]; clientVersion: string; engineVersion: string; previewFeatures?: string[]; engineEndpoint?: string; activeProvider?: string; logEmitter: LogEmitter; transactionOptions: Transaction_2.Options; /** * Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-planetscale`. * If set, this is only used in the library engine, and all queries would be performed through it, * rather than Prisma's Rust drivers. * @remarks only used by LibraryEngine.ts */ adapter?: ErrorCapturingDriverAdapter; /** * The contents of the schema encoded into a string * @remarks only used by DataProxyEngine.ts */ inlineSchema: string; /** * The contents of the datasource url saved in a string * @remarks only used by DataProxyEngine.ts */ inlineDatasources: GetPrismaClientConfig['inlineDatasources']; /** * The string hash that was produced for a given schema * @remarks only used by DataProxyEngine.ts */ inlineSchemaHash: string; /** * The helper for interaction with OTEL tracing * @remarks enabling is determined by the client and @prisma/instrumentation package */ tracingHelper: TracingHelper; /** * Information about whether we have not found a schema.prisma file in the * default location, and that we fell back to finding the schema.prisma file * in the current working directory. This usually means it has been bundled. */ isBundled?: boolean; /** * Web Assembly module loading configuration */ engineWasm?: WasmLoadingConfig; /** * Allows Accelerate to use runtime utilities from the client. These are * necessary for the AccelerateEngine to function correctly. */ accelerateUtils?: { resolveDatasourceUrl: typeof resolveDatasourceUrl; getBatchRequestPayload: typeof getBatchRequestPayload; prismaGraphQLToJSError: typeof prismaGraphQLToJSError; PrismaClientUnknownRequestError: typeof PrismaClientUnknownRequestError; PrismaClientInitializationError: typeof PrismaClientInitializationError; PrismaClientKnownRequestError: typeof PrismaClientKnownRequestError; debug: (...args: any[]) => void; engineVersion: string; clientVersion: string; }; } declare type EngineEvent = E extends QueryEventType ? QueryEvent : LogEvent; declare type EngineEventType = QueryEventType | LogEventType; declare type EngineProtocol = 'graphql' | 'json'; declare type EngineSpan = { span: boolean; name: string; trace_id: string; span_id: string; parent_span_id: string; start_time: [number, number]; end_time: [number, number]; attributes?: Record; links?: { trace_id: string; span_id: string; }[]; }; declare type EngineSpanEvent = { span: boolean; spans: EngineSpan[]; }; declare interface EnvValue { fromEnvVar: null | string; value: null | string; } export declare type Equals = (() => T extends A ? 1 : 2) extends (() => T extends B ? 1 : 2) ? 1 : 0; declare type Error_2 = { kind: 'GenericJs'; id: number; } | { kind: 'UnsupportedNativeDataType'; type: string; } | { kind: 'Postgres'; code: string; severity: string; message: string; detail: string | undefined; column: string | undefined; hint: string | undefined; } | { kind: 'Mysql'; code: number; message: string; state: string; } | { kind: 'Sqlite'; /** * Sqlite extended error code: https://www.sqlite.org/rescode.html */ extendedCode: number; message: string; }; declare interface ErrorCapturingDriverAdapter extends DriverAdapter { readonly errorRegistry: ErrorRegistry; } declare type ErrorFormat = 'pretty' | 'colorless' | 'minimal'; declare type ErrorRecord = { error: unknown; }; declare interface ErrorRegistry { consumeError(id: number): ErrorRecord | undefined; } declare interface ErrorWithBatchIndex { batchRequestIdx?: number; } declare type EventCallback = [E] extends ['beforeExit'] ? () => Promise : [E] extends [LogLevel] ? (event: EngineEvent) => void : never; export declare type Exact = (A extends unknown ? (W extends A ? { [K in keyof A]: Exact; } : W) : never) | (A extends Narrowable ? A : never); /** * Defines Exception. * * string or an object with one of (message or name or code) and optional stack */ declare type Exception = ExceptionWithCode | ExceptionWithMessage | ExceptionWithName | string; declare interface ExceptionWithCode { code: string | number; name?: string; message?: string; stack?: string; } declare interface ExceptionWithMessage { code?: string | number; message: string; name?: string; stack?: string; } declare interface ExceptionWithName { code?: string | number; message?: string; name: string; stack?: string; } declare type ExtendedEventType = LogLevel | 'beforeExit'; declare type ExtendedSpanOptions = SpanOptions & { /** The name of the span */ name: string; internal?: boolean; middleware?: boolean; /** Whether it propagates context (?=true) */ active?: boolean; /** The context to append the span to */ context?: Context; }; /** $extends, defineExtension */ export declare interface ExtendsHook, TypeMap extends TypeMapDef = Call> { extArgs: ExtArgs; , MergedArgs extends InternalArgs = MergeExtArgs>(extension: ((client: DynamicClientExtensionThis) => { $extends: { extArgs: Args; }; }) | { name?: string; query?: DynamicQueryExtensionArgs; result?: DynamicResultExtensionArgs & R; model?: DynamicModelExtensionArgs & M; client?: DynamicClientExtensionArgs & C; }): { extends: DynamicClientExtensionThis, TypeMapCb, MergedArgs>; define: (client: any) => { $extends: { extArgs: Args; }; }; }[Variant]; } export declare type ExtensionArgs = Optional; declare namespace Extensions { export { defineExtension, getExtensionContext } } export { Extensions } declare namespace Extensions_2 { export { InternalArgs, DefaultArgs, GetPayloadResult, GetSelect, GetOmit, DynamicQueryExtensionArgs, DynamicQueryExtensionCb, DynamicQueryExtensionCbArgs, DynamicQueryExtensionCbArgsArgs, DynamicResultExtensionArgs, DynamicResultExtensionNeeds, DynamicResultExtensionData, DynamicModelExtensionArgs, DynamicModelExtensionThis, DynamicModelExtensionOperationFn, DynamicModelExtensionFnResult, DynamicModelExtensionFnResultBase, DynamicModelExtensionFluentApi, DynamicModelExtensionFnResultNull, DynamicClientExtensionArgs, DynamicClientExtensionThis, ClientBuiltInProp, DynamicClientExtensionThisBuiltin, ExtendsHook, MergeExtArgs, AllModelsToStringIndex, TypeMapDef, DevTypeMapDef, DevTypeMapFnDef, TypeMapCbDef, ModelKey, RequiredExtensionArgs as UserArgs } } declare type Fetch = typeof nodeFetch; /** * A reference to a specific field of a specific model */ export declare interface FieldRef { readonly modelName: Model; readonly name: string; readonly typeName: FieldType; readonly isList: boolean; } export declare type FluentOperation = 'findUnique' | 'findUniqueOrThrow' | 'findFirst' | 'findFirstOrThrow' | 'create' | 'update' | 'upsert' | 'delete'; export declare interface Fn { params: Params; returns: Returns; } declare interface GeneratorConfig { name: string; output: EnvValue | null; isCustomOutput?: boolean; provider: EnvValue; config: { /** `output` is a reserved name and will only be available directly at `generator.output` */ output?: never; /** `provider` is a reserved name and will only be available directly at `generator.provider` */ provider?: never; /** `binaryTargets` is a reserved name and will only be available directly at `generator.binaryTargets` */ binaryTargets?: never; /** `previewFeatures` is a reserved name and will only be available directly at `generator.previewFeatures` */ previewFeatures?: never; } & { [key: string]: string | string[] | undefined; }; binaryTargets: BinaryTargetsEnvValue[]; previewFeatures: string[]; } export declare type GetAggregateResult

= { [K in keyof A as K extends Aggregate ? K : never]: K extends '_count' ? A[K] extends true ? number : Count : { [J in keyof A[K] & string]: P['scalars'][J] | null; }; }; declare function getBatchRequestPayload(batch: JsonQuery[], transaction?: TransactionOptions_2): QueryEngineBatchRequest; export declare type GetBatchResult = { count: number; }; export declare type GetCountResult = A extends { select: infer S; } ? (S extends true ? number : Count) : number; declare function getExtensionContext(that: T): Context_2; export declare type GetFindResult

= A extends { omit: infer Omission; } ? Compute, TrueKeys>> : GetSelectIncludeResult; export declare type GetGroupByResult

= A extends { by: string[]; } ? Array & { [K in A['by'][number]]: P['scalars'][K]; }> : A extends { by: string; } ? Array & { [K in A['by']]: P['scalars'][K]; }> : {}[]; export declare type GetOmit = { [K in (string extends keyof R ? never : keyof R) | BaseKeys]?: boolean; }; export declare type GetPayloadResult, R extends InternalArgs['result'][string], KR extends keyof R = string extends keyof R ? never : keyof R> = unknown extends R ? Base : { [K in KR | keyof Base]: K extends KR ? R[K] extends () => { compute: (...args: any) => infer C; } ? C : never : Base[K]; }; export declare function getPrismaClient(config: GetPrismaClientConfig): { new (optionsArg?: PrismaClientOptions): { _originalClient: any; _runtimeDataModel: RuntimeDataModel; _requestHandler: RequestHandler; _connectionPromise?: Promise | undefined; _disconnectionPromise?: Promise | undefined; _engineConfig: EngineConfig; _accelerateEngineConfig: AccelerateEngineConfig; _clientVersion: string; _errorFormat: ErrorFormat; _tracingHelper: TracingHelper; _metrics: MetricsClient; _middlewares: MiddlewareHandler; _previewFeatures: string[]; _activeProvider: string; _extensions: MergedExtensionsList; _engine: Engine; /** * A fully constructed/applied Client that references the parent * PrismaClient. This is used for Client extensions only. */ _appliedParent: any; _createPrismaPromise: PrismaPromiseFactory; /** * Hook a middleware into the client * @param middleware to hook */ $use(middleware: QueryMiddleware): void; $on(eventType: E, callback: EventCallback): void; $connect(): Promise; /** * Disconnect from the database */ $disconnect(): Promise; /** * Executes a raw query and always returns a number */ $executeRawInternal(transaction: PrismaPromiseTransaction | undefined, clientMethod: string, args: RawQueryArgs, middlewareArgsMapper?: MiddlewareArgsMapper): Promise; /** * Executes a raw query provided through a safe tag function * @see https://github.com/prisma/prisma/issues/7142 * * @param query * @param values * @returns */ $executeRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise_2; /** * Unsafe counterpart of `$executeRaw` that is susceptible to SQL injections * @see https://github.com/prisma/prisma/issues/7142 * * @param query * @param values * @returns */ $executeRawUnsafe(query: string, ...values: RawValue[]): PrismaPromise_2; /** * Executes a raw command only for MongoDB * * @param command * @returns */ $runCommandRaw(command: Record): PrismaPromise_2; /** * Executes a raw query and returns selected data */ $queryRawInternal(transaction: PrismaPromiseTransaction | undefined, clientMethod: string, args: RawQueryArgs, middlewareArgsMapper?: MiddlewareArgsMapper): Promise; /** * Executes a raw query provided through a safe tag function * @see https://github.com/prisma/prisma/issues/7142 * * @param query * @param values * @returns */ $queryRaw(query: TemplateStringsArray | Sql, ...values: any[]): PrismaPromise_2; /** * Unsafe counterpart of `$queryRaw` that is susceptible to SQL injections * @see https://github.com/prisma/prisma/issues/7142 * * @param query * @param values * @returns */ $queryRawUnsafe(query: string, ...values: RawValue[]): PrismaPromise_2; /** * Execute a batch of requests in a transaction * @param requests * @param options */ _transactionWithArray({ promises, options, }: { promises: Array>; options?: BatchTransactionOptions; }): Promise; /** * Perform a long-running transaction * @param callback * @param options * @returns */ _transactionWithCallback({ callback, options, }: { callback: (client: Client) => Promise; options?: Options; }): Promise; _createItxClient(transaction: PrismaPromiseInteractiveTransaction): Client; /** * Execute queries within a transaction * @param input a callback or a query list * @param options to set timeouts (callback) * @returns */ $transaction(input: any, options?: any): Promise; /** * Runs the middlewares over params before executing a request * @param internalParams * @returns */ _request(internalParams: InternalRequestParams): Promise; _executeRequest({ args, clientMethod, dataPath, callsite, action, model, argsMapper, transaction, unpacker, otelParentCtx, customDataProxyFetch, }: InternalRequestParams): Promise; readonly $metrics: MetricsClient; /** * Shortcut for checking a preview flag * @param feature preview flag * @returns */ _hasPreviewFlag(feature: string): boolean; $applyPendingMigrations(): Promise; $extends: typeof $extends; readonly [Symbol.toStringTag]: string; }; }; /** * Config that is stored into the generated client. When the generated client is * loaded, this same config is passed to {@link getPrismaClient} which creates a * closure with that config around a non-instantiated [[PrismaClient]]. */ declare type GetPrismaClientConfig = { runtimeDataModel: RuntimeDataModel; generator?: GeneratorConfig; relativeEnvPaths: { rootEnvPath?: string | null; schemaEnvPath?: string | null; }; relativePath: string; dirname: string; filename?: string; clientVersion: string; engineVersion: string; datasourceNames: string[]; activeProvider: string; /** * The contents of the schema encoded into a string * @remarks only used for the purpose of data proxy */ inlineSchema: string; /** * A special env object just for the data proxy edge runtime. * Allows bundlers to inject their own env variables (Vercel). * Allows platforms to declare global variables as env (Workers). * @remarks only used for the purpose of data proxy */ injectableEdgeEnv?: () => LoadedEnv; /** * The contents of the datasource url saved in a string. * This can either be an env var name or connection string. * It is needed by the client to connect to the Data Proxy. * @remarks only used for the purpose of data proxy */ inlineDatasources: { [name in string]: { url: EnvValue; }; }; /** * The string hash that was produced for a given schema * @remarks only used for the purpose of data proxy */ inlineSchemaHash: string; /** * A marker to indicate that the client was not generated via `prisma * generate` but was generated via `generate --postinstall` script instead. * @remarks used to error for Vercel/Netlify for schema caching issues */ postinstall?: boolean; /** * Information about the CI where the Prisma Client has been generated. The * name of the CI environment is stored at generation time because CI * information is not always available at runtime. Moreover, the edge client * has no notion of environment variables, so this works around that. * @remarks used to error for Vercel/Netlify for schema caching issues */ ciName?: string; /** * Information about whether we have not found a schema.prisma file in the * default location, and that we fell back to finding the schema.prisma file * in the current working directory. This usually means it has been bundled. */ isBundled?: boolean; /** * A boolean that is `false` when the client was generated with --no-engine. At * runtime, this means the client will be bound to be using the Data Proxy. */ copyEngine?: boolean; /** * Optional wasm loading configuration */ engineWasm?: WasmLoadingConfig; }; export declare type GetResult

= { findUnique: GetFindResult | null; findUniqueOrThrow: GetFindResult; findFirst: GetFindResult | null; findFirstOrThrow: GetFindResult; findMany: GetFindResult[]; create: GetFindResult; createMany: GetBatchResult; createManyAndReturn: GetFindResult[]; update: GetFindResult; updateMany: GetBatchResult; upsert: GetFindResult; delete: GetFindResult; deleteMany: GetBatchResult; aggregate: GetAggregateResult; count: GetCountResult; groupBy: GetGroupByResult; $queryRaw: unknown; $executeRaw: number; $queryRawUnsafe: unknown; $executeRawUnsafe: number; $runCommandRaw: JsonObject; findRaw: JsonObject; aggregateRaw: JsonObject; }[O]; export declare function getRuntime(): GetRuntimeOutput; declare type GetRuntimeOutput = { id: Runtime; prettyName: string; isEdge: boolean; }; export declare type GetSelect, R extends InternalArgs['result'][string], KR extends keyof R = string extends keyof R ? never : keyof R> = { [K in KR | keyof Base]?: K extends KR ? boolean : Base[K]; }; export declare type GetSelectIncludeResult

= Equals extends 1 ? DefaultSelection

: A extends { select: infer S extends object; } & Record | { include: infer I extends object; } & Record ? { [K in keyof S | keyof I as (S & I)[K] extends false | undefined | null ? never : K]: (S & I)[K] extends object ? P extends SelectablePayloadFields ? O extends OperationPayload ? GetFindResult[] : never : P extends SelectablePayloadFields ? O extends OperationPayload ? GetFindResult | SelectField & null : never : K extends '_count' ? Count> : never : P extends SelectablePayloadFields ? O extends OperationPayload ? DefaultSelection[] : never : P extends SelectablePayloadFields ? O extends OperationPayload ? DefaultSelection | SelectField & null : never : P extends { scalars: { [k in K]: infer O; }; } ? O : K extends '_count' ? Count : never; } & (A extends { include: any; } & Record ? DefaultSelection

: unknown) : DefaultSelection

; declare type HandleErrorParams = { args: JsArgs; error: any; clientMethod: string; callsite?: CallSite; transaction?: PrismaPromiseTransaction; modelName?: string; }; /** * Defines High-Resolution Time. * * The first number, HrTime[0], is UNIX Epoch time in seconds since 00:00:00 UTC on 1 January 1970. * The second number, HrTime[1], represents the partial second elapsed since Unix Epoch time represented by first number in nanoseconds. * For example, 2021-01-01T12:30:10.150Z in UNIX Epoch time in milliseconds is represented as 1609504210150. * The first number is calculated by converting and truncating the Epoch time in milliseconds to seconds: * HrTime[0] = Math.trunc(1609504210150 / 1000) = 1609504210. * The second number is calculated by converting the digits after the decimal point of the subtraction, (1609504210150 / 1000) - HrTime[0], to nanoseconds: * HrTime[1] = Number((1609504210.150 - HrTime[0]).toFixed(9)) * 1e9 = 150000000. * This is represented in HrTime format as [1609504210, 150000000]. */ declare type HrTime = [number, number]; declare type InteractiveTransactionInfo = { /** * Transaction ID returned by the query engine. */ id: string; /** * Arbitrary payload the meaning of which depends on the `Engine` implementation. * For example, `DataProxyEngine` needs to associate different API endpoints with transactions. * In `LibraryEngine` and `BinaryEngine` it is currently not used. */ payload: Payload; }; declare type InteractiveTransactionOptions = Transaction_2.InteractiveTransactionInfo; export declare type InternalArgs = { result: { [K in keyof R]: { [P in keyof R[K]]: () => R[K][P]; }; }; model: { [K in keyof M]: { [P in keyof M[K]]: () => M[K][P]; }; }; query: { [K in keyof Q]: { [P in keyof Q[K]]: () => Q[K][P]; }; }; client: { [K in keyof C]: () => C[K]; }; }; declare type InternalRequestParams = { /** * The original client method being called. * Even though the rootField / operation can be changed, * this method stays as it is, as it's what the user's * code looks like */ clientMethod: string; /** * Name of js model that triggered the request. Might be used * for warnings or error messages */ jsModelName?: string; callsite?: CallSite; transaction?: PrismaPromiseTransaction; unpacker?: Unpacker; otelParentCtx?: Context; /** Used to "desugar" a user input into an "expanded" one */ argsMapper?: (args?: UserArgs_2) => UserArgs_2; /** Used to convert args for middleware and back */ middlewareArgsMapper?: MiddlewareArgsMapper; /** Used for Accelerate client extension via Data Proxy */ customDataProxyFetch?: (fetch: Fetch) => Fetch; } & Omit; declare enum IsolationLevel { ReadUncommitted = "ReadUncommitted", ReadCommitted = "ReadCommitted", RepeatableRead = "RepeatableRead", Snapshot = "Snapshot", Serializable = "Serializable" } export declare type ITXClientDenyList = (typeof denylist)[number]; export declare const itxClientDenyList: readonly (string | symbol)[]; declare interface Job { resolve: (data: any) => void; reject: (data: any) => void; request: any; } /** * Create a SQL query for a list of values. */ export declare function join(values: readonly RawValue[], separator?: string, prefix?: string, suffix?: string): Sql; export declare type JsArgs = { select?: Selection_2; include?: Selection_2; omit?: Omission; [argName: string]: JsInputValue; }; export declare type JsInputValue = null | undefined | string | number | boolean | bigint | Uint8Array | Date | DecimalJsLike | ObjectEnumValue | RawParameters | JsonConvertible | FieldRef | JsInputValue[] | { [key: string]: JsInputValue; }; declare type JsonArgumentValue = number | string | boolean | null | RawTaggedValue | JsonArgumentValue[] | { [key: string]: JsonArgumentValue; }; export declare interface JsonArray extends Array { } declare type JsonBatchQuery = { batch: JsonQuery[]; transaction?: { isolationLevel?: Transaction_2.IsolationLevel; }; }; export declare interface JsonConvertible { toJSON(): unknown; } declare type JsonFieldSelection = { arguments?: Record | RawTaggedValue; selection: JsonSelectionSet; }; declare class JsonNull extends NullTypesEnumValue { } export declare type JsonObject = { [Key in string]?: JsonValue; }; declare type JsonQuery = { modelName?: string; action: JsonQueryAction; query: JsonFieldSelection; }; declare type JsonQueryAction = 'findUnique' | 'findUniqueOrThrow' | 'findFirst' | 'findFirstOrThrow' | 'findMany' | 'createOne' | 'createMany' | 'createManyAndReturn' | 'updateOne' | 'updateMany' | 'deleteOne' | 'deleteMany' | 'upsertOne' | 'aggregate' | 'groupBy' | 'executeRaw' | 'queryRaw' | 'runCommandRaw' | 'findRaw' | 'aggregateRaw'; declare type JsonSelectionSet = { $scalars?: boolean; $composites?: boolean; } & { [fieldName: string]: boolean | JsonFieldSelection; }; export declare type JsonValue = string | number | boolean | JsonObject | JsonArray | null; export declare type JsOutputValue = null | string | number | boolean | bigint | Uint8Array | Date | Decimal | JsOutputValue[] | { [key: string]: JsOutputValue; }; export declare type JsPromise = Promise & {}; declare type KnownErrorParams = { code: string; clientVersion: string; meta?: Record; batchRequestIdx?: number; }; /** * A pointer from the current {@link Span} to another span in the same trace or * in a different trace. * Few examples of Link usage. * 1. Batch Processing: A batch of elements may contain elements associated * with one or more traces/spans. Since there can only be one parent * SpanContext, Link is used to keep reference to SpanContext of all * elements in the batch. * 2. Public Endpoint: A SpanContext in incoming client request on a public * endpoint is untrusted from service provider perspective. In such case it * is advisable to start a new trace with appropriate sampling decision. * However, it is desirable to associate incoming SpanContext to new trace * initiated on service provider side so two traces (from Client and from * Service Provider) can be correlated. */ declare interface Link { /** The {@link SpanContext} of a linked span. */ context: SpanContext; /** A set of {@link SpanAttributes} on the link. */ attributes?: SpanAttributes; /** Count of attributes of the link that were dropped due to collection limits */ droppedAttributesCount?: number; } declare type LoadedEnv = { message?: string; parsed: { [x: string]: string; }; } | undefined; declare type LocationInFile = { fileName: string; lineNumber: number | null; columnNumber: number | null; }; declare type LogDefinition = { level: LogLevel; emit: 'stdout' | 'event'; }; /** * Typings for the events we emit. * * @remarks * If this is updated, our edge runtime shim needs to be updated as well. */ declare type LogEmitter = { on(event: E, listener: (event: EngineEvent) => void): LogEmitter; emit(event: QueryEventType, payload: QueryEvent): boolean; emit(event: LogEventType, payload: LogEvent): boolean; }; declare type LogEvent = { timestamp: Date; message: string; target: string; }; declare type LogEventType = 'info' | 'warn' | 'error'; declare type LogLevel = 'info' | 'query' | 'warn' | 'error'; /** * Generates more strict variant of an enum which, unlike regular enum, * throws on non-existing property access. This can be useful in following situations: * - we have an API, that accepts both `undefined` and `SomeEnumType` as an input * - enum values are generated dynamically from DMMF. * * In that case, if using normal enums and no compile-time typechecking, using non-existing property * will result in `undefined` value being used, which will be accepted. Using strict enum * in this case will help to have a runtime exception, telling you that you are probably doing something wrong. * * Note: if you need to check for existence of a value in the enum you can still use either * `in` operator or `hasOwnProperty` function. * * @param definition * @returns */ export declare function makeStrictEnum>(definition: T): T; /** * Class that holds the list of all extensions, applied to particular instance, * as well as resolved versions of the components that need to apply on * different levels. Main idea of this class: avoid re-resolving as much of the * stuff as possible when new extensions are added while also delaying the * resolve until the point it is actually needed. For example, computed fields * of the model won't be resolved unless the model is actually queried. Neither * adding extensions with `client` component only cause other components to * recompute. */ declare class MergedExtensionsList { private head?; private constructor(); static empty(): MergedExtensionsList; static single(extension: ExtensionArgs): MergedExtensionsList; isEmpty(): boolean; append(extension: ExtensionArgs): MergedExtensionsList; getAllComputedFields(dmmfModelName: string): ComputedFieldsMap | undefined; getAllClientExtensions(): ClientArg | undefined; getAllModelExtensions(dmmfModelName: string): ModelArg | undefined; getAllQueryCallbacks(jsModelName: string, operation: string): any; getAllBatchQueryCallbacks(): BatchQueryOptionsCb[]; } export declare type MergeExtArgs, Args extends Record> = ComputeDeep & AllModelsToStringIndex>; export declare type Metric = { key: string; value: T; labels: Record; description: string; }; export declare type MetricHistogram = { buckets: MetricHistogramBucket[]; sum: number; count: number; }; export declare type MetricHistogramBucket = [maxValue: number, count: number]; export declare type Metrics = { counters: Metric[]; gauges: Metric[]; histograms: Metric[]; }; export declare class MetricsClient { private _engine; constructor(engine: Engine); /** * Returns all metrics gathered up to this point in prometheus format. * Result of this call can be exposed directly to prometheus scraping endpoint * * @param options * @returns */ prometheus(options?: MetricsOptions): Promise; /** * Returns all metrics gathered up to this point in prometheus format. * * @param options * @returns */ json(options?: MetricsOptions): Promise; } declare type MetricsOptions = { /** * Labels to add to every metrics in key-value format */ globalLabels?: Record; }; declare type MetricsOptionsCommon = { globalLabels?: Record; }; declare type MetricsOptionsJson = { format: 'json'; } & MetricsOptionsCommon; declare type MetricsOptionsPrometheus = { format: 'prometheus'; } & MetricsOptionsCommon; declare type MiddlewareArgsMapper = { requestArgsToMiddlewareArgs(requestArgs: RequestArgs): MiddlewareArgs; middlewareArgsToRequestArgs(middlewareArgs: MiddlewareArgs): RequestArgs; }; declare class MiddlewareHandler { private _middlewares; use(middleware: M): void; get(id: number): M | undefined; has(id: number): boolean; length(): number; } export declare type ModelArg = { [MethodName in string]: unknown; }; export declare type ModelArgs = { model: { [ModelName in string]: ModelArg; }; }; export declare type ModelKey = M extends keyof TypeMap['model'] ? M : Capitalize; export declare type ModelQueryOptionsCb = (args: ModelQueryOptionsCbArgs) => Promise; export declare type ModelQueryOptionsCbArgs = { model: string; operation: string; args: JsArgs; query: (args: JsArgs) => Promise; }; export declare type NameArgs = { name?: string; }; export declare type Narrow = { [K in keyof A]: A[K] extends Function ? A[K] : Narrow; } | (A extends Narrowable ? A : never); export declare type Narrowable = string | number | bigint | boolean | []; export declare type NeverToUnknown = [T] extends [never] ? unknown : T; /** * Imitates `fetch` via `https` to only suit our needs, it does nothing more. * This is because we cannot bundle `node-fetch` as it uses many other Node.js * utilities, while also bloating our bundles. This approach is much leaner. * @param url * @param options * @returns */ declare function nodeFetch(url: string, options?: RequestOptions): Promise; declare class NodeHeaders { readonly headers: Map; constructor(init?: Record); append(name: string, value: string): void; delete(name: string): void; get(name: string): string | null; has(name: string): boolean; set(name: string, value: string): void; forEach(callbackfn: (value: string, key: string, parent: this) => void, thisArg?: any): void; } /** * @deprecated Please don´t rely on type checks to this error anymore. * This will become a regular `PrismaClientKnownRequestError` with code `P2025` * in the future major version of the client. * Instead of `error instanceof Prisma.NotFoundError` use `error.code === "P2025"`. */ export declare class NotFoundError extends PrismaClientKnownRequestError { constructor(message: string, clientVersion: string); } declare class NullTypesEnumValue extends ObjectEnumValue { _getNamespace(): string; } /** * List of Prisma enums that must use unique objects instead of strings as their values. */ export declare const objectEnumNames: string[]; /** * Base class for unique values of object-valued enums. */ export declare abstract class ObjectEnumValue { constructor(arg?: symbol); abstract _getNamespace(): string; _getName(): string; toString(): string; } export declare const objectEnumValues: { classes: { DbNull: typeof DbNull; JsonNull: typeof JsonNull; AnyNull: typeof AnyNull; }; instances: { DbNull: DbNull; JsonNull: JsonNull; AnyNull: AnyNull; }; }; declare const officialPrismaAdapters: readonly ["@prisma/adapter-planetscale", "@prisma/adapter-neon", "@prisma/adapter-libsql", "@prisma/adapter-d1", "@prisma/adapter-pg", "@prisma/adapter-pg-worker"]; export declare type Omission = Record; declare type Omit_2 = { [P in keyof T as P extends K ? never : P]: T[P]; }; export { Omit_2 as Omit } export declare type Operation = 'findFirst' | 'findFirstOrThrow' | 'findUnique' | 'findUniqueOrThrow' | 'findMany' | 'create' | 'createMany' | 'createManyAndReturn' | 'update' | 'updateMany' | 'upsert' | 'delete' | 'deleteMany' | 'aggregate' | 'count' | 'groupBy' | '$queryRaw' | '$executeRaw' | '$queryRawUnsafe' | '$executeRawUnsafe' | 'findRaw' | 'aggregateRaw' | '$runCommandRaw'; export declare type OperationPayload = { scalars: { [ScalarName in string]: unknown; }; objects: { [ObjectName in string]: unknown; }; composites: { [CompositeName in string]: unknown; }; }; export declare type Optional = { [P in K & keyof O]?: O[P]; } & { [P in Exclude]: O[P]; }; export declare type OptionalFlat = { [K in keyof T]?: T[K]; }; export declare type OptionalKeys = { [K in keyof O]-?: {} extends Pick_2 ? K : never; }[keyof O]; declare type Options = { maxWait?: number; timeout?: number; isolationLevel?: IsolationLevel; }; declare type Options_2 = { clientVersion: string; }; export declare type Or = { 0: { 0: 0; 1: 1; }; 1: { 0: 1; 1: 1; }; }[A][B]; export declare type PatchFlat = O1 & Omit_2; export declare type Path = O extends unknown ? P extends [infer K, ...infer R] ? K extends keyof O ? Path : Default : O : never; export declare type Payload = T extends { [K: symbol]: { types: { payload: any; }; }; } ? T[symbol]['types']['payload'] : any; export declare type PayloadToResult = RenameAndNestPayloadKeys

> = { [K in keyof O]?: O[K][K] extends any[] ? PayloadToResult[] : O[K][K] extends object ? PayloadToResult : O[K][K]; }; declare type Pick_2 = { [P in keyof T as P extends K ? P : never]: T[P]; }; export { Pick_2 as Pick } export declare class PrismaClientInitializationError extends Error { clientVersion: string; errorCode?: string; retryable?: boolean; constructor(message: string, clientVersion: string, errorCode?: string); get [Symbol.toStringTag](): string; } export declare class PrismaClientKnownRequestError extends Error implements ErrorWithBatchIndex { code: string; meta?: Record; clientVersion: string; batchRequestIdx?: number; constructor(message: string, { code, clientVersion, meta, batchRequestIdx }: KnownErrorParams); get [Symbol.toStringTag](): string; } export declare type PrismaClientOptions = { /** * Overwrites the primary datasource url from your schema.prisma file */ datasourceUrl?: string; /** * Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-planetscale. */ adapter?: DriverAdapter | null; /** * Overwrites the datasource url from your schema.prisma file */ datasources?: Datasources; /** * @default "colorless" */ errorFormat?: ErrorFormat; /** * The default values for Transaction options * maxWait ?= 2000 * timeout ?= 5000 */ transactionOptions?: Transaction_2.Options; /** * @example * \`\`\` * // Defaults to stdout * log: ['query', 'info', 'warn'] * * // Emit as events * log: [ * { emit: 'stdout', level: 'query' }, * { emit: 'stdout', level: 'info' }, * { emit: 'stdout', level: 'warn' } * ] * \`\`\` * Read more in our [docs](https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/logging#the-log-option). */ log?: Array; /** * @internal * You probably don't want to use this. \`__internal\` is used by internal tooling. */ __internal?: { debug?: boolean; engine?: { cwd?: string; binaryPath?: string; endpoint?: string; allowTriggerPanic?: boolean; }; /** This can be used for testing purposes */ configOverride?: (config: GetPrismaClientConfig) => GetPrismaClientConfig; }; }; export declare class PrismaClientRustPanicError extends Error { clientVersion: string; constructor(message: string, clientVersion: string); get [Symbol.toStringTag](): string; } export declare class PrismaClientUnknownRequestError extends Error implements ErrorWithBatchIndex { clientVersion: string; batchRequestIdx?: number; constructor(message: string, { clientVersion, batchRequestIdx }: UnknownErrorParams); get [Symbol.toStringTag](): string; } export declare class PrismaClientValidationError extends Error { name: string; clientVersion: string; constructor(message: string, { clientVersion }: Options_2); get [Symbol.toStringTag](): string; } declare function prismaGraphQLToJSError({ error, user_facing_error }: RequestError, clientVersion: string, activeProvider: string): PrismaClientKnownRequestError | PrismaClientUnknownRequestError; export declare interface PrismaPromise extends Promise { [Symbol.toStringTag]: 'PrismaPromise'; } /** * Prisma's `Promise` that is backwards-compatible. All additions on top of the * original `Promise` are optional so that it can be backwards-compatible. * @see [[createPrismaPromise]] */ declare interface PrismaPromise_2 extends Promise { /** * Extension of the original `.then` function * @param onfulfilled same as regular promises * @param onrejected same as regular promises * @param transaction transaction options */ then(onfulfilled?: (value: A) => R1 | PromiseLike, onrejected?: (error: unknown) => R2 | PromiseLike, transaction?: PrismaPromiseTransaction): Promise; /** * Extension of the original `.catch` function * @param onrejected same as regular promises * @param transaction transaction options */ catch(onrejected?: ((reason: any) => R | PromiseLike) | undefined | null, transaction?: PrismaPromiseTransaction): Promise; /** * Extension of the original `.finally` function * @param onfinally same as regular promises * @param transaction transaction options */ finally(onfinally?: (() => void) | undefined | null, transaction?: PrismaPromiseTransaction): Promise; /** * Called when executing a batch of regular tx * @param transaction transaction options for batch tx */ requestTransaction?(transaction: PrismaPromiseBatchTransaction): PromiseLike; } declare type PrismaPromiseBatchTransaction = { kind: 'batch'; id: number; isolationLevel?: IsolationLevel; index: number; lock: PromiseLike; }; declare type PrismaPromiseCallback = (transaction?: PrismaPromiseTransaction) => PrismaPromise_2; /** * Creates a [[PrismaPromise]]. It is Prisma's implementation of `Promise` which * is essentially a proxy for `Promise`. All the transaction-compatible client * methods return one, this allows for pre-preparing queries without executing * them until `.then` is called. It's the foundation of Prisma's query batching. * @param callback that will be wrapped within our promise implementation * @see [[PrismaPromise]] * @returns */ declare type PrismaPromiseFactory = (callback: PrismaPromiseCallback) => PrismaPromise_2; declare type PrismaPromiseInteractiveTransaction = { kind: 'itx'; id: string; payload: PayloadType; }; declare type PrismaPromiseTransaction = PrismaPromiseBatchTransaction | PrismaPromiseInteractiveTransaction; declare namespace Public { export { validator } } export { Public } declare namespace Public_2 { export { Args, Result, Payload, PrismaPromise, Operation, Exact } } declare type Query = { sql: string; args: Array; }; declare interface Queryable { readonly provider: 'mysql' | 'postgres' | 'sqlite'; readonly adapterName: (typeof officialPrismaAdapters)[number] | (string & {}); /** * Execute a query given as SQL, interpolating the given parameters, * and returning the type-aware result set of the query. * * This is the preferred way of executing `SELECT` queries. */ queryRaw(params: Query): Promise>; /** * Execute a query given as SQL, interpolating the given parameters, * and returning the number of affected rows. * * This is the preferred way of executing `INSERT`, `UPDATE`, `DELETE` queries, * as well as transactional queries. */ executeRaw(params: Query): Promise>; } declare type QueryEngineBatchGraphQLRequest = { batch: QueryEngineRequest[]; transaction?: boolean; isolationLevel?: Transaction_2.IsolationLevel; }; declare type QueryEngineBatchRequest = QueryEngineBatchGraphQLRequest | JsonBatchQuery; declare type QueryEngineConfig = { datamodel: string; configDir: string; logQueries: boolean; ignoreEnvVarErrors: boolean; datasourceOverrides: Record; env: Record; logLevel: QueryEngineLogLevel; telemetry?: QueryEngineTelemetry; engineProtocol: EngineProtocol; }; declare interface QueryEngineConstructor { new (config: QueryEngineConfig, logger: (log: string) => void, adapter?: ErrorCapturingDriverAdapter): QueryEngineInstance; } declare type QueryEngineInstance = { connect(headers: string): Promise; disconnect(headers: string): Promise; /** * @param requestStr JSON.stringified `QueryEngineRequest | QueryEngineBatchRequest` * @param headersStr JSON.stringified `QueryEngineRequestHeaders` */ query(requestStr: string, headersStr: string, transactionId?: string): Promise; sdlSchema(): Promise; dmmf(traceparent: string): Promise; startTransaction(options: string, traceHeaders: string): Promise; commitTransaction(id: string, traceHeaders: string): Promise; rollbackTransaction(id: string, traceHeaders: string): Promise; metrics(options: string): Promise; applyPendingMigrations(): Promise; }; declare type QueryEngineLogLevel = 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'off'; declare type QueryEngineRequest = { query: string; variables: Object; }; declare type QueryEngineResult = { data: T; elapsed: number; }; declare type QueryEngineTelemetry = { enabled: Boolean; endpoint: string; }; declare type QueryEvent = { timestamp: Date; query: string; params: string; duration: number; target: string; }; declare type QueryEventType = 'query'; declare type QueryMiddleware = (params: QueryMiddlewareParams, next: (params: QueryMiddlewareParams) => Promise) => Promise; declare type QueryMiddlewareParams = { /** The model this is executed on */ model?: string; /** The action that is being handled */ action: Action; /** TODO what is this */ dataPath: string[]; /** TODO what is this */ runInTransaction: boolean; args?: UserArgs_2; }; export declare type QueryOptions = { query: { [ModelName in string]: { [ModelAction in string]: ModelQueryOptionsCb; } | QueryOptionsCb; }; }; export declare type QueryOptionsCb = (args: QueryOptionsCbArgs) => Promise; export declare type QueryOptionsCbArgs = { model?: string; operation: string; args: JsArgs | RawQueryArgs; query: (args: JsArgs | RawQueryArgs) => Promise; }; /** * Create raw SQL statement. */ export declare function raw(value: string): Sql; export declare type RawParameters = { __prismaRawParameters__: true; values: string; }; export declare type RawQueryArgs = Sql | [query: string, ...values: RawValue[]]; declare type RawTaggedValue = { $type: 'Raw'; value: unknown; }; /** * Supported value or SQL instance. */ export declare type RawValue = Value | Sql; export declare type ReadonlyDeep = { readonly [K in keyof T]: ReadonlyDeep; }; declare type ReadonlyDeep_2 = { +readonly [K in keyof O]: ReadonlyDeep_2; }; declare type Record_2 = { [P in T]: U; }; export { Record_2 as Record } export declare type RenameAndNestPayloadKeys

= { [K in keyof P as K extends 'scalars' | 'objects' | 'composites' ? keyof P[K] : never]: P[K]; }; declare type RequestBatchOptions = { transaction?: TransactionOptions_2; traceparent?: string; numTry?: number; containsWrite: boolean; customDataProxyFetch?: (fetch: Fetch) => Fetch; }; declare interface RequestError { error: string; user_facing_error: { is_panic: boolean; message: string; meta?: Record; error_code?: string; batch_request_idx?: number; }; } declare class RequestHandler { client: Client; dataloader: DataLoader; private logEmitter?; constructor(client: Client, logEmitter?: LogEmitter); request(params: RequestParams): Promise; mapQueryEngineResult({ dataPath, unpacker }: RequestParams, response: QueryEngineResult): any; /** * Handles the error and logs it, logging the error is done synchronously waiting for the event * handlers to finish. */ handleAndLogRequestError(params: HandleErrorParams): never; handleRequestError({ error, clientMethod, callsite, transaction, args, modelName }: HandleErrorParams): never; sanitizeMessage(message: any): any; unpack(data: unknown, dataPath: string[], unpacker?: Unpacker): any; get [Symbol.toStringTag](): string; } declare type RequestOptions = { method?: string; headers?: Record; body?: string; }; declare type RequestOptions_2 = { traceparent?: string; numTry?: number; interactiveTransaction?: InteractiveTransactionOptions; isWrite: boolean; customDataProxyFetch?: (fetch: Fetch) => Fetch; }; declare type RequestParams = { modelName?: string; action: Action; protocolQuery: JsonQuery; dataPath: string[]; clientMethod: string; callsite?: CallSite; transaction?: PrismaPromiseTransaction; extensions: MergedExtensionsList; args?: any; headers?: Record; unpacker?: Unpacker; otelParentCtx?: Context; otelChildCtx?: Context; customDataProxyFetch?: (fetch: Fetch) => Fetch; }; declare type RequestResponse = { ok: boolean; url: string; statusText?: string; status: number; headers: NodeHeaders; text: () => Promise; json: () => Promise; }; declare type RequiredExtensionArgs = NameArgs & ResultArgs & ModelArgs & ClientArgs & QueryOptions; export { RequiredExtensionArgs } export { RequiredExtensionArgs as UserArgs } export declare type RequiredKeys = { [K in keyof O]-?: {} extends Pick_2 ? never : K; }[keyof O]; declare function resolveDatasourceUrl({ inlineDatasources, overrideDatasources, env, clientVersion, }: { inlineDatasources: GetPrismaClientConfig['inlineDatasources']; overrideDatasources: Datasources; env: Record; clientVersion: string; }): string; export declare type Result = T extends { [K: symbol]: { types: { payload: any; }; }; } ? GetResult : GetResult<{ composites: {}; objects: {}; scalars: {}; }, {}, F>; export declare type Result_2 = Result; declare namespace Result_3 { export { Operation, FluentOperation, Count, TrueKeys, GetFindResult, GetSelectIncludeResult, SelectablePayloadFields, SelectField, DefaultSelection, UnwrapPayload, GetCountResult, Aggregate, GetAggregateResult, GetBatchResult, GetGroupByResult, GetResult } } declare type Result_4 = { map(fn: (value: T) => U): Result_4; flatMap(fn: (value: T) => Result_4): Result_4; } & ({ readonly ok: true; readonly value: T; } | { readonly ok: false; readonly error: Error_2; }); export declare type ResultArg = { [FieldName in string]: ResultFieldDefinition; }; export declare type ResultArgs = { result: { [ModelName in string]: ResultArg; }; }; export declare type ResultArgsFieldCompute = (model: any) => unknown; export declare type ResultFieldDefinition = { needs?: { [FieldName in string]: boolean; }; compute: ResultArgsFieldCompute; }; declare interface ResultSet { /** * List of column types appearing in a database query, in the same order as `columnNames`. * They are used within the Query Engine to convert values from JS to Quaint values. */ columnTypes: Array; /** * List of column names appearing in a database query, in the same order as `columnTypes`. */ columnNames: Array; /** * List of rows retrieved from a database query. * Each row is a list of values, whose length matches `columnNames` and `columnTypes`. */ rows: Array>; /** * The last ID of an `INSERT` statement, if any. * This is required for `AUTO_INCREMENT` columns in databases based on MySQL and SQLite. */ lastInsertId?: string; } export declare type Return = T extends (...args: any[]) => infer R ? R : T; declare type Runtime = "edge-routine" | "workerd" | "deno" | "lagon" | "react-native" | "netlify" | "electron" | "node" | "bun" | "edge-light" | "fastly" | "unknown"; declare type RuntimeDataModel = { readonly models: Record; readonly enums: Record; readonly types: Record; }; declare type RuntimeEnum = Omit; declare type RuntimeModel = Omit; export declare type Select = T extends U ? T : never; export declare type SelectablePayloadFields = { objects: { [k in K]: O; }; } | { composites: { [k in K]: O; }; }; export declare type SelectField

, K extends PropertyKey> = P extends { objects: Record; } ? P['objects'][K] : P extends { composites: Record; } ? P['composites'][K] : never; declare type Selection_2 = Record; export { Selection_2 as Selection } /** * An interface that represents a span. A span represents a single operation * within a trace. Examples of span might include remote procedure calls or a * in-process function calls to sub-components. A Trace has a single, top-level * "root" Span that in turn may have zero or more child Spans, which in turn * may have children. * * Spans are created by the {@link Tracer.startSpan} method. */ declare interface Span { /** * Returns the {@link SpanContext} object associated with this Span. * * Get an immutable, serializable identifier for this span that can be used * to create new child spans. Returned SpanContext is usable even after the * span ends. * * @returns the SpanContext object associated with this Span. */ spanContext(): SpanContext; /** * Sets an attribute to the span. * * Sets a single Attribute with the key and value passed as arguments. * * @param key the key for this attribute. * @param value the value for this attribute. Setting a value null or * undefined is invalid and will result in undefined behavior. */ setAttribute(key: string, value: SpanAttributeValue): this; /** * Sets attributes to the span. * * @param attributes the attributes that will be added. * null or undefined attribute values * are invalid and will result in undefined behavior. */ setAttributes(attributes: SpanAttributes): this; /** * Adds an event to the Span. * * @param name the name of the event. * @param [attributesOrStartTime] the attributes that will be added; these are * associated with this event. Can be also a start time * if type is {@type TimeInput} and 3rd param is undefined * @param [startTime] start time of the event. */ addEvent(name: string, attributesOrStartTime?: SpanAttributes | TimeInput, startTime?: TimeInput): this; /** * Sets a status to the span. If used, this will override the default Span * status. Default is {@link SpanStatusCode.UNSET}. SetStatus overrides the value * of previous calls to SetStatus on the Span. * * @param status the SpanStatus to set. */ setStatus(status: SpanStatus): this; /** * Updates the Span name. * * This will override the name provided via {@link Tracer.startSpan}. * * Upon this update, any sampling behavior based on Span name will depend on * the implementation. * * @param name the Span name. */ updateName(name: string): this; /** * Marks the end of Span execution. * * Call to End of a Span MUST not have any effects on child spans. Those may * still be running and can be ended later. * * Do not return `this`. The Span generally should not be used after it * is ended so chaining is not desired in this context. * * @param [endTime] the time to set as Span's end time. If not provided, * use the current time as the span's end time. */ end(endTime?: TimeInput): void; /** * Returns the flag whether this span will be recorded. * * @returns true if this Span is active and recording information like events * with the `AddEvent` operation and attributes using `setAttributes`. */ isRecording(): boolean; /** * Sets exception as a span event * @param exception the exception the only accepted values are string or Error * @param [time] the time to set as Span's event time. If not provided, * use the current time. */ recordException(exception: Exception, time?: TimeInput): void; } /** * @deprecated please use {@link Attributes} */ declare type SpanAttributes = Attributes; /** * @deprecated please use {@link AttributeValue} */ declare type SpanAttributeValue = AttributeValue; declare type SpanCallback = (span?: Span, context?: Context) => R; /** * A SpanContext represents the portion of a {@link Span} which must be * serialized and propagated along side of a {@link Baggage}. */ declare interface SpanContext { /** * The ID of the trace that this span belongs to. It is worldwide unique * with practically sufficient probability by being made as 16 randomly * generated bytes, encoded as a 32 lowercase hex characters corresponding to * 128 bits. */ traceId: string; /** * The ID of the Span. It is globally unique with practically sufficient * probability by being made as 8 randomly generated bytes, encoded as a 16 * lowercase hex characters corresponding to 64 bits. */ spanId: string; /** * Only true if the SpanContext was propagated from a remote parent. */ isRemote?: boolean; /** * Trace flags to propagate. * * It is represented as 1 byte (bitmap). Bit to represent whether trace is * sampled or not. When set, the least significant bit documents that the * caller may have recorded trace data. A caller who does not record trace * data out-of-band leaves this flag unset. * * see {@link TraceFlags} for valid flag values. */ traceFlags: number; /** * Tracing-system-specific info to propagate. * * The tracestate field value is a `list` as defined below. The `list` is a * series of `list-members` separated by commas `,`, and a list-member is a * key/value pair separated by an equals sign `=`. Spaces and horizontal tabs * surrounding `list-members` are ignored. There can be a maximum of 32 * `list-members` in a `list`. * More Info: https://www.w3.org/TR/trace-context/#tracestate-field * * Examples: * Single tracing system (generic format): * tracestate: rojo=00f067aa0ba902b7 * Multiple tracing systems (with different formatting): * tracestate: rojo=00f067aa0ba902b7,congo=t61rcWkgMzE */ traceState?: TraceState; } declare enum SpanKind { /** Default value. Indicates that the span is used internally. */ INTERNAL = 0, /** * Indicates that the span covers server-side handling of an RPC or other * remote request. */ SERVER = 1, /** * Indicates that the span covers the client-side wrapper around an RPC or * other remote request. */ CLIENT = 2, /** * Indicates that the span describes producer sending a message to a * broker. Unlike client and server, there is no direct critical path latency * relationship between producer and consumer spans. */ PRODUCER = 3, /** * Indicates that the span describes consumer receiving a message from a * broker. Unlike client and server, there is no direct critical path latency * relationship between producer and consumer spans. */ CONSUMER = 4 } /** * Options needed for span creation */ declare interface SpanOptions { /** * The SpanKind of a span * @default {@link SpanKind.INTERNAL} */ kind?: SpanKind; /** A span's attributes */ attributes?: SpanAttributes; /** {@link Link}s span to other spans */ links?: Link[]; /** A manually specified start time for the created `Span` object. */ startTime?: TimeInput; /** The new span should be a root span. (Ignore parent from context). */ root?: boolean; } declare interface SpanStatus { /** The status code of this message. */ code: SpanStatusCode; /** A developer-facing error message. */ message?: string; } /** * An enumeration of status codes. */ declare enum SpanStatusCode { /** * The default status. */ UNSET = 0, /** * The operation has been validated by an Application developer or * Operator to have completed successfully. */ OK = 1, /** * The operation contains an error. */ ERROR = 2 } /** * A SQL instance can be nested within each other to build SQL strings. */ export declare class Sql { readonly values: Value[]; readonly strings: string[]; constructor(rawStrings: readonly string[], rawValues: readonly RawValue[]); get sql(): string; get statement(): string; get text(): string; inspect(): { sql: string; statement: string; text: string; values: unknown[]; }; } /** * Create a SQL object from a template string. */ export declare function sqltag(strings: readonly string[], ...values: readonly RawValue[]): Sql; /** * Defines TimeInput. * * hrtime, epoch milliseconds, performance.now() or Date */ declare type TimeInput = HrTime | number | Date; export declare type ToTuple = T extends any[] ? T : [T]; declare interface TraceState { /** * Create a new TraceState which inherits from this TraceState and has the * given key set. * The new entry will always be added in the front of the list of states. * * @param key key of the TraceState entry. * @param value value of the TraceState entry. */ set(key: string, value: string): TraceState; /** * Return a new TraceState which inherits from this TraceState but does not * contain the given key. * * @param key the key for the TraceState entry to be removed. */ unset(key: string): TraceState; /** * Returns the value to which the specified key is mapped, or `undefined` if * this map contains no mapping for the key. * * @param key with which the specified value is to be associated. * @returns the value to which the specified key is mapped, or `undefined` if * this map contains no mapping for the key. */ get(key: string): string | undefined; /** * Serializes the TraceState to a `list` as defined below. The `list` is a * series of `list-members` separated by commas `,`, and a list-member is a * key/value pair separated by an equals sign `=`. Spaces and horizontal tabs * surrounding `list-members` are ignored. There can be a maximum of 32 * `list-members` in a `list`. * * @returns the serialized string. */ serialize(): string; } declare interface TracingHelper { isEnabled(): boolean; getTraceParent(context?: Context): string; createEngineSpan(engineSpanEvent: EngineSpanEvent): void; getActiveContext(): Context | undefined; runInChildSpan(nameOrOptions: string | ExtendedSpanOptions, callback: SpanCallback): R; } declare interface Transaction extends Queryable { /** * Transaction options. */ readonly options: TransactionOptions; /** * Commit the transaction. */ commit(): Promise>; /** * Rolls back the transaction. */ rollback(): Promise>; } declare namespace Transaction_2 { export { IsolationLevel, Options, InteractiveTransactionInfo, TransactionHeaders } } declare type TransactionHeaders = { traceparent?: string; }; declare type TransactionOptions = { usePhantomQuery: boolean; }; declare type TransactionOptions_2 = { kind: 'itx'; options: InteractiveTransactionOptions; } | { kind: 'batch'; options: BatchTransactionOptions; }; export declare type TrueKeys = { [K in keyof T]: T[K] extends true ? K : never; }[keyof T]; export declare type TypeMapCbDef = Fn<{ extArgs: InternalArgs; }, TypeMapDef>; /** Shared */ export declare type TypeMapDef = Record; declare namespace Types { export { Result_3 as Result, Extensions_2 as Extensions, Utils, Public_2 as Public, OperationPayload as Payload } } export { Types } declare type UnknownErrorParams = { clientVersion: string; batchRequestIdx?: number; }; declare type Unpacker = (data: any) => any; export declare type UnwrapPayload

= {} extends P ? unknown : { [K in keyof P]: P[K] extends { scalars: infer S; composites: infer C; }[] ? Array> : P[K] extends { scalars: infer S; composites: infer C; } | null ? S & UnwrapPayload | Select : never; }; export declare type UnwrapPromise

= P extends Promise ? R : P; export declare type UnwrapTuple = { [K in keyof Tuple]: K extends `${number}` ? Tuple[K] extends PrismaPromise ? X : UnwrapPromise : UnwrapPromise; }; /** * Input that flows from the user into the Client. */ declare type UserArgs_2 = any; declare namespace Utils { export { EmptyToUnknown, NeverToUnknown, PatchFlat, Omit_2 as Omit, Pick_2 as Pick, ComputeDeep, Compute, OptionalFlat, ReadonlyDeep, Narrowable, Narrow, Exact, Cast, JsonObject, JsonArray, JsonValue, Record_2 as Record, UnwrapPromise, UnwrapTuple, Path, Fn, Call, RequiredKeys, OptionalKeys, Optional, Return, ToTuple, RenameAndNestPayloadKeys, PayloadToResult, Select, Equals, Or, JsPromise } } declare function validator(): (select: Exact) => S; declare function validator, O extends keyof C[M] & Operation>(client: C, model: M, operation: O): (select: Exact>) => S; declare function validator, O extends keyof C[M] & Operation, P extends keyof Args>(client: C, model: M, operation: O, prop: P): (select: Exact[P]>) => S; /** * Values supported by SQL engine. */ export declare type Value = unknown; export declare function warnEnvConflicts(envPaths: any): void; export declare const warnOnce: (key: string, message: string, ...args: unknown[]) => void; declare type WasmLoadingConfig = { /** * WASM-bindgen runtime for corresponding module */ getRuntime: () => { __wbg_set_wasm(exports: unknown): any; QueryEngine: QueryEngineConstructor; }; /** * Loads the raw wasm module for the wasm query engine. This configuration is * generated specifically for each type of client, eg. Node.js client and Edge * clients will have different implementations. * @remarks this is a callback on purpose, we only load the wasm if needed. * @remarks only used by LibraryEngine.ts */ getQueryEngineWasmModule: () => Promise; }; export { } ================================================ FILE: server/src/common/prisma-client/runtime/library.js ================================================ "use strict";var Ml=Object.create;var Ct=Object.defineProperty;var $l=Object.getOwnPropertyDescriptor;var ql=Object.getOwnPropertyNames;var jl=Object.getPrototypeOf,Vl=Object.prototype.hasOwnProperty;var Z=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),Fr=(e,r)=>{for(var t in r)Ct(e,t,{get:r[t],enumerable:!0})},no=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let i of ql(r))!Vl.call(e,i)&&i!==t&&Ct(e,i,{get:()=>r[i],enumerable:!(n=$l(r,i))||n.enumerable});return e};var k=(e,r,t)=>(t=e!=null?Ml(jl(e)):{},no(r||!e||!e.__esModule?Ct(t,"default",{value:e,enumerable:!0}):t,e)),Bl=e=>no(Ct({},"__esModule",{value:!0}),e);var Ao=Z((Bm,Un)=>{"use strict";var v=Un.exports;Un.exports.default=v;var D="\x1B[",jr="\x1B]",dr="\x07",Ft=";",Ro=process.env.TERM_PROGRAM==="Apple_Terminal";v.cursorTo=(e,r)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");return typeof r!="number"?D+(e+1)+"G":D+(r+1)+";"+(e+1)+"H"};v.cursorMove=(e,r)=>{if(typeof e!="number")throw new TypeError("The `x` argument is required");let t="";return e<0?t+=D+-e+"D":e>0&&(t+=D+e+"C"),r<0?t+=D+-r+"A":r>0&&(t+=D+r+"B"),t};v.cursorUp=(e=1)=>D+e+"A";v.cursorDown=(e=1)=>D+e+"B";v.cursorForward=(e=1)=>D+e+"C";v.cursorBackward=(e=1)=>D+e+"D";v.cursorLeft=D+"G";v.cursorSavePosition=Ro?"\x1B7":D+"s";v.cursorRestorePosition=Ro?"\x1B8":D+"u";v.cursorGetPosition=D+"6n";v.cursorNextLine=D+"E";v.cursorPrevLine=D+"F";v.cursorHide=D+"?25l";v.cursorShow=D+"?25h";v.eraseLines=e=>{let r="";for(let t=0;t[jr,"8",Ft,Ft,r,dr,e,jr,"8",Ft,Ft,dr].join("");v.image=(e,r={})=>{let t=`${jr}1337;File=inline=1`;return r.width&&(t+=`;width=${r.width}`),r.height&&(t+=`;height=${r.height}`),r.preserveAspectRatio===!1&&(t+=";preserveAspectRatio=0"),t+":"+e.toString("base64")+dr};v.iTerm={setCwd:(e=process.cwd())=>`${jr}50;CurrentDir=${e}${dr}`,annotation:(e,r={})=>{let t=`${jr}1337;`,n=typeof r.x<"u",i=typeof r.y<"u";if((n||i)&&!(n&&i&&typeof r.length<"u"))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return e=e.replace(/\|/g,""),t+=r.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",r.length>0?t+=(n?[e,r.length,r.x,r.y]:[r.length,e]).join("|"):t+=e,t+dr}}});var Qn=Z((Um,Io)=>{"use strict";Io.exports=(e,r=process.argv)=>{let t=e.startsWith("-")?"":e.length===1?"-":"--",n=r.indexOf(t+e),i=r.indexOf("--");return n!==-1&&(i===-1||n{"use strict";var Ru=require("os"),_o=require("tty"),pe=Qn(),{env:G}=process,Ve;pe("no-color")||pe("no-colors")||pe("color=false")||pe("color=never")?Ve=0:(pe("color")||pe("colors")||pe("color=true")||pe("color=always"))&&(Ve=1);"FORCE_COLOR"in G&&(G.FORCE_COLOR==="true"?Ve=1:G.FORCE_COLOR==="false"?Ve=0:Ve=G.FORCE_COLOR.length===0?1:Math.min(parseInt(G.FORCE_COLOR,10),3));function Gn(e){return e===0?!1:{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function Jn(e,r){if(Ve===0)return 0;if(pe("color=16m")||pe("color=full")||pe("color=truecolor"))return 3;if(pe("color=256"))return 2;if(e&&!r&&Ve===void 0)return 0;let t=Ve||0;if(G.TERM==="dumb")return t;if(process.platform==="win32"){let n=Ru.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in G)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in G)||G.CI_NAME==="codeship"?1:t;if("TEAMCITY_VERSION"in G)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(G.TEAMCITY_VERSION)?1:0;if(G.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in G){let n=parseInt((G.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(G.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(G.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(G.TERM)||"COLORTERM"in G?1:t}function Au(e){let r=Jn(e,e&&e.isTTY);return Gn(r)}ko.exports={supportsColor:Au,stdout:Gn(Jn(!0,_o.isatty(1))),stderr:Gn(Jn(!0,_o.isatty(2)))}});var Fo=Z((Gm,Lo)=>{"use strict";var Iu=Do(),mr=Qn();function Oo(e){if(/^\d{3,4}$/.test(e)){let t=/(\d{1,2})(\d{2})/.exec(e);return{major:0,minor:parseInt(t[1],10),patch:parseInt(t[2],10)}}let r=(e||"").split(".").map(t=>parseInt(t,10));return{major:r[0],minor:r[1],patch:r[2]}}function Wn(e){let{env:r}=process;if("FORCE_HYPERLINK"in r)return!(r.FORCE_HYPERLINK.length>0&&parseInt(r.FORCE_HYPERLINK,10)===0);if(mr("no-hyperlink")||mr("no-hyperlinks")||mr("hyperlink=false")||mr("hyperlink=never"))return!1;if(mr("hyperlink=true")||mr("hyperlink=always")||"NETLIFY"in r)return!0;if(!Iu.supportsColor(e)||e&&!e.isTTY||process.platform==="win32"||"CI"in r||"TEAMCITY_VERSION"in r)return!1;if("TERM_PROGRAM"in r){let t=Oo(r.TERM_PROGRAM_VERSION);switch(r.TERM_PROGRAM){case"iTerm.app":return t.major===3?t.minor>=1:t.major>3;case"WezTerm":return t.major>=20200620;case"vscode":return t.major>1||t.major===1&&t.minor>=72}}if("VTE_VERSION"in r){if(r.VTE_VERSION==="0.50.0")return!1;let t=Oo(r.VTE_VERSION);return t.major>0||t.minor>=50}return!1}Lo.exports={supportsHyperlink:Wn,stdout:Wn(process.stdout),stderr:Wn(process.stderr)}});var Mo=Z((Jm,Vr)=>{"use strict";var _u=Ao(),Hn=Fo(),No=(e,r,{target:t="stdout",...n}={})=>Hn[t]?_u.link(e,r):n.fallback===!1?e:typeof n.fallback=="function"?n.fallback(e,r):`${e} (\u200B${r}\u200B)`;Vr.exports=(e,r,t={})=>No(e,r,t);Vr.exports.stderr=(e,r,t={})=>No(e,r,{target:"stderr",...t});Vr.exports.isSupported=Hn.stdout;Vr.exports.stderr.isSupported=Hn.stderr});var Yn=Z((tf,ku)=>{ku.exports={name:"@prisma/engines-version",version:"5.15.0-29.12e25d8d06f6ea5a0252864dd9a03b1bb51f3022",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"12e25d8d06f6ea5a0252864dd9a03b1bb51f3022"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.33",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var zn=Z(Nt=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});Nt.enginesVersion=void 0;Nt.enginesVersion=Yn().prisma.enginesVersion});var Vo=Z((Pf,Lu)=>{Lu.exports={name:"dotenv",version:"16.0.3",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{require:"./lib/main.js",types:"./lib/main.d.ts",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard","lint-readme":"standard-markdown",pretest:"npm run lint && npm run dts-check",test:"tap tests/*.js --100 -Rspec",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@types/node":"^17.0.9",decache:"^4.6.1",dtslint:"^3.7.0",sinon:"^12.0.1",standard:"^16.0.4","standard-markdown":"^7.1.0","standard-version":"^9.3.2",tap:"^15.1.6",tar:"^6.1.11",typescript:"^4.5.4"},engines:{node:">=12"}}});var Uo=Z((vf,$t)=>{"use strict";var Fu=require("fs"),Bo=require("path"),Nu=require("os"),Mu=Vo(),$u=Mu.version,qu=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function ju(e){let r={},t=e.toString();t=t.replace(/\r\n?/mg,` `);let n;for(;(n=qu.exec(t))!=null;){let i=n[1],o=n[2]||"";o=o.trim();let s=o[0];o=o.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),s==='"'&&(o=o.replace(/\\n/g,` `),o=o.replace(/\\r/g,"\r")),r[i]=o}return r}function ri(e){console.log(`[dotenv@${$u}][DEBUG] ${e}`)}function Vu(e){return e[0]==="~"?Bo.join(Nu.homedir(),e.slice(1)):e}function Bu(e){let r=Bo.resolve(process.cwd(),".env"),t="utf8",n=!!(e&&e.debug),i=!!(e&&e.override);e&&(e.path!=null&&(r=Vu(e.path)),e.encoding!=null&&(t=e.encoding));try{let o=Mt.parse(Fu.readFileSync(r,{encoding:t}));return Object.keys(o).forEach(function(s){Object.prototype.hasOwnProperty.call(process.env,s)?(i===!0&&(process.env[s]=o[s]),n&&ri(i===!0?`"${s}" is already defined in \`process.env\` and WAS overwritten`:`"${s}" is already defined in \`process.env\` and was NOT overwritten`)):process.env[s]=o[s]}),{parsed:o}}catch(o){return n&&ri(`Failed to load ${r} ${o.message}`),{error:o}}}var Mt={config:Bu,parse:ju};$t.exports.config=Mt.config;$t.exports.parse=Mt.parse;$t.exports=Mt});var Ko=Z((_f,Ho)=>{"use strict";Ho.exports=e=>{let r=e.match(/^[ \t]*(?=\S)/gm);return r?r.reduce((t,n)=>Math.min(t,n.length),1/0):0}});var zo=Z((kf,Yo)=>{"use strict";var Ju=Ko();Yo.exports=e=>{let r=Ju(e);if(r===0)return e;let t=new RegExp(`^[ \\t]{${r}}`,"gm");return e.replace(t,"")}});var oi=Z((Mf,Zo)=>{"use strict";Zo.exports=(e,r=1,t)=>{if(t={indent:" ",includeEmptyLines:!1,...t},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof r!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof r}\``);if(typeof t.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof t.indent}\``);if(r===0)return e;let n=t.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,t.indent.repeat(r))}});var ts=Z((jf,rs)=>{"use strict";rs.exports=({onlyFirst:e=!1}={})=>{let r=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(r,e?void 0:"g")}});var ui=Z((Vf,ns)=>{"use strict";var ec=ts();ns.exports=e=>typeof e=="string"?e.replace(ec(),""):e});var is=Z((Qf,Vt)=>{"use strict";Vt.exports=(e={})=>{let r;if(e.repoUrl)r=e.repoUrl;else if(e.user&&e.repo)r=`https://github.com/${e.user}/${e.repo}`;else throw new Error("You need to specify either the `repoUrl` option or both the `user` and `repo` options");let t=new URL(`${r}/issues/new`),n=["body","title","labels","template","milestone","assignee","projects"];for(let i of n){let o=e[i];if(o!==void 0){if(i==="labels"||i==="projects"){if(!Array.isArray(o))throw new TypeError(`The \`${i}\` option should be an array`);o=o.join(",")}t.searchParams.set(i,o)}}return t.toString()};Vt.exports.default=Vt.exports});var Hi=Z((DP,Ba)=>{"use strict";Ba.exports=function(){function e(r,t,n,i,o){return rn?n+1:r+1:i===o?t:t+1}return function(r,t){if(r===t)return 0;if(r.length>t.length){var n=r;r=t,t=n}for(var i=r.length,o=t.length;i>0&&r.charCodeAt(i-1)===t.charCodeAt(o-1);)i--,o--;for(var s=0;sFn,Decimal:()=>Te,Extensions:()=>kn,MetricsClient:()=>hr,NotFoundError:()=>Oe,PrismaClientInitializationError:()=>R,PrismaClientKnownRequestError:()=>V,PrismaClientRustPanicError:()=>le,PrismaClientUnknownRequestError:()=>B,PrismaClientValidationError:()=>H,Public:()=>Dn,Sql:()=>ie,defineDmmfProperty:()=>ss,empty:()=>ls,getPrismaClient:()=>Ll,getRuntime:()=>fn,join:()=>as,makeStrictEnum:()=>Fl,objectEnumValues:()=>Qt,raw:()=>Ei,sqltag:()=>bi,warnEnvConflicts:()=>Nl,warnOnce:()=>Wr});module.exports=Bl(fm);var kn={};Fr(kn,{defineExtension:()=>io,getExtensionContext:()=>oo});function io(e){return typeof e=="function"?e:r=>r.$extends(e)}function oo(e){return e}var Dn={};Fr(Dn,{validator:()=>so});function so(...e){return r=>r}var St={};Fr(St,{$:()=>po,bgBlack:()=>Zl,bgBlue:()=>tu,bgCyan:()=>iu,bgGreen:()=>eu,bgMagenta:()=>nu,bgRed:()=>Xl,bgWhite:()=>ou,bgYellow:()=>ru,black:()=>Hl,blue:()=>ze,bold:()=>W,cyan:()=>_e,dim:()=>Ie,gray:()=>Nr,green:()=>Me,grey:()=>zl,hidden:()=>Jl,inverse:()=>Gl,italic:()=>Ql,magenta:()=>Kl,red:()=>ue,reset:()=>Ul,strikethrough:()=>Wl,underline:()=>X,white:()=>Yl,yellow:()=>fe});var On,ao,lo,uo,co=!0;typeof process<"u"&&({FORCE_COLOR:On,NODE_DISABLE_COLORS:ao,NO_COLOR:lo,TERM:uo}=process.env||{},co=process.stdout&&process.stdout.isTTY);var po={enabled:!ao&&lo==null&&uo!=="dumb"&&(On!=null&&On!=="0"||co)};function N(e,r){let t=new RegExp(`\\x1b\\[${r}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${r}m`;return function(o){return!po.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(t,i+n):o)+i}}var Ul=N(0,0),W=N(1,22),Ie=N(2,22),Ql=N(3,23),X=N(4,24),Gl=N(7,27),Jl=N(8,28),Wl=N(9,29),Hl=N(30,39),ue=N(31,39),Me=N(32,39),fe=N(33,39),ze=N(34,39),Kl=N(35,39),_e=N(36,39),Yl=N(37,39),Nr=N(90,39),zl=N(90,39),Zl=N(40,49),Xl=N(41,49),eu=N(42,49),ru=N(43,49),tu=N(44,49),nu=N(45,49),iu=N(46,49),ou=N(47,49);var su=100,mo=["green","yellow","blue","magenta","cyan","red"],Mr=[],fo=Date.now(),au=0,Ln=typeof process<"u"?process.env:{};globalThis.DEBUG??(globalThis.DEBUG=Ln.DEBUG??"");globalThis.DEBUG_COLORS??(globalThis.DEBUG_COLORS=Ln.DEBUG_COLORS?Ln.DEBUG_COLORS==="true":!0);var $r={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let r=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),t=r.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=r.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return t&&!n},log:(...e)=>{let[r,t,...n]=e,i;typeof require=="function"&&typeof process<"u"&&typeof process.stderr<"u"&&typeof process.stderr.write=="function"?i=(...o)=>{try{let s=require("util");process.stderr.write(s.format(...o)+` `)}catch{i=console.warn??console.log}}:i=console.warn??console.log,i(`${r} ${t}`,...n)},formatters:{}};function lu(e){let r={color:mo[au++%mo.length],enabled:$r.enabled(e),namespace:e,log:$r.log,extend:()=>{}},t=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=r;if(n.length!==0&&Mr.push([o,...n]),Mr.length>su&&Mr.shift(),$r.enabled(o)||i){let l=n.map(c=>typeof c=="string"?c:uu(c)),u=`+${Date.now()-fo}ms`;fo=Date.now(),globalThis.DEBUG_COLORS?a(St[s](W(o)),...l,St[s](u)):a(o,...l,u)}};return new Proxy(t,{get:(n,i)=>r[i],set:(n,i,o)=>r[i]=o})}var Fn=new Proxy(lu,{get:(e,r)=>$r[r],set:(e,r,t)=>$r[r]=t});function uu(e,r=2){let t=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(t.has(i))return"[Circular *]";t.add(i)}else if(typeof i=="bigint")return i.toString();return i},r)}function go(e=7500){let r=Mr.map(([t,...n])=>`${t} ${n.map(i=>typeof i=="string"?i:JSON.stringify(i)).join(" ")}`).join(` `);return r.length!!(e&&typeof e=="object"),It=e=>e&&!!e[ke],we=(e,r,t)=>{if(It(e)){let n=e[ke](),{matched:i,selections:o}=n.match(r);return i&&o&&Object.keys(o).forEach(s=>t(s,o[s])),i}if($n(e)){if(!$n(r))return!1;if(Array.isArray(e)){if(!Array.isArray(r))return!1;let n=[],i=[],o=[];for(let s of e.keys()){let a=e[s];It(a)&&a[cu]?o.push(a):o.length?i.push(a):n.push(a)}if(o.length){if(o.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(r.lengthwe(u,s[c],t))&&i.every((u,c)=>we(u,a[c],t))&&(o.length===0||we(o[0],l,t))}return e.length===r.length&&e.every((s,a)=>we(s,r[a],t))}return Object.keys(e).every(n=>{let i=e[n];return(n in r||It(o=i)&&o[ke]().matcherType==="optional")&&we(i,r[n],t);var o})}return Object.is(r,e)},je=e=>{var r,t,n;return $n(e)?It(e)?(r=(t=(n=e[ke]()).getSelectionKeys)==null?void 0:t.call(n))!=null?r:[]:Array.isArray(e)?qr(e,je):qr(Object.values(e),je):[]},qr=(e,r)=>e.reduce((t,n)=>t.concat(r(n)),[]);function ce(e){return Object.assign(e,{optional:()=>pu(e),and:r=>j(e,r),or:r=>du(e,r),select:r=>r===void 0?Eo(e):Eo(r,e)})}function pu(e){return ce({[ke]:()=>({match:r=>{let t={},n=(i,o)=>{t[i]=o};return r===void 0?(je(e).forEach(i=>n(i,void 0)),{matched:!0,selections:t}):{matched:we(e,r,n),selections:t}},getSelectionKeys:()=>je(e),matcherType:"optional"})})}function j(...e){return ce({[ke]:()=>({match:r=>{let t={},n=(i,o)=>{t[i]=o};return{matched:e.every(i=>we(i,r,n)),selections:t}},getSelectionKeys:()=>qr(e,je),matcherType:"and"})})}function du(...e){return ce({[ke]:()=>({match:r=>{let t={},n=(i,o)=>{t[i]=o};return qr(e,je).forEach(i=>n(i,void 0)),{matched:e.some(i=>we(i,r,n)),selections:t}},getSelectionKeys:()=>qr(e,je),matcherType:"or"})})}function _(e){return{[ke]:()=>({match:r=>({matched:!!e(r)})})}}function Eo(...e){let r=typeof e[0]=="string"?e[0]:void 0,t=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return ce({[ke]:()=>({match:n=>{let i={[r??_t]:n};return{matched:t===void 0||we(t,n,(o,s)=>{i[o]=s}),selections:i}},getSelectionKeys:()=>[r??_t].concat(t===void 0?[]:je(t))})})}function Ee(e){return typeof e=="number"}function Ze(e){return typeof e=="string"}function $e(e){return typeof e=="bigint"}var Rm=ce(_(function(e){return!0}));var Xe=e=>Object.assign(ce(e),{startsWith:r=>{return Xe(j(e,(t=r,_(n=>Ze(n)&&n.startsWith(t)))));var t},endsWith:r=>{return Xe(j(e,(t=r,_(n=>Ze(n)&&n.endsWith(t)))));var t},minLength:r=>Xe(j(e,(t=>_(n=>Ze(n)&&n.length>=t))(r))),maxLength:r=>Xe(j(e,(t=>_(n=>Ze(n)&&n.length<=t))(r))),includes:r=>{return Xe(j(e,(t=r,_(n=>Ze(n)&&n.includes(t)))));var t},regex:r=>{return Xe(j(e,(t=r,_(n=>Ze(n)&&!!n.match(t)))));var t}}),Am=Xe(_(Ze)),be=e=>Object.assign(ce(e),{between:(r,t)=>be(j(e,((n,i)=>_(o=>Ee(o)&&n<=o&&i>=o))(r,t))),lt:r=>be(j(e,(t=>_(n=>Ee(n)&&nbe(j(e,(t=>_(n=>Ee(n)&&n>t))(r))),lte:r=>be(j(e,(t=>_(n=>Ee(n)&&n<=t))(r))),gte:r=>be(j(e,(t=>_(n=>Ee(n)&&n>=t))(r))),int:()=>be(j(e,_(r=>Ee(r)&&Number.isInteger(r)))),finite:()=>be(j(e,_(r=>Ee(r)&&Number.isFinite(r)))),positive:()=>be(j(e,_(r=>Ee(r)&&r>0))),negative:()=>be(j(e,_(r=>Ee(r)&&r<0)))}),Im=be(_(Ee)),qe=e=>Object.assign(ce(e),{between:(r,t)=>qe(j(e,((n,i)=>_(o=>$e(o)&&n<=o&&i>=o))(r,t))),lt:r=>qe(j(e,(t=>_(n=>$e(n)&&nqe(j(e,(t=>_(n=>$e(n)&&n>t))(r))),lte:r=>qe(j(e,(t=>_(n=>$e(n)&&n<=t))(r))),gte:r=>qe(j(e,(t=>_(n=>$e(n)&&n>=t))(r))),positive:()=>qe(j(e,_(r=>$e(r)&&r>0))),negative:()=>qe(j(e,_(r=>$e(r)&&r<0)))}),_m=qe(_($e)),km=ce(_(function(e){return typeof e=="boolean"})),Dm=ce(_(function(e){return typeof e=="symbol"})),Om=ce(_(function(e){return e==null})),Lm=ce(_(function(e){return e!=null}));var qn={matched:!1,value:void 0};function pr(e){return new jn(e,qn)}var jn=class e{constructor(r,t){this.input=void 0,this.state=void 0,this.input=r,this.state=t}with(...r){if(this.state.matched)return this;let t=r[r.length-1],n=[r[0]],i;r.length===3&&typeof r[1]=="function"?i=r[1]:r.length>2&&n.push(...r.slice(1,r.length-1));let o=!1,s={},a=(u,c)=>{o=!0,s[u]=c},l=!n.some(u=>we(u,this.input,a))||i&&!i(this.input)?qn:{matched:!0,value:t(o?_t in s?s[_t]:s:this.input,this.input)};return new e(this.input,l)}when(r,t){if(this.state.matched)return this;let n=!!r(this.input);return new e(this.input,n?{matched:!0,value:t(this.input,this.input)}:qn)}otherwise(r){return this.state.matched?this.state.value:r(this.input)}exhaustive(){if(this.state.matched)return this.state.value;let r;try{r=JSON.stringify(this.input)}catch{r=this.input}throw new Error(`Pattern matching error: no pattern matches value ${r}`)}run(){return this.exhaustive()}returnType(){return this}};var Po=require("util");var mu={warn:fe("prisma:warn")},fu={warn:()=>!process.env.PRISMA_DISABLE_WARNINGS};function kt(e,...r){fu.warn()&&console.warn(`${mu.warn} ${e}`,...r)}var gu=(0,Po.promisify)(xo.default.exec),re=L("prisma:get-platform"),hu=["1.0.x","1.1.x","3.0.x"];async function vo(){let e=Ot.default.platform(),r=process.arch;if(e==="freebsd"){let s=await Lt("freebsd-version");if(s&&s.trim().length>0){let l=/^(\d+)\.?/.exec(s);if(l)return{platform:"freebsd",targetDistro:`freebsd${l[1]}`,arch:r}}}if(e!=="linux")return{platform:e,arch:r};let t=await Eu(),n=await Su(),i=wu({arch:r,archFromUname:n,familyDistro:t.familyDistro}),{libssl:o}=await xu(i);return{platform:"linux",libssl:o,arch:r,archFromUname:n,...t}}function yu(e){let r=/^ID="?([^"\n]*)"?$/im,t=/^ID_LIKE="?([^"\n]*)"?$/im,n=r.exec(e),i=n&&n[1]&&n[1].toLowerCase()||"",o=t.exec(e),s=o&&o[1]&&o[1].toLowerCase()||"",a=pr({id:i,idLike:s}).with({id:"alpine"},({id:l})=>({targetDistro:"musl",familyDistro:l,originalDistro:l})).with({id:"raspbian"},({id:l})=>({targetDistro:"arm",familyDistro:"debian",originalDistro:l})).with({id:"nixos"},({id:l})=>({targetDistro:"nixos",originalDistro:l,familyDistro:"nixos"})).with({id:"debian"},{id:"ubuntu"},({id:l})=>({targetDistro:"debian",familyDistro:"debian",originalDistro:l})).with({id:"rhel"},{id:"centos"},{id:"fedora"},({id:l})=>({targetDistro:"rhel",familyDistro:"rhel",originalDistro:l})).when(({idLike:l})=>l.includes("debian")||l.includes("ubuntu"),({id:l})=>({targetDistro:"debian",familyDistro:"debian",originalDistro:l})).when(({idLike:l})=>i==="arch"||l.includes("arch"),({id:l})=>({targetDistro:"debian",familyDistro:"arch",originalDistro:l})).when(({idLike:l})=>l.includes("centos")||l.includes("fedora")||l.includes("rhel")||l.includes("suse"),({id:l})=>({targetDistro:"rhel",familyDistro:"rhel",originalDistro:l})).otherwise(({id:l})=>({targetDistro:void 0,familyDistro:void 0,originalDistro:l}));return re(`Found distro info: ${JSON.stringify(a,null,2)}`),a}async function Eu(){let e="/etc/os-release";try{let r=await Vn.default.readFile(e,{encoding:"utf-8"});return yu(r)}catch{return{targetDistro:void 0,familyDistro:void 0,originalDistro:void 0}}}function bu(e){let r=/^OpenSSL\s(\d+\.\d+)\.\d+/.exec(e);if(r){let t=`${r[1]}.x`;return To(t)}}function bo(e){let r=/libssl\.so\.(\d)(\.\d)?/.exec(e);if(r){let t=`${r[1]}${r[2]??".0"}.x`;return To(t)}}function To(e){let r=(()=>{if(So(e))return e;let t=e.split(".");return t[1]="0",t.join(".")})();if(hu.includes(r))return r}function wu(e){return pr(e).with({familyDistro:"musl"},()=>(re('Trying platform-specific paths for "alpine"'),["/lib"])).with({familyDistro:"debian"},({archFromUname:r})=>(re('Trying platform-specific paths for "debian" (and "ubuntu")'),[`/usr/lib/${r}-linux-gnu`,`/lib/${r}-linux-gnu`])).with({familyDistro:"rhel"},()=>(re('Trying platform-specific paths for "rhel"'),["/lib64","/usr/lib64"])).otherwise(({familyDistro:r,arch:t,archFromUname:n})=>(re(`Don't know any platform-specific paths for "${r}" on ${t} (${n})`),[]))}async function xu(e){let r='grep -v "libssl.so.0"',t=await wo(e);if(t){re(`Found libssl.so file using platform-specific paths: ${t}`);let o=bo(t);if(re(`The parsed libssl version is: ${o}`),o)return{libssl:o,strategy:"libssl-specific-path"}}re('Falling back to "ldconfig" and other generic paths');let n=await Lt(`ldconfig -p | sed "s/.*=>s*//" | sed "s|.*/||" | grep libssl | sort | ${r}`);if(n||(n=await wo(["/lib64","/usr/lib64","/lib"])),n){re(`Found libssl.so file using "ldconfig" or other generic paths: ${n}`);let o=bo(n);if(re(`The parsed libssl version is: ${o}`),o)return{libssl:o,strategy:"ldconfig"}}let i=await Lt("openssl version -v");if(i){re(`Found openssl binary with version: ${i}`);let o=bu(i);if(re(`The parsed openssl version is: ${o}`),o)return{libssl:o,strategy:"openssl-binary"}}return re("Couldn't find any version of libssl or OpenSSL in the system"),{}}async function wo(e){for(let r of e){let t=await Pu(r);if(t)return t}}async function Pu(e){try{return(await Vn.default.readdir(e)).find(t=>t.startsWith("libssl.so.")&&!t.startsWith("libssl.so.0"))}catch(r){if(r.code==="ENOENT")return;throw r}}async function er(){let{binaryTarget:e}=await Co();return e}function vu(e){return e.binaryTarget!==void 0}async function Bn(){let{memoized:e,...r}=await Co();return r}var Dt={};async function Co(){if(vu(Dt))return Promise.resolve({...Dt,memoized:!0});let e=await vo(),r=Tu(e);return Dt={...e,binaryTarget:r},{...Dt,memoized:!1}}function Tu(e){let{platform:r,arch:t,archFromUname:n,libssl:i,targetDistro:o,familyDistro:s,originalDistro:a}=e;r==="linux"&&!["x64","arm64"].includes(t)&&kt(`Prisma only officially supports Linux on amd64 (x86_64) and arm64 (aarch64) system architectures (detected "${t}" instead). If you are using your own custom Prisma engines, you can ignore this warning, as long as you've compiled the engines for your system architecture "${n}".`);let l="1.1.x";if(r==="linux"&&i===void 0){let c=pr({familyDistro:s}).with({familyDistro:"debian"},()=>"Please manually install OpenSSL via `apt-get update -y && apt-get install -y openssl` and try installing Prisma again. If you're running Prisma on Docker, add this command to your Dockerfile, or switch to an image that already has OpenSSL installed.").otherwise(()=>"Please manually install OpenSSL and try installing Prisma again.");kt(`Prisma failed to detect the libssl/openssl version to use, and may not work as expected. Defaulting to "openssl-${l}". ${c}`)}let u="debian";if(r==="linux"&&o===void 0&&re(`Distro is "${a}". Falling back to Prisma engines built for "${u}".`),r==="darwin"&&t==="arm64")return"darwin-arm64";if(r==="darwin")return"darwin";if(r==="win32")return"windows";if(r==="freebsd")return o;if(r==="openbsd")return"openbsd";if(r==="netbsd")return"netbsd";if(r==="linux"&&o==="nixos")return"linux-nixos";if(r==="linux"&&t==="arm64")return`${o==="musl"?"linux-musl-arm64":"linux-arm64"}-openssl-${i||l}`;if(r==="linux"&&t==="arm")return`linux-arm-openssl-${i||l}`;if(r==="linux"&&o==="musl"){let c="linux-musl";return!i||So(i)?c:`${c}-openssl-${i}`}return r==="linux"&&o&&i?`${o}-openssl-${i}`:(r!=="linux"&&kt(`Prisma detected unknown OS "${r}" and may not work as expected. Defaulting to "linux".`),i?`${u}-openssl-${i}`:o?`${o}-openssl-${l}`:`${u}-openssl-${l}`)}async function Cu(e){try{return await e()}catch{return}}function Lt(e){return Cu(async()=>{let r=await gu(e);return re(`Command "${e}" successfully returned "${r.stdout}"`),r.stdout})}async function Su(){return typeof Ot.default.machine=="function"?Ot.default.machine():(await Lt("uname -m"))?.trim()}function So(e){return e.startsWith("1.")}var $o=k(Mo());function Kn(e){return(0,$o.default)(e,e,{fallback:X})}var Du=k(zn());var M=k(require("path")),Ou=k(zn()),mf=L("prisma:engines");function qo(){return M.default.join(__dirname,"../")}var ff="libquery-engine";M.default.join(__dirname,"../query-engine-darwin");M.default.join(__dirname,"../query-engine-darwin-arm64");M.default.join(__dirname,"../query-engine-debian-openssl-1.0.x");M.default.join(__dirname,"../query-engine-debian-openssl-1.1.x");M.default.join(__dirname,"../query-engine-debian-openssl-3.0.x");M.default.join(__dirname,"../query-engine-linux-static-x64");M.default.join(__dirname,"../query-engine-linux-static-arm64");M.default.join(__dirname,"../query-engine-rhel-openssl-1.0.x");M.default.join(__dirname,"../query-engine-rhel-openssl-1.1.x");M.default.join(__dirname,"../query-engine-rhel-openssl-3.0.x");M.default.join(__dirname,"../libquery_engine-darwin.dylib.node");M.default.join(__dirname,"../libquery_engine-darwin-arm64.dylib.node");M.default.join(__dirname,"../libquery_engine-debian-openssl-1.0.x.so.node");M.default.join(__dirname,"../libquery_engine-debian-openssl-1.1.x.so.node");M.default.join(__dirname,"../libquery_engine-debian-openssl-3.0.x.so.node");M.default.join(__dirname,"../libquery_engine-linux-arm64-openssl-1.0.x.so.node");M.default.join(__dirname,"../libquery_engine-linux-arm64-openssl-1.1.x.so.node");M.default.join(__dirname,"../libquery_engine-linux-arm64-openssl-3.0.x.so.node");M.default.join(__dirname,"../libquery_engine-linux-musl.so.node");M.default.join(__dirname,"../libquery_engine-linux-musl-openssl-3.0.x.so.node");M.default.join(__dirname,"../libquery_engine-rhel-openssl-1.0.x.so.node");M.default.join(__dirname,"../libquery_engine-rhel-openssl-1.1.x.so.node");M.default.join(__dirname,"../libquery_engine-rhel-openssl-3.0.x.so.node");M.default.join(__dirname,"../query_engine-windows.dll.node");var Zn=k(require("fs")),jo=L("chmodPlusX");function Xn(e){if(process.platform==="win32")return;let r=Zn.default.statSync(e),t=r.mode|64|8|1;if(r.mode===t){jo(`Execution permissions of ${e} are fine`);return}let n=t.toString(8).slice(-3);jo(`Have to call chmodPlusX on ${e}`),Zn.default.chmodSync(e,n)}function ei(e){let r=e.e,t=a=>`Prisma cannot find the required \`${a}\` system library in your system`,n=r.message.includes("cannot open shared object file"),i=`Please refer to the documentation about Prisma's system requirements: ${Kn("https://pris.ly/d/system-requirements")}`,o=`Unable to require(\`${Ie(e.id)}\`).`,s=pr({message:r.message,code:r.code}).with({code:"ENOENT"},()=>"File does not exist.").when(({message:a})=>n&&a.includes("libz"),()=>`${t("libz")}. Please install it and try again.`).when(({message:a})=>n&&a.includes("libgcc_s"),()=>`${t("libgcc_s")}. Please install it and try again.`).when(({message:a})=>n&&a.includes("libssl"),()=>{let a=e.platformInfo.libssl?`openssl-${e.platformInfo.libssl}`:"openssl";return`${t("libssl")}. Please install ${a} and try again.`}).when(({message:a})=>a.includes("GLIBC"),()=>`Prisma has detected an incompatible version of the \`glibc\` C standard library installed in your system. This probably means your system may be too old to run Prisma. ${i}`).when(({message:a})=>e.platformInfo.platform==="linux"&&a.includes("symbol not found"),()=>`The Prisma engines are not compatible with your system ${e.platformInfo.originalDistro} on (${e.platformInfo.archFromUname}) which uses the \`${e.platformInfo.binaryTarget}\` binaryTarget by default. ${i}`).otherwise(()=>`The Prisma engines do not seem to be compatible with your system. ${i}`);return`${o} ${s} Details: ${r.message}`}var ni=k(Uo()),qt=k(require("fs"));var fr=k(require("path"));function Qo(e){let r=e.ignoreProcessEnv?{}:process.env,t=n=>n.match(/(.?\${(?:[a-zA-Z0-9_]+)?})/g)?.reduce(function(o,s){let a=/(.?)\${([a-zA-Z0-9_]+)?}/g.exec(s);if(!a)return o;let l=a[1],u,c;if(l==="\\")c=a[0],u=c.replace("\\$","$");else{let p=a[2];c=a[0].substring(l.length),u=Object.hasOwnProperty.call(r,p)?r[p]:e.parsed[p]||"",u=t(u)}return o.replace(c,u)},n)??n;for(let n in e.parsed){let i=Object.hasOwnProperty.call(r,n)?r[n]:e.parsed[n];e.parsed[n]=t(i)}for(let n in e.parsed)r[n]=e.parsed[n];return e}var ti=L("prisma:tryLoadEnv");function Br({rootEnvPath:e,schemaEnvPath:r},t={conflictCheck:"none"}){let n=Go(e);t.conflictCheck!=="none"&&Uu(n,r,t.conflictCheck);let i=null;return Jo(n?.path,r)||(i=Go(r)),!n&&!i&&ti("No Environment variables loaded"),i?.dotenvResult.error?console.error(ue(W("Schema Env Error: "))+i.dotenvResult.error):{message:[n?.message,i?.message].filter(Boolean).join(` `),parsed:{...n?.dotenvResult?.parsed,...i?.dotenvResult?.parsed}}}function Uu(e,r,t){let n=e?.dotenvResult.parsed,i=!Jo(e?.path,r);if(n&&r&&i&&qt.default.existsSync(r)){let o=ni.default.parse(qt.default.readFileSync(r)),s=[];for(let a in o)n[a]===o[a]&&s.push(a);if(s.length>0){let a=fr.default.relative(process.cwd(),e.path),l=fr.default.relative(process.cwd(),r);if(t==="error"){let u=`There is a conflict between env var${s.length>1?"s":""} in ${X(a)} and ${X(l)} Conflicting env vars: ${s.map(c=>` ${W(c)}`).join(` `)} We suggest to move the contents of ${X(l)} to ${X(a)} to consolidate your env vars. `;throw new Error(u)}else if(t==="warn"){let u=`Conflict for env var${s.length>1?"s":""} ${s.map(c=>W(c)).join(", ")} in ${X(a)} and ${X(l)} Env vars from ${X(l)} overwrite the ones from ${X(a)} `;console.warn(`${fe("warn(prisma)")} ${u}`)}}}}function Go(e){if(Qu(e)){ti(`Environment variables loaded from ${e}`);let r=ni.default.config({path:e,debug:process.env.DOTENV_CONFIG_DEBUG?!0:void 0});return{dotenvResult:Qo(r),message:Ie(`Environment variables loaded from ${fr.default.relative(process.cwd(),e)}`),path:e}}else ti(`Environment variables not found at ${e}`);return null}function Jo(e,r){return e&&r&&fr.default.resolve(e)===fr.default.resolve(r)}function Qu(e){return!!(e&&qt.default.existsSync(e))}var Wo="library";function Ur(e){let r=Gu();return r||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":Wo)}function Gu(){let e=process.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":void 0}var De;(r=>{let e;(b=>(b.findUnique="findUnique",b.findUniqueOrThrow="findUniqueOrThrow",b.findFirst="findFirst",b.findFirstOrThrow="findFirstOrThrow",b.findMany="findMany",b.create="create",b.createMany="createMany",b.createManyAndReturn="createManyAndReturn",b.update="update",b.updateMany="updateMany",b.upsert="upsert",b.delete="delete",b.deleteMany="deleteMany",b.groupBy="groupBy",b.count="count",b.aggregate="aggregate",b.findRaw="findRaw",b.aggregateRaw="aggregateRaw"))(e=r.ModelAction||(r.ModelAction={}))})(De||(De={}));var Qr=k(require("path"));function ii(e){return Qr.default.sep===Qr.default.posix.sep?e:e.split(Qr.default.sep).join(Qr.default.posix.sep)}var Xo=k(oi());function ai(e){return String(new si(e))}var si=class{constructor(r){this.config=r}toString(){let{config:r}=this,t=r.provider.fromEnvVar?`env("${r.provider.fromEnvVar}")`:r.provider.value,n=JSON.parse(JSON.stringify({provider:t,binaryTargets:Wu(r.binaryTargets)}));return`generator ${r.name} { ${(0,Xo.default)(Hu(n),2)} }`}};function Wu(e){let r;if(e.length>0){let t=e.find(n=>n.fromEnvVar!==null);t?r=`env("${t.fromEnvVar}")`:r=e.map(n=>n.native?"native":n.value)}else r=void 0;return r}function Hu(e){let r=Object.keys(e).reduce((t,n)=>Math.max(t,n.length),0);return Object.entries(e).map(([t,n])=>`${t.padEnd(r)} = ${Ku(n)}`).join(` `)}function Ku(e){return JSON.parse(JSON.stringify(e,(r,t)=>Array.isArray(t)?`[${t.map(n=>JSON.stringify(n)).join(", ")}]`:JSON.stringify(t)))}var Jr={};Fr(Jr,{error:()=>Zu,info:()=>zu,log:()=>Yu,query:()=>Xu,should:()=>es,tags:()=>Gr,warn:()=>li});var Gr={error:ue("prisma:error"),warn:fe("prisma:warn"),info:_e("prisma:info"),query:ze("prisma:query")},es={warn:()=>!process.env.PRISMA_DISABLE_WARNINGS};function Yu(...e){console.log(...e)}function li(e,...r){es.warn()&&console.warn(`${Gr.warn} ${e}`,...r)}function zu(e,...r){console.info(`${Gr.info} ${e}`,...r)}function Zu(e,...r){console.error(`${Gr.error} ${e}`,...r)}function Xu(e,...r){console.log(`${Gr.query} ${e}`,...r)}function jt(e,r){if(!e)throw new Error(`${r}. This should never happen. If you see this error, please, open an issue at https://pris.ly/prisma-prisma-bug-report`)}function rr(e,r){throw new Error(r)}function ci(e,r){return Object.prototype.hasOwnProperty.call(e,r)}var pi=(e,r)=>e.reduce((t,n)=>(t[r(n)]=n,t),{});function gr(e,r){let t={};for(let n of Object.keys(e))t[n]=r(e[n],n);return t}function di(e,r){if(e.length===0)return;let t=e[0];for(let n=1;n{os.has(e)||(os.add(e),li(r,...t))};var V=class extends Error{constructor(r,{code:t,clientVersion:n,meta:i,batchRequestIdx:o}){super(r),this.name="PrismaClientKnownRequestError",this.code=t,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};w(V,"PrismaClientKnownRequestError");var Oe=class extends V{constructor(r,t){super(r,{code:"P2025",clientVersion:t}),this.name="NotFoundError"}};w(Oe,"NotFoundError");var R=class e extends Error{constructor(r,t,n){super(r),this.name="PrismaClientInitializationError",this.clientVersion=t,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};w(R,"PrismaClientInitializationError");var le=class extends Error{constructor(r,t){super(r),this.name="PrismaClientRustPanicError",this.clientVersion=t}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};w(le,"PrismaClientRustPanicError");var B=class extends Error{constructor(r,{clientVersion:t,batchRequestIdx:n}){super(r),this.name="PrismaClientUnknownRequestError",this.clientVersion=t,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};w(B,"PrismaClientUnknownRequestError");var H=class extends Error{constructor(t,{clientVersion:n}){super(t);this.name="PrismaClientValidationError";this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};w(H,"PrismaClientValidationError");var hr=class{constructor(r){this._engine=r}prometheus(r){return this._engine.metrics({format:"prometheus",...r})}json(r){return this._engine.metrics({format:"json",...r})}};function Hr(e){let r;return{get(){return r||(r={value:e()}),r.value}}}function ss(e,r){let t=Hr(()=>rc(r));Object.defineProperty(e,"dmmf",{get:()=>t.get()})}function rc(e){return{datamodel:{models:mi(e.models),enums:mi(e.enums),types:mi(e.types)}}}function mi(e){return Object.entries(e).map(([r,t])=>({name:r,...t}))}var Ut=Symbol(),fi=new WeakMap,Le=class{constructor(r){r===Ut?fi.set(this,`Prisma.${this._getName()}`):fi.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return fi.get(this)}},Kr=class extends Le{_getNamespace(){return"NullTypes"}},Yr=class extends Kr{};gi(Yr,"DbNull");var zr=class extends Kr{};gi(zr,"JsonNull");var Zr=class extends Kr{};gi(Zr,"AnyNull");var Qt={classes:{DbNull:Yr,JsonNull:zr,AnyNull:Zr},instances:{DbNull:new Yr(Ut),JsonNull:new zr(Ut),AnyNull:new Zr(Ut)}};function gi(e,r){Object.defineProperty(e,"name",{value:r,configurable:!0})}function Xr(e){return{ok:!1,error:e,map(){return Xr(e)},flatMap(){return Xr(e)}}}var hi=class{constructor(){this.registeredErrors=[]}consumeError(r){return this.registeredErrors[r]}registerNewError(r){let t=0;for(;this.registeredErrors[t]!==void 0;)t++;return this.registeredErrors[t]={error:r},t}},yi=e=>{let r=new hi,t=tr(r,e.startTransaction.bind(e)),n={adapterName:e.adapterName,errorRegistry:r,queryRaw:tr(r,e.queryRaw.bind(e)),executeRaw:tr(r,e.executeRaw.bind(e)),provider:e.provider,startTransaction:async(...i)=>(await t(...i)).map(s=>tc(r,s))};return e.getConnectionInfo&&(n.getConnectionInfo=nc(r,e.getConnectionInfo.bind(e))),n},tc=(e,r)=>({adapterName:r.adapterName,provider:r.provider,options:r.options,queryRaw:tr(e,r.queryRaw.bind(r)),executeRaw:tr(e,r.executeRaw.bind(r)),commit:tr(e,r.commit.bind(r)),rollback:tr(e,r.rollback.bind(r))});function tr(e,r){return async(...t)=>{try{return await r(...t)}catch(n){let i=e.registerNewError(n);return Xr({kind:"GenericJs",id:i})}}}function nc(e,r){return(...t)=>{try{return r(...t)}catch(n){let i=e.registerNewError(n);return Xr({kind:"GenericJs",id:i})}}}var _l=k(Yn());var kl=require("async_hooks"),Dl=require("events"),Ol=k(require("fs")),vt=k(require("path"));var ie=class e{constructor(r,t){if(r.length-1!==t.length)throw r.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${r.length} strings to have ${r.length-1} values`);let n=t.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=r[0];let i=0,o=0;for(;ie.getPropertyValue(t))},getPropertyDescriptor(t){return e.getPropertyDescriptor?.(t)}}}var Gt={enumerable:!0,configurable:!0,writable:!0};function Jt(e){let r=new Set(e);return{getOwnPropertyDescriptor:()=>Gt,has:(t,n)=>r.has(n),set:(t,n,i)=>r.add(n)&&Reflect.set(t,n,i),ownKeys:()=>[...r]}}var us=Symbol.for("nodejs.util.inspect.custom");function Pe(e,r){let t=ic(r),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=t.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=t.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=cs(Reflect.ownKeys(o),t),a=cs(Array.from(t.keys()),t);return[...new Set([...s,...a,...n])]},set(o,s,a){return t.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let l=t.get(s);return l?l.getPropertyDescriptor?{...Gt,...l?.getPropertyDescriptor(s)}:Gt:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)}});return i[us]=function(){let o={...this};return delete o[us],o},i}function ic(e){let r=new Map;for(let t of e){let n=t.getKeys();for(let i of n)r.set(i,t)}return r}function cs(e,r){return e.filter(t=>r.get(t)?.has?.(t)??!0)}function yr(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}function Er(e,r){return{batch:e,transaction:r?.kind==="batch"?{isolationLevel:r.options.isolationLevel}:void 0}}var br=class{constructor(r=0,t){this.context=t;this.lines=[];this.currentLine="";this.currentIndent=0;this.currentIndent=r}write(r){return typeof r=="string"?this.currentLine+=r:r.write(this),this}writeJoined(r,t){let n=t.length-1;for(let i=0;i0&&this.currentIndent--,this}addMarginSymbol(r){return this.marginSymbol=r,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` `)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let r=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+r.slice(1):r}};function ps(e){return e.substring(0,1).toLowerCase()+e.substring(1)}function wr(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function Wt(e){return e.toString()!=="Invalid Date"}var xr=9e15,Ge=1e9,wi="0123456789abcdef",Kt="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Yt="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",xi={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-xr,maxE:xr,crypto:!1},gs,Fe,x=!0,Zt="[DecimalError] ",Qe=Zt+"Invalid argument: ",hs=Zt+"Precision limit exceeded",ys=Zt+"crypto unavailable",Es="[object Decimal]",ee=Math.floor,Q=Math.pow,oc=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,sc=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,ac=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,bs=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,he=1e7,E=7,lc=9007199254740991,uc=Kt.length-1,Pi=Yt.length-1,m={toStringTag:Es};m.absoluteValue=m.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),y(e)};m.ceil=function(){return y(new this.constructor(this),this.e+1,2)};m.clampedTo=m.clamp=function(e,r){var t,n=this,i=n.constructor;if(e=new i(e),r=new i(r),!e.s||!r.s)return new i(NaN);if(e.gt(r))throw Error(Qe+r);return t=n.cmp(e),t<0?e:n.cmp(r)>0?r:new i(n)};m.comparedTo=m.cmp=function(e){var r,t,n,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,l=o.s,u=e.s;if(!s||!a)return!l||!u?NaN:l!==u?l:s===a?0:!s^l<0?1:-1;if(!s[0]||!a[0])return s[0]?l:a[0]?-u:0;if(l!==u)return l;if(o.e!==e.e)return o.e>e.e^l<0?1:-1;for(n=s.length,i=a.length,r=0,t=na[r]^l<0?1:-1;return n===i?0:n>i^l<0?1:-1};m.cosine=m.cos=function(){var e,r,t=this,n=t.constructor;return t.d?t.d[0]?(e=n.precision,r=n.rounding,n.precision=e+Math.max(t.e,t.sd())+E,n.rounding=1,t=cc(n,Ts(n,t)),n.precision=e,n.rounding=r,y(Fe==2||Fe==3?t.neg():t,e,r,!0)):new n(1):new n(NaN)};m.cubeRoot=m.cbrt=function(){var e,r,t,n,i,o,s,a,l,u,c=this,p=c.constructor;if(!c.isFinite()||c.isZero())return new p(c);for(x=!1,o=c.s*Q(c.s*c,1/3),!o||Math.abs(o)==1/0?(t=K(c.d),e=c.e,(o=(e-t.length+1)%3)&&(t+=o==1||o==-2?"0":"00"),o=Q(t,1/3),e=ee((e+1)/3)-(e%3==(e<0?-1:2)),o==1/0?t="5e"+e:(t=o.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new p(t),n.s=c.s):n=new p(o.toString()),s=(e=p.precision)+3;;)if(a=n,l=a.times(a).times(a),u=l.plus(c),n=F(u.plus(c).times(a),u.plus(l),s+2,1),K(a.d).slice(0,s)===(t=K(n.d)).slice(0,s))if(t=t.slice(s-3,s+1),t=="9999"||!i&&t=="4999"){if(!i&&(y(a,e+1,0),a.times(a).times(a).eq(c))){n=a;break}s+=4,i=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(y(n,e+1,1),r=!n.times(n).times(n).eq(c));break}return x=!0,y(n,e,p.rounding,r)};m.decimalPlaces=m.dp=function(){var e,r=this.d,t=NaN;if(r){if(e=r.length-1,t=(e-ee(this.e/E))*E,e=r[e],e)for(;e%10==0;e/=10)t--;t<0&&(t=0)}return t};m.dividedBy=m.div=function(e){return F(this,new this.constructor(e))};m.dividedToIntegerBy=m.divToInt=function(e){var r=this,t=r.constructor;return y(F(r,new t(e),0,1,1),t.precision,t.rounding)};m.equals=m.eq=function(e){return this.cmp(e)===0};m.floor=function(){return y(new this.constructor(this),this.e+1,3)};m.greaterThan=m.gt=function(e){return this.cmp(e)>0};m.greaterThanOrEqualTo=m.gte=function(e){var r=this.cmp(e);return r==1||r===0};m.hyperbolicCosine=m.cosh=function(){var e,r,t,n,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;t=s.precision,n=s.rounding,s.precision=t+Math.max(o.e,o.sd())+4,s.rounding=1,i=o.d.length,i<32?(e=Math.ceil(i/3),r=(1/en(4,e)).toString()):(e=16,r="2.3283064365386962890625e-10"),o=Pr(s,1,o.times(r),new s(1),!0);for(var l,u=e,c=new s(8);u--;)l=o.times(o),o=a.minus(l.times(c.minus(l.times(c))));return y(o,s.precision=t,s.rounding=n,!0)};m.hyperbolicSine=m.sinh=function(){var e,r,t,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(r=o.precision,t=o.rounding,o.precision=r+Math.max(i.e,i.sd())+4,o.rounding=1,n=i.d.length,n<3)i=Pr(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/en(5,e)),i=Pr(o,2,i,i,!0);for(var s,a=new o(5),l=new o(16),u=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(l.times(s).plus(u))))}return o.precision=r,o.rounding=t,y(i,r,t,!0)};m.hyperbolicTangent=m.tanh=function(){var e,r,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(e=n.precision,r=n.rounding,n.precision=e+7,n.rounding=1,F(t.sinh(),t.cosh(),n.precision=e,n.rounding=r)):new n(t.s)};m.inverseCosine=m.acos=function(){var e,r=this,t=r.constructor,n=r.abs().cmp(1),i=t.precision,o=t.rounding;return n!==-1?n===0?r.isNeg()?ge(t,i,o):new t(0):new t(NaN):r.isZero()?ge(t,i+4,o).times(.5):(t.precision=i+6,t.rounding=1,r=r.asin(),e=ge(t,i+4,o).times(.5),t.precision=i,t.rounding=o,e.minus(r))};m.inverseHyperbolicCosine=m.acosh=function(){var e,r,t=this,n=t.constructor;return t.lte(1)?new n(t.eq(1)?0:NaN):t.isFinite()?(e=n.precision,r=n.rounding,n.precision=e+Math.max(Math.abs(t.e),t.sd())+4,n.rounding=1,x=!1,t=t.times(t).minus(1).sqrt().plus(t),x=!0,n.precision=e,n.rounding=r,t.ln()):new n(t)};m.inverseHyperbolicSine=m.asinh=function(){var e,r,t=this,n=t.constructor;return!t.isFinite()||t.isZero()?new n(t):(e=n.precision,r=n.rounding,n.precision=e+2*Math.max(Math.abs(t.e),t.sd())+6,n.rounding=1,x=!1,t=t.times(t).plus(1).sqrt().plus(t),x=!0,n.precision=e,n.rounding=r,t.ln())};m.inverseHyperbolicTangent=m.atanh=function(){var e,r,t,n,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,r=o.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?y(new o(i),e,r,!0):(o.precision=t=n-i.e,i=F(i.plus(1),new o(1).minus(i),t+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=r,i.times(.5))):new o(NaN)};m.inverseSine=m.asin=function(){var e,r,t,n,i=this,o=i.constructor;return i.isZero()?new o(i):(r=i.abs().cmp(1),t=o.precision,n=o.rounding,r!==-1?r===0?(e=ge(o,t+4,n).times(.5),e.s=i.s,e):new o(NaN):(o.precision=t+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=t,o.rounding=n,i.times(2)))};m.inverseTangent=m.atan=function(){var e,r,t,n,i,o,s,a,l,u=this,c=u.constructor,p=c.precision,d=c.rounding;if(u.isFinite()){if(u.isZero())return new c(u);if(u.abs().eq(1)&&p+4<=Pi)return s=ge(c,p+4,d).times(.25),s.s=u.s,s}else{if(!u.s)return new c(NaN);if(p+4<=Pi)return s=ge(c,p+4,d).times(.5),s.s=u.s,s}for(c.precision=a=p+10,c.rounding=1,t=Math.min(28,a/E+2|0),e=t;e;--e)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(x=!1,r=Math.ceil(a/E),n=1,l=u.times(u),s=new c(u),i=u;e!==-1;)if(i=i.times(l),o=s.minus(i.div(n+=2)),i=i.times(l),s=o.plus(i.div(n+=2)),s.d[r]!==void 0)for(e=r;s.d[e]===o.d[e]&&e--;);return t&&(s=s.times(2<this.d.length-2};m.isNaN=function(){return!this.s};m.isNegative=m.isNeg=function(){return this.s<0};m.isPositive=m.isPos=function(){return this.s>0};m.isZero=function(){return!!this.d&&this.d[0]===0};m.lessThan=m.lt=function(e){return this.cmp(e)<0};m.lessThanOrEqualTo=m.lte=function(e){return this.cmp(e)<1};m.logarithm=m.log=function(e){var r,t,n,i,o,s,a,l,u=this,c=u.constructor,p=c.precision,d=c.rounding,f=5;if(e==null)e=new c(10),r=!0;else{if(e=new c(e),t=e.d,e.s<0||!t||!t[0]||e.eq(1))return new c(NaN);r=e.eq(10)}if(t=u.d,u.s<0||!t||!t[0]||u.eq(1))return new c(t&&!t[0]?-1/0:u.s!=1?NaN:t?0:1/0);if(r)if(t.length>1)o=!0;else{for(i=t[0];i%10===0;)i/=10;o=i!==1}if(x=!1,a=p+f,s=Ue(u,a),n=r?zt(c,a+10):Ue(e,a),l=F(s,n,a,1),rt(l.d,i=p,d))do if(a+=10,s=Ue(u,a),n=r?zt(c,a+10):Ue(e,a),l=F(s,n,a,1),!o){+K(l.d).slice(i+1,i+15)+1==1e14&&(l=y(l,p+1,0));break}while(rt(l.d,i+=10,d));return x=!0,y(l,p,d)};m.minus=m.sub=function(e){var r,t,n,i,o,s,a,l,u,c,p,d,f=this,g=f.constructor;if(e=new g(e),!f.d||!e.d)return!f.s||!e.s?e=new g(NaN):f.d?e.s=-e.s:e=new g(e.d||f.s!==e.s?f:NaN),e;if(f.s!=e.s)return e.s=-e.s,f.plus(e);if(u=f.d,d=e.d,a=g.precision,l=g.rounding,!u[0]||!d[0]){if(d[0])e.s=-e.s;else if(u[0])e=new g(f);else return new g(l===3?-0:0);return x?y(e,a,l):e}if(t=ee(e.e/E),c=ee(f.e/E),u=u.slice(),o=c-t,o){for(p=o<0,p?(r=u,o=-o,s=d.length):(r=d,t=c,s=u.length),n=Math.max(Math.ceil(a/E),s)+2,o>n&&(o=n,r.length=1),r.reverse(),n=o;n--;)r.push(0);r.reverse()}else{for(n=u.length,s=d.length,p=n0;--n)u[s++]=0;for(n=d.length;n>o;){if(u[--n]s?o+1:s+1,i>s&&(i=s,t.length=1),t.reverse();i--;)t.push(0);t.reverse()}for(s=u.length,i=c.length,s-i<0&&(i=s,t=c,c=u,u=t),r=0;i;)r=(u[--i]=u[i]+c[i]+r)/he|0,u[i]%=he;for(r&&(u.unshift(r),++n),s=u.length;u[--s]==0;)u.pop();return e.d=u,e.e=Xt(u,n),x?y(e,a,l):e};m.precision=m.sd=function(e){var r,t=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Qe+e);return t.d?(r=ws(t.d),e&&t.e+1>r&&(r=t.e+1)):r=NaN,r};m.round=function(){var e=this,r=e.constructor;return y(new r(e),e.e+1,r.rounding)};m.sine=m.sin=function(){var e,r,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(e=n.precision,r=n.rounding,n.precision=e+Math.max(t.e,t.sd())+E,n.rounding=1,t=dc(n,Ts(n,t)),n.precision=e,n.rounding=r,y(Fe>2?t.neg():t,e,r,!0)):new n(NaN)};m.squareRoot=m.sqrt=function(){var e,r,t,n,i,o,s=this,a=s.d,l=s.e,u=s.s,c=s.constructor;if(u!==1||!a||!a[0])return new c(!u||u<0&&(!a||a[0])?NaN:a?s:1/0);for(x=!1,u=Math.sqrt(+s),u==0||u==1/0?(r=K(a),(r.length+l)%2==0&&(r+="0"),u=Math.sqrt(r),l=ee((l+1)/2)-(l<0||l%2),u==1/0?r="5e"+l:(r=u.toExponential(),r=r.slice(0,r.indexOf("e")+1)+l),n=new c(r)):n=new c(u.toString()),t=(l=c.precision)+3;;)if(o=n,n=o.plus(F(s,o,t+2,1)).times(.5),K(o.d).slice(0,t)===(r=K(n.d)).slice(0,t))if(r=r.slice(t-3,t+1),r=="9999"||!i&&r=="4999"){if(!i&&(y(o,l+1,0),o.times(o).eq(s))){n=o;break}t+=4,i=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(y(n,l+1,1),e=!n.times(n).eq(s));break}return x=!0,y(n,l,c.rounding,e)};m.tangent=m.tan=function(){var e,r,t=this,n=t.constructor;return t.isFinite()?t.isZero()?new n(t):(e=n.precision,r=n.rounding,n.precision=e+10,n.rounding=1,t=t.sin(),t.s=1,t=F(t,new n(1).minus(t.times(t)).sqrt(),e+10,0),n.precision=e,n.rounding=r,y(Fe==2||Fe==4?t.neg():t,e,r,!0)):new n(NaN)};m.times=m.mul=function(e){var r,t,n,i,o,s,a,l,u,c=this,p=c.constructor,d=c.d,f=(e=new p(e)).d;if(e.s*=c.s,!d||!d[0]||!f||!f[0])return new p(!e.s||d&&!d[0]&&!f||f&&!f[0]&&!d?NaN:!d||!f?e.s/0:e.s*0);for(t=ee(c.e/E)+ee(e.e/E),l=d.length,u=f.length,l=0;){for(r=0,i=l+n;i>n;)a=o[i]+f[n]*d[i-n-1]+r,o[i--]=a%he|0,r=a/he|0;o[i]=(o[i]+r)%he|0}for(;!o[--s];)o.pop();return r?++t:o.shift(),e.d=o,e.e=Xt(o,t),x?y(e,p.precision,p.rounding):e};m.toBinary=function(e,r){return Ci(this,2,e,r)};m.toDecimalPlaces=m.toDP=function(e,r){var t=this,n=t.constructor;return t=new n(t),e===void 0?t:(oe(e,0,Ge),r===void 0?r=n.rounding:oe(r,0,8),y(t,e+t.e+1,r))};m.toExponential=function(e,r){var t,n=this,i=n.constructor;return e===void 0?t=ve(n,!0):(oe(e,0,Ge),r===void 0?r=i.rounding:oe(r,0,8),n=y(new i(n),e+1,r),t=ve(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+t:t};m.toFixed=function(e,r){var t,n,i=this,o=i.constructor;return e===void 0?t=ve(i):(oe(e,0,Ge),r===void 0?r=o.rounding:oe(r,0,8),n=y(new o(i),e+i.e+1,r),t=ve(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+t:t};m.toFraction=function(e){var r,t,n,i,o,s,a,l,u,c,p,d,f=this,g=f.d,h=f.constructor;if(!g)return new h(f);if(u=t=new h(1),n=l=new h(0),r=new h(n),o=r.e=ws(g)-f.e-1,s=o%E,r.d[0]=Q(10,s<0?E+s:s),e==null)e=o>0?r:u;else{if(a=new h(e),!a.isInt()||a.lt(u))throw Error(Qe+a);e=a.gt(r)?o>0?r:u:a}for(x=!1,a=new h(K(g)),c=h.precision,h.precision=o=g.length*E*2;p=F(a,r,0,1,1),i=t.plus(p.times(n)),i.cmp(e)!=1;)t=n,n=i,i=u,u=l.plus(p.times(i)),l=i,i=r,r=a.minus(p.times(i)),a=i;return i=F(e.minus(t),n,0,1,1),l=l.plus(i.times(u)),t=t.plus(i.times(n)),l.s=u.s=f.s,d=F(u,n,o,1).minus(f).abs().cmp(F(l,t,o,1).minus(f).abs())<1?[u,n]:[l,t],h.precision=c,x=!0,d};m.toHexadecimal=m.toHex=function(e,r){return Ci(this,16,e,r)};m.toNearest=function(e,r){var t=this,n=t.constructor;if(t=new n(t),e==null){if(!t.d)return t;e=new n(1),r=n.rounding}else{if(e=new n(e),r===void 0?r=n.rounding:oe(r,0,8),!t.d)return e.s?t:e;if(!e.d)return e.s&&(e.s=t.s),e}return e.d[0]?(x=!1,t=F(t,e,0,r,1).times(e),x=!0,y(t)):(e.s=t.s,t=e),t};m.toNumber=function(){return+this};m.toOctal=function(e,r){return Ci(this,8,e,r)};m.toPower=m.pow=function(e){var r,t,n,i,o,s,a=this,l=a.constructor,u=+(e=new l(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new l(Q(+a,u));if(a=new l(a),a.eq(1))return a;if(n=l.precision,o=l.rounding,e.eq(1))return y(a,n,o);if(r=ee(e.e/E),r>=e.d.length-1&&(t=u<0?-u:u)<=lc)return i=xs(l,a,t,n),e.s<0?new l(1).div(i):y(i,n,o);if(s=a.s,s<0){if(rl.maxE+1||r0?s/0:0):(x=!1,l.rounding=a.s=1,t=Math.min(12,(r+"").length),i=vi(e.times(Ue(a,n+t)),n),i.d&&(i=y(i,n+5,1),rt(i.d,n,o)&&(r=n+10,i=y(vi(e.times(Ue(a,r+t)),r),r+5,1),+K(i.d).slice(n+1,n+15)+1==1e14&&(i=y(i,n+1,0)))),i.s=s,x=!0,l.rounding=o,y(i,n,o))};m.toPrecision=function(e,r){var t,n=this,i=n.constructor;return e===void 0?t=ve(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(oe(e,1,Ge),r===void 0?r=i.rounding:oe(r,0,8),n=y(new i(n),e,r),t=ve(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+t:t};m.toSignificantDigits=m.toSD=function(e,r){var t=this,n=t.constructor;return e===void 0?(e=n.precision,r=n.rounding):(oe(e,1,Ge),r===void 0?r=n.rounding:oe(r,0,8)),y(new n(t),e,r)};m.toString=function(){var e=this,r=e.constructor,t=ve(e,e.e<=r.toExpNeg||e.e>=r.toExpPos);return e.isNeg()&&!e.isZero()?"-"+t:t};m.truncated=m.trunc=function(){return y(new this.constructor(this),this.e+1,1)};m.valueOf=m.toJSON=function(){var e=this,r=e.constructor,t=ve(e,e.e<=r.toExpNeg||e.e>=r.toExpPos);return e.isNeg()?"-"+t:t};function K(e){var r,t,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,r=1;rt)throw Error(Qe+e)}function rt(e,r,t,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--r;return--r<0?(r+=E,i=0):(i=Math.ceil((r+1)/E),r%=E),o=Q(10,E-r),a=e[i]%o|0,n==null?r<3?(r==0?a=a/100|0:r==1&&(a=a/10|0),s=t<4&&a==99999||t>3&&a==49999||a==5e4||a==0):s=(t<4&&a+1==o||t>3&&a+1==o/2)&&(e[i+1]/o/100|0)==Q(10,r-2)-1||(a==o/2||a==0)&&(e[i+1]/o/100|0)==0:r<4?(r==0?a=a/1e3|0:r==1?a=a/100|0:r==2&&(a=a/10|0),s=(n||t<4)&&a==9999||!n&&t>3&&a==4999):s=((n||t<4)&&a+1==o||!n&&t>3&&a+1==o/2)&&(e[i+1]/o/1e3|0)==Q(10,r-3)-1,s}function Ht(e,r,t){for(var n,i=[0],o,s=0,a=e.length;st-1&&(i[n+1]===void 0&&(i[n+1]=0),i[n+1]+=i[n]/t|0,i[n]%=t)}return i.reverse()}function cc(e,r){var t,n,i;if(r.isZero())return r;n=r.d.length,n<32?(t=Math.ceil(n/3),i=(1/en(4,t)).toString()):(t=16,i="2.3283064365386962890625e-10"),e.precision+=t,r=Pr(e,1,r.times(i),new e(1));for(var o=t;o--;){var s=r.times(r);r=s.times(s).minus(s).times(8).plus(1)}return e.precision-=t,r}var F=function(){function e(n,i,o){var s,a=0,l=n.length;for(n=n.slice();l--;)s=n[l]*i+a,n[l]=s%o|0,a=s/o|0;return a&&n.unshift(a),n}function r(n,i,o,s){var a,l;if(o!=s)l=o>s?1:-1;else for(a=l=0;ai[a]?1:-1;break}return l}function t(n,i,o,s){for(var a=0;o--;)n[o]-=a,a=n[o]1;)n.shift()}return function(n,i,o,s,a,l){var u,c,p,d,f,g,h,I,T,S,C,b,me,ae,Lr,U,ne,Ae,Y,cr,Tt=n.constructor,_n=n.s==i.s?1:-1,z=n.d,O=i.d;if(!z||!z[0]||!O||!O[0])return new Tt(!n.s||!i.s||(z?O&&z[0]==O[0]:!O)?NaN:z&&z[0]==0||!O?_n*0:_n/0);for(l?(f=1,c=n.e-i.e):(l=he,f=E,c=ee(n.e/f)-ee(i.e/f)),Y=O.length,ne=z.length,T=new Tt(_n),S=T.d=[],p=0;O[p]==(z[p]||0);p++);if(O[p]>(z[p]||0)&&c--,o==null?(ae=o=Tt.precision,s=Tt.rounding):a?ae=o+(n.e-i.e)+1:ae=o,ae<0)S.push(1),g=!0;else{if(ae=ae/f+2|0,p=0,Y==1){for(d=0,O=O[0],ae++;(p1&&(O=e(O,d,l),z=e(z,d,l),Y=O.length,ne=z.length),U=Y,C=z.slice(0,Y),b=C.length;b=l/2&&++Ae;do d=0,u=r(O,C,Y,b),u<0?(me=C[0],Y!=b&&(me=me*l+(C[1]||0)),d=me/Ae|0,d>1?(d>=l&&(d=l-1),h=e(O,d,l),I=h.length,b=C.length,u=r(h,C,I,b),u==1&&(d--,t(h,Y=10;d/=10)p++;T.e=p+c*f-1,y(T,a?o+T.e+1:o,s,g)}return T}}();function y(e,r,t,n){var i,o,s,a,l,u,c,p,d,f=e.constructor;e:if(r!=null){if(p=e.d,!p)return e;for(i=1,a=p[0];a>=10;a/=10)i++;if(o=r-i,o<0)o+=E,s=r,c=p[d=0],l=c/Q(10,i-s-1)%10|0;else if(d=Math.ceil((o+1)/E),a=p.length,d>=a)if(n){for(;a++<=d;)p.push(0);c=l=0,i=1,o%=E,s=o-E+1}else break e;else{for(c=a=p[d],i=1;a>=10;a/=10)i++;o%=E,s=o-E+i,l=s<0?0:c/Q(10,i-s-1)%10|0}if(n=n||r<0||p[d+1]!==void 0||(s<0?c:c%Q(10,i-s-1)),u=t<4?(l||n)&&(t==0||t==(e.s<0?3:2)):l>5||l==5&&(t==4||n||t==6&&(o>0?s>0?c/Q(10,i-s):0:p[d-1])%10&1||t==(e.s<0?8:7)),r<1||!p[0])return p.length=0,u?(r-=e.e+1,p[0]=Q(10,(E-r%E)%E),e.e=-r||0):p[0]=e.e=0,e;if(o==0?(p.length=d,a=1,d--):(p.length=d+1,a=Q(10,E-o),p[d]=s>0?(c/Q(10,i-s)%Q(10,s)|0)*a:0),u)for(;;)if(d==0){for(o=1,s=p[0];s>=10;s/=10)o++;for(s=p[0]+=a,a=1;s>=10;s/=10)a++;o!=a&&(e.e++,p[0]==he&&(p[0]=1));break}else{if(p[d]+=a,p[d]!=he)break;p[d--]=0,a=1}for(o=p.length;p[--o]===0;)p.pop()}return x&&(e.e>f.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+Be(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+Be(-i-1)+o,t&&(n=t-s)>0&&(o+=Be(n))):i>=s?(o+=Be(i+1-s),t&&(n=t-i-1)>0&&(o=o+"."+Be(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Be(n))),o}function Xt(e,r){var t=e[0];for(r*=E;t>=10;t/=10)r++;return r}function zt(e,r,t){if(r>uc)throw x=!0,t&&(e.precision=t),Error(hs);return y(new e(Kt),r,1,!0)}function ge(e,r,t){if(r>Pi)throw Error(hs);return y(new e(Yt),r,t,!0)}function ws(e){var r=e.length-1,t=r*E+1;if(r=e[r],r){for(;r%10==0;r/=10)t--;for(r=e[0];r>=10;r/=10)t++}return t}function Be(e){for(var r="";e--;)r+="0";return r}function xs(e,r,t,n){var i,o=new e(1),s=Math.ceil(n/E+4);for(x=!1;;){if(t%2&&(o=o.times(r),ms(o.d,s)&&(i=!0)),t=ee(t/2),t===0){t=o.d.length-1,i&&o.d[t]===0&&++o.d[t];break}r=r.times(r),ms(r.d,s)}return x=!0,o}function ds(e){return e.d[e.d.length-1]&1}function Ps(e,r,t){for(var n,i=new e(r[0]),o=0;++o17)return new d(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(r==null?(x=!1,l=g):l=r,a=new d(.03125);e.e>-2;)e=e.times(a),p+=5;for(n=Math.log(Q(2,p))/Math.LN10*2+5|0,l+=n,t=o=s=new d(1),d.precision=l;;){if(o=y(o.times(e),l,1),t=t.times(++c),a=s.plus(F(o,t,l,1)),K(a.d).slice(0,l)===K(s.d).slice(0,l)){for(i=p;i--;)s=y(s.times(s),l,1);if(r==null)if(u<3&&rt(s.d,l-n,f,u))d.precision=l+=10,t=o=a=new d(1),c=0,u++;else return y(s,d.precision=g,f,x=!0);else return d.precision=g,s}s=a}}function Ue(e,r){var t,n,i,o,s,a,l,u,c,p,d,f=1,g=10,h=e,I=h.d,T=h.constructor,S=T.rounding,C=T.precision;if(h.s<0||!I||!I[0]||!h.e&&I[0]==1&&I.length==1)return new T(I&&!I[0]?-1/0:h.s!=1?NaN:I?0:h);if(r==null?(x=!1,c=C):c=r,T.precision=c+=g,t=K(I),n=t.charAt(0),Math.abs(o=h.e)<15e14){for(;n<7&&n!=1||n==1&&t.charAt(1)>3;)h=h.times(e),t=K(h.d),n=t.charAt(0),f++;o=h.e,n>1?(h=new T("0."+t),o++):h=new T(n+"."+t.slice(1))}else return u=zt(T,c+2,C).times(o+""),h=Ue(new T(n+"."+t.slice(1)),c-g).plus(u),T.precision=C,r==null?y(h,C,S,x=!0):h;for(p=h,l=s=h=F(h.minus(1),h.plus(1),c,1),d=y(h.times(h),c,1),i=3;;){if(s=y(s.times(d),c,1),u=l.plus(F(s,new T(i),c,1)),K(u.d).slice(0,c)===K(l.d).slice(0,c))if(l=l.times(2),o!==0&&(l=l.plus(zt(T,c+2,C).times(o+""))),l=F(l,new T(f),c,1),r==null)if(rt(l.d,c-g,S,a))T.precision=c+=g,u=s=h=F(p.minus(1),p.plus(1),c,1),d=y(h.times(h),c,1),i=a=1;else return y(l,T.precision=C,S,x=!0);else return T.precision=C,l;l=u,i+=2}}function vs(e){return String(e.s*e.s/0)}function Ti(e,r){var t,n,i;for((t=r.indexOf("."))>-1&&(r=r.replace(".","")),(n=r.search(/e/i))>0?(t<0&&(t=n),t+=+r.slice(n+1),r=r.substring(0,n)):t<0&&(t=r.length),n=0;r.charCodeAt(n)===48;n++);for(i=r.length;r.charCodeAt(i-1)===48;--i);if(r=r.slice(n,i),r){if(i-=n,e.e=t=t-n-1,e.d=[],n=(t+1)%E,t<0&&(n+=E),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(r=r.replace(/(\d)_(?=\d)/g,"$1"),bs.test(r))return Ti(e,r)}else if(r==="Infinity"||r==="NaN")return+r||(e.s=NaN),e.e=NaN,e.d=null,e;if(sc.test(r))t=16,r=r.toLowerCase();else if(oc.test(r))t=2;else if(ac.test(r))t=8;else throw Error(Qe+r);for(o=r.search(/p/i),o>0?(l=+r.slice(o+1),r=r.substring(2,o)):r=r.slice(2),o=r.indexOf("."),s=o>=0,n=e.constructor,s&&(r=r.replace(".",""),a=r.length,o=a-o,i=xs(n,new n(t),o,o*2)),u=Ht(r,t,he),c=u.length-1,o=c;u[o]===0;--o)u.pop();return o<0?new n(e.s*0):(e.e=Xt(u,c),e.d=u,x=!1,s&&(e=F(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?Q(2,l):ir.pow(2,l))),x=!0,e)}function dc(e,r){var t,n=r.d.length;if(n<3)return r.isZero()?r:Pr(e,2,r,r);t=1.4*Math.sqrt(n),t=t>16?16:t|0,r=r.times(1/en(5,t)),r=Pr(e,2,r,r);for(var i,o=new e(5),s=new e(16),a=new e(20);t--;)i=r.times(r),r=r.times(o.plus(i.times(s.times(i).minus(a))));return r}function Pr(e,r,t,n,i){var o,s,a,l,u=1,c=e.precision,p=Math.ceil(c/E);for(x=!1,l=t.times(t),a=new e(n);;){if(s=F(a.times(l),new e(r++*r++),c,1),a=i?n.plus(s):n.minus(s),n=F(s.times(l),new e(r++*r++),c,1),s=a.plus(n),s.d[p]!==void 0){for(o=p;s.d[o]===a.d[o]&&o--;);if(o==-1)break}o=a,a=n,n=s,s=o,u++}return x=!0,s.d.length=p+1,s}function en(e,r){for(var t=e;--r;)t*=e;return t}function Ts(e,r){var t,n=r.s<0,i=ge(e,e.precision,1),o=i.times(.5);if(r=r.abs(),r.lte(o))return Fe=n?4:1,r;if(t=r.divToInt(i),t.isZero())Fe=n?3:2;else{if(r=r.minus(t.times(i)),r.lte(o))return Fe=ds(t)?n?2:3:n?4:1,r;Fe=ds(t)?n?1:4:n?3:2}return r.minus(i).abs()}function Ci(e,r,t,n){var i,o,s,a,l,u,c,p,d,f=e.constructor,g=t!==void 0;if(g?(oe(t,1,Ge),n===void 0?n=f.rounding:oe(n,0,8)):(t=f.precision,n=f.rounding),!e.isFinite())c=vs(e);else{for(c=ve(e),s=c.indexOf("."),g?(i=2,r==16?t=t*4-3:r==8&&(t=t*3-2)):i=r,s>=0&&(c=c.replace(".",""),d=new f(1),d.e=c.length-s,d.d=Ht(ve(d),10,i),d.e=d.d.length),p=Ht(c,10,i),o=l=p.length;p[--l]==0;)p.pop();if(!p[0])c=g?"0p+0":"0";else{if(s<0?o--:(e=new f(e),e.d=p,e.e=o,e=F(e,d,t,n,0,i),p=e.d,o=e.e,u=gs),s=p[t],a=i/2,u=u||p[t+1]!==void 0,u=n<4?(s!==void 0||u)&&(n===0||n===(e.s<0?3:2)):s>a||s===a&&(n===4||u||n===6&&p[t-1]&1||n===(e.s<0?8:7)),p.length=t,u)for(;++p[--t]>i-1;)p[t]=0,t||(++o,p.unshift(1));for(l=p.length;!p[l-1];--l);for(s=0,c="";s1)if(r==16||r==8){for(s=r==16?4:3,--l;l%s;l++)c+="0";for(p=Ht(c,i,r),l=p.length;!p[l-1];--l);for(s=1,c="1.";sl)for(o-=l;o--;)c+="0";else or)return e.length=r,!0}function mc(e){return new this(e).abs()}function fc(e){return new this(e).acos()}function gc(e){return new this(e).acosh()}function hc(e,r){return new this(e).plus(r)}function yc(e){return new this(e).asin()}function Ec(e){return new this(e).asinh()}function bc(e){return new this(e).atan()}function wc(e){return new this(e).atanh()}function xc(e,r){e=new this(e),r=new this(r);var t,n=this.precision,i=this.rounding,o=n+4;return!e.s||!r.s?t=new this(NaN):!e.d&&!r.d?(t=ge(this,o,1).times(r.s>0?.25:.75),t.s=e.s):!r.d||e.isZero()?(t=r.s<0?ge(this,n,i):new this(0),t.s=e.s):!e.d||r.isZero()?(t=ge(this,o,1).times(.5),t.s=e.s):r.s<0?(this.precision=o,this.rounding=1,t=this.atan(F(e,r,o,1)),r=ge(this,o,1),this.precision=n,this.rounding=i,t=e.s<0?t.minus(r):t.plus(r)):t=this.atan(F(e,r,o,1)),t}function Pc(e){return new this(e).cbrt()}function vc(e){return y(e=new this(e),e.e+1,2)}function Tc(e,r,t){return new this(e).clamp(r,t)}function Cc(e){if(!e||typeof e!="object")throw Error(Zt+"Object expected");var r,t,n,i=e.defaults===!0,o=["precision",1,Ge,"rounding",0,8,"toExpNeg",-xr,0,"toExpPos",0,xr,"maxE",0,xr,"minE",-xr,0,"modulo",0,9];for(r=0;r=o[r+1]&&n<=o[r+2])this[t]=n;else throw Error(Qe+t+": "+n);if(t="crypto",i&&(this[t]=xi[t]),(n=e[t])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[t]=!0;else throw Error(ys);else this[t]=!1;else throw Error(Qe+t+": "+n);return this}function Sc(e){return new this(e).cos()}function Rc(e){return new this(e).cosh()}function Cs(e){var r,t,n;function i(o){var s,a,l,u=this;if(!(u instanceof i))return new i(o);if(u.constructor=i,fs(o)){u.s=o.s,x?!o.d||o.e>i.maxE?(u.e=NaN,u.d=null):o.e=10;a/=10)s++;x?s>i.maxE?(u.e=NaN,u.d=null):s=429e7?r[o]=crypto.getRandomValues(new Uint32Array(1))[0]:a[o++]=i%1e7;else if(crypto.randomBytes){for(r=crypto.randomBytes(n*=4);o=214e7?crypto.randomBytes(4).copy(r,o):(a.push(i%1e7),o+=4);o=n/4}else throw Error(ys);else for(;o=10;i/=10)n++;n`}};function Tr(e){return e instanceof tt}var rn=class{constructor(r){this.value=r}write(r){r.write(this.value)}markAsError(){this.value.markAsError()}};var tn=e=>e,nn={bold:tn,red:tn,green:tn,dim:tn,enabled:!1},Ss={bold:W,red:ue,green:Me,dim:Ie,enabled:!0},Cr={write(e){e.writeLine(",")}};var Ce=class{constructor(r){this.contents=r;this.isUnderlined=!1;this.color=r=>r}underline(){return this.isUnderlined=!0,this}setColor(r){return this.color=r,this}write(r){let t=r.getCurrentLineLength();r.write(this.color(this.contents)),this.isUnderlined&&r.afterNextNewline(()=>{r.write(" ".repeat(t)).writeLine(this.color("~".repeat(this.contents.length)))})}};var Je=class{constructor(){this.hasError=!1}markAsError(){return this.hasError=!0,this}};var Sr=class extends Je{constructor(){super(...arguments);this.items=[]}addItem(t){return this.items.push(new rn(t)),this}getField(t){return this.items[t]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(n=>n.value.getPrintWidth()))+2}write(t){if(this.items.length===0){this.writeEmpty(t);return}this.writeWithItems(t)}writeEmpty(t){let n=new Ce("[]");this.hasError&&n.setColor(t.context.colors.red).underline(),t.write(n)}writeWithItems(t){let{colors:n}=t.context;t.writeLine("[").withIndent(()=>t.writeJoined(Cr,this.items).newLine()).write("]"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(n.red("~".repeat(this.getPrintWidth())))})}asObject(){}};var Rs=": ",on=class{constructor(r,t){this.name=r;this.value=t;this.hasError=!1}markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+Rs.length}write(r){let t=new Ce(this.name);this.hasError&&t.underline().setColor(r.context.colors.red),r.write(t).write(Rs).write(this.value)}};var sn=class e extends Je{constructor(){super(...arguments);this.fields={};this.suggestions=[]}addField(t){this.fields[t.name]=t}addSuggestion(t){this.suggestions.push(t)}getField(t){return this.fields[t]}getDeepField(t){let[n,...i]=t,o=this.getField(n);if(!o)return;let s=o;for(let a of i){let l;if(s.value instanceof e?l=s.value.getField(a):s.value instanceof Sr&&(l=s.value.getField(Number(a))),!l)return;s=l}return s}getDeepFieldValue(t){return t.length===0?this:this.getDeepField(t)?.value}hasField(t){return!!this.getField(t)}removeAllFields(){this.fields={}}removeField(t){delete this.fields[t]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(t){return this.getField(t)?.value}getDeepSubSelectionValue(t){let n=this;for(let i of t){if(!(n instanceof e))return;let o=n.getSubSelectionValue(i);if(!o)return;n=o}return n}getDeepSelectionParent(t){let n=this.getSelectionParent();if(!n)return;let i=n;for(let o of t){let s=i.value.getFieldValue(o);if(!s||!(s instanceof e))return;let a=s.getSelectionParent();if(!a)return;i=a}return i}getSelectionParent(){let t=this.getField("select")?.value.asObject();if(t)return{kind:"select",value:t};let n=this.getField("include")?.value.asObject();if(n)return{kind:"include",value:n}}getSubSelectionValue(t){return this.getSelectionParent()?.value.fields[t].value}getPrintWidth(){let t=Object.values(this.fields);return t.length==0?2:Math.max(...t.map(i=>i.getPrintWidth()))+2}write(t){let n=Object.values(this.fields);if(n.length===0&&this.suggestions.length===0){this.writeEmpty(t);return}this.writeWithContents(t,n)}asObject(){return this}writeEmpty(t){let n=new Ce("{}");this.hasError&&n.setColor(t.context.colors.red).underline(),t.write(n)}writeWithContents(t,n){t.writeLine("{").withIndent(()=>{t.writeJoined(Cr,[...n,...this.suggestions]).newLine()}),t.write("}"),this.hasError&&t.afterNextNewline(()=>{t.writeLine(t.context.colors.red("~".repeat(this.getPrintWidth())))})}};var J=class extends Je{constructor(t){super();this.text=t}getPrintWidth(){return this.text.length}write(t){let n=new Ce(this.text);this.hasError&&n.underline().setColor(t.context.colors.red),t.write(n)}asObject(){}};var Si=class{constructor(r){this.errorMessages=[];this.arguments=r}write(r){r.write(this.arguments)}addErrorMessage(r){this.errorMessages.push(r)}renderAllMessages(r){return this.errorMessages.map(t=>t(r)).join(` `)}};function an(e){return new Si(As(e))}function As(e){let r=new sn;for(let[t,n]of Object.entries(e)){let i=new on(t,Is(n));r.addField(i)}return r}function Is(e){if(typeof e=="string")return new J(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new J(String(e));if(typeof e=="bigint")return new J(`${e}n`);if(e===null)return new J("null");if(e===void 0)return new J("undefined");if(vr(e))return new J(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return Buffer.isBuffer(e)?new J(`Buffer.alloc(${e.byteLength})`):new J(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let r=Wt(e)?e.toISOString():"Invalid Date";return new J(`new Date("${r}")`)}return e instanceof Le?new J(`Prisma.${e._getName()}`):Tr(e)?new J(`prisma.${ps(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?Xc(e):typeof e=="object"?As(e):new J(Object.prototype.toString.call(e))}function Xc(e){let r=new Sr;for(let t of e)r.addItem(Is(t));return r}function _s(e){if(e===void 0)return"";let r=an(e);return new br(0,{colors:nn}).write(r).toString()}var ep="P2037";function or({error:e,user_facing_error:r},t,n){return r.error_code?new V(rp(r,n),{code:r.error_code,clientVersion:t,meta:r.meta,batchRequestIdx:r.batch_request_idx}):new B(e,{clientVersion:t,batchRequestIdx:r.batch_request_idx})}function rp(e,r){let t=e.message;return(r==="postgresql"||r==="postgres"||r==="mysql")&&e.error_code===ep&&(t+=` Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),t}var nt="";function ks(e){var r=e.split(` `);return r.reduce(function(t,n){var i=ip(n)||sp(n)||up(n)||mp(n)||pp(n);return i&&t.push(i),t},[])}var tp=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,np=/\((\S*)(?::(\d+))(?::(\d+))\)/;function ip(e){var r=tp.exec(e);if(!r)return null;var t=r[2]&&r[2].indexOf("native")===0,n=r[2]&&r[2].indexOf("eval")===0,i=np.exec(r[2]);return n&&i!=null&&(r[2]=i[1],r[3]=i[2],r[4]=i[3]),{file:t?null:r[2],methodName:r[1]||nt,arguments:t?[r[2]]:[],lineNumber:r[3]?+r[3]:null,column:r[4]?+r[4]:null}}var op=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function sp(e){var r=op.exec(e);return r?{file:r[2],methodName:r[1]||nt,arguments:[],lineNumber:+r[3],column:r[4]?+r[4]:null}:null}var ap=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,lp=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function up(e){var r=ap.exec(e);if(!r)return null;var t=r[3]&&r[3].indexOf(" > eval")>-1,n=lp.exec(r[3]);return t&&n!=null&&(r[3]=n[1],r[4]=n[2],r[5]=null),{file:r[3],methodName:r[1]||nt,arguments:r[2]?r[2].split(","):[],lineNumber:r[4]?+r[4]:null,column:r[5]?+r[5]:null}}var cp=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function pp(e){var r=cp.exec(e);return r?{file:r[3],methodName:r[1]||nt,arguments:[],lineNumber:+r[4],column:r[5]?+r[5]:null}:null}var dp=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function mp(e){var r=dp.exec(e);return r?{file:r[2],methodName:r[1]||nt,arguments:[],lineNumber:+r[3],column:r[4]?+r[4]:null}:null}var Ri=class{getLocation(){return null}},Ai=class{constructor(){this._error=new Error}getLocation(){let r=this._error.stack;if(!r)return null;let n=ks(r).find(i=>{if(!i.file)return!1;let o=ii(i.file);return o!==""&&!o.includes("@prisma")&&!o.includes("/packages/client/src/runtime/")&&!o.endsWith("/runtime/binary.js")&&!o.endsWith("/runtime/library.js")&&!o.endsWith("/runtime/edge.js")&&!o.endsWith("/runtime/edge-esm.js")&&!o.startsWith("internal/")&&!i.methodName.includes("new ")&&!i.methodName.includes("getCallSite")&&!i.methodName.includes("Proxy.")&&i.methodName.split(".").length<4});return!n||!n.file?null:{fileName:n.file,lineNumber:n.lineNumber,columnNumber:n.column}}};function We(e){return e==="minimal"?typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new Ri:new Ai}var Ds={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function Rr(e={}){let r=gp(e);return Object.entries(r).reduce((n,[i,o])=>(Ds[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function gp(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function ln(e={}){return r=>(typeof e._count=="boolean"&&(r._count=r._count._all),r)}function Os(e,r){let t=ln(e);return r({action:"aggregate",unpacker:t,argsMapper:Rr})(e)}function hp(e={}){let{select:r,...t}=e;return typeof r=="object"?Rr({...t,_count:r}):Rr({...t,_count:{_all:!0}})}function yp(e={}){return typeof e.select=="object"?r=>ln(e)(r)._count:r=>ln(e)(r)._count._all}function Ls(e,r){return r({action:"count",unpacker:yp(e),argsMapper:hp})(e)}function Ep(e={}){let r=Rr(e);if(Array.isArray(r.by))for(let t of r.by)typeof t=="string"&&(r.select[t]=!0);else typeof r.by=="string"&&(r.select[r.by]=!0);return r}function bp(e={}){return r=>(typeof e?._count=="boolean"&&r.forEach(t=>{t._count=t._count._all}),r)}function Fs(e,r){return r({action:"groupBy",unpacker:bp(e),argsMapper:Ep})(e)}function Ns(e,r,t){if(r==="aggregate")return n=>Os(n,t);if(r==="count")return n=>Ls(n,t);if(r==="groupBy")return n=>Fs(n,t)}function Ms(e,r){let t=r.fields.filter(i=>!i.relationName),n=pi(t,i=>i.name);return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new tt(e,o,s.type,s.isList,s.kind==="enum")},...Jt(Object.keys(n))})}var $s=e=>Array.isArray(e)?e:e.split("."),Ii=(e,r)=>$s(r).reduce((t,n)=>t&&t[n],e),qs=(e,r,t)=>$s(r).reduceRight((n,i,o,s)=>Object.assign({},Ii(e,s.slice(0,o)),{[i]:n}),t);function wp(e,r){return e===void 0||r===void 0?[]:[...r,"select",e]}function xp(e,r,t){return r===void 0?e??{}:qs(r,t,e||!0)}function _i(e,r,t,n,i,o){let a=e._runtimeDataModel.models[r].fields.reduce((l,u)=>({...l,[u.name]:u}),{});return l=>{let u=We(e._errorFormat),c=wp(n,i),p=xp(l,o,c),d=t({dataPath:c,callsite:u})(p),f=Pp(e,r);return new Proxy(d,{get(g,h){if(!f.includes(h))return g[h];let T=[a[h].type,t,h],S=[c,p];return _i(e,...T,...S)},...Jt([...f,...Object.getOwnPropertyNames(d)])})}}function Pp(e,r){return e._runtimeDataModel.models[r].fields.filter(t=>t.kind==="object").map(t=>t.name)}var Gs=k(oi());var Qs=k(require("fs"));var js={keyword:_e,entity:_e,value:e=>W(ze(e)),punctuation:ze,directive:_e,function:_e,variable:e=>W(ze(e)),string:e=>W(Me(e)),boolean:fe,number:_e,comment:Nr};var vp=e=>e,un={},Tp=0,P={manual:un.Prism&&un.Prism.manual,disableWorkerMessageHandler:un.Prism&&un.Prism.disableWorkerMessageHandler,util:{encode:function(e){if(e instanceof ye){let r=e;return new ye(r.type,P.util.encode(r.content),r.alias)}else return Array.isArray(e)?e.map(P.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(Ae instanceof ye)continue;if(me&&U!=r.length-1){S.lastIndex=ne;var p=S.exec(e);if(!p)break;var c=p.index+(b?p[1].length:0),d=p.index+p[0].length,a=U,l=ne;for(let O=r.length;a=l&&(++U,ne=l);if(r[U]instanceof ye)continue;u=a-U,Ae=e.slice(ne,l),p.index-=ne}else{S.lastIndex=0;var p=S.exec(Ae),u=1}if(!p){if(o)break;continue}b&&(ae=p[1]?p[1].length:0);var c=p.index+ae,p=p[0].slice(ae),d=c+p.length,f=Ae.slice(0,c),g=Ae.slice(d);let Y=[U,u];f&&(++U,ne+=f.length,Y.push(f));let cr=new ye(h,C?P.tokenize(p,C):p,Lr,p,me);if(Y.push(cr),g&&Y.push(g),Array.prototype.splice.apply(r,Y),u!=1&&P.matchGrammar(e,r,t,U,ne,!0,h),o)break}}}},tokenize:function(e,r){let t=[e],n=r.rest;if(n){for(let i in n)r[i]=n[i];delete r.rest}return P.matchGrammar(e,t,r,0,0,!1),t},hooks:{all:{},add:function(e,r){let t=P.hooks.all;t[e]=t[e]||[],t[e].push(r)},run:function(e,r){let t=P.hooks.all[e];if(!(!t||!t.length))for(var n=0,i;i=t[n++];)i(r)}},Token:ye};P.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/};P.languages.javascript=P.languages.extend("clike",{"class-name":[P.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.])\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/});P.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/;P.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:P.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:P.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:P.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:P.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});P.languages.markup&&P.languages.markup.tag.addInlined("script","javascript");P.languages.js=P.languages.javascript;P.languages.typescript=P.languages.extend("javascript",{keyword:/\b(?:abstract|as|async|await|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|is|keyof|let|module|namespace|new|null|of|package|private|protected|public|readonly|return|require|set|static|super|switch|this|throw|try|type|typeof|var|void|while|with|yield)\b/,builtin:/\b(?:string|Function|any|number|boolean|Array|symbol|console|Promise|unknown|never)\b/});P.languages.ts=P.languages.typescript;function ye(e,r,t,n,i){this.type=e,this.content=r,this.alias=t,this.length=(n||"").length|0,this.greedy=!!i}ye.stringify=function(e,r){return typeof e=="string"?e:Array.isArray(e)?e.map(function(t){return ye.stringify(t,r)}).join(""):Cp(e.type)(e.content)};function Cp(e){return js[e]||vp}function Vs(e){return Sp(e,P.languages.javascript)}function Sp(e,r){return P.tokenize(e,r).map(n=>ye.stringify(n)).join("")}var Bs=k(zo());function Us(e){return(0,Bs.default)(e)}var cn=class e{static read(r){let t;try{t=Qs.default.readFileSync(r,"utf-8")}catch{return null}return e.fromContent(t)}static fromContent(r){let t=r.split(/\r?\n/);return new e(1,t)}constructor(r,t){this.firstLineNumber=r,this.lines=t}get lastLineNumber(){return this.firstLineNumber+this.lines.length-1}mapLineAt(r,t){if(rthis.lines.length+this.firstLineNumber)return this;let n=r-this.firstLineNumber,i=[...this.lines];return i[n]=t(i[n]),new e(this.firstLineNumber,i)}mapLines(r){return new e(this.firstLineNumber,this.lines.map((t,n)=>r(t,this.firstLineNumber+n)))}lineAt(r){return this.lines[r-this.firstLineNumber]}prependSymbolAt(r,t){return this.mapLines((n,i)=>i===r?`${t} ${n}`:` ${n}`)}slice(r,t){let n=this.lines.slice(r-1,t).join(` `);return new e(r,Us(n).split(` `))}highlight(){let r=Vs(this.toString());return new e(this.firstLineNumber,r.split(` `))}toString(){return this.lines.join(` `)}};var Rp={red:ue,gray:Nr,dim:Ie,bold:W,underline:X,highlightSource:e=>e.highlight()},Ap={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function Ip({message:e,originalMethod:r,isPanic:t,callArguments:n}){return{functionName:`prisma.${r}()`,message:e,isPanic:t??!1,callArguments:n}}function _p({callsite:e,message:r,originalMethod:t,isPanic:n,callArguments:i},o){let s=Ip({message:r,originalMethod:t,isPanic:n,callArguments:i});if(!e||typeof window<"u"||process.env.NODE_ENV==="production")return s;let a=e.getLocation();if(!a||!a.lineNumber||!a.columnNumber)return s;let l=Math.max(1,a.lineNumber-3),u=cn.read(a.fileName)?.slice(l,a.lineNumber),c=u?.lineAt(a.lineNumber);if(u&&c){let p=Dp(c),d=kp(c);if(!d)return s;s.functionName=`${d.code})`,s.location=a,n||(u=u.mapLineAt(a.lineNumber,g=>g.slice(0,d.openingBraceIndex))),u=o.highlightSource(u);let f=String(u.lastLineNumber).length;if(s.contextLines=u.mapLines((g,h)=>o.gray(String(h).padStart(f))+" "+g).mapLines(g=>o.dim(g)).prependSymbolAt(a.lineNumber,o.bold(o.red("\u2192"))),i){let g=p+f+1;g+=2,s.callArguments=(0,Gs.default)(i,g).slice(g)}}return s}function kp(e){let r=Object.keys(De.ModelAction).join("|"),n=new RegExp(String.raw`\.(${r})\(`).exec(e);if(n){let i=n.index+n[0].length,o=e.lastIndexOf(" ",n.index)+1;return{code:e.slice(o,i),openingBraceIndex:i}}return null}function Dp(e){let r=0;for(let t=0;t{if("rejectOnNotFound"in n.args){let o=Ar({originalMethod:n.clientMethod,callsite:n.callsite,message:"'rejectOnNotFound' option is not supported"});throw new H(o,{clientVersion:r})}return await t(n).catch(o=>{throw o instanceof V&&o.code==="P2025"?new Oe(`No ${e} found`,r):o})}}function Se(e){return e.replace(/^./,r=>r.toLowerCase())}var Np=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],Mp=["aggregate","count","groupBy"];function ki(e,r){let t=e._extensions.getAllModelExtensions(r)??{},n=[$p(e,r),jp(e,r),et(t),te("name",()=>r),te("$name",()=>r),te("$parent",()=>e._appliedParent)];return Pe({},n)}function $p(e,r){let t=Se(r),n=Object.keys(De.ModelAction).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=l=>e._request(l);s=Js(o,r,e._clientVersion,s);let a=l=>u=>{let c=We(e._errorFormat);return e._createPrismaPromise(p=>{let d={args:u,dataPath:[],action:o,model:r,clientMethod:`${t}.${i}`,jsModelName:t,transaction:p,callsite:c};return s({...d,...l})})};return Np.includes(o)?_i(e,r,a):qp(i)?Ns(e,i,a):a({})}}}function qp(e){return Mp.includes(e)}function jp(e,r){return nr(te("fields",()=>{let t=e._runtimeDataModel.models[r];return Ms(r,t)}))}function Ws(e){return e.replace(/^./,r=>r.toUpperCase())}var Di=Symbol();function it(e){let r=[Vp(e),te(Di,()=>e),te("$parent",()=>e._appliedParent)],t=e._extensions.getAllClientExtensions();return t&&r.push(et(t)),Pe(e,r)}function Vp(e){let r=Object.keys(e._runtimeDataModel.models),t=r.map(Se),n=[...new Set(r.concat(t))];return nr({getKeys(){return n},getPropertyValue(i){let o=Ws(i);if(e._runtimeDataModel.models[o]!==void 0)return ki(e,o);if(e._runtimeDataModel.models[i]!==void 0)return ki(e,i)},getPropertyDescriptor(i){if(!t.includes(i))return{enumerable:!1}}})}function Hs(e){return e[Di]?e[Di]:e}function Ks(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let t=e.client.__AccelerateEngine;this._originalClient._engine=new t(this._originalClient._accelerateEngineConfig)}let r=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$use:{value:void 0},$on:{value:void 0}});return it(r)}function Ys({result:e,modelName:r,select:t,omit:n,extensions:i}){let o=i.getAllComputedFields(r);if(!o)return e;let s=[],a=[];for(let l of Object.values(o)){if(n){if(n[l.name])continue;let u=l.needs.filter(c=>n[c]);u.length>0&&a.push(yr(u))}else if(t){if(!t[l.name])continue;let u=l.needs.filter(c=>!t[c]);u.length>0&&a.push(yr(u))}Bp(e,l.needs)&&s.push(Up(l,Pe(e,s)))}return s.length>0||a.length>0?Pe(e,[...s,...a]):e}function Bp(e,r){return r.every(t=>ci(e,t))}function Up(e,r){return nr(te(e.name,()=>e.compute(r)))}function pn({visitor:e,result:r,args:t,runtimeDataModel:n,modelName:i}){if(Array.isArray(r)){for(let s=0;sc.name===o);if(!l||l.kind!=="object"||!l.relationName)continue;let u=typeof s=="object"?s:{};r[o]=pn({visitor:i,result:r[o],args:u,modelName:l.type,runtimeDataModel:n})}}function Zs({result:e,modelName:r,args:t,extensions:n,runtimeDataModel:i}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[r]?e:pn({result:e,args:t??{},modelName:r,runtimeDataModel:i,visitor:(s,a,l)=>Ys({result:s,modelName:Se(a),select:l.select,omit:l.omit,extensions:n})})}function Xs(e){if(e instanceof ie)return Qp(e);if(Array.isArray(e)){let t=[e[0]];for(let n=1;n{let o=r.customDataProxyFetch;return"transaction"in r&&i!==void 0&&(r.transaction?.kind==="batch"&&r.transaction.lock.then(),r.transaction=i),n===t.length?e._executeRequest(r):t[n]({model:r.model,operation:r.model?r.action:r.clientMethod,args:Xs(r.args??{}),__internalParams:r,query:(s,a=r)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=oa(o,l),a.args=s,ra(e,a,t,n+1)}})})}function ta(e,r){let{jsModelName:t,action:n,clientMethod:i}=r,o=t?n:i;if(e._extensions.isEmpty())return e._executeRequest(r);let s=e._extensions.getAllQueryCallbacks(t??"$none",o);return ra(e,r,s)}function na(e){return r=>{let t={requests:r},n=r[0].extensions.getAllBatchQueryCallbacks();return n.length?ia(t,n,0,e):e(t)}}function ia(e,r,t,n){if(t===r.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return r[t]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let l=a.customDataProxyFetch;return a.customDataProxyFetch=oa(i,l),ia(a,r,t+1,n)}})}var ea=e=>e;function oa(e=ea,r=ea){return t=>e(r(t))}function aa(e,r,t){let n=Se(t);return!r.result||!(r.result.$allModels||r.result[n])?e:Gp({...e,...sa(r.name,e,r.result.$allModels),...sa(r.name,e,r.result[n])})}function Gp(e){let r=new xe,t=(n,i)=>r.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>t(o,i)):[n]));return gr(e,n=>({...n,needs:t(n.name,new Set)}))}function sa(e,r,t){return t?gr(t,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:Jp(r,o,i)})):{}}function Jp(e,r,t){let n=e?.[r]?.compute;return n?i=>t({...i,[r]:n(i)}):t}function la(e,r){if(!r)return e;let t={...e};for(let n of Object.values(r))if(e[n.name])for(let i of n.needs)t[i]=!0;return t}function ua(e,r){if(!r)return e;let t={...e};for(let n of Object.values(r))if(!e[n.name])for(let i of n.needs)delete t[i];return t}var dn=class{constructor(r,t){this.extension=r;this.previous=t;this.computedFieldsCache=new xe;this.modelExtensionsCache=new xe;this.queryCallbacksCache=new xe;this.clientExtensions=Hr(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());this.batchCallbacks=Hr(()=>{let r=this.previous?.getAllBatchQueryCallbacks()??[],t=this.extension.query?.$__internalBatch;return t?r.concat(t):r})}getAllComputedFields(r){return this.computedFieldsCache.getOrCreate(r,()=>aa(this.previous?.getAllComputedFields(r),this.extension,r))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(r){return this.modelExtensionsCache.getOrCreate(r,()=>{let t=Se(r);return!this.extension.model||!(this.extension.model[t]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(r):{...this.previous?.getAllModelExtensions(r),...this.extension.model.$allModels,...this.extension.model[t]}})}getAllQueryCallbacks(r,t){return this.queryCallbacksCache.getOrCreate(`${r}:${t}`,()=>{let n=this.previous?.getAllQueryCallbacks(r,t)??[],i=[],o=this.extension.query;return!o||!(o[r]||o.$allModels||o[t]||o.$allOperations)?n:(o[r]!==void 0&&(o[r][t]!==void 0&&i.push(o[r][t]),o[r].$allOperations!==void 0&&i.push(o[r].$allOperations)),r!=="$none"&&o.$allModels!==void 0&&(o.$allModels[t]!==void 0&&i.push(o.$allModels[t]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[t]!==void 0&&i.push(o[t]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},mn=class e{constructor(r){this.head=r}static empty(){return new e}static single(r){return new e(new dn(r))}isEmpty(){return this.head===void 0}append(r){return new e(new dn(r,this.head))}getAllComputedFields(r){return this.head?.getAllComputedFields(r)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(r){return this.head?.getAllModelExtensions(r)}getAllQueryCallbacks(r,t){return this.head?.getAllQueryCallbacks(r,t)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};var ca=L("prisma:client"),pa={Vercel:"vercel","Netlify CI":"netlify"};function da({postinstall:e,ciName:r,clientVersion:t}){if(ca("checkPlatformCaching:postinstall",e),ca("checkPlatformCaching:ciName",r),e===!0&&r&&r in pa){let n=`Prisma has detected that this project was built on ${r}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. Learn how: https://pris.ly/d/${pa[r]}-build`;throw console.error(n),new R(n,t)}}function ma(e,r){return e?e.datasources?e.datasources:e.datasourceUrl?{[r[0]]:{url:e.datasourceUrl}}:{}:{}}var Wp="Cloudflare-Workers",Hp="node";function fa(){return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":globalThis.navigator?.userAgent===Wp?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":globalThis.process?.release?.name===Hp?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}var Kp={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Vercel Edge Functions or Edge Middleware"};function fn(){let e=fa();return{id:e,prettyName:Kp[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}var ba=k(require("fs")),st=k(require("path"));function gn(e){let{runtimeBinaryTarget:r}=e;return`Add "${r}" to \`binaryTargets\` in the "schema.prisma" file and run \`prisma generate\` after saving it: ${Yp(e)}`}function Yp(e){let{generator:r,generatorBinaryTargets:t,runtimeBinaryTarget:n}=e,i={fromEnvVar:null,value:n},o=[...t,i];return ai({...r,binaryTargets:o})}function He(e){let{runtimeBinaryTarget:r}=e;return`Prisma Client could not locate the Query Engine for runtime "${r}".`}function Ke(e){let{searchedLocations:r}=e;return`The following locations have been searched: ${[...new Set(r)].map(i=>` ${i}`).join(` `)}`}function ga(e){let{runtimeBinaryTarget:r}=e;return`${He(e)} This happened because \`binaryTargets\` have been pinned, but the actual deployment also required "${r}". ${gn(e)} ${Ke(e)}`}function hn(e){return`We would appreciate if you could take the time to share some information with us. Please help us by answering a few questions: https://pris.ly/${e}`}function yn(e){let{errorStack:r}=e;return r?.match(/\/\.next|\/next@|\/next\//)?` We detected that you are using Next.js, learn how to fix this: https://pris.ly/d/engine-not-found-nextjs.`:""}function ha(e){let{queryEngineName:r}=e;return`${He(e)}${yn(e)} This is likely caused by a bundler that has not copied "${r}" next to the resulting bundle. Ensure that "${r}" has been copied next to the bundle or in "${e.expectedLocation}". ${hn("engine-not-found-bundler-investigation")} ${Ke(e)}`}function ya(e){let{runtimeBinaryTarget:r,generatorBinaryTargets:t}=e,n=t.find(i=>i.native);return`${He(e)} This happened because Prisma Client was generated for "${n?.value??"unknown"}", but the actual deployment required "${r}". ${gn(e)} ${Ke(e)}`}function Ea(e){let{queryEngineName:r}=e;return`${He(e)}${yn(e)} This is likely caused by tooling that has not copied "${r}" to the deployment folder. Ensure that you ran \`prisma generate\` and that "${r}" has been copied to "${e.expectedLocation}". ${hn("engine-not-found-tooling-investigation")} ${Ke(e)}`}var zp=L("prisma:client:engines:resolveEnginePath"),Zp=()=>new RegExp("runtime[\\\\/]library\\.m?js$");async function wa(e,r){let t={binary:process.env.PRISMA_QUERY_ENGINE_BINARY,library:process.env.PRISMA_QUERY_ENGINE_LIBRARY}[e]??r.prismaPath;if(t!==void 0)return t;let{enginePath:n,searchedLocations:i}=await Xp(e,r);if(zp("enginePath",n),n!==void 0&&e==="binary"&&Xn(n),n!==void 0)return r.prismaPath=n;let o=await er(),s=r.generator?.binaryTargets??[],a=s.some(d=>d.native),l=!s.some(d=>d.value===o),u=__filename.match(Zp())===null,c={searchedLocations:i,generatorBinaryTargets:s,generator:r.generator,runtimeBinaryTarget:o,queryEngineName:xa(e,o),expectedLocation:st.default.relative(process.cwd(),r.dirname),errorStack:new Error().stack},p;throw a&&l?p=ya(c):l?p=ga(c):u?p=ha(c):p=Ea(c),new R(p,r.clientVersion)}async function Xp(engineType,config){let binaryTarget=await er(),searchedLocations=[],dirname=eval("__dirname"),searchLocations=[config.dirname,st.default.resolve(dirname,".."),config.generator?.output?.value??dirname,st.default.resolve(dirname,"../../../.prisma/client"),"/tmp/prisma-engines",config.cwd];__filename.includes("resolveEnginePath")&&searchLocations.push(qo());for(let e of searchLocations){let r=xa(engineType,binaryTarget),t=st.default.join(e,r);if(searchedLocations.push(e),ba.default.existsSync(t))return{enginePath:t,searchedLocations}}return{enginePath:void 0,searchedLocations}}function xa(e,r){return e==="library"?At(r,"fs"):`query-engine-${r}${r==="windows"?".exe":""}`}var Oi=k(ui());function Pa(e){return e?e.replace(/".*"/g,'"X"').replace(/[\s:\[]([+-]?([0-9]*[.])?[0-9]+)/g,r=>`${r[0]}5`):""}function va(e){return e.split(` `).map(r=>r.replace(/^\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)\s*/,"").replace(/\+\d+\s*ms$/,"")).join(` `)}var Ta=k(is());function Ca({title:e,user:r="prisma",repo:t="prisma",template:n="bug_report.yml",body:i}){return(0,Ta.default)({user:r,repo:t,template:n,title:e,body:i})}function Sa({version:e,binaryTarget:r,title:t,description:n,engineVersion:i,database:o,query:s}){let a=go(6e3-(s?.length??0)),l=va((0,Oi.default)(a)),u=n?`# Description \`\`\` ${n} \`\`\``:"",c=(0,Oi.default)(`Hi Prisma Team! My Prisma Client just crashed. This is the report: ## Versions | Name | Version | |-----------------|--------------------| | Node | ${process.version?.padEnd(19)}| | OS | ${r?.padEnd(19)}| | Prisma Client | ${e?.padEnd(19)}| | Query Engine | ${i?.padEnd(19)}| | Database | ${o?.padEnd(19)}| ${u} ## Logs \`\`\` ${l} \`\`\` ## Client Snippet \`\`\`ts // PLEASE FILL YOUR CODE SNIPPET HERE \`\`\` ## Schema \`\`\`prisma // PLEASE ADD YOUR SCHEMA HERE IF POSSIBLE \`\`\` ## Prisma Engine Query \`\`\` ${s?Pa(s):""} \`\`\` `),p=Ca({title:t,body:c});return`${t} This is a non-recoverable error which probably happens when the Prisma Query Engine has a panic. ${X(p)} If you want the Prisma team to look into it, please open the link above \u{1F64F} To increase the chance of success, please post your schema and a snippet of how you used Prisma Client in the issue. `}function Ir({inlineDatasources:e,overrideDatasources:r,env:t,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=r[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=t[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw new R(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new R("error: Missing URL environment variable, value, or override.",n);return i}var En=class extends Error{constructor(r,t){super(r),this.clientVersion=t.clientVersion,this.cause=t.cause}get[Symbol.toStringTag](){return this.name}};var se=class extends En{constructor(r,t){super(r,t),this.isRetryable=t.isRetryable??!0}};function A(e,r){return{...e,isRetryable:r}}var _r=class extends se{constructor(t){super("This request must be retried",A(t,!0));this.name="ForcedRetryError";this.code="P5001"}};w(_r,"ForcedRetryError");var sr=class extends se{constructor(t,n){super(t,A(n,!1));this.name="InvalidDatasourceError";this.code="P6001"}};w(sr,"InvalidDatasourceError");var ar=class extends se{constructor(t,n){super(t,A(n,!1));this.name="NotImplementedYetError";this.code="P5004"}};w(ar,"NotImplementedYetError");var $=class extends se{constructor(r,t){super(r,t),this.response=t.response;let n=this.response.headers.get("prisma-request-id");if(n){let i=`(The request id was: ${n})`;this.message=this.message+" "+i}}};var lr=class extends ${constructor(t){super("Schema needs to be uploaded",A(t,!0));this.name="SchemaMissingError";this.code="P5005"}};w(lr,"SchemaMissingError");var Li="This request could not be understood by the server",at=class extends ${constructor(t,n,i){super(n||Li,A(t,!1));this.name="BadRequestError";this.code="P5000";i&&(this.code=i)}};w(at,"BadRequestError");var lt=class extends ${constructor(t,n){super("Engine not started: healthcheck timeout",A(t,!0));this.name="HealthcheckTimeoutError";this.code="P5013";this.logs=n}};w(lt,"HealthcheckTimeoutError");var ut=class extends ${constructor(t,n,i){super(n,A(t,!0));this.name="EngineStartupError";this.code="P5014";this.logs=i}};w(ut,"EngineStartupError");var ct=class extends ${constructor(t){super("Engine version is not supported",A(t,!1));this.name="EngineVersionNotSupportedError";this.code="P5012"}};w(ct,"EngineVersionNotSupportedError");var Fi="Request timed out",pt=class extends ${constructor(t,n=Fi){super(n,A(t,!1));this.name="GatewayTimeoutError";this.code="P5009"}};w(pt,"GatewayTimeoutError");var ed="Interactive transaction error",dt=class extends ${constructor(t,n=ed){super(n,A(t,!1));this.name="InteractiveTransactionError";this.code="P5015"}};w(dt,"InteractiveTransactionError");var rd="Request parameters are invalid",mt=class extends ${constructor(t,n=rd){super(n,A(t,!1));this.name="InvalidRequestError";this.code="P5011"}};w(mt,"InvalidRequestError");var Ni="Requested resource does not exist",ft=class extends ${constructor(t,n=Ni){super(n,A(t,!1));this.name="NotFoundError";this.code="P5003"}};w(ft,"NotFoundError");var Mi="Unknown server error",kr=class extends ${constructor(t,n,i){super(n||Mi,A(t,!0));this.name="ServerError";this.code="P5006";this.logs=i}};w(kr,"ServerError");var $i="Unauthorized, check your connection string",gt=class extends ${constructor(t,n=$i){super(n,A(t,!1));this.name="UnauthorizedError";this.code="P5007"}};w(gt,"UnauthorizedError");var qi="Usage exceeded, retry again later",ht=class extends ${constructor(t,n=qi){super(n,A(t,!0));this.name="UsageExceededError";this.code="P5008"}};w(ht,"UsageExceededError");async function td(e){let r;try{r=await e.text()}catch{return{type:"EmptyError"}}try{let t=JSON.parse(r);if(typeof t=="string")switch(t){case"InternalDataProxyError":return{type:"DataProxyError",body:t};default:return{type:"UnknownTextError",body:t}}if(typeof t=="object"&&t!==null){if("is_panic"in t&&"message"in t&&"error_code"in t)return{type:"QueryEngineError",body:t};if("EngineNotStarted"in t||"InteractiveTransactionMisrouted"in t||"InvalidRequestError"in t){let n=Object.values(t)[0].reason;return typeof n=="string"&&!["SchemaMissing","EngineVersionNotSupported"].includes(n)?{type:"UnknownJsonError",body:t}:{type:"DataProxyError",body:t}}}return{type:"UnknownJsonError",body:t}}catch{return r===""?{type:"EmptyError"}:{type:"UnknownTextError",body:r}}}async function yt(e,r){if(e.ok)return;let t={clientVersion:r,response:e},n=await td(e);if(n.type==="QueryEngineError")throw new V(n.body.message,{code:n.body.error_code,clientVersion:r});if(n.type==="DataProxyError"){if(n.body==="InternalDataProxyError")throw new kr(t,"Internal Data Proxy error");if("EngineNotStarted"in n.body){if(n.body.EngineNotStarted.reason==="SchemaMissing")return new lr(t);if(n.body.EngineNotStarted.reason==="EngineVersionNotSupported")throw new ct(t);if("EngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,logs:o}=n.body.EngineNotStarted.reason.EngineStartupError;throw new ut(t,i,o)}if("KnownEngineStartupError"in n.body.EngineNotStarted.reason){let{msg:i,error_code:o}=n.body.EngineNotStarted.reason.KnownEngineStartupError;throw new R(i,r,o)}if("HealthcheckTimeout"in n.body.EngineNotStarted.reason){let{logs:i}=n.body.EngineNotStarted.reason.HealthcheckTimeout;throw new lt(t,i)}}if("InteractiveTransactionMisrouted"in n.body){let i={IDParseError:"Could not parse interactive transaction ID",NoQueryEngineFoundError:"Could not find Query Engine for the specified host and transaction ID",TransactionStartError:"Could not start interactive transaction"};throw new dt(t,i[n.body.InteractiveTransactionMisrouted.reason])}if("InvalidRequestError"in n.body)throw new mt(t,n.body.InvalidRequestError.reason)}if(e.status===401||e.status===403)throw new gt(t,Dr($i,n));if(e.status===404)return new ft(t,Dr(Ni,n));if(e.status===429)throw new ht(t,Dr(qi,n));if(e.status===504)throw new pt(t,Dr(Fi,n));if(e.status>=500)throw new kr(t,Dr(Mi,n));if(e.status>=400)throw new at(t,Dr(Li,n))}function Dr(e,r){return r.type==="EmptyError"?e:`${e}: ${JSON.stringify(r)}`}function Ra(e){let r=Math.pow(2,e)*50,t=Math.ceil(Math.random()*r)-Math.ceil(r/2),n=r+t;return new Promise(i=>setTimeout(()=>i(n),n))}var Ne="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Aa(e){let r=new TextEncoder().encode(e),t="",n=r.byteLength,i=n%3,o=n-i,s,a,l,u,c;for(let p=0;p>18,a=(c&258048)>>12,l=(c&4032)>>6,u=c&63,t+=Ne[s]+Ne[a]+Ne[l]+Ne[u];return i==1?(c=r[o],s=(c&252)>>2,a=(c&3)<<4,t+=Ne[s]+Ne[a]+"=="):i==2&&(c=r[o]<<8|r[o+1],s=(c&64512)>>10,a=(c&1008)>>4,l=(c&15)<<2,t+=Ne[s]+Ne[a]+Ne[l]+"="),t}function Ia(e){if(!!e.generator?.previewFeatures.some(t=>t.toLowerCase().includes("metrics")))throw new R("The `metrics` preview feature is not yet available with Accelerate.\nPlease remove `metrics` from the `previewFeatures` in your schema.\n\nMore information about Accelerate: https://pris.ly/d/accelerate",e.clientVersion)}function nd(e){return e[0]*1e3+e[1]/1e6}function _a(e){return new Date(nd(e))}var ka={"@prisma/debug":"workspace:*","@prisma/engines-version":"5.15.0-29.12e25d8d06f6ea5a0252864dd9a03b1bb51f3022","@prisma/fetch-engine":"workspace:*","@prisma/get-platform":"workspace:*"};var Et=class extends se{constructor(t,n){super(`Cannot fetch data from service: ${t}`,A(n,!0));this.name="RequestError";this.code="P5010"}};w(Et,"RequestError");async function ur(e,r,t=n=>n){let n=r.clientVersion;try{return typeof fetch=="function"?await t(fetch)(e,r):await t(ji)(e,r)}catch(i){let o=i.message??"Unknown error";throw new Et(o,{clientVersion:n})}}function od(e){return{...e.headers,"Content-Type":"application/json"}}function sd(e){return{method:e.method,headers:od(e)}}function ad(e,r){return{text:()=>Promise.resolve(Buffer.concat(e).toString()),json:()=>Promise.resolve().then(()=>JSON.parse(Buffer.concat(e).toString())),ok:r.statusCode>=200&&r.statusCode<=299,status:r.statusCode,url:r.url,headers:new Vi(r.headers)}}async function ji(e,r={}){let t=ld("https"),n=sd(r),i=[],{origin:o}=new URL(e);return new Promise((s,a)=>{let l=t.request(e,n,u=>{let{statusCode:c,headers:{location:p}}=u;c>=301&&c<=399&&p&&(p.startsWith("http")===!1?s(ji(`${o}${p}`,r)):s(ji(p,r))),u.on("data",d=>i.push(d)),u.on("end",()=>s(ad(i,u))),u.on("error",a)});l.on("error",a),l.end(r.body??"")})}var ld=typeof require<"u"?require:()=>{},Vi=class{constructor(r={}){this.headers=new Map;for(let[t,n]of Object.entries(r))if(typeof n=="string")this.headers.set(t,n);else if(Array.isArray(n))for(let i of n)this.headers.set(t,i)}append(r,t){this.headers.set(r,t)}delete(r){this.headers.delete(r)}get(r){return this.headers.get(r)??null}has(r){return this.headers.has(r)}set(r,t){this.headers.set(r,t)}forEach(r,t){for(let[n,i]of this.headers)r.call(t,i,n,this)}};var ud=/^[1-9][0-9]*\.[0-9]+\.[0-9]+$/,Da=L("prisma:client:dataproxyEngine");async function cd(e,r){let t=ka["@prisma/engines-version"],n=r.clientVersion??"unknown";if(process.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION)return process.env.PRISMA_CLIENT_DATA_PROXY_CLIENT_VERSION;if(e.includes("accelerate")&&n!=="0.0.0"&&n!=="in-memory")return n;let[i,o]=n?.split("-")??[];if(o===void 0&&ud.test(i))return i;if(o!==void 0||n==="0.0.0"||n==="in-memory"){if(e.startsWith("localhost")||e.startsWith("127.0.0.1"))return"0.0.0";let[s]=t.split("-")??[],[a,l,u]=s.split("."),c=pd(`<=${a}.${l}.${u}`),p=await ur(c,{clientVersion:n});if(!p.ok)throw new Error(`Failed to fetch stable Prisma version, unpkg.com status ${p.status} ${p.statusText}, response body: ${await p.text()||""}`);let d=await p.text();Da("length of body fetched from unpkg.com",d.length);let f;try{f=JSON.parse(d)}catch(g){throw console.error("JSON.parse error: body fetched from unpkg.com: ",d),g}return f.version}throw new ar("Only `major.minor.patch` versions are supported by Accelerate.",{clientVersion:n})}async function Oa(e,r){let t=await cd(e,r);return Da("version",t),t}function pd(e){return encodeURI(`https://unpkg.com/prisma@${e}/package.json`)}var La=3,Bi=L("prisma:client:dataproxyEngine"),Ui=class{constructor({apiKey:r,tracingHelper:t,logLevel:n,logQueries:i,engineHash:o}){this.apiKey=r,this.tracingHelper=t,this.logLevel=n,this.logQueries=i,this.engineHash=o}build({traceparent:r,interactiveTransaction:t}={}){let n={Authorization:`Bearer ${this.apiKey}`,"Prisma-Engine-Hash":this.engineHash};this.tracingHelper.isEnabled()&&(n.traceparent=r??this.tracingHelper.getTraceParent()),t&&(n["X-transaction-id"]=t.id);let i=this.buildCaptureSettings();return i.length>0&&(n["X-capture-telemetry"]=i.join(", ")),n}buildCaptureSettings(){let r=[];return this.tracingHelper.isEnabled()&&r.push("tracing"),this.logLevel&&r.push(this.logLevel),this.logQueries&&r.push("query"),r}},bt=class{constructor(r){this.name="DataProxyEngine";Ia(r),this.config=r,this.env={...r.env,...typeof process<"u"?process.env:{}},this.inlineSchema=Aa(r.inlineSchema),this.inlineDatasources=r.inlineDatasources,this.inlineSchemaHash=r.inlineSchemaHash,this.clientVersion=r.clientVersion,this.engineHash=r.engineVersion,this.logEmitter=r.logEmitter,this.tracingHelper=r.tracingHelper}apiKey(){return this.headerBuilder.apiKey}version(){return this.engineHash}async start(){this.startPromise!==void 0&&await this.startPromise,this.startPromise=(async()=>{let[r,t]=this.extractHostAndApiKey();this.host=r,this.headerBuilder=new Ui({apiKey:t,tracingHelper:this.tracingHelper,logLevel:this.config.logLevel,logQueries:this.config.logQueries,engineHash:this.engineHash}),this.remoteClientVersion=await Oa(r,this.config),Bi("host",this.host)})(),await this.startPromise}async stop(){}propagateResponseExtensions(r){r?.logs?.length&&r.logs.forEach(t=>{switch(t.level){case"debug":case"error":case"trace":case"warn":case"info":break;case"query":{let n=typeof t.attributes.query=="string"?t.attributes.query:"";if(!this.tracingHelper.isEnabled()){let[i]=n.split("/* traceparent");n=i}this.logEmitter.emit("query",{query:n,timestamp:_a(t.timestamp),duration:Number(t.attributes.duration_ms),params:t.attributes.params,target:t.attributes.target})}}}),r?.traces?.length&&this.tracingHelper.createEngineSpan({span:!0,spans:r.traces})}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the remote query engine')}async url(r){return await this.start(),`https://${this.host}/${this.remoteClientVersion}/${this.inlineSchemaHash}/${r}`}async uploadSchema(){let r={name:"schemaUpload",internal:!0};return this.tracingHelper.runInChildSpan(r,async()=>{let t=await ur(await this.url("schema"),{method:"PUT",headers:this.headerBuilder.build(),body:this.inlineSchema,clientVersion:this.clientVersion});t.ok||Bi("schema response status",t.status);let n=await yt(t,this.clientVersion);if(n)throw this.logEmitter.emit("warn",{message:`Error while uploading schema: ${n.message}`,timestamp:new Date,target:""}),n;this.logEmitter.emit("info",{message:`Schema (re)uploaded (hash: ${this.inlineSchemaHash})`,timestamp:new Date,target:""})})}request(r,{traceparent:t,interactiveTransaction:n,customDataProxyFetch:i}){return this.requestInternal({body:r,traceparent:t,interactiveTransaction:n,customDataProxyFetch:i})}async requestBatch(r,{traceparent:t,transaction:n,customDataProxyFetch:i}){let o=n?.kind==="itx"?n.options:void 0,s=Er(r,n),{batchResult:a,elapsed:l}=await this.requestInternal({body:s,customDataProxyFetch:i,interactiveTransaction:o,traceparent:t});return a.map(u=>"errors"in u&&u.errors.length>0?or(u.errors[0],this.clientVersion,this.config.activeProvider):{data:u,elapsed:l})}requestInternal({body:r,traceparent:t,customDataProxyFetch:n,interactiveTransaction:i}){return this.withRetry({actionGerund:"querying",callback:async({logHttpCall:o})=>{let s=i?`${i.payload.endpoint}/graphql`:await this.url("graphql");o(s);let a=await ur(s,{method:"POST",headers:this.headerBuilder.build({traceparent:t,interactiveTransaction:i}),body:JSON.stringify(r),clientVersion:this.clientVersion},n);a.ok||Bi("graphql response status",a.status),await this.handleError(await yt(a,this.clientVersion));let l=await a.json(),u=l.extensions;if(u&&this.propagateResponseExtensions(u),l.errors)throw l.errors.length===1?or(l.errors[0],this.config.clientVersion,this.config.activeProvider):new B(l.errors,{clientVersion:this.config.clientVersion});return l}})}async transaction(r,t,n){let i={start:"starting",commit:"committing",rollback:"rolling back"};return this.withRetry({actionGerund:`${i[r]} transaction`,callback:async({logHttpCall:o})=>{if(r==="start"){let s=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel}),a=await this.url("transaction/start");o(a);let l=await ur(a,{method:"POST",headers:this.headerBuilder.build({traceparent:t.traceparent}),body:s,clientVersion:this.clientVersion});await this.handleError(await yt(l,this.clientVersion));let u=await l.json(),c=u.extensions;c&&this.propagateResponseExtensions(c);let p=u.id,d=u["data-proxy"].endpoint;return{id:p,payload:{endpoint:d}}}else{let s=`${n.payload.endpoint}/${r}`;o(s);let a=await ur(s,{method:"POST",headers:this.headerBuilder.build({traceparent:t.traceparent}),clientVersion:this.clientVersion});await this.handleError(await yt(a,this.clientVersion));let u=(await a.json()).extensions;u&&this.propagateResponseExtensions(u);return}}})}extractHostAndApiKey(){let r={clientVersion:this.clientVersion},t=Object.keys(this.inlineDatasources)[0],n=Ir({inlineDatasources:this.inlineDatasources,overrideDatasources:this.config.overrideDatasources,clientVersion:this.clientVersion,env:this.env}),i;try{i=new URL(n)}catch{throw new sr(`Error validating datasource \`${t}\`: the URL must start with the protocol \`prisma://\``,r)}let{protocol:o,host:s,searchParams:a}=i;if(o!=="prisma:")throw new sr(`Error validating datasource \`${t}\`: the URL must start with the protocol \`prisma://\``,r);let l=a.get("api_key");if(l===null||l.length<1)throw new sr(`Error validating datasource \`${t}\`: the URL must contain a valid API key`,r);return[s,l]}metrics(){throw new ar("Metrics are not yet supported for Accelerate",{clientVersion:this.clientVersion})}async withRetry(r){for(let t=0;;t++){let n=i=>{this.logEmitter.emit("info",{message:`Calling ${i} (n=${t})`,timestamp:new Date,target:""})};try{return await r.callback({logHttpCall:n})}catch(i){if(!(i instanceof se)||!i.isRetryable)throw i;if(t>=La)throw i instanceof _r?i.cause:i;this.logEmitter.emit("warn",{message:`Attempt ${t+1}/${La} failed for ${r.actionGerund}: ${i.message??"(unknown)"}`,timestamp:new Date,target:""});let o=await Ra(t);this.logEmitter.emit("warn",{message:`Retrying after ${o}ms`,timestamp:new Date,target:""})}}}async handleError(r){if(r instanceof lr)throw await this.uploadSchema(),new _r({clientVersion:this.clientVersion,cause:r});if(r)throw r}applyPendingMigrations(){throw new Error("Method not implemented.")}};function Fa(e){if(e?.kind==="itx")return e.options.id}var Gi=k(require("os")),Na=k(require("path"));var Qi=Symbol("PrismaLibraryEngineCache");function dd(){let e=globalThis;return e[Qi]===void 0&&(e[Qi]={}),e[Qi]}function md(e){let r=dd();if(r[e]!==void 0)return r[e];let t=Na.default.toNamespacedPath(e),n={exports:{}},i=0;return process.platform!=="win32"&&(i=Gi.default.constants.dlopen.RTLD_LAZY|Gi.default.constants.dlopen.RTLD_DEEPBIND),process.dlopen(n,t,i),r[e]=n.exports,n.exports}var Ma={async loadLibrary(e){let r=await Bn(),t=await wa("library",e);try{return e.tracingHelper.runInChildSpan({name:"loadLibrary",internal:!0},()=>md(t))}catch(n){let i=ei({e:n,platformInfo:r,id:t});throw new R(i,e.clientVersion)}}};var Ji,$a={async loadLibrary(e){let{clientVersion:r,adapter:t,engineWasm:n}=e;if(t===void 0)throw new R(`The \`adapter\` option for \`PrismaClient\` is required in this context (${fn().prettyName})`,r);if(n===void 0)throw new R("WASM engine was unexpectedly `undefined`",r);Ji===void 0&&(Ji=(async()=>{let o=n.getRuntime(),s=await n.getQueryEngineWasmModule();if(s==null)throw new R("The loaded wasm module was unexpectedly `undefined` or `null` once loaded",r);let a={"./query_engine_bg.js":o},l=new WebAssembly.Instance(s,a);return o.__wbg_set_wasm(l.exports),o.QueryEngine})());let i=await Ji;return{debugPanic(){return Promise.reject("{}")},dmmf(){return Promise.resolve("{}")},version(){return{commit:"unknown",version:"unknown"}},QueryEngine:i}}};var fd="P2036",Re=L("prisma:client:libraryEngine");function gd(e){return e.item_type==="query"&&"query"in e}function hd(e){return"level"in e?e.level==="error"&&e.message==="PANIC":!1}var qa=[...Mn,"native"],ja=0,wt=class{constructor(r,t){this.name="LibraryEngine";this.libraryLoader=t??Ma,r.engineWasm!==void 0&&(this.libraryLoader=t??$a),this.config=r,this.libraryStarted=!1,this.logQueries=r.logQueries??!1,this.logLevel=r.logLevel??"error",this.logEmitter=r.logEmitter,this.datamodel=r.inlineSchema,r.enableDebugLogs&&(this.logLevel="debug");let n=Object.keys(r.overrideDatasources)[0],i=r.overrideDatasources[n]?.url;n!==void 0&&i!==void 0&&(this.datasourceOverrides={[n]:i}),this.libraryInstantiationPromise=this.instantiateLibrary(),this.checkForTooManyEngines()}checkForTooManyEngines(){this.config.adapter&&["wasm"].includes("library")||ja===10&&console.warn(`${fe("warn(prisma-client)")} This is the 10th instance of Prisma Client being started. Make sure this is intentional.`)}async applyPendingMigrations(){throw new Error("Cannot call this method from this type of engine instance")}async transaction(r,t,n){await this.start();let i=JSON.stringify(t),o;if(r==="start"){let a=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel});o=await this.engine?.startTransaction(a,i)}else r==="commit"?o=await this.engine?.commitTransaction(n.id,i):r==="rollback"&&(o=await this.engine?.rollbackTransaction(n.id,i));let s=this.parseEngineResponse(o);if(yd(s)){let a=this.getExternalAdapterError(s);throw a?a.error:new V(s.message,{code:s.error_code,clientVersion:this.config.clientVersion,meta:s.meta})}return s}async instantiateLibrary(){if(Re("internalSetup"),this.libraryInstantiationPromise)return this.libraryInstantiationPromise;Nn(),this.binaryTarget=await this.getCurrentBinaryTarget(),await this.loadEngine(),this.version()}async getCurrentBinaryTarget(){{if(this.binaryTarget)return this.binaryTarget;let r=await er();if(!qa.includes(r))throw new R(`Unknown ${ue("PRISMA_QUERY_ENGINE_LIBRARY")} ${ue(W(r))}. Possible binaryTargets: ${Me(qa.join(", "))} or a path to the query engine library. You may have to run ${Me("prisma generate")} for your changes to take effect.`,this.config.clientVersion);return r}}parseEngineResponse(r){if(!r)throw new B("Response from the Engine was empty",{clientVersion:this.config.clientVersion});try{return JSON.parse(r)}catch{throw new B("Unable to JSON.parse response from engine",{clientVersion:this.config.clientVersion})}}async loadEngine(){if(!this.engine){this.QueryEngineConstructor||(this.library=await this.libraryLoader.loadLibrary(this.config),this.QueryEngineConstructor=this.library.QueryEngine);try{let r=new WeakRef(this),{adapter:t}=this.config;t&&Re("Using driver adapter: %O",t),this.engine=new this.QueryEngineConstructor({datamodel:this.datamodel,env:process.env,logQueries:this.config.logQueries??!1,ignoreEnvVarErrors:!0,datasourceOverrides:this.datasourceOverrides??{},logLevel:this.logLevel,configDir:this.config.cwd,engineProtocol:"json"},n=>{r.deref()?.logger(n)},t),ja++}catch(r){let t=r,n=this.parseInitError(t.message);throw typeof n=="string"?t:new R(n.message,this.config.clientVersion,n.error_code)}}}logger(r){let t=this.parseEngineResponse(r);if(t){if("span"in t){this.config.tracingHelper.createEngineSpan(t);return}t.level=t?.level.toLowerCase()??"unknown",gd(t)?this.logEmitter.emit("query",{timestamp:new Date,query:t.query,params:t.params,duration:Number(t.duration_ms),target:t.module_path}):hd(t)?this.loggerRustPanic=new le(Wi(this,`${t.message}: ${t.reason} in ${t.file}:${t.line}:${t.column}`),this.config.clientVersion):this.logEmitter.emit(t.level,{timestamp:new Date,message:t.message,target:t.module_path})}}parseInitError(r){try{return JSON.parse(r)}catch{}return r}parseRequestError(r){try{return JSON.parse(r)}catch{}return r}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the library engine since Prisma 5.0.0, it is only relevant and implemented for the binary engine. Please add your event listener to the `process` object directly instead.')}async start(){if(await this.libraryInstantiationPromise,await this.libraryStoppingPromise,this.libraryStartingPromise)return Re(`library already starting, this.libraryStarted: ${this.libraryStarted}`),this.libraryStartingPromise;if(this.libraryStarted)return;let r=async()=>{Re("library starting");try{let t={traceparent:this.config.tracingHelper.getTraceParent()};await this.engine?.connect(JSON.stringify(t)),this.libraryStarted=!0,Re("library started")}catch(t){let n=this.parseInitError(t.message);throw typeof n=="string"?t:new R(n.message,this.config.clientVersion,n.error_code)}finally{this.libraryStartingPromise=void 0}};return this.libraryStartingPromise=this.config.tracingHelper.runInChildSpan("connect",r),this.libraryStartingPromise}async stop(){if(await this.libraryStartingPromise,await this.executingQueryPromise,this.libraryStoppingPromise)return Re("library is already stopping"),this.libraryStoppingPromise;if(!this.libraryStarted)return;let r=async()=>{await new Promise(n=>setTimeout(n,5)),Re("library stopping");let t={traceparent:this.config.tracingHelper.getTraceParent()};await this.engine?.disconnect(JSON.stringify(t)),this.libraryStarted=!1,this.libraryStoppingPromise=void 0,Re("library stopped")};return this.libraryStoppingPromise=this.config.tracingHelper.runInChildSpan("disconnect",r),this.libraryStoppingPromise}version(){return this.versionInfo=this.library?.version(),this.versionInfo?.version??"unknown"}debugPanic(r){return this.library?.debugPanic(r)}async request(r,{traceparent:t,interactiveTransaction:n}){Re(`sending request, this.libraryStarted: ${this.libraryStarted}`);let i=JSON.stringify({traceparent:t}),o=JSON.stringify(r);try{await this.start(),this.executingQueryPromise=this.engine?.query(o,i,n?.id),this.lastQuery=o;let s=this.parseEngineResponse(await this.executingQueryPromise);if(s.errors)throw s.errors.length===1?this.buildQueryError(s.errors[0]):new B(JSON.stringify(s.errors),{clientVersion:this.config.clientVersion});if(this.loggerRustPanic)throw this.loggerRustPanic;return{data:s,elapsed:0}}catch(s){if(s instanceof R)throw s;if(s.code==="GenericFailure"&&s.message?.startsWith("PANIC:"))throw new le(Wi(this,s.message),this.config.clientVersion);let a=this.parseRequestError(s.message);throw typeof a=="string"?s:new B(`${a.message} ${a.backtrace}`,{clientVersion:this.config.clientVersion})}}async requestBatch(r,{transaction:t,traceparent:n}){Re("requestBatch");let i=Er(r,t);await this.start(),this.lastQuery=JSON.stringify(i),this.executingQueryPromise=this.engine.query(this.lastQuery,JSON.stringify({traceparent:n}),Fa(t));let o=await this.executingQueryPromise,s=this.parseEngineResponse(o);if(s.errors)throw s.errors.length===1?this.buildQueryError(s.errors[0]):new B(JSON.stringify(s.errors),{clientVersion:this.config.clientVersion});let{batchResult:a,errors:l}=s;if(Array.isArray(a))return a.map(u=>u.errors&&u.errors.length>0?this.loggerRustPanic??this.buildQueryError(u.errors[0]):{data:u,elapsed:0});throw l&&l.length===1?new Error(l[0].error):new Error(JSON.stringify(s))}buildQueryError(r){if(r.user_facing_error.is_panic)return new le(Wi(this,r.user_facing_error.message),this.config.clientVersion);let t=this.getExternalAdapterError(r.user_facing_error);return t?t.error:or(r,this.config.clientVersion,this.config.activeProvider)}getExternalAdapterError(r){if(r.error_code===fd&&this.config.adapter){let t=r.meta?.id;jt(typeof t=="number","Malformed external JS error received from the engine");let n=this.config.adapter.errorRegistry.consumeError(t);return jt(n,"External error with reported id was not registered"),n}}async metrics(r){await this.start();let t=await this.engine.metrics(JSON.stringify(r));return r.format==="prometheus"?t:this.parseEngineResponse(t)}};function yd(e){return typeof e=="object"&&e!==null&&e.error_code!==void 0}function Wi(e,r){return Sa({binaryTarget:e.binaryTarget,title:r,version:e.config.clientVersion,engineVersion:e.versionInfo?.commit,database:e.config.activeProvider,query:e.lastQuery})}function Va({copyEngine:e=!0},r){let t;try{t=Ir({inlineDatasources:r.inlineDatasources,overrideDatasources:r.overrideDatasources,env:{...r.env,...process.env},clientVersion:r.clientVersion})}catch{}e&&t?.startsWith("prisma://")&&Wr("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let n=Ur(r.generator),i=!!(t?.startsWith("prisma://")||!e),o=!!r.adapter,s=n==="library",a=n==="binary";if(i&&o||o&&!1){let l;throw e?t?.startsWith("prisma://")?l=["Prisma Client was configured to use the `adapter` option but the URL was a `prisma://` URL.","Please either use the `prisma://` URL or remove the `adapter` from the Prisma Client constructor."]:l=["Prisma Client was configured to use both the `adapter` and Accelerate, please chose one."]:l=["Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.","Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter."],new H(l.join(` `),{clientVersion:r.clientVersion})}if(i)return new bt(r);if(s)return new wt(r);throw new H("Invalid client engine type, please use `library` or `binary`",{clientVersion:r.clientVersion})}function bn({generator:e}){return e?.previewFeatures??[]}var Wa=k(Hi());function Ga(e,r){let t=Ja(e),n=Ed(t),i=wd(n);i?wn(i,r):r.addErrorMessage(()=>"Unknown error")}function Ja(e){return e.errors.flatMap(r=>r.kind==="Union"?Ja(r):[r])}function Ed(e){let r=new Map,t=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){t.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=r.get(i);o?r.set(i,{...n,argument:{...n.argument,typeNames:bd(o.argument.typeNames,n.argument.typeNames)}}):r.set(i,n)}return t.push(...r.values()),t}function bd(e,r){return[...new Set(e.concat(r))]}function wd(e){return di(e,(r,t)=>{let n=Ua(r),i=Ua(t);return n!==i?n-i:Qa(r)-Qa(t)})}function Ua(e){let r=0;return Array.isArray(e.selectionPath)&&(r+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(r+=e.argumentPath.length),r}function Qa(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}var de=class{constructor(r,t){this.name=r;this.value=t;this.isRequired=!1}makeRequired(){return this.isRequired=!0,this}write(r){let{colors:{green:t}}=r.context;r.addMarginSymbol(t(this.isRequired?"+":"?")),r.write(t(this.name)),this.isRequired||r.write(t("?")),r.write(t(": ")),typeof this.value=="string"?r.write(t(this.value)):r.write(this.value)}};var xn=class{constructor(){this.fields=[]}addField(r,t){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${r}: ${t}`))).addMarginSymbol(i(o("+")))}}),this}write(r){let{colors:{green:t}}=r.context;r.writeLine(t("{")).withIndent(()=>{r.writeJoined(Cr,this.fields).newLine()}).write(t("}")).addMarginSymbol(t("+"))}};function wn(e,r){switch(e.kind){case"MutuallyExclusiveFields":xd(e,r);break;case"IncludeOnScalar":Pd(e,r);break;case"EmptySelection":vd(e,r);break;case"UnknownSelectionField":Sd(e,r);break;case"UnknownArgument":Rd(e,r);break;case"UnknownInputField":Ad(e,r);break;case"RequiredArgumentMissing":Id(e,r);break;case"InvalidArgumentType":_d(e,r);break;case"InvalidArgumentValue":kd(e,r);break;case"ValueTooLarge":Dd(e,r);break;case"SomeFieldsMissing":Od(e,r);break;case"TooManyFieldsGiven":Ld(e,r);break;case"Union":Ga(e,r);break;default:throw new Error("not implemented: "+e.kind)}}function xd(e,r){let t=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();t&&(t.getField(e.firstField)?.markAsError(),t.getField(e.secondField)?.markAsError()),r.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function Pd(e,r){let[t,n]=Pn(e.selectionPath),i=e.outputType,o=r.arguments.getDeepSelectionParent(t)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new de(s.name,"true"));r.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${xt(s)}`:a+=".",a+=` Note that ${s.bold("include")} statements only accept relation fields.`,a})}function vd(e,r){let t=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(t){let n=t.getField("omit")?.value.asObject();if(n){Td(e,r,n);return}}Cd(e,r)}function Td(e,r,t){t.removeAllFields();for(let n of e.outputType.fields)t.addSuggestion(new de(n.name,"false"));r.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function Cd(e,r){let t=e.outputType,n=r.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),Ya(n,t)),r.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(t.name)} must not be empty. ${xt(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(t.name)} needs ${o.bold("at least one truthy value")}.`)}function Sd(e,r){let[t,n]=Pn(e.selectionPath),i=r.arguments.getDeepSubSelectionValue(t)?.asObject(),o;if(i){let s=i.getFieldValue("select")?.asObject(),a=i.getFieldValue("include")?.asObject(),l=i.getFieldValue("omit")?.asObject();s?.hasField(n)?(o="select",s.getField(n)?.markAsError(),Ya(s,e.outputType)):a?.hasField(n)?(o="include",a.getField(n)?.markAsError(),Fd(a,e.outputType)):l?.hasField(n)&&(o="omit",l.getField(n)?.markAsError(),Nd(l,e.outputType))}r.addErrorMessage(s=>{let a=[`Unknown field ${s.red(`\`${n}\``)}`];return o&&a.push(`for ${s.bold(o)} statement`),a.push(`on model ${s.bold(`\`${e.outputType.name}\``)}.`),a.push(xt(s)),a.join(" ")})}function Rd(e,r){let t=e.argumentPath[0],n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(t)?.markAsError(),Md(n,e.arguments)),r.addErrorMessage(i=>Ha(i,t,e.arguments.map(o=>o.name)))}function Ad(e,r){let[t,n]=Pn(e.argumentPath),i=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(t)?.asObject();o&&za(o,e.inputType)}r.addErrorMessage(o=>Ha(o,n,e.inputType.fields.map(s=>s.name)))}function Ha(e,r,t){let n=[`Unknown argument \`${e.red(r)}\`.`],i=qd(r,t);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),t.length>0&&n.push(xt(e)),n.join(" ")}function Id(e,r){let t;r.addErrorMessage(l=>t?.value instanceof J&&t.value.text==="null"?`Argument \`${l.green(o)}\` must not be ${l.red("null")}.`:`Argument \`${l.green(o)}\` is missing.`);let n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=Pn(e.argumentPath),s=new xn,a=n.getDeepFieldValue(i)?.asObject();if(a)if(t=a.getField(o),t&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let l of e.inputTypes[0].fields)s.addField(l.name,l.typeNames.join(" | "));a.addSuggestion(new de(o,s).makeRequired())}else{let l=e.inputTypes.map(Ka).join(" | ");a.addSuggestion(new de(o,l).makeRequired())}}function Ka(e){return e.kind==="list"?`${Ka(e.elementType)}[]`:e.name}function _d(e,r){let t=e.argument.name,n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),r.addErrorMessage(i=>{let o=vn("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(t)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function kd(e,r){let t=e.argument.name,n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),r.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(t)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=vn("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function Dd(e,r){let t=e.argument.name,n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof J&&(i=s.text)}r.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(t)}\``),s.join(" ")})}function Od(e,r){let t=e.argumentPath[e.argumentPath.length-1],n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&za(i,e.inputType)}r.addErrorMessage(i=>{let o=[`Argument \`${i.bold(t)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${vn("or",e.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),o.push(xt(i)),o.join(" ")})}function Ld(e,r){let t=e.argumentPath[e.argumentPath.length-1],n=r.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}r.addErrorMessage(o=>{let s=[`Argument \`${o.bold(t)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${vn("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function Ya(e,r){for(let t of r.fields)e.hasField(t.name)||e.addSuggestion(new de(t.name,"true"))}function Fd(e,r){for(let t of r.fields)t.isRelation&&!e.hasField(t.name)&&e.addSuggestion(new de(t.name,"true"))}function Nd(e,r){for(let t of r.fields)!e.hasField(t.name)&&!t.isRelation&&e.addSuggestion(new de(t.name,"true"))}function Md(e,r){for(let t of r)e.hasField(t.name)||e.addSuggestion(new de(t.name,t.typeNames.join(" | ")))}function za(e,r){if(r.kind==="object")for(let t of r.fields)e.hasField(t.name)||e.addSuggestion(new de(t.name,t.typeNames.join(" | ")))}function Pn(e){let r=[...e],t=r.pop();if(!t)throw new Error("unexpected empty path");return[r,t]}function xt({green:e,enabled:r}){return"Available options are "+(r?`listed in ${e("green")}`:"marked with ?")+"."}function vn(e,r){if(r.length===1)return r[0];let t=[...r],n=t.pop();return`${t.join(", ")} ${e} ${n}`}var $d=3;function qd(e,r){let t=1/0,n;for(let i of r){let o=(0,Wa.default)(e,i);o>$d||o({name:r.name,typeName:"boolean",isRelation:r.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(r){return this.params.previewFeatures.includes(r)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(r){return this.model?.fields.find(t=>t.name===r)}nestSelection(r){let t=this.findField(r),n=t?.kind==="object"?t.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(r)})}nestArgument(r){return new e({...this.params,argumentPath:this.params.argumentPath.concat(r)})}};var rl=e=>({command:e});var tl=e=>e.strings.reduce((r,t,n)=>`${r}@P${n}${t}`);function Pt(e){try{return nl(e,"fast")}catch{return nl(e,"slow")}}function nl(e,r){return JSON.stringify(e.map(t=>Kd(t,r)))}function Kd(e,r){return typeof e=="bigint"?{prisma__type:"bigint",prisma__value:e.toString()}:wr(e)?{prisma__type:"date",prisma__value:e.toJSON()}:Te.isDecimal(e)?{prisma__type:"decimal",prisma__value:e.toJSON()}:Buffer.isBuffer(e)?{prisma__type:"bytes",prisma__value:e.toString("base64")}:Yd(e)||ArrayBuffer.isView(e)?{prisma__type:"bytes",prisma__value:Buffer.from(e).toString("base64")}:typeof e=="object"&&r==="slow"?ol(e):e}function Yd(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function ol(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(il);let r={};for(let t of Object.keys(e))r[t]=il(e[t]);return r}function il(e){return typeof e=="bigint"?e.toString():ol(e)}var zd=/^(\s*alter\s)/i,sl=L("prisma:client");function zi(e,r,t,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&t.length>0&&zd.exec(r))throw new Error(`Running ALTER using ${n} is not supported Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. Example: await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) More Information: https://pris.ly/d/execute-raw `)}var Zi=({clientMethod:e,activeProvider:r})=>t=>{let n="",i;if(Array.isArray(t)){let[o,...s]=t;n=o,i={values:Pt(s||[]),__prismaRawParameters__:!0}}else switch(r){case"sqlite":case"mysql":{n=t.sql,i={values:Pt(t.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=t.text,i={values:Pt(t.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=tl(t),i={values:Pt(t.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${r} provider does not support ${e}`)}return i?.values?sl(`prisma.${e}(${n}, ${i.values})`):sl(`prisma.${e}(${n})`),{query:n,parameters:i}},al={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[r,...t]=e;return new ie(r,t)}},ll={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};function Xi(e){return function(t){let n,i=(o=e)=>{try{return o===void 0||o?.kind==="itx"?n??(n=ul(t(o))):ul(t(o))}catch(s){return Promise.reject(s)}};return{then(o,s){return i().then(o,s)},catch(o){return i().catch(o)},finally(o){return i().finally(o)},requestTransaction(o){let s=i(o);return s.requestTransaction?s.requestTransaction(o):s},[Symbol.toStringTag]:"PrismaPromise"}}}function ul(e){return typeof e.then=="function"?e:Promise.resolve(e)}var cl={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},async createEngineSpan(){},getActiveContext(){},runInChildSpan(e,r){return r()}},eo=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(r){return this.getGlobalTracingHelper().getTraceParent(r)}createEngineSpan(r){return this.getGlobalTracingHelper().createEngineSpan(r)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(r,t){return this.getGlobalTracingHelper().runInChildSpan(r,t)}getGlobalTracingHelper(){return globalThis.PRISMA_INSTRUMENTATION?.helper??cl}};function pl(e){return e.includes("tracing")?new eo:cl}function dl(e,r=()=>{}){let t,n=new Promise(i=>t=i);return{then(i){return--e===0&&t(r()),i?.(n)}}}var Zd=["$connect","$disconnect","$on","$transaction","$use","$extends"],ml=Zd;function fl(e){return typeof e=="string"?e:e.reduce((r,t)=>{let n=typeof t=="string"?t:t.level;return n==="query"?r:r&&(t==="info"||r==="info")?"info":n},void 0)}var Cn=class{constructor(){this._middlewares=[]}use(r){this._middlewares.push(r)}get(r){return this._middlewares[r]}has(r){return!!this._middlewares[r]}length(){return this._middlewares.length}};var hl=k(ui());function Sn(e){return typeof e.batchRequestIdx=="number"}function Rn(e){return e===null?e:Array.isArray(e)?e.map(Rn):typeof e=="object"?Xd(e)?em(e):gr(e,Rn):e}function Xd(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function em({$type:e,value:r}){switch(e){case"BigInt":return BigInt(r);case"Bytes":return Buffer.from(r,"base64");case"DateTime":return new Date(r);case"Decimal":return new Te(r);case"Json":return JSON.parse(r);default:rr(r,"Unknown tagged value")}}function gl(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let r=[];return e.modelName&&r.push(e.modelName),e.query.arguments&&r.push(ro(e.query.arguments)),r.push(ro(e.query.selection)),r.join("")}function ro(e){return`(${Object.keys(e).sort().map(t=>{let n=e[t];return typeof n=="object"&&n!==null?`(${t} ${ro(n)})`:t}).join(" ")})`}var rm={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateOne:!0,upsertOne:!0};function to(e){return rm[e]}var An=class{constructor(r){this.options=r;this.tickActive=!1;this.batches={}}request(r){let t=this.options.batchBy(r);return t?(this.batches[t]||(this.batches[t]=[],this.tickActive||(this.tickActive=!0,process.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[t].push({request:r,resolve:n,reject:i})})):this.options.singleLoader(r)}dispatchBatches(){for(let r in this.batches){let t=this.batches[r];delete this.batches[r],t.length===1?this.options.singleLoader(t[0].request).then(n=>{n instanceof Error?t[0].reject(n):t[0].resolve(n)}).catch(n=>{t[0].reject(n)}):(t.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(t.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;i{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(p=>p.protocolQuery),l=this.client._tracingHelper.getTraceParent(s),u=n.some(p=>to(p.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:nm(o),containsWrite:u,customDataProxyFetch:i})).map((p,d)=>{if(p instanceof Error)return p;try{return this.mapQueryEngineResult(n[d],p)}catch(f){return f}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?yl(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:to(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:gl(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(r){try{return await this.dataloader.request(r)}catch(t){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=r;this.handleAndLogRequestError({error:t,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a})}}mapQueryEngineResult({dataPath:r,unpacker:t},n){let i=n?.data,o=n?.elapsed,s=this.unpack(i,r,t);return process.env.PRISMA_CLIENT_GET_TIME?{data:s,elapsed:o}:s}handleAndLogRequestError(r){try{this.handleRequestError(r)}catch(t){throw this.logEmitter&&this.logEmitter.emit("error",{message:t.message,target:r.clientMethod,timestamp:new Date}),t}}handleRequestError({error:r,clientMethod:t,callsite:n,transaction:i,args:o,modelName:s}){if(tm(r),im(r,i)||r instanceof Oe)throw r;if(r instanceof V&&om(r)){let l=El(r.meta);Tn({args:o,errors:[l],callsite:n,errorFormat:this.client._errorFormat,originalMethod:t,clientVersion:this.client._clientVersion})}let a=r.message;if(n&&(a=Ar({callsite:n,originalMethod:t,isPanic:r.isPanic,showColors:this.client._errorFormat==="pretty",message:a})),a=this.sanitizeMessage(a),r.code){let l=s?{modelName:s,...r.meta}:r.meta;throw new V(a,{code:r.code,clientVersion:this.client._clientVersion,meta:l,batchRequestIdx:r.batchRequestIdx})}else{if(r.isPanic)throw new le(a,this.client._clientVersion);if(r instanceof B)throw new B(a,{clientVersion:this.client._clientVersion,batchRequestIdx:r.batchRequestIdx});if(r instanceof R)throw new R(a,this.client._clientVersion);if(r instanceof le)throw new le(a,this.client._clientVersion)}throw r.clientVersion=this.client._clientVersion,r}sanitizeMessage(r){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,hl.default)(r):r}unpack(r,t,n){if(!r||(r.data&&(r=r.data),!r))return r;let i=Object.values(r)[0],o=t.filter(a=>a!=="select"&&a!=="include"),s=Rn(Ii(i,o));return n?n(s):s}get[Symbol.toStringTag](){return"RequestHandler"}};function nm(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:yl(e)};rr(e,"Unknown transaction kind")}}function yl(e){return{id:e.id,payload:e.payload}}function im(e,r){return Sn(e)&&r?.kind==="batch"&&e.batchRequestIdx!==r.index}function om(e){return e.code==="P2009"||e.code==="P2012"}function El(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(El)};if(Array.isArray(e.selectionPath)){let[,...r]=e.selectionPath;return{...e,selectionPath:r}}return e}var bl="5.15.0";var wl=bl;function xl(e){return e.map(r=>{let t={};for(let n of Object.keys(r))t[n]=Pl(r[n]);return t})}function Pl({prisma__type:e,prisma__value:r}){switch(e){case"bigint":return BigInt(r);case"bytes":return Buffer.from(r,"base64");case"decimal":return new Te(r);case"datetime":case"date":return new Date(r);case"time":return new Date(`1970-01-01T${r}Z`);case"array":return r.map(Pl);default:return r}}var Sl=k(Hi());var q=class extends Error{constructor(r){super(r+` Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};w(q,"PrismaClientConstructorValidationError");var vl=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","__internal"],Tl=["pretty","colorless","minimal"],Cl=["info","query","warn","error"],am={datasources:(e,{datasourceNames:r})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new q(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[t,n]of Object.entries(e)){if(!r.includes(t)){let i=Or(t,r)||` Available datasources: ${r.join(", ")}`;throw new q(`Unknown datasource ${t} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new q(`Invalid value ${JSON.stringify(e)} for datasource "${t}" provided to PrismaClient constructor. It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new q(`Invalid value ${JSON.stringify(e)} for datasource "${t}" provided to PrismaClient constructor. It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new q(`Invalid value ${JSON.stringify(o)} for datasource "${t}" provided to PrismaClient constructor. It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,r)=>{if(e===null)return;if(e===void 0)throw new q('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!bn(r).includes("driverAdapters"))throw new q('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(Ur()==="binary")throw new q('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')},datasourceUrl:e=>{if(typeof e<"u"&&typeof e!="string")throw new q(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new q(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!Tl.includes(e)){let r=Or(e,Tl);throw new q(`Invalid errorFormat ${e} provided to PrismaClient constructor.${r}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new q(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function r(t){if(typeof t=="string"&&!Cl.includes(t)){let n=Or(t,Cl);throw new q(`Invalid log level "${t}" provided to PrismaClient constructor.${n}`)}}for(let t of e){r(t);let n={level:r,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=Or(i,o);throw new q(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(t&&typeof t=="object")for(let[i,o]of Object.entries(t))if(n[i])n[i](o);else throw new q(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let r=e.maxWait;if(r!=null&&r<=0)throw new q(`Invalid value ${r} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let t=e.timeout;if(t!=null&&t<=0)throw new q(`Invalid value ${t} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},__internal:e=>{if(!e)return;let r=["debug","engine","configOverride"];if(typeof e!="object")throw new q(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[t]of Object.entries(e))if(!r.includes(t)){let n=Or(t,r);throw new q(`Invalid property ${JSON.stringify(t)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function Rl(e,r){for(let[t,n]of Object.entries(e)){if(!vl.includes(t)){let i=Or(t,vl);throw new q(`Unknown property ${t} provided to PrismaClient constructor.${i}`)}am[t](n,r)}if(e.datasourceUrl&&e.datasources)throw new q('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function Or(e,r){if(r.length===0||typeof e!="string")return"";let t=lm(e,r);return t?` Did you mean "${t}"?`:""}function lm(e,r){if(r.length===0)return null;let t=r.map(i=>({value:i,distance:(0,Sl.default)(e,i)}));t.sort((i,o)=>i.distance{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?t(i):r(n)))},l=u=>{o||(o=!0,t(u))};for(let u=0;u{n[u]=c,a()},c=>{if(!Sn(c)){l(c);return}c.batchRequestIdx===u?l(c):(i||(i=c),a())})})}var Ye=L("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var um={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},cm=Symbol.for("prisma.client.transaction.id"),pm={id:0,nextId(){return++this.id}};function Ll(e){class r{constructor(n){this._originalClient=this;this._middlewares=new Cn;this._createPrismaPromise=Xi();this.$extends=Ks;e=n?.__internal?.configOverride?.(e)??e,da(e),n&&Rl(n,e);let i=n?.adapter?yi(n.adapter):void 0,o=new Dl.EventEmitter().on("error",()=>{});this._extensions=mn.empty(),this._previewFeatures=bn(e),this._clientVersion=e.clientVersion??wl,this._activeProvider=e.activeProvider,this._tracingHelper=pl(this._previewFeatures);let s={rootEnvPath:e.relativeEnvPaths.rootEnvPath&&vt.default.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&vt.default.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},a=!i&&Br(s,{conflictCheck:"none"})||e.injectableEdgeEnv?.();try{let l=n??{},u=l.__internal??{},c=u.debug===!0;c&&L.enable("prisma:client");let p=vt.default.resolve(e.dirname,e.relativePath);Ol.default.existsSync(p)||(p=e.dirname),Ye("dirname",e.dirname),Ye("relativePath",e.relativePath),Ye("cwd",p);let d=u.engine||{};if(l.errorFormat?this._errorFormat=l.errorFormat:process.env.NODE_ENV==="production"?this._errorFormat="minimal":process.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:p,dirname:e.dirname,enableDebugLogs:c,allowTriggerPanic:d.allowTriggerPanic,datamodelPath:vt.default.join(e.dirname,e.filename??"schema.prisma"),prismaPath:d.binaryPath??void 0,engineEndpoint:d.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:l.log&&fl(l.log),logQueries:l.log&&!!(typeof l.log=="string"?l.log==="query":l.log.find(f=>typeof f=="string"?f==="query":f.level==="query")),env:a?.parsed??{},flags:[],engineWasm:e.engineWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:ma(l,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:l.transactionOptions?.maxWait??2e3,timeout:l.transactionOptions?.timeout??5e3,isolationLevel:l.transactionOptions?.isolationLevel},logEmitter:o,isBundled:e.isBundled,adapter:i},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:Ir,getBatchRequestPayload:Er,prismaGraphQLToJSError:or,PrismaClientUnknownRequestError:B,PrismaClientInitializationError:R,PrismaClientKnownRequestError:V,debug:L("prisma:client:accelerateEngine"),engineVersion:_l.version,clientVersion:e.clientVersion}},Ye("clientVersion",e.clientVersion),this._engine=Va(e,this._engineConfig),this._requestHandler=new In(this,o),l.log)for(let f of l.log){let g=typeof f=="string"?f:f.emit==="stdout"?f.level:null;g&&this.$on(g,h=>{Jr.log(`${Jr.tags[g]??""}`,h.message||h.query)})}this._metrics=new hr(this._engine)}catch(l){throw l.clientVersion=this._clientVersion,l}return this._appliedParent=it(this)}get[Symbol.toStringTag](){return"PrismaClient"}$use(n){this._middlewares.use(n)}$on(n,i){n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i)}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{ho()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:Zi({clientMethod:i,activeProvider:a}),callsite:We(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=Il(n,i);return zi(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new H("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(zi(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new H(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:rl,callsite:We(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:Zi({clientMethod:i,activeProvider:a}),callsite:We(this._errorFormat),dataPath:[],middlewareArgsMapper:s}).then(xl)}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...Il(n,i));throw new H("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=pm.nextId(),s=dl(n.length),a=n.map((l,u)=>{if(l?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let c=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,p={kind:"batch",id:o,index:u,isolationLevel:c,lock:s};return l.requestTransaction?.(p)??l});return Al(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),l;try{let u={kind:"itx",...a};l=await n(this._createItxClient(u)),await this._engine.transaction("commit",o,a)}catch(u){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),u}return l}_createItxClient(n){return it(Pe(Hs(this),[te("_appliedParent",()=>this._appliedParent._createItxClient(n)),te("_createPrismaPromise",()=>Xi(n)),te(cm,()=>n.id),yr(ml)]))}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??um,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={middleware:{name:"middleware",middleware:!0,attributes:{method:"$use"},active:!1},operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=-1,l=async u=>{let c=this._middlewares.get(++a);if(c)return this._tracingHelper.runInChildSpan(s.middleware,I=>c(u,T=>(I?.end(),l(T))));let{runInTransaction:p,args:d,...f}=u,g={...n,...f};d&&(g.args=i.middlewareArgsToRequestArgs(d)),n.transaction!==void 0&&p===!1&&delete g.transaction;let h=await ta(this,g);return g.model?Zs({result:h,modelName:g.model,args:g.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel}):h};return this._tracingHelper.runInChildSpan(s.operation,()=>new kl.AsyncResource("prisma-client-request").runInAsyncScope(()=>l(o)))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:l,argsMapper:u,transaction:c,unpacker:p,otelParentCtx:d,customDataProxyFetch:f}){try{n=u?u(n):n;let g={name:"serialize"},h=this._tracingHelper.runInChildSpan(g,()=>Za({modelName:l,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures}));return L.enabled("prisma:client")&&(Ye("Prisma Client call:"),Ye(`prisma.${i}(${_s(n)})`),Ye("Generated request:"),Ye(JSON.stringify(h,null,2)+` `)),c?.kind==="batch"&&await c.lock,this._requestHandler.request({protocolQuery:h,modelName:l,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:c,unpacker:p,otelParentCtx:d,otelChildCtx:this._tracingHelper.getActiveContext(),customDataProxyFetch:f})}catch(g){throw g.clientVersion=this._clientVersion,g}}get $metrics(){if(!this._hasPreviewFlag("metrics"))throw new H("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:this._clientVersion});return this._metrics}_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}}return r}function Il(e,r){return dm(e)?[new ie(e,r),al]:[e,ll]}function dm(e){return Array.isArray(e)&&Array.isArray(e.raw)}var mm=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Fl(e){return new Proxy(e,{get(r,t){if(t in r)return r[t];if(!mm.has(t))throw new TypeError(`Invalid enum value: ${String(t)}`)}})}function Nl(e){Br(e,{conflictCheck:"warn"})}0&&(module.exports={Debug,Decimal,Extensions,MetricsClient,NotFoundError,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,defineDmmfProperty,empty,getPrismaClient,getRuntime,join,makeStrictEnum,objectEnumValues,raw,sqltag,warnEnvConflicts,warnOnce}); /*! Bundled license information: decimal.js/decimal.mjs: (*! * decimal.js v10.4.3 * An arbitrary-precision Decimal type for JavaScript. * https://github.com/MikeMcl/decimal.js * Copyright (c) 2022 Michael Mclaughlin * MIT Licence *) */ //# sourceMappingURL=library.js.map ================================================ FILE: server/src/common/prisma-client/runtime/react-native.js ================================================ "use strict";var ea=Object.create;var Qt=Object.defineProperty;var ta=Object.getOwnPropertyDescriptor;var ra=Object.getOwnPropertyNames;var na=Object.getPrototypeOf,ia=Object.prototype.hasOwnProperty;var Se=(e,t)=>()=>(e&&(t=e(e=0)),t);var ce=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ye=(e,t)=>{for(var r in t)Qt(e,r,{get:t[r],enumerable:!0})},jn=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ra(t))!ia.call(e,i)&&i!==r&&Qt(e,i,{get:()=>t[i],enumerable:!(n=ta(t,i))||n.enumerable});return e};var fe=(e,t,r)=>(r=e!=null?ea(na(e)):{},jn(t||!e||!e.__esModule?Qt(r,"default",{value:e,enumerable:!0}):r,e)),Dr=e=>jn(Qt({},"__esModule",{value:!0}),e);var y,c=Se(()=>{"use strict";y={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"]}});var x,p=Se(()=>{"use strict";x=globalThis.performance??(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var E,f=Se(()=>{"use strict";E=()=>{};E.prototype=E});var b,d=Se(()=>{"use strict";b=class{constructor(t){this.value=t}deref(){return this.value}}});var oi=ce(tt=>{"use strict";m();c();p();f();d();var Jn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),oa=Jn(e=>{"use strict";e.byteLength=l,e.toByteArray=g,e.fromByteArray=R;var t=[],r=[],n=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(o=0,s=i.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var F=C.indexOf("=");F===-1&&(F=A);var L=F===A?0:4-F%4;return[F,L]}function l(C){var A=a(C),F=A[0],L=A[1];return(F+L)*3/4-L}function u(C,A,F){return(A+F)*3/4-F}function g(C){var A,F=a(C),L=F[0],N=F[1],M=new n(u(C,L,N)),k=0,z=N>0?L-4:L,j;for(j=0;j>16&255,M[k++]=A>>8&255,M[k++]=A&255;return N===2&&(A=r[C.charCodeAt(j)]<<2|r[C.charCodeAt(j+1)]>>4,M[k++]=A&255),N===1&&(A=r[C.charCodeAt(j)]<<10|r[C.charCodeAt(j+1)]<<4|r[C.charCodeAt(j+2)]>>2,M[k++]=A>>8&255,M[k++]=A&255),M}function h(C){return t[C>>18&63]+t[C>>12&63]+t[C>>6&63]+t[C&63]}function v(C,A,F){for(var L,N=[],M=A;Mz?z:k+M));return L===1?(A=C[F-1],N.push(t[A>>2]+t[A<<4&63]+"==")):L===2&&(A=(C[F-2]<<8)+C[F-1],N.push(t[A>>10]+t[A>>4&63]+t[A<<2&63]+"=")),N.join("")}}),sa=Jn(e=>{e.read=function(t,r,n,i,o){var s,a,l=o*8-i-1,u=(1<>1,h=-7,v=n?o-1:0,R=n?-1:1,C=t[r+v];for(v+=R,s=C&(1<<-h)-1,C>>=-h,h+=l;h>0;s=s*256+t[r+v],v+=R,h-=8);for(a=s&(1<<-h)-1,s>>=-h,h+=i;h>0;a=a*256+t[r+v],v+=R,h-=8);if(s===0)s=1-g;else{if(s===u)return a?NaN:(C?-1:1)*(1/0);a=a+Math.pow(2,i),s=s-g}return(C?-1:1)*a*Math.pow(2,s-i)},e.write=function(t,r,n,i,o,s){var a,l,u,g=s*8-o-1,h=(1<>1,R=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,C=i?0:s-1,A=i?1:-1,F=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(l=isNaN(r)?1:0,a=h):(a=Math.floor(Math.log(r)/Math.LN2),r*(u=Math.pow(2,-a))<1&&(a--,u*=2),a+v>=1?r+=R/u:r+=R*Math.pow(2,1-v),r*u>=2&&(a++,u/=2),a+v>=h?(l=0,a=h):a+v>=1?(l=(r*u-1)*Math.pow(2,o),a=a+v):(l=r*Math.pow(2,v-1)*Math.pow(2,o),a=0));o>=8;t[n+C]=l&255,C+=A,l/=256,o-=8);for(a=a<0;t[n+C]=a&255,C+=A,a/=256,g-=8);t[n+C-A]|=F*128}}),Br=oa(),Xe=sa(),Un=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;tt.Buffer=T;tt.SlowBuffer=fa;tt.INSPECT_MAX_BYTES=50;var Jt=2147483647;tt.kMaxLength=Jt;T.TYPED_ARRAY_SUPPORT=aa();!T.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function aa(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return!1}}Object.defineProperty(T.prototype,"parent",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.buffer}});Object.defineProperty(T.prototype,"offset",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.byteOffset}});function Re(e){if(e>Jt)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,T.prototype),t}function T(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return Ur(e)}return Wn(e,t,r)}T.poolSize=8192;function Wn(e,t,r){if(typeof e=="string")return ua(e,t);if(ArrayBuffer.isView(e))return ca(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(ye(e,ArrayBuffer)||e&&ye(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ye(e,SharedArrayBuffer)||e&&ye(e.buffer,SharedArrayBuffer)))return Hn(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return T.from(n,t,r);let i=pa(e);if(i)return i;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return T.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}T.from=function(e,t,r){return Wn(e,t,r)};Object.setPrototypeOf(T.prototype,Uint8Array.prototype);Object.setPrototypeOf(T,Uint8Array);function Gn(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function la(e,t,r){return Gn(e),e<=0?Re(e):t!==void 0?typeof r=="string"?Re(e).fill(t,r):Re(e).fill(t):Re(e)}T.alloc=function(e,t,r){return la(e,t,r)};function Ur(e){return Gn(e),Re(e<0?0:qr(e)|0)}T.allocUnsafe=function(e){return Ur(e)};T.allocUnsafeSlow=function(e){return Ur(e)};function ua(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!T.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=Kn(e,t)|0,n=Re(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}function $r(e){let t=e.length<0?0:qr(e.length)|0,r=Re(t);for(let n=0;n=Jt)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Jt.toString(16)+" bytes");return e|0}function fa(e){return+e!=e&&(e=0),T.alloc(+e)}T.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==T.prototype};T.compare=function(e,t){if(ye(e,Uint8Array)&&(e=T.from(e,e.offset,e.byteLength)),ye(t,Uint8Array)&&(t=T.from(t,t.offset,t.byteLength)),!T.isBuffer(e)||!T.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);in.length?(T.isBuffer(o)||(o=T.from(o)),o.copy(n,i)):Uint8Array.prototype.set.call(n,o,i);else if(T.isBuffer(o))o.copy(n,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=o.length}return n};function Kn(e,t){if(T.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||ye(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return jr(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return ii(e).length;default:if(i)return n?-1:jr(e).length;t=(""+t).toLowerCase(),i=!0}}T.byteLength=Kn;function da(e,t,r){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return Pa(this,t,r);case"utf8":case"utf-8":return Yn(this,t,r);case"ascii":return xa(this,t,r);case"latin1":case"binary":return va(this,t,r);case"base64":return ba(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ta(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}T.prototype._isBuffer=!0;function qe(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}T.prototype.swap16=function(){let e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tt&&(e+=" ... "),""};Un&&(T.prototype[Un]=T.prototype.inspect);T.prototype.compare=function(e,t,r,n,i){if(ye(e,Uint8Array)&&(e=T.from(e,e.offset,e.byteLength)),!T.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0&&(t=0),r===void 0&&(r=e?e.length:0),n===void 0&&(n=0),i===void 0&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;let o=i-n,s=r-t,a=Math.min(o,s),l=this.slice(n,i),u=e.slice(t,r);for(let g=0;g2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,Qr(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0)if(i)r=0;else return-1;if(typeof t=="string"&&(t=T.from(t,n)),T.isBuffer(t))return t.length===0?-1:qn(e,t,r,n,i);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):qn(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function qn(e,t,r,n,i){let o=1,s=e.length,a=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;o=2,s/=2,a/=2,r/=2}function l(g,h){return o===1?g[h]:g.readUInt16BE(h*o)}let u;if(i){let g=-1;for(u=r;us&&(r=s-a),u=r;u>=0;u--){let g=!0;for(let h=0;hi&&(n=i)):n=i;let o=t.length;n>o/2&&(n=o/2);let s;for(s=0;s>>0,isFinite(r)?(r=r>>>0,n===void 0&&(n="utf8")):(n=r,r=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-t;if((r===void 0||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return ma(this,e,t,r);case"utf8":case"utf-8":return ga(this,e,t,r);case"ascii":case"latin1":case"binary":return ha(this,e,t,r);case"base64":return ya(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return wa(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}};T.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ba(e,t,r){return t===0&&r===e.length?Br.fromByteArray(e):Br.fromByteArray(e.slice(t,r))}function Yn(e,t,r){r=Math.min(e.length,r);let n=[],i=t;for(;i239?4:o>223?3:o>191?2:1;if(i+a<=r){let l,u,g,h;switch(a){case 1:o<128&&(s=o);break;case 2:l=e[i+1],(l&192)===128&&(h=(o&31)<<6|l&63,h>127&&(s=h));break;case 3:l=e[i+1],u=e[i+2],(l&192)===128&&(u&192)===128&&(h=(o&15)<<12|(l&63)<<6|u&63,h>2047&&(h<55296||h>57343)&&(s=h));break;case 4:l=e[i+1],u=e[i+2],g=e[i+3],(l&192)===128&&(u&192)===128&&(g&192)===128&&(h=(o&15)<<18|(l&63)<<12|(u&63)<<6|g&63,h>65535&&h<1114112&&(s=h))}}s===null?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),i+=a}return Ea(n)}var Vn=4096;function Ea(e){let t=e.length;if(t<=Vn)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn)&&(r=n);let i="";for(let o=t;or&&(e=r),t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),tr)throw new RangeError("Trying to access beyond buffer length")}T.prototype.readUintLE=T.prototype.readUIntLE=function(e,t,r){e=e>>>0,t=t>>>0,r||W(e,t,this.length);let n=this[e],i=1,o=0;for(;++o>>0,t=t>>>0,r||W(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n};T.prototype.readUint8=T.prototype.readUInt8=function(e,t){return e=e>>>0,t||W(e,1,this.length),this[e]};T.prototype.readUint16LE=T.prototype.readUInt16LE=function(e,t){return e=e>>>0,t||W(e,2,this.length),this[e]|this[e+1]<<8};T.prototype.readUint16BE=T.prototype.readUInt16BE=function(e,t){return e=e>>>0,t||W(e,2,this.length),this[e]<<8|this[e+1]};T.prototype.readUint32LE=T.prototype.readUInt32LE=function(e,t){return e=e>>>0,t||W(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};T.prototype.readUint32BE=T.prototype.readUInt32BE=function(e,t){return e=e>>>0,t||W(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};T.prototype.readBigUInt64LE=_e(function(e){e=e>>>0,et(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&yt(e,this.length-8);let n=t+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,i=this[++e]+this[++e]*2**8+this[++e]*2**16+r*2**24;return BigInt(n)+(BigInt(i)<>>0,et(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&yt(e,this.length-8);let n=t*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],i=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+r;return(BigInt(n)<>>0,t=t>>>0,r||W(e,t,this.length);let n=this[e],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*t)),n};T.prototype.readIntBE=function(e,t,r){e=e>>>0,t=t>>>0,r||W(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o};T.prototype.readInt8=function(e,t){return e=e>>>0,t||W(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};T.prototype.readInt16LE=function(e,t){e=e>>>0,t||W(e,2,this.length);let r=this[e]|this[e+1]<<8;return r&32768?r|4294901760:r};T.prototype.readInt16BE=function(e,t){e=e>>>0,t||W(e,2,this.length);let r=this[e+1]|this[e]<<8;return r&32768?r|4294901760:r};T.prototype.readInt32LE=function(e,t){return e=e>>>0,t||W(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};T.prototype.readInt32BE=function(e,t){return e=e>>>0,t||W(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};T.prototype.readBigInt64LE=_e(function(e){e=e>>>0,et(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&yt(e,this.length-8);let n=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(r<<24);return(BigInt(n)<>>0,et(e,"offset");let t=this[e],r=this[e+7];(t===void 0||r===void 0)&&yt(e,this.length-8);let n=(t<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(n)<>>0,t||W(e,4,this.length),Xe.read(this,e,!0,23,4)};T.prototype.readFloatBE=function(e,t){return e=e>>>0,t||W(e,4,this.length),Xe.read(this,e,!1,23,4)};T.prototype.readDoubleLE=function(e,t){return e=e>>>0,t||W(e,8,this.length),Xe.read(this,e,!0,52,8)};T.prototype.readDoubleBE=function(e,t){return e=e>>>0,t||W(e,8,this.length),Xe.read(this,e,!1,52,8)};function oe(e,t,r,n,i,o){if(!T.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}T.prototype.writeUintLE=T.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;oe(this,e,t,r,s,0)}let i=1,o=0;for(this[t]=e&255;++o>>0,r=r>>>0,!n){let s=Math.pow(2,8*r)-1;oe(this,e,t,r,s,0)}let i=r-1,o=1;for(this[t+i]=e&255;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r};T.prototype.writeUint8=T.prototype.writeUInt8=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,1,255,0),this[t]=e&255,t+1};T.prototype.writeUint16LE=T.prototype.writeUInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2};T.prototype.writeUint16BE=T.prototype.writeUInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2};T.prototype.writeUint32LE=T.prototype.writeUInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4};T.prototype.writeUint32BE=T.prototype.writeUInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function Zn(e,t,r,n,i){ni(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,s=s>>8,e[r++]=s,r}function Xn(e,t,r,n,i){ni(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o=o>>8,e[r+6]=o,o=o>>8,e[r+5]=o,o=o>>8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s=s>>8,e[r+2]=s,s=s>>8,e[r+1]=s,s=s>>8,e[r]=s,r+8}T.prototype.writeBigUInt64LE=_e(function(e,t=0){return Zn(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});T.prototype.writeBigUInt64BE=_e(function(e,t=0){return Xn(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});T.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);oe(this,e,t,r,a-1,-a)}let i=0,o=1,s=0;for(this[t]=e&255;++i>0)-s&255;return t+r};T.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);oe(this,e,t,r,a-1,-a)}let i=r-1,o=1,s=0;for(this[t+i]=e&255;--i>=0&&(o*=256);)e<0&&s===0&&this[t+i+1]!==0&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r};T.prototype.writeInt8=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1};T.prototype.writeInt16LE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2};T.prototype.writeInt16BE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2};T.prototype.writeInt32LE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4};T.prototype.writeInt32BE=function(e,t,r){return e=+e,t=t>>>0,r||oe(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};T.prototype.writeBigInt64LE=_e(function(e,t=0){return Zn(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});T.prototype.writeBigInt64BE=_e(function(e,t=0){return Xn(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ei(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function ti(e,t,r,n,i){return t=+t,r=r>>>0,i||ei(e,t,r,4,34028234663852886e22,-34028234663852886e22),Xe.write(e,t,r,n,23,4),r+4}T.prototype.writeFloatLE=function(e,t,r){return ti(this,e,t,!0,r)};T.prototype.writeFloatBE=function(e,t,r){return ti(this,e,t,!1,r)};function ri(e,t,r,n,i){return t=+t,r=r>>>0,i||ei(e,t,r,8,17976931348623157e292,-17976931348623157e292),Xe.write(e,t,r,n,52,8),r+8}T.prototype.writeDoubleLE=function(e,t,r){return ri(this,e,t,!0,r)};T.prototype.writeDoubleBE=function(e,t,r){return ri(this,e,t,!1,r)};T.prototype.copy=function(e,t,r,n){if(!T.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),!n&&n!==0&&(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>0,r=r===void 0?this.length:r>>>0,e||(e=0);let i;if(typeof e=="number")for(i=t;i2**32?i=Qn(String(r)):typeof r=="bigint"&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=Qn(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);function Qn(e){let t="",r=e.length,n=e[0]==="-"?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function Ca(e,t,r){et(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&yt(t,e.length-(r+1))}function ni(e,t,r,n,i,o){if(e>r||e3?t===0||t===BigInt(0)?a=`>= 0${s} and < 2${s} ** ${(o+1)*8}${s}`:a=`>= -(2${s} ** ${(o+1)*8-1}${s}) and < 2 ** ${(o+1)*8-1}${s}`:a=`>= ${t}${s} and <= ${r}${s}`,new Ze.ERR_OUT_OF_RANGE("value",a,e)}Ca(n,i,o)}function et(e,t){if(typeof e!="number")throw new Ze.ERR_INVALID_ARG_TYPE(t,"number",e)}function yt(e,t,r){throw Math.floor(e)!==e?(et(e,r),new Ze.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new Ze.ERR_BUFFER_OUT_OF_BOUNDS:new Ze.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var Aa=/[^+/0-9A-Za-z-_]/g;function Sa(e){if(e=e.split("=")[0],e=e.trim().replace(Aa,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function jr(e,t){t=t||1/0;let r,n=e.length,i=null,o=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return o}function Ra(e){let t=[];for(let r=0;r>8,i=r%256,o.push(i),o.push(n);return o}function ii(e){return Br.toByteArray(Sa(e))}function Wt(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function ye(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function Qr(e){return e!==e}var Oa=function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function _e(e){return typeof BigInt>"u"?Fa:e}function Fa(){throw new Error("BigInt not supported")}});var w,m=Se(()=>{"use strict";w=fe(oi())});function Ma(){return!1}var _a,La,Gt,Gr=Se(()=>{"use strict";m();c();p();f();d();_a={},La={existsSync:Ma,promises:_a},Gt=La});var gi=ce((gf,mi)=>{"use strict";m();c();p();f();d();mi.exports=(zr(),Dr(Kr)).format});var Kr={};Ye(Kr,{default:()=>Xa,deprecate:()=>yi,format:()=>bi,inspect:()=>wi,promisify:()=>hi});function hi(e){return(...t)=>new Promise((r,n)=>{e(...t,(i,o)=>{i?n(i):r(o)})})}function yi(e,t){return(...r)=>(console.warn(t),e(...r))}function wi(e){return JSON.stringify(e,(t,r)=>typeof r=="function"?r.toString():typeof r=="bigint"?`${r}n`:r instanceof Error?{...r,message:r.message,stack:r.stack}:r)}var bi,Za,Xa,zr=Se(()=>{"use strict";m();c();p();f();d();bi=gi(),Za={promisify:hi,deprecate:yi,inspect:wi,format:bi},Xa=Za});function il(...e){return e.join("/")}function ol(...e){return e.join("/")}var Ti,sl,al,we,en=Se(()=>{"use strict";m();c();p();f();d();Ti="/",sl={sep:Ti},al={resolve:il,posix:sl,join:ol,sep:Ti},we=al});var Ci=ce(()=>{"use strict";m();c();p();f();d()});var Ri=ce((fd,Si)=>{"use strict";m();c();p();f();d();Si.exports=e=>{let t=e.match(/^[ \t]*(?=\S)/gm);return t?t.reduce((r,n)=>Math.min(r,n.length),1/0):0}});var Oi=ce((wd,ki)=>{"use strict";m();c();p();f();d();var ul=Ri();ki.exports=e=>{let t=ul(e);if(t===0)return e;let r=new RegExp(`^[ \\t]{${t}}`,"gm");return e.replace(r,"")}});var Kt,Fi=Se(()=>{"use strict";m();c();p();f();d();Kt=class{constructor(){this.events={}}on(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),this}emit(t,...r){return this.events[t]?(this.events[t].forEach(n=>{n(...r)}),!0):!1}}});var _i=ce((Yd,Mi)=>{"use strict";m();c();p();f();d();Mi.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var Ni=ce((um,Ii)=>{"use strict";m();c();p();f();d();Ii.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var nn=ce((gm,Di)=>{"use strict";m();c();p();f();d();var ml=Ni();Di.exports=e=>typeof e=="string"?e.replace(ml(),""):e});var Bi=ce((_m,Yt)=>{"use strict";m();c();p();f();d();Yt.exports=(e={})=>{let t;if(e.repoUrl)t=e.repoUrl;else if(e.user&&e.repo)t=`https://github.com/${e.user}/${e.repo}`;else throw new Error("You need to specify either the `repoUrl` option or both the `user` and `repo` options");let r=new URL(`${t}/issues/new`),n=["body","title","labels","template","milestone","assignee","projects"];for(let i of n){let o=e[i];if(o!==void 0){if(i==="labels"||i==="projects"){if(!Array.isArray(o))throw new TypeError(`The \`${i}\` option should be an array`);o=o.join(",")}r.searchParams.set(i,o)}}return r.toString()};Yt.exports.default=Yt.exports});var qi=ce((ky,wl)=>{wl.exports={name:"@prisma/engines-version",version:"5.15.0-29.12e25d8d06f6ea5a0252864dd9a03b1bb51f3022",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"12e25d8d06f6ea5a0252864dd9a03b1bb51f3022"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.33",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var Vi=ce(()=>{"use strict";m();c();p();f();d()});var Fn=ce((cA,ls)=>{"use strict";m();c();p();f();d();ls.exports=function(){function e(t,r,n,i,o){return tn?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;sZr,Decimal:()=>ve,Extensions:()=>Jr,MetricsClient:()=>nt,NotFoundError:()=>Oe,PrismaClientInitializationError:()=>V,PrismaClientKnownRequestError:()=>G,PrismaClientRustPanicError:()=>ue,PrismaClientUnknownRequestError:()=>H,PrismaClientValidationError:()=>Y,Public:()=>Wr,Sql:()=>se,defineDmmfProperty:()=>Ui,empty:()=>Ji,getPrismaClient:()=>Ys,getRuntime:()=>Zo,join:()=>Qi,makeStrictEnum:()=>Zs,objectEnumValues:()=>Xt,raw:()=>dn,sqltag:()=>mn,warnEnvConflicts:()=>void 0,warnOnce:()=>St});module.exports=Dr(fp);m();c();p();f();d();var Jr={};Ye(Jr,{defineExtension:()=>si,getExtensionContext:()=>ai});m();c();p();f();d();m();c();p();f();d();function si(e){return typeof e=="function"?e:t=>t.$extends(e)}m();c();p();f();d();function ai(e){return e}var Wr={};Ye(Wr,{validator:()=>li});m();c();p();f();d();m();c();p();f();d();function li(...e){return t=>t}m();c();p();f();d();m();c();p();f();d();var Ht={};Ye(Ht,{$:()=>di,bgBlack:()=>Qa,bgBlue:()=>Ha,bgCyan:()=>za,bgGreen:()=>Wa,bgMagenta:()=>Ka,bgRed:()=>Ja,bgWhite:()=>Ya,bgYellow:()=>Ga,black:()=>ja,blue:()=>Je,bold:()=>de,cyan:()=>ke,dim:()=>wt,gray:()=>xt,green:()=>Et,grey:()=>Va,hidden:()=>Ba,inverse:()=>Da,italic:()=>Na,magenta:()=>Ua,red:()=>Ve,reset:()=>Ia,strikethrough:()=>$a,underline:()=>bt,white:()=>qa,yellow:()=>Qe});m();c();p();f();d();var Hr,ui,ci,pi,fi=!0;typeof y<"u"&&({FORCE_COLOR:Hr,NODE_DISABLE_COLORS:ui,NO_COLOR:ci,TERM:pi}=y.env||{},fi=y.stdout&&y.stdout.isTTY);var di={enabled:!ui&&ci==null&&pi!=="dumb"&&(Hr!=null&&Hr!=="0"||fi)};function U(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!di.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var Ia=U(0,0),de=U(1,22),wt=U(2,22),Na=U(3,23),bt=U(4,24),Da=U(7,27),Ba=U(8,28),$a=U(9,29),ja=U(30,39),Ve=U(31,39),Et=U(32,39),Qe=U(33,39),Je=U(34,39),Ua=U(35,39),ke=U(36,39),qa=U(37,39),xt=U(90,39),Va=U(90,39),Qa=U(40,49),Ja=U(41,49),Wa=U(42,49),Ga=U(43,49),Ha=U(44,49),Ka=U(45,49),za=U(46,49),Ya=U(47,49);m();c();p();f();d();var el=100,Ei=["green","yellow","blue","magenta","cyan","red"],vt=[],xi=Date.now(),tl=0,Yr=typeof y<"u"?y.env:{};globalThis.DEBUG??=Yr.DEBUG??"";globalThis.DEBUG_COLORS??=Yr.DEBUG_COLORS?Yr.DEBUG_COLORS==="true":!0;var Pt={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let t=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=t.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=t.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...e)=>{let[t,r,...n]=e,i;typeof require=="function"&&typeof y<"u"&&typeof y.stderr<"u"&&typeof y.stderr.write=="function"?i=(...o)=>{try{let s=(zr(),Dr(Kr));y.stderr.write(s.format(...o)+` `)}catch{i=console.warn??console.log}}:i=console.warn??console.log,i(`${t} ${r}`,...n)},formatters:{}};function rl(e){let t={color:Ei[tl++%Ei.length],enabled:Pt.enabled(e),namespace:e,log:Pt.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&vt.push([o,...n]),vt.length>el&&vt.shift(),Pt.enabled(o)||i){let l=n.map(g=>typeof g=="string"?g:nl(g)),u=`+${Date.now()-xi}ms`;xi=Date.now(),globalThis.DEBUG_COLORS?a(Ht[s](de(o)),...l,Ht[s](u)):a(o,...l,u)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var Zr=new Proxy(rl,{get:(e,t)=>Pt[t],set:(e,t,r)=>Pt[t]=r});function nl(e,t=2){let r=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},t)}function vi(e=7500){let t=vt.map(([r,...n])=>`${r} ${n.map(i=>typeof i=="string"?i:JSON.stringify(i)).join(" ")}`).join(` `);return t.length{let e;(k=>(k.findUnique="findUnique",k.findUniqueOrThrow="findUniqueOrThrow",k.findFirst="findFirst",k.findFirstOrThrow="findFirstOrThrow",k.findMany="findMany",k.create="create",k.createMany="createMany",k.createManyAndReturn="createManyAndReturn",k.update="update",k.updateMany="updateMany",k.upsert="upsert",k.delete="delete",k.deleteMany="deleteMany",k.groupBy="groupBy",k.count="count",k.aggregate="aggregate",k.findRaw="findRaw",k.aggregateRaw="aggregateRaw"))(e=t.ModelAction||={})})(Le||={});m();c();p();f();d();en();function tn(e){return we.sep===we.posix.sep?e:e.split(we.sep).join(we.posix.sep)}var At={};Ye(At,{error:()=>fl,info:()=>pl,log:()=>cl,query:()=>dl,should:()=>Li,tags:()=>Ct,warn:()=>rn});m();c();p();f();d();var Ct={error:Ve("prisma:error"),warn:Qe("prisma:warn"),info:ke("prisma:info"),query:Je("prisma:query")},Li={warn:()=>!y.env.PRISMA_DISABLE_WARNINGS};function cl(...e){console.log(...e)}function rn(e,...t){Li.warn()&&console.warn(`${Ct.warn} ${e}`,...t)}function pl(e,...t){console.info(`${Ct.info} ${e}`,...t)}function fl(e,...t){console.error(`${Ct.error} ${e}`,...t)}function dl(e,...t){console.log(`${Ct.query} ${e}`,...t)}m();c();p();f();d();function zt(e,t){if(!e)throw new Error(`${t}. This should never happen. If you see this error, please, open an issue at https://pris.ly/prisma-prisma-bug-report`)}m();c();p();f();d();function We(e,t){throw new Error(t)}m();c();p();f();d();function on(e,t){return Object.prototype.hasOwnProperty.call(e,t)}m();c();p();f();d();var sn=(e,t)=>e.reduce((r,n)=>(r[t(n)]=n,r),{});m();c();p();f();d();function rt(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}m();c();p();f();d();function an(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{$i.has(e)||($i.add(e),rn(t,...r))};m();c();p();f();d();var G=class extends Error{constructor(t,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(t),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};re(G,"PrismaClientKnownRequestError");var Oe=class extends G{constructor(t,r){super(t,{code:"P2025",clientVersion:r}),this.name="NotFoundError"}};re(Oe,"NotFoundError");m();c();p();f();d();var V=class e extends Error{constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};re(V,"PrismaClientInitializationError");m();c();p();f();d();var ue=class extends Error{constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};re(ue,"PrismaClientRustPanicError");m();c();p();f();d();var H=class extends Error{constructor(t,{clientVersion:r,batchRequestIdx:n}){super(t),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};re(H,"PrismaClientUnknownRequestError");m();c();p();f();d();var Y=class extends Error{constructor(r,{clientVersion:n}){super(r);this.name="PrismaClientValidationError";this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};re(Y,"PrismaClientValidationError");m();c();p();f();d();var nt=class{constructor(t){this._engine=t}prometheus(t){return this._engine.metrics({format:"prometheus",...t})}json(t){return this._engine.metrics({format:"json",...t})}};m();c();p();f();d();m();c();p();f();d();function Rt(e){let t;return{get(){return t||(t={value:e()}),t.value}}}function Ui(e,t){let r=Rt(()=>gl(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function gl(e){return{datamodel:{models:ln(e.models),enums:ln(e.enums),types:ln(e.types)}}}function ln(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}m();c();p();f();d();var Zt=Symbol(),un=new WeakMap,Fe=class{constructor(t){t===Zt?un.set(this,`Prisma.${this._getName()}`):un.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return un.get(this)}},kt=class extends Fe{_getNamespace(){return"NullTypes"}},Ot=class extends kt{};cn(Ot,"DbNull");var Ft=class extends kt{};cn(Ft,"JsonNull");var Mt=class extends kt{};cn(Mt,"AnyNull");var Xt={classes:{DbNull:Ot,JsonNull:Ft,AnyNull:Mt},instances:{DbNull:new Ot(Zt),JsonNull:new Ft(Zt),AnyNull:new Mt(Zt)}};function cn(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}m();c();p();f();d();m();c();p();f();d();m();c();p();f();d();m();c();p();f();d();function _t(e){return{ok:!1,error:e,map(){return _t(e)},flatMap(){return _t(e)}}}var pn=class{constructor(){this.registeredErrors=[]}consumeError(t){return this.registeredErrors[t]}registerNewError(t){let r=0;for(;this.registeredErrors[r]!==void 0;)r++;return this.registeredErrors[r]={error:t},r}},fn=e=>{let t=new pn,r=Ge(t,e.startTransaction.bind(e)),n={adapterName:e.adapterName,errorRegistry:t,queryRaw:Ge(t,e.queryRaw.bind(e)),executeRaw:Ge(t,e.executeRaw.bind(e)),provider:e.provider,startTransaction:async(...i)=>(await r(...i)).map(s=>hl(t,s))};return e.getConnectionInfo&&(n.getConnectionInfo=yl(t,e.getConnectionInfo.bind(e))),n},hl=(e,t)=>({adapterName:t.adapterName,provider:t.provider,options:t.options,queryRaw:Ge(e,t.queryRaw.bind(t)),executeRaw:Ge(e,t.executeRaw.bind(t)),commit:Ge(e,t.commit.bind(t)),rollback:Ge(e,t.rollback.bind(t))});function Ge(e,t){return async(...r)=>{try{return await t(...r)}catch(n){let i=e.registerNewError(n);return _t({kind:"GenericJs",id:i})}}}function yl(e,t){return(...r)=>{try{return t(...r)}catch(n){let i=e.registerNewError(n);return _t({kind:"GenericJs",id:i})}}}var zs=fe(qi());var wk=fe(Vi());Fi();Gr();en();m();c();p();f();d();var se=class e{constructor(t,r){if(t.length-1!==r.length)throw t.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${t.length} strings to have ${t.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=t[0];let i=0,o=0;for(;ie.getPropertyValue(r))},getPropertyDescriptor(r){return e.getPropertyDescriptor?.(r)}}}m();c();p();f();d();m();c();p();f();d();var er={enumerable:!0,configurable:!0,writable:!0};function tr(e){let t=new Set(e);return{getOwnPropertyDescriptor:()=>er,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var Wi=Symbol.for("nodejs.util.inspect.custom");function Ee(e,t){let r=bl(t),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=r.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=r.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=Gi(Reflect.ownKeys(o),r),a=Gi(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){return r.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let l=r.get(s);return l?l.getPropertyDescriptor?{...er,...l?.getPropertyDescriptor(s)}:er:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)}});return i[Wi]=function(){let o={...this};return delete o[Wi],o},i}function bl(e){let t=new Map;for(let r of e){let n=r.getKeys();for(let i of n)t.set(i,r)}return t}function Gi(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}m();c();p();f();d();function it(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}m();c();p();f();d();function rr(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}m();c();p();f();d();m();c();p();f();d();var ot=class{constructor(t=0,r){this.context=r;this.lines=[];this.currentLine="";this.currentIndent=0;this.currentIndent=t}write(t){return typeof t=="string"?this.currentLine+=t:t.write(this),this}writeJoined(t,r){let n=r.length-1;for(let i=0;i0&&this.currentIndent--,this}addMarginSymbol(t){return this.marginSymbol=t,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` `)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let t=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+t.slice(1):t}};m();c();p();f();d();m();c();p();f();d();function Hi(e){return e.substring(0,1).toLowerCase()+e.substring(1)}m();c();p();f();d();function st(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function nr(e){return e.toString()!=="Invalid Date"}m();c();p();f();d();m();c();p();f();d();var at=9e15,Be=1e9,gn="0123456789abcdef",or="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",sr="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",hn={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-at,maxE:at,crypto:!1},Zi,Me,I=!0,lr="[DecimalError] ",De=lr+"Invalid argument: ",Xi=lr+"Precision limit exceeded",eo=lr+"crypto unavailable",to="[object Decimal]",te=Math.floor,J=Math.pow,El=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,xl=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,vl=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,ro=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,ge=1e7,_=7,Pl=9007199254740991,Tl=or.length-1,yn=sr.length-1,S={toStringTag:to};S.absoluteValue=S.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),O(e)};S.ceil=function(){return O(new this.constructor(this),this.e+1,2)};S.clampedTo=S.clamp=function(e,t){var r,n=this,i=n.constructor;if(e=new i(e),t=new i(t),!e.s||!t.s)return new i(NaN);if(e.gt(t))throw Error(De+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new i(n)};S.comparedTo=S.cmp=function(e){var t,r,n,i,o=this,s=o.d,a=(e=new o.constructor(e)).d,l=o.s,u=e.s;if(!s||!a)return!l||!u?NaN:l!==u?l:s===a?0:!s^l<0?1:-1;if(!s[0]||!a[0])return s[0]?l:a[0]?-u:0;if(l!==u)return l;if(o.e!==e.e)return o.e>e.e^l<0?1:-1;for(n=s.length,i=a.length,t=0,r=na[t]^l<0?1:-1;return n===i?0:n>i^l<0?1:-1};S.cosine=S.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+_,n.rounding=1,r=Cl(n,ao(n,r)),n.precision=e,n.rounding=t,O(Me==2||Me==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};S.cubeRoot=S.cbrt=function(){var e,t,r,n,i,o,s,a,l,u,g=this,h=g.constructor;if(!g.isFinite()||g.isZero())return new h(g);for(I=!1,o=g.s*J(g.s*g,1/3),!o||Math.abs(o)==1/0?(r=Z(g.d),e=g.e,(o=(e-r.length+1)%3)&&(r+=o==1||o==-2?"0":"00"),o=J(r,1/3),e=te((e+1)/3)-(e%3==(e<0?-1:2)),o==1/0?r="5e"+e:(r=o.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),n=new h(r),n.s=g.s):n=new h(o.toString()),s=(e=h.precision)+3;;)if(a=n,l=a.times(a).times(a),u=l.plus(g),n=$(u.plus(g).times(a),u.plus(l),s+2,1),Z(a.d).slice(0,s)===(r=Z(n.d)).slice(0,s))if(r=r.slice(s-3,s+1),r=="9999"||!i&&r=="4999"){if(!i&&(O(a,e+1,0),a.times(a).times(a).eq(g))){n=a;break}s+=4,i=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(O(n,e+1,1),t=!n.times(n).times(n).eq(g));break}return I=!0,O(n,e,h.rounding,t)};S.decimalPlaces=S.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-te(this.e/_))*_,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};S.dividedBy=S.div=function(e){return $(this,new this.constructor(e))};S.dividedToIntegerBy=S.divToInt=function(e){var t=this,r=t.constructor;return O($(t,new r(e),0,1,1),r.precision,r.rounding)};S.equals=S.eq=function(e){return this.cmp(e)===0};S.floor=function(){return O(new this.constructor(this),this.e+1,3)};S.greaterThan=S.gt=function(e){return this.cmp(e)>0};S.greaterThanOrEqualTo=S.gte=function(e){var t=this.cmp(e);return t==1||t===0};S.hyperbolicCosine=S.cosh=function(){var e,t,r,n,i,o=this,s=o.constructor,a=new s(1);if(!o.isFinite())return new s(o.s?1/0:NaN);if(o.isZero())return a;r=s.precision,n=s.rounding,s.precision=r+Math.max(o.e,o.sd())+4,s.rounding=1,i=o.d.length,i<32?(e=Math.ceil(i/3),t=(1/cr(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=lt(s,1,o.times(t),new s(1),!0);for(var l,u=e,g=new s(8);u--;)l=o.times(o),o=a.minus(l.times(g.minus(l.times(g))));return O(o,s.precision=r,s.rounding=n,!0)};S.hyperbolicSine=S.sinh=function(){var e,t,r,n,i=this,o=i.constructor;if(!i.isFinite()||i.isZero())return new o(i);if(t=o.precision,r=o.rounding,o.precision=t+Math.max(i.e,i.sd())+4,o.rounding=1,n=i.d.length,n<3)i=lt(o,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,i=i.times(1/cr(5,e)),i=lt(o,2,i,i,!0);for(var s,a=new o(5),l=new o(16),u=new o(20);e--;)s=i.times(i),i=i.times(a.plus(s.times(l.times(s).plus(u))))}return o.precision=t,o.rounding=r,O(i,t,r,!0)};S.hyperbolicTangent=S.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,$(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};S.inverseCosine=S.acos=function(){var e,t=this,r=t.constructor,n=t.abs().cmp(1),i=r.precision,o=r.rounding;return n!==-1?n===0?t.isNeg()?me(r,i,o):new r(0):new r(NaN):t.isZero()?me(r,i+4,o).times(.5):(r.precision=i+6,r.rounding=1,t=t.asin(),e=me(r,i+4,o).times(.5),r.precision=i,r.rounding=o,e.minus(t))};S.inverseHyperbolicCosine=S.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,I=!1,r=r.times(r).minus(1).sqrt().plus(r),I=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)};S.inverseHyperbolicSine=S.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,I=!1,r=r.times(r).plus(1).sqrt().plus(r),I=!0,n.precision=e,n.rounding=t,r.ln())};S.inverseHyperbolicTangent=S.atanh=function(){var e,t,r,n,i=this,o=i.constructor;return i.isFinite()?i.e>=0?new o(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=o.precision,t=o.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?O(new o(i),e,t,!0):(o.precision=r=n-i.e,i=$(i.plus(1),new o(1).minus(i),r+e,1),o.precision=e+4,o.rounding=1,i=i.ln(),o.precision=e,o.rounding=t,i.times(.5))):new o(NaN)};S.inverseSine=S.asin=function(){var e,t,r,n,i=this,o=i.constructor;return i.isZero()?new o(i):(t=i.abs().cmp(1),r=o.precision,n=o.rounding,t!==-1?t===0?(e=me(o,r+4,n).times(.5),e.s=i.s,e):new o(NaN):(o.precision=r+6,o.rounding=1,i=i.div(new o(1).minus(i.times(i)).sqrt().plus(1)).atan(),o.precision=r,o.rounding=n,i.times(2)))};S.inverseTangent=S.atan=function(){var e,t,r,n,i,o,s,a,l,u=this,g=u.constructor,h=g.precision,v=g.rounding;if(u.isFinite()){if(u.isZero())return new g(u);if(u.abs().eq(1)&&h+4<=yn)return s=me(g,h+4,v).times(.25),s.s=u.s,s}else{if(!u.s)return new g(NaN);if(h+4<=yn)return s=me(g,h+4,v).times(.5),s.s=u.s,s}for(g.precision=a=h+10,g.rounding=1,r=Math.min(28,a/_+2|0),e=r;e;--e)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(I=!1,t=Math.ceil(a/_),n=1,l=u.times(u),s=new g(u),i=u;e!==-1;)if(i=i.times(l),o=s.minus(i.div(n+=2)),i=i.times(l),s=o.plus(i.div(n+=2)),s.d[t]!==void 0)for(e=t;s.d[e]===o.d[e]&&e--;);return r&&(s=s.times(2<this.d.length-2};S.isNaN=function(){return!this.s};S.isNegative=S.isNeg=function(){return this.s<0};S.isPositive=S.isPos=function(){return this.s>0};S.isZero=function(){return!!this.d&&this.d[0]===0};S.lessThan=S.lt=function(e){return this.cmp(e)<0};S.lessThanOrEqualTo=S.lte=function(e){return this.cmp(e)<1};S.logarithm=S.log=function(e){var t,r,n,i,o,s,a,l,u=this,g=u.constructor,h=g.precision,v=g.rounding,R=5;if(e==null)e=new g(10),t=!0;else{if(e=new g(e),r=e.d,e.s<0||!r||!r[0]||e.eq(1))return new g(NaN);t=e.eq(10)}if(r=u.d,u.s<0||!r||!r[0]||u.eq(1))return new g(r&&!r[0]?-1/0:u.s!=1?NaN:r?0:1/0);if(t)if(r.length>1)o=!0;else{for(i=r[0];i%10===0;)i/=10;o=i!==1}if(I=!1,a=h+R,s=Ne(u,a),n=t?ar(g,a+10):Ne(e,a),l=$(s,n,a,1),It(l.d,i=h,v))do if(a+=10,s=Ne(u,a),n=t?ar(g,a+10):Ne(e,a),l=$(s,n,a,1),!o){+Z(l.d).slice(i+1,i+15)+1==1e14&&(l=O(l,h+1,0));break}while(It(l.d,i+=10,v));return I=!0,O(l,h,v)};S.minus=S.sub=function(e){var t,r,n,i,o,s,a,l,u,g,h,v,R=this,C=R.constructor;if(e=new C(e),!R.d||!e.d)return!R.s||!e.s?e=new C(NaN):R.d?e.s=-e.s:e=new C(e.d||R.s!==e.s?R:NaN),e;if(R.s!=e.s)return e.s=-e.s,R.plus(e);if(u=R.d,v=e.d,a=C.precision,l=C.rounding,!u[0]||!v[0]){if(v[0])e.s=-e.s;else if(u[0])e=new C(R);else return new C(l===3?-0:0);return I?O(e,a,l):e}if(r=te(e.e/_),g=te(R.e/_),u=u.slice(),o=g-r,o){for(h=o<0,h?(t=u,o=-o,s=v.length):(t=v,r=g,s=u.length),n=Math.max(Math.ceil(a/_),s)+2,o>n&&(o=n,t.length=1),t.reverse(),n=o;n--;)t.push(0);t.reverse()}else{for(n=u.length,s=v.length,h=n0;--n)u[s++]=0;for(n=v.length;n>o;){if(u[--n]s?o+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=u.length,i=g.length,s-i<0&&(i=s,r=g,g=u,u=r),t=0;i;)t=(u[--i]=u[i]+g[i]+t)/ge|0,u[i]%=ge;for(t&&(u.unshift(t),++n),s=u.length;u[--s]==0;)u.pop();return e.d=u,e.e=ur(u,n),I?O(e,a,l):e};S.precision=S.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(De+e);return r.d?(t=no(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};S.round=function(){var e=this,t=e.constructor;return O(new t(e),e.e+1,t.rounding)};S.sine=S.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+_,n.rounding=1,r=Sl(n,ao(n,r)),n.precision=e,n.rounding=t,O(Me>2?r.neg():r,e,t,!0)):new n(NaN)};S.squareRoot=S.sqrt=function(){var e,t,r,n,i,o,s=this,a=s.d,l=s.e,u=s.s,g=s.constructor;if(u!==1||!a||!a[0])return new g(!u||u<0&&(!a||a[0])?NaN:a?s:1/0);for(I=!1,u=Math.sqrt(+s),u==0||u==1/0?(t=Z(a),(t.length+l)%2==0&&(t+="0"),u=Math.sqrt(t),l=te((l+1)/2)-(l<0||l%2),u==1/0?t="5e"+l:(t=u.toExponential(),t=t.slice(0,t.indexOf("e")+1)+l),n=new g(t)):n=new g(u.toString()),r=(l=g.precision)+3;;)if(o=n,n=o.plus($(s,o,r+2,1)).times(.5),Z(o.d).slice(0,r)===(t=Z(n.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!i&&t=="4999"){if(!i&&(O(o,l+1,0),o.times(o).eq(s))){n=o;break}r+=4,i=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(O(n,l+1,1),e=!n.times(n).eq(s));break}return I=!0,O(n,l,g.rounding,e)};S.tangent=S.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,r=r.sin(),r.s=1,r=$(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,O(Me==2||Me==4?r.neg():r,e,t,!0)):new n(NaN)};S.times=S.mul=function(e){var t,r,n,i,o,s,a,l,u,g=this,h=g.constructor,v=g.d,R=(e=new h(e)).d;if(e.s*=g.s,!v||!v[0]||!R||!R[0])return new h(!e.s||v&&!v[0]&&!R||R&&!R[0]&&!v?NaN:!v||!R?e.s/0:e.s*0);for(r=te(g.e/_)+te(e.e/_),l=v.length,u=R.length,l=0;){for(t=0,i=l+n;i>n;)a=o[i]+R[n]*v[i-n-1]+t,o[i--]=a%ge|0,t=a/ge|0;o[i]=(o[i]+t)%ge|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=ur(o,r),I?O(e,h.precision,h.rounding):e};S.toBinary=function(e,t){return En(this,2,e,t)};S.toDecimalPlaces=S.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(ae(e,0,Be),t===void 0?t=n.rounding:ae(t,0,8),O(r,e+r.e+1,t))};S.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=xe(n,!0):(ae(e,0,Be),t===void 0?t=i.rounding:ae(t,0,8),n=O(new i(n),e+1,t),r=xe(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};S.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?r=xe(i):(ae(e,0,Be),t===void 0?t=o.rounding:ae(t,0,8),n=O(new o(i),e+i.e+1,t),r=xe(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};S.toFraction=function(e){var t,r,n,i,o,s,a,l,u,g,h,v,R=this,C=R.d,A=R.constructor;if(!C)return new A(R);if(u=r=new A(1),n=l=new A(0),t=new A(n),o=t.e=no(C)-R.e-1,s=o%_,t.d[0]=J(10,s<0?_+s:s),e==null)e=o>0?t:u;else{if(a=new A(e),!a.isInt()||a.lt(u))throw Error(De+a);e=a.gt(t)?o>0?t:u:a}for(I=!1,a=new A(Z(C)),g=A.precision,A.precision=o=C.length*_*2;h=$(a,t,0,1,1),i=r.plus(h.times(n)),i.cmp(e)!=1;)r=n,n=i,i=u,u=l.plus(h.times(i)),l=i,i=t,t=a.minus(h.times(i)),a=i;return i=$(e.minus(r),n,0,1,1),l=l.plus(i.times(u)),r=r.plus(i.times(n)),l.s=u.s=R.s,v=$(u,n,o,1).minus(R).abs().cmp($(l,r,o,1).minus(R).abs())<1?[u,n]:[l,r],A.precision=g,I=!0,v};S.toHexadecimal=S.toHex=function(e,t){return En(this,16,e,t)};S.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),e==null){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),t===void 0?t=n.rounding:ae(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(I=!1,r=$(r,e,0,t,1).times(e),I=!0,O(r)):(e.s=r.s,r=e),r};S.toNumber=function(){return+this};S.toOctal=function(e,t){return En(this,8,e,t)};S.toPower=S.pow=function(e){var t,r,n,i,o,s,a=this,l=a.constructor,u=+(e=new l(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new l(J(+a,u));if(a=new l(a),a.eq(1))return a;if(n=l.precision,o=l.rounding,e.eq(1))return O(a,n,o);if(t=te(e.e/_),t>=e.d.length-1&&(r=u<0?-u:u)<=Pl)return i=io(l,a,r,n),e.s<0?new l(1).div(i):O(i,n,o);if(s=a.s,s<0){if(tl.maxE+1||t0?s/0:0):(I=!1,l.rounding=a.s=1,r=Math.min(12,(t+"").length),i=wn(e.times(Ne(a,n+r)),n),i.d&&(i=O(i,n+5,1),It(i.d,n,o)&&(t=n+10,i=O(wn(e.times(Ne(a,t+r)),t),t+5,1),+Z(i.d).slice(n+1,n+15)+1==1e14&&(i=O(i,n+1,0)))),i.s=s,I=!0,l.rounding=o,O(i,n,o))};S.toPrecision=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=xe(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(ae(e,1,Be),t===void 0?t=i.rounding:ae(t,0,8),n=O(new i(n),e,t),r=xe(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};S.toSignificantDigits=S.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(ae(e,1,Be),t===void 0?t=n.rounding:ae(t,0,8)),O(new n(r),e,t)};S.toString=function(){var e=this,t=e.constructor,r=xe(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};S.truncated=S.trunc=function(){return O(new this.constructor(this),this.e+1,1)};S.valueOf=S.toJSON=function(){var e=this,t=e.constructor,r=xe(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function Z(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;tr)throw Error(De+e)}function It(e,t,r,n){var i,o,s,a;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=_,i=0):(i=Math.ceil((t+1)/_),t%=_),o=J(10,_-t),a=e[i]%o|0,n==null?t<3?(t==0?a=a/100|0:t==1&&(a=a/10|0),s=r<4&&a==99999||r>3&&a==49999||a==5e4||a==0):s=(r<4&&a+1==o||r>3&&a+1==o/2)&&(e[i+1]/o/100|0)==J(10,t-2)-1||(a==o/2||a==0)&&(e[i+1]/o/100|0)==0:t<4?(t==0?a=a/1e3|0:t==1?a=a/100|0:t==2&&(a=a/10|0),s=(n||r<4)&&a==9999||!n&&r>3&&a==4999):s=((n||r<4)&&a+1==o||!n&&r>3&&a+1==o/2)&&(e[i+1]/o/1e3|0)==J(10,t-3)-1,s}function ir(e,t,r){for(var n,i=[0],o,s=0,a=e.length;sr-1&&(i[n+1]===void 0&&(i[n+1]=0),i[n+1]+=i[n]/r|0,i[n]%=r)}return i.reverse()}function Cl(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),i=(1/cr(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=lt(e,1,t.times(i),new e(1));for(var o=r;o--;){var s=t.times(t);t=s.times(s).minus(s).times(8).plus(1)}return e.precision-=r,t}var $=function(){function e(n,i,o){var s,a=0,l=n.length;for(n=n.slice();l--;)s=n[l]*i+a,n[l]=s%o|0,a=s/o|0;return a&&n.unshift(a),n}function t(n,i,o,s){var a,l;if(o!=s)l=o>s?1:-1;else for(a=l=0;ai[a]?1:-1;break}return l}function r(n,i,o,s){for(var a=0;o--;)n[o]-=a,a=n[o]1;)n.shift()}return function(n,i,o,s,a,l){var u,g,h,v,R,C,A,F,L,N,M,k,z,j,ht,Q,ie,Ae,X,ze,Vt=n.constructor,Nr=n.s==i.s?1:-1,ee=n.d,B=i.d;if(!ee||!ee[0]||!B||!B[0])return new Vt(!n.s||!i.s||(ee?B&&ee[0]==B[0]:!B)?NaN:ee&&ee[0]==0||!B?Nr*0:Nr/0);for(l?(R=1,g=n.e-i.e):(l=ge,R=_,g=te(n.e/R)-te(i.e/R)),X=B.length,ie=ee.length,L=new Vt(Nr),N=L.d=[],h=0;B[h]==(ee[h]||0);h++);if(B[h]>(ee[h]||0)&&g--,o==null?(j=o=Vt.precision,s=Vt.rounding):a?j=o+(n.e-i.e)+1:j=o,j<0)N.push(1),C=!0;else{if(j=j/R+2|0,h=0,X==1){for(v=0,B=B[0],j++;(h1&&(B=e(B,v,l),ee=e(ee,v,l),X=B.length,ie=ee.length),Q=X,M=ee.slice(0,X),k=M.length;k=l/2&&++Ae;do v=0,u=t(B,M,X,k),u<0?(z=M[0],X!=k&&(z=z*l+(M[1]||0)),v=z/Ae|0,v>1?(v>=l&&(v=l-1),A=e(B,v,l),F=A.length,k=M.length,u=t(A,M,F,k),u==1&&(v--,r(A,X=10;v/=10)h++;L.e=h+g*R-1,O(L,a?o+L.e+1:o,s,C)}return L}}();function O(e,t,r,n){var i,o,s,a,l,u,g,h,v,R=e.constructor;e:if(t!=null){if(h=e.d,!h)return e;for(i=1,a=h[0];a>=10;a/=10)i++;if(o=t-i,o<0)o+=_,s=t,g=h[v=0],l=g/J(10,i-s-1)%10|0;else if(v=Math.ceil((o+1)/_),a=h.length,v>=a)if(n){for(;a++<=v;)h.push(0);g=l=0,i=1,o%=_,s=o-_+1}else break e;else{for(g=a=h[v],i=1;a>=10;a/=10)i++;o%=_,s=o-_+i,l=s<0?0:g/J(10,i-s-1)%10|0}if(n=n||t<0||h[v+1]!==void 0||(s<0?g:g%J(10,i-s-1)),u=r<4?(l||n)&&(r==0||r==(e.s<0?3:2)):l>5||l==5&&(r==4||n||r==6&&(o>0?s>0?g/J(10,i-s):0:h[v-1])%10&1||r==(e.s<0?8:7)),t<1||!h[0])return h.length=0,u?(t-=e.e+1,h[0]=J(10,(_-t%_)%_),e.e=-t||0):h[0]=e.e=0,e;if(o==0?(h.length=v,a=1,v--):(h.length=v+1,a=J(10,_-o),h[v]=s>0?(g/J(10,i-s)%J(10,s)|0)*a:0),u)for(;;)if(v==0){for(o=1,s=h[0];s>=10;s/=10)o++;for(s=h[0]+=a,a=1;s>=10;s/=10)a++;o!=a&&(e.e++,h[0]==ge&&(h[0]=1));break}else{if(h[v]+=a,h[v]!=ge)break;h[v--]=0,a=1}for(o=h.length;h[--o]===0;)h.pop()}return I&&(e.e>R.maxE?(e.d=null,e.e=NaN):e.e0?o=o.charAt(0)+"."+o.slice(1)+Ie(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+Ie(-i-1)+o,r&&(n=r-s)>0&&(o+=Ie(n))):i>=s?(o+=Ie(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+Ie(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=Ie(n))),o}function ur(e,t){var r=e[0];for(t*=_;r>=10;r/=10)t++;return t}function ar(e,t,r){if(t>Tl)throw I=!0,r&&(e.precision=r),Error(Xi);return O(new e(or),t,1,!0)}function me(e,t,r){if(t>yn)throw Error(Xi);return O(new e(sr),t,r,!0)}function no(e){var t=e.length-1,r=t*_+1;if(t=e[t],t){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function Ie(e){for(var t="";e--;)t+="0";return t}function io(e,t,r,n){var i,o=new e(1),s=Math.ceil(n/_+4);for(I=!1;;){if(r%2&&(o=o.times(t),zi(o.d,s)&&(i=!0)),r=te(r/2),r===0){r=o.d.length-1,i&&o.d[r]===0&&++o.d[r];break}t=t.times(t),zi(t.d,s)}return I=!0,o}function Ki(e){return e.d[e.d.length-1]&1}function oo(e,t,r){for(var n,i=new e(t[0]),o=0;++o17)return new v(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(I=!1,l=C):l=t,a=new v(.03125);e.e>-2;)e=e.times(a),h+=5;for(n=Math.log(J(2,h))/Math.LN10*2+5|0,l+=n,r=o=s=new v(1),v.precision=l;;){if(o=O(o.times(e),l,1),r=r.times(++g),a=s.plus($(o,r,l,1)),Z(a.d).slice(0,l)===Z(s.d).slice(0,l)){for(i=h;i--;)s=O(s.times(s),l,1);if(t==null)if(u<3&&It(s.d,l-n,R,u))v.precision=l+=10,r=o=a=new v(1),g=0,u++;else return O(s,v.precision=C,R,I=!0);else return v.precision=C,s}s=a}}function Ne(e,t){var r,n,i,o,s,a,l,u,g,h,v,R=1,C=10,A=e,F=A.d,L=A.constructor,N=L.rounding,M=L.precision;if(A.s<0||!F||!F[0]||!A.e&&F[0]==1&&F.length==1)return new L(F&&!F[0]?-1/0:A.s!=1?NaN:F?0:A);if(t==null?(I=!1,g=M):g=t,L.precision=g+=C,r=Z(F),n=r.charAt(0),Math.abs(o=A.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)A=A.times(e),r=Z(A.d),n=r.charAt(0),R++;o=A.e,n>1?(A=new L("0."+r),o++):A=new L(n+"."+r.slice(1))}else return u=ar(L,g+2,M).times(o+""),A=Ne(new L(n+"."+r.slice(1)),g-C).plus(u),L.precision=M,t==null?O(A,M,N,I=!0):A;for(h=A,l=s=A=$(A.minus(1),A.plus(1),g,1),v=O(A.times(A),g,1),i=3;;){if(s=O(s.times(v),g,1),u=l.plus($(s,new L(i),g,1)),Z(u.d).slice(0,g)===Z(l.d).slice(0,g))if(l=l.times(2),o!==0&&(l=l.plus(ar(L,g+2,M).times(o+""))),l=$(l,new L(R),g,1),t==null)if(It(l.d,g-C,N,a))L.precision=g+=C,u=s=A=$(h.minus(1),h.plus(1),g,1),v=O(A.times(A),g,1),i=a=1;else return O(l,L.precision=M,N,I=!0);else return L.precision=M,l;l=u,i+=2}}function so(e){return String(e.s*e.s/0)}function bn(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;n++);for(i=t.length;t.charCodeAt(i-1)===48;--i);if(t=t.slice(n,i),t){if(i-=n,e.e=r=r-n-1,e.d=[],n=(r+1)%_,r<0&&(n+=_),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),ro.test(t))return bn(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(xl.test(t))r=16,t=t.toLowerCase();else if(El.test(t))r=2;else if(vl.test(t))r=8;else throw Error(De+t);for(o=t.search(/p/i),o>0?(l=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),o=t.indexOf("."),s=o>=0,n=e.constructor,s&&(t=t.replace(".",""),a=t.length,o=a-o,i=io(n,new n(r),o,o*2)),u=ir(t,r,ge),g=u.length-1,o=g;u[o]===0;--o)u.pop();return o<0?new n(e.s*0):(e.e=ur(u,g),e.d=u,I=!1,s&&(e=$(e,i,a*4)),l&&(e=e.times(Math.abs(l)<54?J(2,l):Ke.pow(2,l))),I=!0,e)}function Sl(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:lt(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/cr(5,r)),t=lt(e,2,t,t);for(var i,o=new e(5),s=new e(16),a=new e(20);r--;)i=t.times(t),t=t.times(o.plus(i.times(s.times(i).minus(a))));return t}function lt(e,t,r,n,i){var o,s,a,l,u=1,g=e.precision,h=Math.ceil(g/_);for(I=!1,l=r.times(r),a=new e(n);;){if(s=$(a.times(l),new e(t++*t++),g,1),a=i?n.plus(s):n.minus(s),n=$(s.times(l),new e(t++*t++),g,1),s=a.plus(n),s.d[h]!==void 0){for(o=h;s.d[o]===a.d[o]&&o--;);if(o==-1)break}o=a,a=n,n=s,s=o,u++}return I=!0,s.d.length=h+1,s}function cr(e,t){for(var r=e;--t;)r*=e;return r}function ao(e,t){var r,n=t.s<0,i=me(e,e.precision,1),o=i.times(.5);if(t=t.abs(),t.lte(o))return Me=n?4:1,t;if(r=t.divToInt(i),r.isZero())Me=n?3:2;else{if(t=t.minus(r.times(i)),t.lte(o))return Me=Ki(r)?n?2:3:n?4:1,t;Me=Ki(r)?n?1:4:n?3:2}return t.minus(i).abs()}function En(e,t,r,n){var i,o,s,a,l,u,g,h,v,R=e.constructor,C=r!==void 0;if(C?(ae(r,1,Be),n===void 0?n=R.rounding:ae(n,0,8)):(r=R.precision,n=R.rounding),!e.isFinite())g=so(e);else{for(g=xe(e),s=g.indexOf("."),C?(i=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):i=t,s>=0&&(g=g.replace(".",""),v=new R(1),v.e=g.length-s,v.d=ir(xe(v),10,i),v.e=v.d.length),h=ir(g,10,i),o=l=h.length;h[--l]==0;)h.pop();if(!h[0])g=C?"0p+0":"0";else{if(s<0?o--:(e=new R(e),e.d=h,e.e=o,e=$(e,v,r,n,0,i),h=e.d,o=e.e,u=Zi),s=h[r],a=i/2,u=u||h[r+1]!==void 0,u=n<4?(s!==void 0||u)&&(n===0||n===(e.s<0?3:2)):s>a||s===a&&(n===4||u||n===6&&h[r-1]&1||n===(e.s<0?8:7)),h.length=r,u)for(;++h[--r]>i-1;)h[r]=0,r||(++o,h.unshift(1));for(l=h.length;!h[l-1];--l);for(s=0,g="";s1)if(t==16||t==8){for(s=t==16?4:3,--l;l%s;l++)g+="0";for(h=ir(g,i,t),l=h.length;!h[l-1];--l);for(s=1,g="1.";sl)for(o-=l;o--;)g+="0";else ot)return e.length=t,!0}function Rl(e){return new this(e).abs()}function kl(e){return new this(e).acos()}function Ol(e){return new this(e).acosh()}function Fl(e,t){return new this(e).plus(t)}function Ml(e){return new this(e).asin()}function _l(e){return new this(e).asinh()}function Ll(e){return new this(e).atan()}function Il(e){return new this(e).atanh()}function Nl(e,t){e=new this(e),t=new this(t);var r,n=this.precision,i=this.rounding,o=n+4;return!e.s||!t.s?r=new this(NaN):!e.d&&!t.d?(r=me(this,o,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?me(this,n,i):new this(0),r.s=e.s):!e.d||t.isZero()?(r=me(this,o,1).times(.5),r.s=e.s):t.s<0?(this.precision=o,this.rounding=1,r=this.atan($(e,t,o,1)),t=me(this,o,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan($(e,t,o,1)),r}function Dl(e){return new this(e).cbrt()}function Bl(e){return O(e=new this(e),e.e+1,2)}function $l(e,t,r){return new this(e).clamp(t,r)}function jl(e){if(!e||typeof e!="object")throw Error(lr+"Object expected");var t,r,n,i=e.defaults===!0,o=["precision",1,Be,"rounding",0,8,"toExpNeg",-at,0,"toExpPos",0,at,"maxE",0,at,"minE",-at,0,"modulo",0,9];for(t=0;t=o[t+1]&&n<=o[t+2])this[r]=n;else throw Error(De+r+": "+n);if(r="crypto",i&&(this[r]=hn[r]),(n=e[r])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(eo);else this[r]=!1;else throw Error(De+r+": "+n);return this}function Ul(e){return new this(e).cos()}function ql(e){return new this(e).cosh()}function lo(e){var t,r,n;function i(o){var s,a,l,u=this;if(!(u instanceof i))return new i(o);if(u.constructor=i,Yi(o)){u.s=o.s,I?!o.d||o.e>i.maxE?(u.e=NaN,u.d=null):o.e=10;a/=10)s++;I?s>i.maxE?(u.e=NaN,u.d=null):s=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:a[o++]=i%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(n*=4);o=214e7?crypto.randomBytes(4).copy(t,o):(a.push(i%1e7),o+=4);o=n/4}else throw Error(eo);else for(;o=10;i/=10)n++;n<_&&(r-=_-n)}return s.e=r,s.d=a,s}function nu(e){return O(e=new this(e),e.e+1,this.rounding)}function iu(e){return e=new this(e),e.d?e.d[0]?e.s:0*e.s:e.s||NaN}function ou(e){return new this(e).sin()}function su(e){return new this(e).sinh()}function au(e){return new this(e).sqrt()}function lu(e,t){return new this(e).sub(t)}function uu(){var e=0,t=arguments,r=new this(t[e]);for(I=!1;r.s&&++e`}};function ct(e){return e instanceof Nt}m();c();p();f();d();m();c();p();f();d();var pr=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};m();c();p();f();d();var fr=e=>e,dr={bold:fr,red:fr,green:fr,dim:fr,enabled:!1},uo={bold:de,red:Ve,green:Et,dim:wt,enabled:!0},pt={write(e){e.writeLine(",")}};m();c();p();f();d();var Pe=class{constructor(t){this.contents=t;this.isUnderlined=!1;this.color=t=>t}underline(){return this.isUnderlined=!0,this}setColor(t){return this.color=t,this}write(t){let r=t.getCurrentLineLength();t.write(this.color(this.contents)),this.isUnderlined&&t.afterNextNewline(()=>{t.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};m();c();p();f();d();var $e=class{constructor(){this.hasError=!1}markAsError(){return this.hasError=!0,this}};var ft=class extends $e{constructor(){super(...arguments);this.items=[]}addItem(r){return this.items.push(new pr(r)),this}getField(r){return this.items[r]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(n=>n.value.getPrintWidth()))+2}write(r){if(this.items.length===0){this.writeEmpty(r);return}this.writeWithItems(r)}writeEmpty(r){let n=new Pe("[]");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithItems(r){let{colors:n}=r.context;r.writeLine("[").withIndent(()=>r.writeJoined(pt,this.items).newLine()).write("]"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(n.red("~".repeat(this.getPrintWidth())))})}asObject(){}};m();c();p();f();d();var co=": ",mr=class{constructor(t,r){this.name=t;this.value=r;this.hasError=!1}markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+co.length}write(t){let r=new Pe(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(co).write(this.value)}};m();c();p();f();d();var gr=class e extends $e{constructor(){super(...arguments);this.fields={};this.suggestions=[]}addField(r){this.fields[r.name]=r}addSuggestion(r){this.suggestions.push(r)}getField(r){return this.fields[r]}getDeepField(r){let[n,...i]=r,o=this.getField(n);if(!o)return;let s=o;for(let a of i){let l;if(s.value instanceof e?l=s.value.getField(a):s.value instanceof ft&&(l=s.value.getField(Number(a))),!l)return;s=l}return s}getDeepFieldValue(r){return r.length===0?this:this.getDeepField(r)?.value}hasField(r){return!!this.getField(r)}removeAllFields(){this.fields={}}removeField(r){delete this.fields[r]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(r){return this.getField(r)?.value}getDeepSubSelectionValue(r){let n=this;for(let i of r){if(!(n instanceof e))return;let o=n.getSubSelectionValue(i);if(!o)return;n=o}return n}getDeepSelectionParent(r){let n=this.getSelectionParent();if(!n)return;let i=n;for(let o of r){let s=i.value.getFieldValue(o);if(!s||!(s instanceof e))return;let a=s.getSelectionParent();if(!a)return;i=a}return i}getSelectionParent(){let r=this.getField("select")?.value.asObject();if(r)return{kind:"select",value:r};let n=this.getField("include")?.value.asObject();if(n)return{kind:"include",value:n}}getSubSelectionValue(r){return this.getSelectionParent()?.value.fields[r].value}getPrintWidth(){let r=Object.values(this.fields);return r.length==0?2:Math.max(...r.map(i=>i.getPrintWidth()))+2}write(r){let n=Object.values(this.fields);if(n.length===0&&this.suggestions.length===0){this.writeEmpty(r);return}this.writeWithContents(r,n)}asObject(){return this}writeEmpty(r){let n=new Pe("{}");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithContents(r,n){r.writeLine("{").withIndent(()=>{r.writeJoined(pt,[...n,...this.suggestions]).newLine()}),r.write("}"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(r.context.colors.red("~".repeat(this.getPrintWidth())))})}};m();c();p();f();d();var K=class extends $e{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new Pe(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};var xn=class{constructor(t){this.errorMessages=[];this.arguments=t}write(t){t.write(this.arguments)}addErrorMessage(t){this.errorMessages.push(t)}renderAllMessages(t){return this.errorMessages.map(r=>r(t)).join(` `)}};function hr(e){return new xn(po(e))}function po(e){let t=new gr;for(let[r,n]of Object.entries(e)){let i=new mr(r,fo(n));t.addField(i)}return t}function fo(e){if(typeof e=="string")return new K(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new K(String(e));if(typeof e=="bigint")return new K(`${e}n`);if(e===null)return new K("null");if(e===void 0)return new K("undefined");if(ut(e))return new K(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return w.Buffer.isBuffer(e)?new K(`Buffer.alloc(${e.byteLength})`):new K(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=nr(e)?e.toISOString():"Invalid Date";return new K(`new Date("${t}")`)}return e instanceof Fe?new K(`Prisma.${e._getName()}`):ct(e)?new K(`prisma.${Hi(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?mu(e):typeof e=="object"?po(e):new K(Object.prototype.toString.call(e))}function mu(e){let t=new ft;for(let r of e)t.addItem(fo(r));return t}function mo(e){if(e===void 0)return"";let t=hr(e);return new ot(0,{colors:dr}).write(t).toString()}m();c();p();f();d();var gu="P2037";function yr({error:e,user_facing_error:t},r,n){return t.error_code?new G(hu(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new H(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function hu(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===gu&&(r+=` Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}m();c();p();f();d();m();c();p();f();d();m();c();p();f();d();m();c();p();f();d();m();c();p();f();d();var Dt="";function go(e){var t=e.split(` `);return t.reduce(function(r,n){var i=bu(n)||xu(n)||Tu(n)||Ru(n)||Au(n);return i&&r.push(i),r},[])}var yu=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,wu=/\((\S*)(?::(\d+))(?::(\d+))\)/;function bu(e){var t=yu.exec(e);if(!t)return null;var r=t[2]&&t[2].indexOf("native")===0,n=t[2]&&t[2].indexOf("eval")===0,i=wu.exec(t[2]);return n&&i!=null&&(t[2]=i[1],t[3]=i[2],t[4]=i[3]),{file:r?null:t[2],methodName:t[1]||Dt,arguments:r?[t[2]]:[],lineNumber:t[3]?+t[3]:null,column:t[4]?+t[4]:null}}var Eu=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function xu(e){var t=Eu.exec(e);return t?{file:t[2],methodName:t[1]||Dt,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}var vu=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,Pu=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function Tu(e){var t=vu.exec(e);if(!t)return null;var r=t[3]&&t[3].indexOf(" > eval")>-1,n=Pu.exec(t[3]);return r&&n!=null&&(t[3]=n[1],t[4]=n[2],t[5]=null),{file:t[3],methodName:t[1]||Dt,arguments:t[2]?t[2].split(","):[],lineNumber:t[4]?+t[4]:null,column:t[5]?+t[5]:null}}var Cu=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;function Au(e){var t=Cu.exec(e);return t?{file:t[3],methodName:t[1]||Dt,arguments:[],lineNumber:+t[4],column:t[5]?+t[5]:null}:null}var Su=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;function Ru(e){var t=Su.exec(e);return t?{file:t[2],methodName:t[1]||Dt,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}:null}var vn=class{getLocation(){return null}},Pn=class{constructor(){this._error=new Error}getLocation(){let t=this._error.stack;if(!t)return null;let n=go(t).find(i=>{if(!i.file)return!1;let o=tn(i.file);return o!==""&&!o.includes("@prisma")&&!o.includes("/packages/client/src/runtime/")&&!o.endsWith("/runtime/binary.js")&&!o.endsWith("/runtime/library.js")&&!o.endsWith("/runtime/edge.js")&&!o.endsWith("/runtime/edge-esm.js")&&!o.startsWith("internal/")&&!i.methodName.includes("new ")&&!i.methodName.includes("getCallSite")&&!i.methodName.includes("Proxy.")&&i.methodName.split(".").length<4});return!n||!n.file?null:{fileName:n.file,lineNumber:n.lineNumber,columnNumber:n.column}}};function je(e){return e==="minimal"?typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new vn:new Pn}m();c();p();f();d();m();c();p();f();d();m();c();p();f();d();var ho={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function dt(e={}){let t=Ou(e);return Object.entries(t).reduce((n,[i,o])=>(ho[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function Ou(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function wr(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function yo(e,t){let r=wr(e);return t({action:"aggregate",unpacker:r,argsMapper:dt})(e)}m();c();p();f();d();function Fu(e={}){let{select:t,...r}=e;return typeof t=="object"?dt({...r,_count:t}):dt({...r,_count:{_all:!0}})}function Mu(e={}){return typeof e.select=="object"?t=>wr(e)(t)._count:t=>wr(e)(t)._count._all}function wo(e,t){return t({action:"count",unpacker:Mu(e),argsMapper:Fu})(e)}m();c();p();f();d();function _u(e={}){let t=dt(e);if(Array.isArray(t.by))for(let r of t.by)typeof r=="string"&&(t.select[r]=!0);else typeof t.by=="string"&&(t.select[t.by]=!0);return t}function Lu(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function bo(e,t){return t({action:"groupBy",unpacker:Lu(e),argsMapper:_u})(e)}function Eo(e,t,r){if(t==="aggregate")return n=>yo(n,r);if(t==="count")return n=>wo(n,r);if(t==="groupBy")return n=>bo(n,r)}m();c();p();f();d();function xo(e,t){let r=t.fields.filter(i=>!i.relationName),n=sn(r,i=>i.name);return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new Nt(e,o,s.type,s.isList,s.kind==="enum")},...tr(Object.keys(n))})}m();c();p();f();d();m();c();p();f();d();var vo=e=>Array.isArray(e)?e:e.split("."),Tn=(e,t)=>vo(t).reduce((r,n)=>r&&r[n],e),Po=(e,t,r)=>vo(t).reduceRight((n,i,o,s)=>Object.assign({},Tn(e,s.slice(0,o)),{[i]:n}),r);function Iu(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function Nu(e,t,r){return t===void 0?e??{}:Po(t,r,e||!0)}function Cn(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((l,u)=>({...l,[u.name]:u}),{});return l=>{let u=je(e._errorFormat),g=Iu(n,i),h=Nu(l,o,g),v=r({dataPath:g,callsite:u})(h),R=Du(e,t);return new Proxy(v,{get(C,A){if(!R.includes(A))return C[A];let L=[a[A].type,r,A],N=[g,h];return Cn(e,...L,...N)},...tr([...R,...Object.getOwnPropertyNames(v)])})}}function Du(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}m();c();p();f();d();m();c();p();f();d();var Ro=fe(_i());m();c();p();f();d();Gr();m();c();p();f();d();m();c();p();f();d();m();c();p();f();d();var To={keyword:ke,entity:ke,value:e=>de(Je(e)),punctuation:Je,directive:ke,function:ke,variable:e=>de(Je(e)),string:e=>de(Et(e)),boolean:Qe,number:ke,comment:xt};var Bu=e=>e,br={},$u=0,D={manual:br.Prism&&br.Prism.manual,disableWorkerMessageHandler:br.Prism&&br.Prism.disableWorkerMessageHandler,util:{encode:function(e){if(e instanceof he){let t=e;return new he(t.type,D.util.encode(t.content),t.alias)}else return Array.isArray(e)?e.map(D.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(Ae instanceof he)continue;if(z&&Q!=t.length-1){N.lastIndex=ie;var h=N.exec(e);if(!h)break;var g=h.index+(k?h[1].length:0),v=h.index+h[0].length,a=Q,l=ie;for(let B=t.length;a=l&&(++Q,ie=l);if(t[Q]instanceof he)continue;u=a-Q,Ae=e.slice(ie,l),h.index-=ie}else{N.lastIndex=0;var h=N.exec(Ae),u=1}if(!h){if(o)break;continue}k&&(j=h[1]?h[1].length:0);var g=h.index+j,h=h[0].slice(j),v=g+h.length,R=Ae.slice(0,g),C=Ae.slice(v);let X=[Q,u];R&&(++Q,ie+=R.length,X.push(R));let ze=new he(A,M?D.tokenize(h,M):h,ht,h,z);if(X.push(ze),C&&X.push(C),Array.prototype.splice.apply(t,X),u!=1&&D.matchGrammar(e,t,r,Q,ie,!0,A),o)break}}}},tokenize:function(e,t){let r=[e],n=t.rest;if(n){for(let i in n)t[i]=n[i];delete t.rest}return D.matchGrammar(e,r,t,0,0,!1),r},hooks:{all:{},add:function(e,t){let r=D.hooks.all;r[e]=r[e]||[],r[e].push(t)},run:function(e,t){let r=D.hooks.all[e];if(!(!r||!r.length))for(var n=0,i;i=r[n++];)i(t)}},Token:he};D.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/};D.languages.javascript=D.languages.extend("clike",{"class-name":[D.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.])\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/});D.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/;D.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:D.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:D.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:D.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:D.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/});D.languages.markup&&D.languages.markup.tag.addInlined("script","javascript");D.languages.js=D.languages.javascript;D.languages.typescript=D.languages.extend("javascript",{keyword:/\b(?:abstract|as|async|await|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|is|keyof|let|module|namespace|new|null|of|package|private|protected|public|readonly|return|require|set|static|super|switch|this|throw|try|type|typeof|var|void|while|with|yield)\b/,builtin:/\b(?:string|Function|any|number|boolean|Array|symbol|console|Promise|unknown|never)\b/});D.languages.ts=D.languages.typescript;function he(e,t,r,n,i){this.type=e,this.content=t,this.alias=r,this.length=(n||"").length|0,this.greedy=!!i}he.stringify=function(e,t){return typeof e=="string"?e:Array.isArray(e)?e.map(function(r){return he.stringify(r,t)}).join(""):ju(e.type)(e.content)};function ju(e){return To[e]||Bu}function Co(e){return Uu(e,D.languages.javascript)}function Uu(e,t){return D.tokenize(e,t).map(n=>he.stringify(n)).join("")}m();c();p();f();d();var Ao=fe(Oi());function So(e){return(0,Ao.default)(e)}var Er=class e{static read(t){let r;try{r=Gt.readFileSync(t,"utf-8")}catch{return null}return e.fromContent(r)}static fromContent(t){let r=t.split(/\r?\n/);return new e(1,r)}constructor(t,r){this.firstLineNumber=t,this.lines=r}get lastLineNumber(){return this.firstLineNumber+this.lines.length-1}mapLineAt(t,r){if(tthis.lines.length+this.firstLineNumber)return this;let n=t-this.firstLineNumber,i=[...this.lines];return i[n]=r(i[n]),new e(this.firstLineNumber,i)}mapLines(t){return new e(this.firstLineNumber,this.lines.map((r,n)=>t(r,this.firstLineNumber+n)))}lineAt(t){return this.lines[t-this.firstLineNumber]}prependSymbolAt(t,r){return this.mapLines((n,i)=>i===t?`${r} ${n}`:` ${n}`)}slice(t,r){let n=this.lines.slice(t-1,r).join(` `);return new e(t,So(n).split(` `))}highlight(){let t=Co(this.toString());return new e(this.firstLineNumber,t.split(` `))}toString(){return this.lines.join(` `)}};var qu={red:Ve,gray:xt,dim:wt,bold:de,underline:bt,highlightSource:e=>e.highlight()},Vu={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function Qu({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function Ju({callsite:e,message:t,originalMethod:r,isPanic:n,callArguments:i},o){let s=Qu({message:t,originalMethod:r,isPanic:n,callArguments:i});if(!e||typeof window<"u"||y.env.NODE_ENV==="production")return s;let a=e.getLocation();if(!a||!a.lineNumber||!a.columnNumber)return s;let l=Math.max(1,a.lineNumber-3),u=Er.read(a.fileName)?.slice(l,a.lineNumber),g=u?.lineAt(a.lineNumber);if(u&&g){let h=Gu(g),v=Wu(g);if(!v)return s;s.functionName=`${v.code})`,s.location=a,n||(u=u.mapLineAt(a.lineNumber,C=>C.slice(0,v.openingBraceIndex))),u=o.highlightSource(u);let R=String(u.lastLineNumber).length;if(s.contextLines=u.mapLines((C,A)=>o.gray(String(A).padStart(R))+" "+C).mapLines(C=>o.dim(C)).prependSymbolAt(a.lineNumber,o.bold(o.red("\u2192"))),i){let C=h+R+1;C+=2,s.callArguments=(0,Ro.default)(i,C).slice(C)}}return s}function Wu(e){let t=Object.keys(Le.ModelAction).join("|"),n=new RegExp(String.raw`\.(${t})\(`).exec(e);if(n){let i=n.index+n[0].length,o=e.lastIndexOf(" ",n.index)+1;return{code:e.slice(o,i),openingBraceIndex:i}}return null}function Gu(e){let t=0;for(let r=0;r{if("rejectOnNotFound"in n.args){let o=mt({originalMethod:n.clientMethod,callsite:n.callsite,message:"'rejectOnNotFound' option is not supported"});throw new Y(o,{clientVersion:t})}return await r(n).catch(o=>{throw o instanceof G&&o.code==="P2025"?new Oe(`No ${e} found`,t):o})}}m();c();p();f();d();function Te(e){return e.replace(/^./,t=>t.toLowerCase())}var Yu=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],Zu=["aggregate","count","groupBy"];function An(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[Xu(e,t),tc(e,t),Lt(r),ne("name",()=>t),ne("$name",()=>t),ne("$parent",()=>e._appliedParent)];return Ee({},n)}function Xu(e,t){let r=Te(t),n=Object.keys(Le.ModelAction).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=l=>e._request(l);s=ko(o,t,e._clientVersion,s);let a=l=>u=>{let g=je(e._errorFormat);return e._createPrismaPromise(h=>{let v={args:u,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:h,callsite:g};return s({...v,...l})})};return Yu.includes(o)?Cn(e,t,a):ec(i)?Eo(e,i,a):a({})}}}function ec(e){return Zu.includes(e)}function tc(e,t){return He(ne("fields",()=>{let r=e._runtimeDataModel.models[t];return xo(t,r)}))}m();c();p();f();d();function Oo(e){return e.replace(/^./,t=>t.toUpperCase())}var Sn=Symbol();function Bt(e){let t=[rc(e),ne(Sn,()=>e),ne("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(Lt(r)),Ee(e,t)}function rc(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(Te),n=[...new Set(t.concat(r))];return He({getKeys(){return n},getPropertyValue(i){let o=Oo(i);if(e._runtimeDataModel.models[o]!==void 0)return An(e,o);if(e._runtimeDataModel.models[i]!==void 0)return An(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function Fo(e){return e[Sn]?e[Sn]:e}function Mo(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let r=e.client.__AccelerateEngine;this._originalClient._engine=new r(this._originalClient._accelerateEngineConfig)}let t=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$use:{value:void 0},$on:{value:void 0}});return Bt(t)}m();c();p();f();d();m();c();p();f();d();function _o({result:e,modelName:t,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(t);if(!o)return e;let s=[],a=[];for(let l of Object.values(o)){if(n){if(n[l.name])continue;let u=l.needs.filter(g=>n[g]);u.length>0&&a.push(it(u))}else if(r){if(!r[l.name])continue;let u=l.needs.filter(g=>!r[g]);u.length>0&&a.push(it(u))}nc(e,l.needs)&&s.push(ic(l,Ee(e,s)))}return s.length>0||a.length>0?Ee(e,[...s,...a]):e}function nc(e,t){return t.every(r=>on(e,r))}function ic(e,t){return He(ne(e.name,()=>e.compute(t)))}m();c();p();f();d();function xr({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(t)){for(let s=0;sg.name===o);if(!l||l.kind!=="object"||!l.relationName)continue;let u=typeof s=="object"?s:{};t[o]=xr({visitor:i,result:t[o],args:u,modelName:l.type,runtimeDataModel:n})}}function Io({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:xr({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(s,a,l)=>_o({result:s,modelName:Te(a),select:l.select,omit:l.omit,extensions:n})})}m();c();p();f();d();m();c();p();f();d();function No(e){if(e instanceof se)return oc(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n{let o=t.customDataProxyFetch;return"transaction"in t&&i!==void 0&&(t.transaction?.kind==="batch"&&t.transaction.lock.then(),t.transaction=i),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.model?t.action:t.clientMethod,args:No(t.args??{}),__internalParams:t,query:(s,a=t)=>{let l=a.customDataProxyFetch;return a.customDataProxyFetch=qo(o,l),a.args=s,Bo(e,a,r,n+1)}})})}function $o(e,t){let{jsModelName:r,action:n,clientMethod:i}=t,o=r?n:i;if(e._extensions.isEmpty())return e._executeRequest(t);let s=e._extensions.getAllQueryCallbacks(r??"$none",o);return Bo(e,t,s)}function jo(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?Uo(r,n,0,e):e(r)}}function Uo(e,t,r,n){if(r===t.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return t[r]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let l=a.customDataProxyFetch;return a.customDataProxyFetch=qo(i,l),Uo(a,t,r+1,n)}})}var Do=e=>e;function qo(e=Do,t=Do){return r=>e(t(r))}m();c();p();f();d();m();c();p();f();d();function Qo(e,t,r){let n=Te(r);return!t.result||!(t.result.$allModels||t.result[n])?e:sc({...e,...Vo(t.name,e,t.result.$allModels),...Vo(t.name,e,t.result[n])})}function sc(e){let t=new be,r=(n,i)=>t.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>r(o,i)):[n]));return rt(e,n=>({...n,needs:r(n.name,new Set)}))}function Vo(e,t,r){return r?rt(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:ac(t,o,i)})):{}}function ac(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function Jo(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let i of n.needs)r[i]=!0;return r}function Wo(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(!e[n.name])for(let i of n.needs)delete r[i];return r}var vr=class{constructor(t,r){this.extension=t;this.previous=r;this.computedFieldsCache=new be;this.modelExtensionsCache=new be;this.queryCallbacksCache=new be;this.clientExtensions=Rt(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());this.batchCallbacks=Rt(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t})}getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>Qo(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=Te(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(t):{...this.previous?.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{let n=this.previous?.getAllQueryCallbacks(t,r)??[],i=[],o=this.extension.query;return!o||!(o[t]||o.$allModels||o[r]||o.$allOperations)?n:(o[t]!==void 0&&(o[t][r]!==void 0&&i.push(o[t][r]),o[t].$allOperations!==void 0&&i.push(o[t].$allOperations)),t!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},Pr=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new vr(t))}isEmpty(){return this.head===void 0}append(t){return new e(new vr(t,this.head))}getAllComputedFields(t){return this.head?.getAllComputedFields(t)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(t){return this.head?.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){return this.head?.getAllQueryCallbacks(t,r)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};m();c();p();f();d();var Go=le("prisma:client"),Ho={Vercel:"vercel","Netlify CI":"netlify"};function Ko({postinstall:e,ciName:t,clientVersion:r}){if(Go("checkPlatformCaching:postinstall",e),Go("checkPlatformCaching:ciName",t),e===!0&&t&&t in Ho){let n=`Prisma has detected that this project was built on ${t}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. Learn how: https://pris.ly/d/${Ho[t]}-build`;throw console.error(n),new V(n,r)}}m();c();p();f();d();function zo(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}m();c();p();f();d();m();c();p();f();d();m();c();p();f();d();var lc="Cloudflare-Workers",uc="node";function Yo(){return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":globalThis.navigator?.userAgent===lc?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":globalThis.process?.release?.name===uc?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}var cc={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Vercel Edge Functions or Edge Middleware"};function Zo(){let e=Yo();return{id:e,prettyName:cc[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}m();c();p();f();d();m();c();p();f();d();var Rn=fe(nn());m();c();p();f();d();function Xo(e){return e?e.replace(/".*"/g,'"X"').replace(/[\s:\[]([+-]?([0-9]*[.])?[0-9]+)/g,t=>`${t[0]}5`):""}m();c();p();f();d();function es(e){return e.split(` `).map(t=>t.replace(/^\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)\s*/,"").replace(/\+\d+\s*ms$/,"")).join(` `)}m();c();p();f();d();var pc=fe(Ci()),ts=fe(Bi());function rs({title:e,user:t="prisma",repo:r="prisma",template:n="bug_report.yml",body:i}){return(0,ts.default)({user:t,repo:r,template:n,title:e,body:i})}function ns({version:e,binaryTarget:t,title:r,description:n,engineVersion:i,database:o,query:s}){let a=vi(6e3-(s?.length??0)),l=es((0,Rn.default)(a)),u=n?`# Description \`\`\` ${n} \`\`\``:"",g=(0,Rn.default)(`Hi Prisma Team! My Prisma Client just crashed. This is the report: ## Versions | Name | Version | |-----------------|--------------------| | Node | ${y.version?.padEnd(19)}| | OS | ${t?.padEnd(19)}| | Prisma Client | ${e?.padEnd(19)}| | Query Engine | ${i?.padEnd(19)}| | Database | ${o?.padEnd(19)}| ${u} ## Logs \`\`\` ${l} \`\`\` ## Client Snippet \`\`\`ts // PLEASE FILL YOUR CODE SNIPPET HERE \`\`\` ## Schema \`\`\`prisma // PLEASE ADD YOUR SCHEMA HERE IF POSSIBLE \`\`\` ## Prisma Engine Query \`\`\` ${s?Xo(s):""} \`\`\` `),h=rs({title:r,body:g});return`${r} This is a non-recoverable error which probably happens when the Prisma Query Engine has a panic. ${bt(h)} If you want the Prisma team to look into it, please open the link above \u{1F64F} To increase the chance of success, please post your schema and a snippet of how you used Prisma Client in the issue. `}m();c();p();f();d();function Tr({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=t[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=r[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw new V(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new V("error: Missing URL environment variable, value, or override.",n);return i}m();c();p();f();d();m();c();p();f();d();function is(e){if(e?.kind==="itx")return e.options.id}m();c();p();f();d();var kn=class{constructor(t,r,n){this.engineObject=__PrismaProxy.create({datamodel:t.datamodel,env:y.env,ignoreEnvVarErrors:!0,datasourceOverrides:t.datasourceOverrides??{},logLevel:t.logLevel,logQueries:t.logQueries??!1,logCallback:r})}async connect(t){return __PrismaProxy.connect(this.engineObject,t)}async disconnect(t){return __PrismaProxy.disconnect(this.engineObject,t)}query(t,r,n){return __PrismaProxy.execute(this.engineObject,t,r,n)}sdlSchema(){return Promise.resolve("{}")}dmmf(t){return Promise.resolve("{}")}async startTransaction(t,r){return __PrismaProxy.startTransaction(this.engineObject,t,r)}async commitTransaction(t,r){return __PrismaProxy.commitTransaction(this.engineObject,t,r)}async rollbackTransaction(t,r){return __PrismaProxy.rollbackTransaction(this.engineObject,t,r)}metrics(t){return Promise.resolve("{}")}async applyPendingMigrations(){return __PrismaProxy.applyPendingMigrations(this.engineObject)}},os={async loadLibrary(e){if(!__PrismaProxy)throw new V("__PrismaProxy not detected make sure React Native bindings are installed",e.clientVersion);return{debugPanic(){return Promise.reject("{}")},dmmf(){return Promise.resolve("{}")},version(){return{commit:"unknown",version:"unknown"}},QueryEngine:kn}}};var fc="P2036",Ce=le("prisma:client:libraryEngine");function dc(e){return e.item_type==="query"&&"query"in e}function mc(e){return"level"in e?e.level==="error"&&e.message==="PANIC":!1}var RC=[...Xr,"native"],ss=0,jt=class{constructor(t,r){this.name="LibraryEngine";this.libraryLoader=os,this.config=t,this.libraryStarted=!1,this.logQueries=t.logQueries??!1,this.logLevel=t.logLevel??"error",this.logEmitter=t.logEmitter,this.datamodel=t.inlineSchema,t.enableDebugLogs&&(this.logLevel="debug");let n=Object.keys(t.overrideDatasources)[0],i=t.overrideDatasources[n]?.url;n!==void 0&&i!==void 0&&(this.datasourceOverrides={[n]:i}),this.libraryInstantiationPromise=this.instantiateLibrary(),this.checkForTooManyEngines()}checkForTooManyEngines(){this.config.adapter&&["wasm"].includes("react-native")||ss===10&&console.warn(`${Qe("warn(prisma-client)")} This is the 10th instance of Prisma Client being started. Make sure this is intentional.`)}async applyPendingMigrations(){await this.start(),await this.engine?.applyPendingMigrations()}async transaction(t,r,n){await this.start();let i=JSON.stringify(r),o;if(t==="start"){let a=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel});o=await this.engine?.startTransaction(a,i)}else t==="commit"?o=await this.engine?.commitTransaction(n.id,i):t==="rollback"&&(o=await this.engine?.rollbackTransaction(n.id,i));let s=this.parseEngineResponse(o);if(gc(s)){let a=this.getExternalAdapterError(s);throw a?a.error:new G(s.message,{code:s.error_code,clientVersion:this.config.clientVersion,meta:s.meta})}return s}async instantiateLibrary(){if(Ce("internalSetup"),this.libraryInstantiationPromise)return this.libraryInstantiationPromise;this.binaryTarget=await this.getCurrentBinaryTarget(),await this.loadEngine(),this.version()}async getCurrentBinaryTarget(){}parseEngineResponse(t){if(!t)throw new H("Response from the Engine was empty",{clientVersion:this.config.clientVersion});try{return JSON.parse(t)}catch{throw new H("Unable to JSON.parse response from engine",{clientVersion:this.config.clientVersion})}}async loadEngine(){if(!this.engine){this.QueryEngineConstructor||(this.library=await this.libraryLoader.loadLibrary(this.config),this.QueryEngineConstructor=this.library.QueryEngine);try{let t=new b(this),{adapter:r}=this.config;r&&Ce("Using driver adapter: %O",r),this.engine=new this.QueryEngineConstructor({datamodel:this.datamodel,env:y.env,logQueries:this.config.logQueries??!1,ignoreEnvVarErrors:!0,datasourceOverrides:this.datasourceOverrides??{},logLevel:this.logLevel,configDir:this.config.cwd,engineProtocol:"json"},n=>{t.deref()?.logger(n)},r),ss++}catch(t){let r=t,n=this.parseInitError(r.message);throw typeof n=="string"?r:new V(n.message,this.config.clientVersion,n.error_code)}}}logger(t){let r=this.parseEngineResponse(t);if(r){if("span"in r){this.config.tracingHelper.createEngineSpan(r);return}r.level=r?.level.toLowerCase()??"unknown",dc(r)?this.logEmitter.emit("query",{timestamp:new Date,query:r.query,params:r.params,duration:Number(r.duration_ms),target:r.module_path}):mc(r)?this.loggerRustPanic=new ue(On(this,`${r.message}: ${r.reason} in ${r.file}:${r.line}:${r.column}`),this.config.clientVersion):this.logEmitter.emit(r.level,{timestamp:new Date,message:r.message,target:r.module_path})}}parseInitError(t){try{return JSON.parse(t)}catch{}return t}parseRequestError(t){try{return JSON.parse(t)}catch{}return t}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the library engine since Prisma 5.0.0, it is only relevant and implemented for the binary engine. Please add your event listener to the `process` object directly instead.')}async start(){if(await this.libraryInstantiationPromise,await this.libraryStoppingPromise,this.libraryStartingPromise)return Ce(`library already starting, this.libraryStarted: ${this.libraryStarted}`),this.libraryStartingPromise;if(this.libraryStarted)return;let t=async()=>{Ce("library starting");try{let r={traceparent:this.config.tracingHelper.getTraceParent()};await this.engine?.connect(JSON.stringify(r)),this.libraryStarted=!0,Ce("library started")}catch(r){let n=this.parseInitError(r.message);throw typeof n=="string"?r:new V(n.message,this.config.clientVersion,n.error_code)}finally{this.libraryStartingPromise=void 0}};return this.libraryStartingPromise=this.config.tracingHelper.runInChildSpan("connect",t),this.libraryStartingPromise}async stop(){if(await this.libraryStartingPromise,await this.executingQueryPromise,this.libraryStoppingPromise)return Ce("library is already stopping"),this.libraryStoppingPromise;if(!this.libraryStarted)return;let t=async()=>{await new Promise(n=>setTimeout(n,5)),Ce("library stopping");let r={traceparent:this.config.tracingHelper.getTraceParent()};await this.engine?.disconnect(JSON.stringify(r)),this.libraryStarted=!1,this.libraryStoppingPromise=void 0,Ce("library stopped")};return this.libraryStoppingPromise=this.config.tracingHelper.runInChildSpan("disconnect",t),this.libraryStoppingPromise}version(){return this.versionInfo=this.library?.version(),this.versionInfo?.version??"unknown"}debugPanic(t){return this.library?.debugPanic(t)}async request(t,{traceparent:r,interactiveTransaction:n}){Ce(`sending request, this.libraryStarted: ${this.libraryStarted}`);let i=JSON.stringify({traceparent:r}),o=JSON.stringify(t);try{await this.start(),this.executingQueryPromise=this.engine?.query(o,i,n?.id),this.lastQuery=o;let s=this.parseEngineResponse(await this.executingQueryPromise);if(s.errors)throw s.errors.length===1?this.buildQueryError(s.errors[0]):new H(JSON.stringify(s.errors),{clientVersion:this.config.clientVersion});if(this.loggerRustPanic)throw this.loggerRustPanic;return{data:s,elapsed:0}}catch(s){if(s instanceof V)throw s;if(s.code==="GenericFailure"&&s.message?.startsWith("PANIC:"))throw new ue(On(this,s.message),this.config.clientVersion);let a=this.parseRequestError(s.message);throw typeof a=="string"?s:new H(`${a.message} ${a.backtrace}`,{clientVersion:this.config.clientVersion})}}async requestBatch(t,{transaction:r,traceparent:n}){Ce("requestBatch");let i=rr(t,r);await this.start(),this.lastQuery=JSON.stringify(i),this.executingQueryPromise=this.engine.query(this.lastQuery,JSON.stringify({traceparent:n}),is(r));let o=await this.executingQueryPromise,s=this.parseEngineResponse(o);if(s.errors)throw s.errors.length===1?this.buildQueryError(s.errors[0]):new H(JSON.stringify(s.errors),{clientVersion:this.config.clientVersion});let{batchResult:a,errors:l}=s;if(Array.isArray(a))return a.map(u=>u.errors&&u.errors.length>0?this.loggerRustPanic??this.buildQueryError(u.errors[0]):{data:u,elapsed:0});throw l&&l.length===1?new Error(l[0].error):new Error(JSON.stringify(s))}buildQueryError(t){if(t.user_facing_error.is_panic)return new ue(On(this,t.user_facing_error.message),this.config.clientVersion);let r=this.getExternalAdapterError(t.user_facing_error);return r?r.error:yr(t,this.config.clientVersion,this.config.activeProvider)}getExternalAdapterError(t){if(t.error_code===fc&&this.config.adapter){let r=t.meta?.id;zt(typeof r=="number","Malformed external JS error received from the engine");let n=this.config.adapter.errorRegistry.consumeError(r);return zt(n,"External error with reported id was not registered"),n}}async metrics(t){await this.start();let r=await this.engine.metrics(JSON.stringify(t));return t.format==="prometheus"?r:this.parseEngineResponse(r)}};function gc(e){return typeof e=="object"&&e!==null&&e.error_code!==void 0}function On(e,t){return ns({binaryTarget:e.binaryTarget,title:t,version:e.config.clientVersion,engineVersion:e.versionInfo?.commit,database:e.config.activeProvider,query:e.lastQuery})}function as({copyEngine:e=!0},t){let r;try{r=Tr({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...y.env},clientVersion:t.clientVersion})}catch{}e&&r?.startsWith("prisma://")&&St("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let n=Tt(t.generator),i=!!(r?.startsWith("prisma://")||!e),o=!!t.adapter,s=n==="library",a=n==="binary";if(i&&o||o&&!1){let l;throw e?r?.startsWith("prisma://")?l=["Prisma Client was configured to use the `adapter` option but the URL was a `prisma://` URL.","Please either use the `prisma://` URL or remove the `adapter` from the Prisma Client constructor."]:l=["Prisma Client was configured to use both the `adapter` and Accelerate, please chose one."]:l=["Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.","Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter."],new Y(l.join(` `),{clientVersion:t.clientVersion})}return new jt(t)}m();c();p();f();d();function Cr({generator:e}){return e?.previewFeatures??[]}m();c();p();f();d();m();c();p();f();d();m();c();p();f();d();var ds=fe(Fn());m();c();p();f();d();function ps(e,t){let r=fs(e),n=hc(r),i=wc(n);i?Ar(i,t):t.addErrorMessage(()=>"Unknown error")}function fs(e){return e.errors.flatMap(t=>t.kind==="Union"?fs(t):[t])}function hc(e){let t=new Map,r=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=t.get(i);o?t.set(i,{...n,argument:{...n.argument,typeNames:yc(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function yc(e,t){return[...new Set(e.concat(t))]}function wc(e){return an(e,(t,r)=>{let n=us(t),i=us(r);return n!==i?n-i:cs(t)-cs(r)})}function us(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function cs(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}m();c();p();f();d();var pe=class{constructor(t,r){this.name=t;this.value=r;this.isRequired=!1}makeRequired(){return this.isRequired=!0,this}write(t){let{colors:{green:r}}=t.context;t.addMarginSymbol(r(this.isRequired?"+":"?")),t.write(r(this.name)),this.isRequired||t.write(r("?")),t.write(r(": ")),typeof this.value=="string"?t.write(r(this.value)):t.write(this.value)}};m();c();p();f();d();var Sr=class{constructor(){this.fields=[]}addField(t,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(pt,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function Ar(e,t){switch(e.kind){case"MutuallyExclusiveFields":bc(e,t);break;case"IncludeOnScalar":Ec(e,t);break;case"EmptySelection":xc(e,t);break;case"UnknownSelectionField":Tc(e,t);break;case"UnknownArgument":Cc(e,t);break;case"UnknownInputField":Ac(e,t);break;case"RequiredArgumentMissing":Sc(e,t);break;case"InvalidArgumentType":Rc(e,t);break;case"InvalidArgumentValue":kc(e,t);break;case"ValueTooLarge":Oc(e,t);break;case"SomeFieldsMissing":Fc(e,t);break;case"TooManyFieldsGiven":Mc(e,t);break;case"Union":ps(e,t);break;default:throw new Error("not implemented: "+e.kind)}}function bc(e,t){let r=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();r&&(r.getField(e.firstField)?.markAsError(),r.getField(e.secondField)?.markAsError()),t.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function Ec(e,t){let[r,n]=Rr(e.selectionPath),i=e.outputType,o=t.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new pe(s.name,"true"));t.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${Ut(s)}`:a+=".",a+=` Note that ${s.bold("include")} statements only accept relation fields.`,a})}function xc(e,t){let r=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(r){let n=r.getField("omit")?.value.asObject();if(n){vc(e,t,n);return}}Pc(e,t)}function vc(e,t,r){r.removeAllFields();for(let n of e.outputType.fields)r.addSuggestion(new pe(n.name,"false"));t.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function Pc(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),hs(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${Ut(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function Tc(e,t){let[r,n]=Rr(e.selectionPath),i=t.arguments.getDeepSubSelectionValue(r)?.asObject(),o;if(i){let s=i.getFieldValue("select")?.asObject(),a=i.getFieldValue("include")?.asObject(),l=i.getFieldValue("omit")?.asObject();s?.hasField(n)?(o="select",s.getField(n)?.markAsError(),hs(s,e.outputType)):a?.hasField(n)?(o="include",a.getField(n)?.markAsError(),_c(a,e.outputType)):l?.hasField(n)&&(o="omit",l.getField(n)?.markAsError(),Lc(l,e.outputType))}t.addErrorMessage(s=>{let a=[`Unknown field ${s.red(`\`${n}\``)}`];return o&&a.push(`for ${s.bold(o)} statement`),a.push(`on model ${s.bold(`\`${e.outputType.name}\``)}.`),a.push(Ut(s)),a.join(" ")})}function Cc(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),Ic(n,e.arguments)),t.addErrorMessage(i=>ms(i,r,e.arguments.map(o=>o.name)))}function Ac(e,t){let[r,n]=Rr(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&ys(o,e.inputType)}t.addErrorMessage(o=>ms(o,n,e.inputType.fields.map(s=>s.name)))}function ms(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=Dc(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(Ut(e)),n.join(" ")}function Sc(e,t){let r;t.addErrorMessage(l=>r?.value instanceof K&&r.value.text==="null"?`Argument \`${l.green(o)}\` must not be ${l.red("null")}.`:`Argument \`${l.green(o)}\` is missing.`);let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=Rr(e.argumentPath),s=new Sr,a=n.getDeepFieldValue(i)?.asObject();if(a)if(r=a.getField(o),r&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let l of e.inputTypes[0].fields)s.addField(l.name,l.typeNames.join(" | "));a.addSuggestion(new pe(o,s).makeRequired())}else{let l=e.inputTypes.map(gs).join(" | ");a.addSuggestion(new pe(o,l).makeRequired())}}function gs(e){return e.kind==="list"?`${gs(e.elementType)}[]`:e.name}function Rc(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=kr("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function kc(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=kr("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function Oc(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof K&&(i=s.text)}t.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``),s.join(" ")})}function Fc(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&ys(i,e.inputType)}t.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${kr("or",e.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),o.push(Ut(i)),o.join(" ")})}function Mc(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}t.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${kr("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function hs(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new pe(r.name,"true"))}function _c(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new pe(r.name,"true"))}function Lc(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new pe(r.name,"true"))}function Ic(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new pe(r.name,r.typeNames.join(" | ")))}function ys(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new pe(r.name,r.typeNames.join(" | ")))}function Rr(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function Ut({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function kr(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var Nc=3;function Dc(e,t){let r=1/0,n;for(let i of t){let o=(0,ds.default)(e,i);o>Nc||o({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(t){return this.params.previewFeatures.includes(t)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){return this.model?.fields.find(r=>r.name===t)}nestSelection(t){let r=this.findField(t),n=r?.kind==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};m();c();p();f();d();var xs=e=>({command:e});m();c();p();f();d();m();c();p();f();d();var vs=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);m();c();p();f();d();function qt(e){try{return Ps(e,"fast")}catch{return Ps(e,"slow")}}function Ps(e,t){return JSON.stringify(e.map(r=>Gc(r,t)))}function Gc(e,t){return typeof e=="bigint"?{prisma__type:"bigint",prisma__value:e.toString()}:st(e)?{prisma__type:"date",prisma__value:e.toJSON()}:ve.isDecimal(e)?{prisma__type:"decimal",prisma__value:e.toJSON()}:w.Buffer.isBuffer(e)?{prisma__type:"bytes",prisma__value:e.toString("base64")}:Hc(e)||ArrayBuffer.isView(e)?{prisma__type:"bytes",prisma__value:w.Buffer.from(e).toString("base64")}:typeof e=="object"&&t==="slow"?Cs(e):e}function Hc(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Cs(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(Ts);let t={};for(let r of Object.keys(e))t[r]=Ts(e[r]);return t}function Ts(e){return typeof e=="bigint"?e.toString():Cs(e)}var Kc=/^(\s*alter\s)/i,As=le("prisma:client");function Ln(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&Kc.exec(t))throw new Error(`Running ALTER using ${n} is not supported Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. Example: await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) More Information: https://pris.ly/d/execute-raw `)}var In=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:qt(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:qt(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:qt(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=vs(r),i={values:qt(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?As(`prisma.${e}(${n}, ${i.values})`):As(`prisma.${e}(${n})`),{query:n,parameters:i}},Ss={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new se(t,r)}},Rs={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};m();c();p();f();d();function Nn(e){return function(r){let n,i=(o=e)=>{try{return o===void 0||o?.kind==="itx"?n??=ks(r(o)):ks(r(o))}catch(s){return Promise.reject(s)}};return{then(o,s){return i().then(o,s)},catch(o){return i().catch(o)},finally(o){return i().finally(o)},requestTransaction(o){let s=i(o);return s.requestTransaction?s.requestTransaction(o):s},[Symbol.toStringTag]:"PrismaPromise"}}}function ks(e){return typeof e.then=="function"?e:Promise.resolve(e)}m();c();p();f();d();var Os={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},async createEngineSpan(){},getActiveContext(){},runInChildSpan(e,t){return t()}},Dn=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}createEngineSpan(t){return this.getGlobalTracingHelper().createEngineSpan(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){return globalThis.PRISMA_INSTRUMENTATION?.helper??Os}};function Fs(e){return e.includes("tracing")?new Dn:Os}m();c();p();f();d();function Ms(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}m();c();p();f();d();var zc=["$connect","$disconnect","$on","$transaction","$use","$extends"],_s=zc;m();c();p();f();d();function Ls(e){return typeof e=="string"?e:e.reduce((t,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?t:t&&(r==="info"||t==="info")?"info":n},void 0)}m();c();p();f();d();var Fr=class{constructor(){this._middlewares=[]}use(t){this._middlewares.push(t)}get(t){return this._middlewares[t]}has(t){return!!this._middlewares[t]}length(){return this._middlewares.length}};m();c();p();f();d();var Ns=fe(nn());m();c();p();f();d();function Mr(e){return typeof e.batchRequestIdx=="number"}m();c();p();f();d();function _r(e){return e===null?e:Array.isArray(e)?e.map(_r):typeof e=="object"?Yc(e)?Zc(e):rt(e,_r):e}function Yc(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function Zc({$type:e,value:t}){switch(e){case"BigInt":return BigInt(t);case"Bytes":return w.Buffer.from(t,"base64");case"DateTime":return new Date(t);case"Decimal":return new ve(t);case"Json":return JSON.parse(t);default:We(t,"Unknown tagged value")}}m();c();p();f();d();function Is(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(Bn(e.query.arguments)),t.push(Bn(e.query.selection)),t.join("")}function Bn(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${Bn(n)})`:r}).join(" ")})`}m();c();p();f();d();var Xc={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateOne:!0,upsertOne:!0};function $n(e){return Xc[e]}m();c();p();f();d();var Lr=class{constructor(t){this.options=t;this.tickActive=!1;this.batches={}}request(t){let r=this.options.batchBy(t);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,y.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:t,resolve:n,reject:i})})):this.options.singleLoader(t)}dispatchBatches(){for(let t in this.batches){let r=this.batches[t];delete this.batches[t],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;i{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(h=>h.protocolQuery),l=this.client._tracingHelper.getTraceParent(s),u=n.some(h=>$n(h.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:l,transaction:tp(o),containsWrite:u,customDataProxyFetch:i})).map((h,v)=>{if(h instanceof Error)return h;try{return this.mapQueryEngineResult(n[v],h)}catch(R){return R}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?Ds(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:$n(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:Is(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(t){try{return await this.dataloader.request(t)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let i=n?.data,o=n?.elapsed,s=this.unpack(i,t,r);return y.env.PRISMA_CLIENT_GET_TIME?{data:s,elapsed:o}:s}handleAndLogRequestError(t){try{this.handleRequestError(t)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:t.clientMethod,timestamp:new Date}),r}}handleRequestError({error:t,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s}){if(ep(t),rp(t,i)||t instanceof Oe)throw t;if(t instanceof G&&np(t)){let l=Bs(t.meta);Or({args:o,errors:[l],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion})}let a=t.message;if(n&&(a=mt({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:a})),a=this.sanitizeMessage(a),t.code){let l=s?{modelName:s,...t.meta}:t.meta;throw new G(a,{code:t.code,clientVersion:this.client._clientVersion,meta:l,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new ue(a,this.client._clientVersion);if(t instanceof H)throw new H(a,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof V)throw new V(a,this.client._clientVersion);if(t instanceof ue)throw new ue(a,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,Ns.default)(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let i=Object.values(t)[0],o=r.filter(a=>a!=="select"&&a!=="include"),s=_r(Tn(i,o));return n?n(s):s}get[Symbol.toStringTag](){return"RequestHandler"}};function tp(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:Ds(e)};We(e,"Unknown transaction kind")}}function Ds(e){return{id:e.id,payload:e.payload}}function rp(e,t){return Mr(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function np(e){return e.code==="P2009"||e.code==="P2012"}function Bs(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(Bs)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}m();c();p();f();d();var $s="5.15.0";var js=$s;m();c();p();f();d();function Us(e){return e.map(t=>{let r={};for(let n of Object.keys(t))r[n]=qs(t[n]);return r})}function qs({prisma__type:e,prisma__value:t}){switch(e){case"bigint":return BigInt(t);case"bytes":return w.Buffer.from(t,"base64");case"decimal":return new ve(t);case"datetime":case"date":return new Date(t);case"time":return new Date(`1970-01-01T${t}Z`);case"array":return t.map(qs);default:return t}}m();c();p();f();d();var Ws=fe(Fn());m();c();p();f();d();var q=class extends Error{constructor(t){super(t+` Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};re(q,"PrismaClientConstructorValidationError");var Vs=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","__internal"],Qs=["pretty","colorless","minimal"],Js=["info","query","warn","error"],op={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new q(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(e)){if(!t.includes(r)){let i=gt(r,t)||` Available datasources: ${t.join(", ")}`;throw new q(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new q(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new q(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new q(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,t)=>{if(e===null)return;if(e===void 0)throw new q('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!Cr(t).includes("driverAdapters"))throw new q('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(Tt()==="binary")throw new q('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')},datasourceUrl:e=>{if(typeof e<"u"&&typeof e!="string")throw new q(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new q(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!Qs.includes(e)){let t=gt(e,Qs);throw new q(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new q(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!Js.includes(r)){let n=gt(r,Js);throw new q(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of e){t(r);let n={level:t,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=gt(i,o);throw new q(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[i,o]of Object.entries(r))if(n[i])n[i](o);else throw new q(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let t=e.maxWait;if(t!=null&&t<=0)throw new q(`Invalid value ${t} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let r=e.timeout;if(r!=null&&r<=0)throw new q(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new q(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=gt(r,t);throw new q(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function Gs(e,t){for(let[r,n]of Object.entries(e)){if(!Vs.includes(r)){let i=gt(r,Vs);throw new q(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}op[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new q('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function gt(e,t){if(t.length===0||typeof e!="string")return"";let r=sp(e,t);return r?` Did you mean "${r}"?`:""}function sp(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,Ws.default)(e,i)}));r.sort((i,o)=>i.distance{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?r(i):t(n)))},l=u=>{o||(o=!0,r(u))};for(let u=0;u{n[u]=g,a()},g=>{if(!Mr(g)){l(g);return}g.batchRequestIdx===u?l(g):(i||(i=g),a())})})}var Ue=le("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var ap={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},lp=Symbol.for("prisma.client.transaction.id"),up={id:0,nextId(){return++this.id}};function Ys(e){class t{constructor(n){this._originalClient=this;this._middlewares=new Fr;this._createPrismaPromise=Nn();this.$extends=Mo;e=n?.__internal?.configOverride?.(e)??e,Ko(e),n&&Gs(n,e);let i=n?.adapter?fn(n.adapter):void 0,o=new Kt().on("error",()=>{});this._extensions=Pr.empty(),this._previewFeatures=Cr(e),this._clientVersion=e.clientVersion??js,this._activeProvider=e.activeProvider,this._tracingHelper=Fs(this._previewFeatures);let s={rootEnvPath:e.relativeEnvPaths.rootEnvPath&&we.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&we.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},a=e.injectableEdgeEnv?.();try{let l=n??{},u=l.__internal??{},g=u.debug===!0;g&&le.enable("prisma:client");let h=we.resolve(e.dirname,e.relativePath);Gt.existsSync(h)||(h=e.dirname),Ue("dirname",e.dirname),Ue("relativePath",e.relativePath),Ue("cwd",h);let v=u.engine||{};if(l.errorFormat?this._errorFormat=l.errorFormat:y.env.NODE_ENV==="production"?this._errorFormat="minimal":y.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:h,dirname:e.dirname,enableDebugLogs:g,allowTriggerPanic:v.allowTriggerPanic,datamodelPath:we.join(e.dirname,e.filename??"schema.prisma"),prismaPath:v.binaryPath??void 0,engineEndpoint:v.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:l.log&&Ls(l.log),logQueries:l.log&&!!(typeof l.log=="string"?l.log==="query":l.log.find(R=>typeof R=="string"?R==="query":R.level==="query")),env:a?.parsed??{},flags:[],engineWasm:e.engineWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:zo(l,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:l.transactionOptions?.maxWait??2e3,timeout:l.transactionOptions?.timeout??5e3,isolationLevel:l.transactionOptions?.isolationLevel},logEmitter:o,isBundled:e.isBundled,adapter:i},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:Tr,getBatchRequestPayload:rr,prismaGraphQLToJSError:yr,PrismaClientUnknownRequestError:H,PrismaClientInitializationError:V,PrismaClientKnownRequestError:G,debug:le("prisma:client:accelerateEngine"),engineVersion:zs.version,clientVersion:e.clientVersion}},Ue("clientVersion",e.clientVersion),this._engine=as(e,this._engineConfig),this._requestHandler=new Ir(this,o),l.log)for(let R of l.log){let C=typeof R=="string"?R:R.emit==="stdout"?R.level:null;C&&this.$on(C,A=>{At.log(`${At.tags[C]??""}`,A.message||A.query)})}this._metrics=new nt(this._engine)}catch(l){throw l.clientVersion=this._clientVersion,l}return this._appliedParent=Bt(this)}get[Symbol.toStringTag](){return"PrismaClient"}$use(n){this._middlewares.use(n)}$on(n,i){n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i)}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{Pi()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:In({clientMethod:i,activeProvider:a}),callsite:je(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=Ks(n,i);return Ln(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new Y("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(Ln(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new Y(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:xs,callsite:je(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:In({clientMethod:i,activeProvider:a}),callsite:je(this._errorFormat),dataPath:[],middlewareArgsMapper:s}).then(Us)}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...Ks(n,i));throw new Y("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=up.nextId(),s=Ms(n.length),a=n.map((l,u)=>{if(l?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let g=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,h={kind:"batch",id:o,index:u,isolationLevel:g,lock:s};return l.requestTransaction?.(h)??l});return Hs(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),l;try{let u={kind:"itx",...a};l=await n(this._createItxClient(u)),await this._engine.transaction("commit",o,a)}catch(u){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),u}return l}_createItxClient(n){return Bt(Ee(Fo(this),[ne("_appliedParent",()=>this._appliedParent._createItxClient(n)),ne("_createPrismaPromise",()=>Nn(n)),ne(lp,()=>n.id),it(_s)]))}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??ap,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={middleware:{name:"middleware",middleware:!0,attributes:{method:"$use"},active:!1},operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=-1,l=async u=>{let g=this._middlewares.get(++a);if(g)return this._tracingHelper.runInChildSpan(s.middleware,F=>g(u,L=>(F?.end(),l(L))));let{runInTransaction:h,args:v,...R}=u,C={...n,...R};v&&(C.args=i.middlewareArgsToRequestArgs(v)),n.transaction!==void 0&&h===!1&&delete C.transaction;let A=await $o(this,C);return C.model?Io({result:A,modelName:C.model,args:C.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel}):A};return this._tracingHelper.runInChildSpan(s.operation,()=>l(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:l,argsMapper:u,transaction:g,unpacker:h,otelParentCtx:v,customDataProxyFetch:R}){try{n=u?u(n):n;let C={name:"serialize"},A=this._tracingHelper.runInChildSpan(C,()=>ws({modelName:l,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures}));return le.enabled("prisma:client")&&(Ue("Prisma Client call:"),Ue(`prisma.${i}(${mo(n)})`),Ue("Generated request:"),Ue(JSON.stringify(A,null,2)+` `)),g?.kind==="batch"&&await g.lock,this._requestHandler.request({protocolQuery:A,modelName:l,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:g,unpacker:h,otelParentCtx:v,otelChildCtx:this._tracingHelper.getActiveContext(),customDataProxyFetch:R})}catch(C){throw C.clientVersion=this._clientVersion,C}}get $metrics(){if(!this._hasPreviewFlag("metrics"))throw new Y("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:this._clientVersion});return this._metrics}_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}}return t}function Ks(e,t){return cp(e)?[new se(e,t),Ss]:[e,Rs]}function cp(e){return Array.isArray(e)&&Array.isArray(e.raw)}m();c();p();f();d();var pp=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Zs(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!pp.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}m();c();p();f();d();0&&(module.exports={Debug,Decimal,Extensions,MetricsClient,NotFoundError,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,defineDmmfProperty,empty,getPrismaClient,getRuntime,join,makeStrictEnum,objectEnumValues,raw,sqltag,warnEnvConflicts,warnOnce}); //# sourceMappingURL=react-native.js.map ================================================ FILE: server/src/common/prisma-client/runtime/wasm.js ================================================ "use strict";var ko=Object.create;var Et=Object.defineProperty;var Lo=Object.getOwnPropertyDescriptor;var Mo=Object.getOwnPropertyNames;var Io=Object.getPrototypeOf,_o=Object.prototype.hasOwnProperty;var oe=(e,t)=>()=>(e&&(t=e(e=0)),t);var Te=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),ze=(e,t)=>{for(var r in t)Et(e,r,{get:t[r],enumerable:!0})},Kr=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Mo(t))!_o.call(e,i)&&i!==r&&Et(e,i,{get:()=>t[i],enumerable:!(n=Lo(t,i))||n.enumerable});return e};var _e=(e,t,r)=>(r=e!=null?ko(Io(e)):{},Kr(t||!e||!e.__esModule?Et(r,"default",{value:e,enumerable:!0}):r,e)),ar=e=>Kr(Et({},"__esModule",{value:!0}),e);function lr(e,t){if(t=t.toLowerCase(),t==="utf8"||t==="utf-8")return new h(Uo.encode(e));if(t==="base64"||t==="base64url")return e=e.replace(/-/g,"+").replace(/_/g,"/"),e=e.replace(/[^A-Za-z0-9+/]/g,""),new h([...atob(e)].map(r=>r.charCodeAt(0)));if(t==="binary"||t==="ascii"||t==="latin1"||t==="latin-1")return new h([...e].map(r=>r.charCodeAt(0)));if(t==="ucs2"||t==="ucs-2"||t==="utf16le"||t==="utf-16le"){let r=new h(e.length*2),n=new DataView(r.buffer);for(let i=0;ia.startsWith("get")||a.startsWith("set")),n=r.map(a=>a.replace("get","read").replace("set","write")),i=(a,f)=>function(v=0){return $(v,"offset"),Y(v,"offset"),q(v,"offset",this.length-1),new DataView(this.buffer)[r[a]](v,f)},o=(a,f)=>function(v,C=0){let T=r[a].match(/set(\w+\d+)/)[1].toLowerCase(),O=No[T];return $(C,"offset"),Y(C,"offset"),q(C,"offset",this.length-1),Fo(v,"value",O[0],O[1]),new DataView(this.buffer)[r[a]](C,v,f),C+parseInt(r[a].match(/\d+/)[0])/8},s=a=>{a.forEach(f=>{f.includes("Uint")&&(e[f.replace("Uint","UInt")]=e[f]),f.includes("Float64")&&(e[f.replace("Float64","Double")]=e[f]),f.includes("Float32")&&(e[f.replace("Float32","Float")]=e[f])})};n.forEach((a,f)=>{a.startsWith("read")&&(e[a]=i(f,!1),e[a+"LE"]=i(f,!0),e[a+"BE"]=i(f,!1)),a.startsWith("write")&&(e[a]=o(f,!1),e[a+"LE"]=o(f,!0),e[a+"BE"]=o(f,!1)),s([a,a+"LE",a+"BE"])})}function zr(e){throw new Error(`Buffer polyfill does not implement "${e}"`)}function xt(e,t){if(!(e instanceof Uint8Array))throw new TypeError(`The "${t}" argument must be an instance of Buffer or Uint8Array`)}function q(e,t,r=Vo+1){if(e<0||e>r){let n=new RangeError(`The value of "${t}" is out of range. It must be >= 0 && <= ${r}. Received ${e}`);throw n.code="ERR_OUT_OF_RANGE",n}}function $(e,t){if(typeof e!="number"){let r=new TypeError(`The "${t}" argument must be of type number. Received type ${typeof e}.`);throw r.code="ERR_INVALID_ARG_TYPE",r}}function Y(e,t){if(!Number.isInteger(e)||Number.isNaN(e)){let r=new RangeError(`The value of "${t}" is out of range. It must be an integer. Received ${e}`);throw r.code="ERR_OUT_OF_RANGE",r}}function Fo(e,t,r,n){if(en){let i=new RangeError(`The value of "${t}" is out of range. It must be >= ${r} and <= ${n}. Received ${e}`);throw i.code="ERR_OUT_OF_RANGE",i}}function Hr(e,t){if(typeof e!="string"){let r=new TypeError(`The "${t}" argument must be of type string. Received type ${typeof e}`);throw r.code="ERR_INVALID_ARG_TYPE",r}}function qo(e,t="utf8"){return h.from(e,t)}var h,No,Uo,Bo,$o,Vo,y,ur,u=oe(()=>{"use strict";h=class e extends Uint8Array{constructor(){super(...arguments);this._isBuffer=!0}get offset(){return this.byteOffset}static alloc(r,n=0,i="utf8"){return Hr(i,"encoding"),e.allocUnsafe(r).fill(n,i)}static allocUnsafe(r){return e.from(r)}static allocUnsafeSlow(r){return e.from(r)}static isBuffer(r){return r&&!!r._isBuffer}static byteLength(r,n="utf8"){if(typeof r=="string")return lr(r,n).byteLength;if(r&&r.byteLength)return r.byteLength;let i=new TypeError('The "string" argument must be of type string or an instance of Buffer or ArrayBuffer.');throw i.code="ERR_INVALID_ARG_TYPE",i}static isEncoding(r){return $o.includes(r)}static compare(r,n){xt(r,"buff1"),xt(n,"buff2");for(let i=0;in[i])return 1}return r.length===n.length?0:r.length>n.length?1:-1}static from(r,n="utf8"){if(r&&typeof r=="object"&&r.type==="Buffer")return new e(r.data);if(typeof r=="number")return new e(new Uint8Array(r));if(typeof r=="string")return lr(r,n);if(ArrayBuffer.isView(r)){let{byteOffset:i,byteLength:o,buffer:s}=r;return"map"in r&&typeof r.map=="function"?new e(r.map(a=>a%256),i,o):new e(s,i,o)}if(r&&typeof r=="object"&&("length"in r||"byteLength"in r||"buffer"in r))return new e(r);throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}static concat(r,n){if(r.length===0)return e.alloc(0);let i=[].concat(...r.map(s=>[...s])),o=e.alloc(n!==void 0?n:i.length);return o.set(n!==void 0?i.slice(0,n):i),o}slice(r=0,n=this.length){return this.subarray(r,n)}subarray(r=0,n=this.length){return Object.setPrototypeOf(super.subarray(r,n),e.prototype)}reverse(){return super.reverse(),this}readIntBE(r,n){$(r,"offset"),Y(r,"offset"),q(r,"offset",this.length-1),$(n,"byteLength"),Y(n,"byteLength");let i=new DataView(this.buffer,r,n),o=0;for(let s=0;s=0;s--)o.setUint8(s,r&255),r=r/256;return n+i}writeUintBE(r,n,i){return this.writeUIntBE(r,n,i)}writeUIntLE(r,n,i){$(n,"offset"),Y(n,"offset"),q(n,"offset",this.length-1),$(i,"byteLength"),Y(i,"byteLength");let o=new DataView(this.buffer,n,i);for(let s=0;sn===r[i])}copy(r,n=0,i=0,o=this.length){q(n,"targetStart"),q(i,"sourceStart",this.length),q(o,"sourceEnd"),n>>>=0,i>>>=0,o>>>=0;let s=0;for(;i=this.length?this.length-f:r.length),f);return this}includes(r,n=null,i="utf-8"){return this.indexOf(r,n,i)!==-1}lastIndexOf(r,n=null,i="utf-8"){return this.indexOf(r,n,i,!0)}indexOf(r,n=null,i="utf-8",o=!1){let s=o?this.findLastIndex.bind(this):this.findIndex.bind(this);i=typeof n=="string"?n:i;let a=e.from(typeof r=="number"?[r]:r,i),f=typeof n=="string"?0:n;return f=typeof n=="number"?f:null,f=Number.isNaN(f)?null:f,f??=o?this.length:0,f=f<0?this.length+f:f,a.length===0&&o===!1?f>=this.length?this.length:f:a.length===0&&o===!0?(f>=this.length?this.length:f)||this.length:s((v,C)=>(o?C<=f:C>=f)&&this[C]===a[0]&&a.every((O,R)=>this[C+R]===O))}toString(r="utf8",n=0,i=this.length){if(n=n<0?0:n,r=r.toString().toLowerCase(),i<=0)return"";if(r==="utf8"||r==="utf-8")return Bo.decode(this.slice(n,i));if(r==="base64"||r==="base64url"){let o=btoa(this.reduce((s,a)=>s+ur(a),""));return r==="base64url"?o.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""):o}if(r==="binary"||r==="ascii"||r==="latin1"||r==="latin-1")return this.slice(n,i).reduce((o,s)=>o+ur(s&(r==="ascii"?127:255)),"");if(r==="ucs2"||r==="ucs-2"||r==="utf16le"||r==="utf-16le"){let o=new DataView(this.buffer.slice(n,i));return Array.from({length:o.byteLength/2},(s,a)=>a*2+1o+s.toString(16).padStart(2,"0"),"");zr(`encoding "${r}"`)}toLocaleString(){return this.toString()}inspect(){return``}};No={int8:[-128,127],int16:[-32768,32767],int32:[-2147483648,2147483647],uint8:[0,255],uint16:[0,65535],uint32:[0,4294967295],float32:[-1/0,1/0],float64:[-1/0,1/0],bigint64:[-0x8000000000000000n,0x7fffffffffffffffn],biguint64:[0n,0xffffffffffffffffn]},Uo=new TextEncoder,Bo=new TextDecoder,$o=["utf8","utf-8","hex","base64","ascii","binary","base64url","ucs2","ucs-2","utf16le","utf-16le","latin1","latin-1"],Vo=4294967295;Do(h.prototype);y=new Proxy(qo,{construct(e,[t,r]){return h.from(t,r)},get(e,t){return h[t]}}),ur=String.fromCodePoint});var g,c=oe(()=>{"use strict";g={nextTick:(e,...t)=>{setTimeout(()=>{e(...t)},0)},env:{},version:"",cwd:()=>"/",stderr:{},argv:["/bin/node"]}});var E,m=oe(()=>{"use strict";E=globalThis.performance??(()=>{let e=Date.now();return{now:()=>Date.now()-e}})()});var w,p=oe(()=>{"use strict";w=()=>{};w.prototype=w});var b,d=oe(()=>{"use strict";b=class{constructor(t){this.value=t}deref(){return this.value}}});function en(e,t){var r,n,i,o,s,a,f,v,C=e.constructor,T=C.precision;if(!e.s||!t.s)return t.s||(t=new C(e)),U?_(t,T):t;if(f=e.d,v=t.d,s=e.e,i=t.e,f=f.slice(),o=s-i,o){for(o<0?(n=f,o=-o,a=v.length):(n=v,i=s,a=f.length),s=Math.ceil(T/F),a=s>a?s+1:a+1,o>a&&(o=a,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for(a=f.length,o=v.length,a-o<0&&(o=a,n=v,v=f,f=n),r=0;o;)r=(f[--o]=f[o]+v[o]+r)/j|0,f[o]%=j;for(r&&(f.unshift(r),++i),a=f.length;f[--a]==0;)f.pop();return t.d=f,t.e=i,U?_(t,T):t}function le(e,t,r){if(e!==~~e||er)throw Error(Re+e)}function ae(e){var t,r,n,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;t16)throw Error(mr+V(e));if(!e.s)return new C(Z);for(t==null?(U=!1,a=T):a=t,s=new C(.03125);e.abs().gte(.1);)e=e.times(s),v+=5;for(n=Math.log(Ae(2,v))/Math.LN10*2+5|0,a+=n,r=i=o=new C(Z),C.precision=a;;){if(i=_(i.times(e),a),r=r.times(++f),s=o.plus(ge(i,r,a)),ae(s.d).slice(0,a)===ae(o.d).slice(0,a)){for(;v--;)o=_(o.times(o),a);return C.precision=T,t==null?(U=!0,_(o,T)):o}o=s}}function V(e){for(var t=e.e*F,r=e.d[0];r>=10;r/=10)t++;return t}function cr(e,t,r){if(t>e.LN10.sd())throw U=!0,r&&(e.precision=r),Error(te+"LN10 precision limit exceeded");return _(new e(e.LN10),t)}function we(e){for(var t="";e--;)t+="0";return t}function Ye(e,t){var r,n,i,o,s,a,f,v,C,T=1,O=10,R=e,L=R.d,S=R.constructor,M=S.precision;if(R.s<1)throw Error(te+(R.s?"NaN":"-Infinity"));if(R.eq(Z))return new S(0);if(t==null?(U=!1,v=M):v=t,R.eq(10))return t==null&&(U=!0),cr(S,v);if(v+=O,S.precision=v,r=ae(L),n=r.charAt(0),o=V(R),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)R=R.times(e),r=ae(R.d),n=r.charAt(0),T++;o=V(R),n>1?(R=new S("0."+r),o++):R=new S(n+"."+r.slice(1))}else return f=cr(S,v+2,M).times(o+""),R=Ye(new S(n+"."+r.slice(1)),v-O).plus(f),S.precision=M,t==null?(U=!0,_(R,M)):R;for(a=s=R=ge(R.minus(Z),R.plus(Z),v),C=_(R.times(R),v),i=3;;){if(s=_(s.times(C),v),f=a.plus(ge(s,new S(i),v)),ae(f.d).slice(0,v)===ae(a.d).slice(0,v))return a=a.times(2),o!==0&&(a=a.plus(cr(S,v+2,M).times(o+""))),a=ge(a,new S(T),v),S.precision=M,t==null?(U=!0,_(a,M)):a;a=f,i+=2}}function Yr(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=Fe(r/F),e.d=[],n=(r+1)%F,r<0&&(n+=F),nPt||e.e<-Pt))throw Error(mr+r)}else e.s=0,e.e=0,e.d=[0];return e}function _(e,t,r){var n,i,o,s,a,f,v,C,T=e.d;for(s=1,o=T[0];o>=10;o/=10)s++;if(n=t-s,n<0)n+=F,i=t,v=T[C=0];else{if(C=Math.ceil((n+1)/F),o=T.length,C>=o)return e;for(v=o=T[C],s=1;o>=10;o/=10)s++;n%=F,i=n-F+s}if(r!==void 0&&(o=Ae(10,s-i-1),a=v/o%10|0,f=t<0||T[C+1]!==void 0||v%o,f=r<4?(a||f)&&(r==0||r==(e.s<0?3:2)):a>5||a==5&&(r==4||f||r==6&&(n>0?i>0?v/Ae(10,s-i):0:T[C-1])%10&1||r==(e.s<0?8:7))),t<1||!T[0])return f?(o=V(e),T.length=1,t=t-o-1,T[0]=Ae(10,(F-t%F)%F),e.e=Fe(-t/F)||0):(T.length=1,T[0]=e.e=e.s=0),e;if(n==0?(T.length=C,o=1,C--):(T.length=C+1,o=Ae(10,F-n),T[C]=i>0?(v/Ae(10,s-i)%Ae(10,i)|0)*o:0),f)for(;;)if(C==0){(T[0]+=o)==j&&(T[0]=1,++e.e);break}else{if(T[C]+=o,T[C]!=j)break;T[C--]=0,o=1}for(n=T.length;T[--n]===0;)T.pop();if(U&&(e.e>Pt||e.e<-Pt))throw Error(mr+V(e));return e}function rn(e,t){var r,n,i,o,s,a,f,v,C,T,O=e.constructor,R=O.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new O(e),U?_(t,R):t;if(f=e.d,T=t.d,n=t.e,v=e.e,f=f.slice(),s=v-n,s){for(C=s<0,C?(r=f,s=-s,a=T.length):(r=T,n=v,a=f.length),i=Math.max(Math.ceil(R/F),a)+2,s>i&&(s=i,r.length=1),r.reverse(),i=s;i--;)r.push(0);r.reverse()}else{for(i=f.length,a=T.length,C=i0;--i)f[a++]=0;for(i=T.length;i>s;){if(f[--i]0?o=o.charAt(0)+"."+o.slice(1)+we(n):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+we(-i-1)+o,r&&(n=r-s)>0&&(o+=we(n))):i>=s?(o+=we(i+1-s),r&&(n=r-i-1)>0&&(o=o+"."+we(n))):((n=i+1)0&&(i+1===s&&(o+="."),o+=we(n))),e.s<0?"-"+o:o}function Xr(e,t){if(e.length>t)return e.length=t,!0}function nn(e){var t,r,n;function i(o){var s=this;if(!(s instanceof i))return new i(o);if(s.constructor=i,o instanceof i){s.s=o.s,s.e=o.e,s.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(Re+o);if(o>0)s.s=1;else if(o<0)o=-o,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(o===~~o&&o<1e7){s.e=0,s.d=[o];return}return Yr(s,o.toString())}else if(typeof o!="string")throw Error(Re+o);if(o.charCodeAt(0)===45?(o=o.slice(1),s.s=-1):s.s=1,Qo.test(o))Yr(s,o);else throw Error(Re+o)}if(i.prototype=A,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=nn,i.config=i.set=Jo,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(Re+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Re+r+": "+n);return this}var De,jo,pr,U,te,Re,mr,Fe,Ae,Qo,Z,j,F,Zr,Pt,A,ge,pr,vt,on=oe(()=>{"use strict";u();c();m();p();d();l();De=1e9,jo={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},U=!0,te="[DecimalError] ",Re=te+"Invalid argument: ",mr=te+"Exponent out of range: ",Fe=Math.floor,Ae=Math.pow,Qo=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,j=1e7,F=7,Zr=9007199254740991,Pt=Fe(Zr/F),A={};A.absoluteValue=A.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};A.comparedTo=A.cmp=function(e){var t,r,n,i,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(n=o.d.length,i=e.d.length,t=0,r=ne.d[t]^o.s<0?1:-1;return n===i?0:n>i^o.s<0?1:-1};A.decimalPlaces=A.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*F;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};A.dividedBy=A.div=function(e){return ge(this,new this.constructor(e))};A.dividedToIntegerBy=A.idiv=function(e){var t=this,r=t.constructor;return _(ge(t,new r(e),0,1),r.precision)};A.equals=A.eq=function(e){return!this.cmp(e)};A.exponent=function(){return V(this)};A.greaterThan=A.gt=function(e){return this.cmp(e)>0};A.greaterThanOrEqualTo=A.gte=function(e){return this.cmp(e)>=0};A.isInteger=A.isint=function(){return this.e>this.d.length-2};A.isNegative=A.isneg=function(){return this.s<0};A.isPositive=A.ispos=function(){return this.s>0};A.isZero=function(){return this.s===0};A.lessThan=A.lt=function(e){return this.cmp(e)<0};A.lessThanOrEqualTo=A.lte=function(e){return this.cmp(e)<1};A.logarithm=A.log=function(e){var t,r=this,n=r.constructor,i=n.precision,o=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(Z))throw Error(te+"NaN");if(r.s<1)throw Error(te+(r.s?"NaN":"-Infinity"));return r.eq(Z)?new n(0):(U=!1,t=ge(Ye(r,o),Ye(e,o),o),U=!0,_(t,i))};A.minus=A.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?rn(t,e):en(t,(e.s=-e.s,e))};A.modulo=A.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(te+"NaN");return r.s?(U=!1,t=ge(r,e,0,1).times(e),U=!0,r.minus(t)):_(new n(r),i)};A.naturalExponential=A.exp=function(){return tn(this)};A.naturalLogarithm=A.ln=function(){return Ye(this)};A.negated=A.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};A.plus=A.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?en(t,e):rn(t,(e.s=-e.s,e))};A.precision=A.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Re+e);if(t=V(i)+1,n=i.d.length-1,r=n*F+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};A.squareRoot=A.sqrt=function(){var e,t,r,n,i,o,s,a=this,f=a.constructor;if(a.s<1){if(!a.s)return new f(0);throw Error(te+"NaN")}for(e=V(a),U=!1,i=Math.sqrt(+a),i==0||i==1/0?(t=ae(a.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Fe((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new f(t)):n=new f(i.toString()),r=f.precision,i=s=r+3;;)if(o=n,n=o.plus(ge(a,o,s+2)).times(.5),ae(o.d).slice(0,s)===(t=ae(n.d)).slice(0,s)){if(t=t.slice(s-3,s+1),i==s&&t=="4999"){if(_(o,r+1,0),o.times(o).eq(a)){n=o;break}}else if(t!="9999")break;s+=4}return U=!0,_(n,r)};A.times=A.mul=function(e){var t,r,n,i,o,s,a,f,v,C=this,T=C.constructor,O=C.d,R=(e=new T(e)).d;if(!C.s||!e.s)return new T(0);for(e.s*=C.s,r=C.e+e.e,f=O.length,v=R.length,f=0;){for(t=0,i=f+n;i>n;)a=o[i]+R[n]*O[i-n-1]+t,o[i--]=a%j|0,t=a/j|0;o[i]=(o[i]+t)%j|0}for(;!o[--s];)o.pop();return t?++r:o.shift(),e.d=o,e.e=r,U?_(e,T.precision):e};A.toDecimalPlaces=A.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(le(e,0,De),t===void 0?t=n.rounding:le(t,0,8),_(r,e+V(r)+1,t))};A.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=Se(n,!0):(le(e,0,De),t===void 0?t=i.rounding:le(t,0,8),n=_(new i(n),e+1,t),r=Se(n,!0,e+1)),r};A.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?Se(i):(le(e,0,De),t===void 0?t=o.rounding:le(t,0,8),n=_(new o(i),e+V(i)+1,t),r=Se(n.abs(),!1,e+V(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};A.toInteger=A.toint=function(){var e=this,t=e.constructor;return _(new t(e),V(e)+1,t.rounding)};A.toNumber=function(){return+this};A.toPower=A.pow=function(e){var t,r,n,i,o,s,a=this,f=a.constructor,v=12,C=+(e=new f(e));if(!e.s)return new f(Z);if(a=new f(a),!a.s){if(e.s<1)throw Error(te+"Infinity");return a}if(a.eq(Z))return a;if(n=f.precision,e.eq(Z))return _(a,n);if(t=e.e,r=e.d.length-1,s=t>=r,o=a.s,s){if((r=C<0?-C:C)<=Zr){for(i=new f(Z),t=Math.ceil(n/F+4),U=!1;r%2&&(i=i.times(a),Xr(i.d,t)),r=Fe(r/2),r!==0;)a=a.times(a),Xr(a.d,t);return U=!0,e.s<0?new f(Z).div(i):_(i,n)}}else if(o<0)throw Error(te+"NaN");return o=o<0&&e.d[Math.max(t,r)]&1?-1:1,a.s=1,U=!1,i=e.times(Ye(a,n+v)),U=!0,i=tn(i),i.s=o,i};A.toPrecision=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?(r=V(i),n=Se(i,r<=o.toExpNeg||r>=o.toExpPos)):(le(e,1,De),t===void 0?t=o.rounding:le(t,0,8),i=_(new o(i),e,t),r=V(i),n=Se(i,e<=r||r<=o.toExpNeg,e)),n};A.toSignificantDigits=A.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(le(e,1,De),t===void 0?t=n.rounding:le(t,0,8)),_(new n(r),e,t)};A.toString=A.valueOf=A.val=A.toJSON=A[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=V(e),r=e.constructor;return Se(e,t<=r.toExpNeg||t>=r.toExpPos)};ge=function(){function e(n,i){var o,s=0,a=n.length;for(n=n.slice();a--;)o=n[a]*i+s,n[a]=o%j|0,s=o/j|0;return s&&n.unshift(s),n}function t(n,i,o,s){var a,f;if(o!=s)f=o>s?1:-1;else for(a=f=0;ai[a]?1:-1;break}return f}function r(n,i,o){for(var s=0;o--;)n[o]-=s,s=n[o]1;)n.shift()}return function(n,i,o,s){var a,f,v,C,T,O,R,L,S,M,ne,z,Ie,k,Ce,sr,ie,bt,wt=n.constructor,Oo=n.s==i.s?1:-1,se=n.d,B=i.d;if(!n.s)return new wt(n);if(!i.s)throw Error(te+"Division by zero");for(f=n.e-i.e,ie=B.length,Ce=se.length,R=new wt(Oo),L=R.d=[],v=0;B[v]==(se[v]||0);)++v;if(B[v]>(se[v]||0)&&--f,o==null?z=o=wt.precision:s?z=o+(V(n)-V(i))+1:z=o,z<0)return new wt(0);if(z=z/F+2|0,v=0,ie==1)for(C=0,B=B[0],z++;(v1&&(B=e(B,C),se=e(se,C),ie=B.length,Ce=se.length),k=ie,S=se.slice(0,ie),M=S.length;M=j/2&&++sr;do C=0,a=t(B,S,ie,M),a<0?(ne=S[0],ie!=M&&(ne=ne*j+(S[1]||0)),C=ne/sr|0,C>1?(C>=j&&(C=j-1),T=e(B,C),O=T.length,M=S.length,a=t(T,S,O,M),a==1&&(C--,r(T,ie{"use strict";on();P=class extends vt{static isDecimal(t){return t instanceof vt}static random(t=20){{let n=crypto.getRandomValues(new Uint8Array(t)).reduce((i,o)=>i+o,"");return new vt(`0.${n.slice(0,t)}`)}}},ue=P});function Wo(){return!1}var Go,Ko,un,cn=oe(()=>{"use strict";u();c();m();p();d();l();Go={},Ko={existsSync:Wo,promises:Go},un=Ko});var xn=Te((Au,En)=>{"use strict";u();c();m();p();d();l();En.exports=(yr(),ar(hr)).format});var hr={};ze(hr,{default:()=>Yo,deprecate:()=>vn,format:()=>Tn,inspect:()=>Cn,promisify:()=>Pn});function Pn(e){return(...t)=>new Promise((r,n)=>{e(...t,(i,o)=>{i?n(i):r(o)})})}function vn(e,t){return(...r)=>(console.warn(t),e(...r))}function Cn(e){return JSON.stringify(e,(t,r)=>typeof r=="function"?r.toString():typeof r=="bigint"?`${r}n`:r instanceof Error?{...r,message:r.message,stack:r.stack}:r)}var Tn,zo,Yo,yr=oe(()=>{"use strict";u();c();m();p();d();l();Tn=xn(),zo={promisify:Pn,deprecate:vn,inspect:Cn,format:Tn},Yo=zo});function rs(...e){return e.join("/")}function ns(...e){return e.join("/")}var On,is,os,Ze,kn=oe(()=>{"use strict";u();c();m();p();d();l();On="/",is={sep:On},os={resolve:rs,posix:is,join:ns,sep:On},Ze=os});var St,Mn=oe(()=>{"use strict";u();c();m();p();d();l();St=class{constructor(){this.events={}}on(t,r){return this.events[t]||(this.events[t]=[]),this.events[t].push(r),this}emit(t,...r){return this.events[t]?(this.events[t].forEach(n=>{n(...r)}),!0):!1}}});var _n=Te((Kc,In)=>{"use strict";u();c();m();p();d();l();In.exports=(e,t=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof e!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof e}\``);if(typeof t!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof t}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(t===0)return e;let n=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return e.replace(n,r.indent.repeat(t))}});var Nn=Te((lm,Fn)=>{"use strict";u();c();m();p();d();l();Fn.exports=({onlyFirst:e=!1}={})=>{let t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")}});var Bn=Te((gm,Un)=>{"use strict";u();c();m();p();d();l();var ms=Nn();Un.exports=e=>typeof e=="string"?e.replace(ms(),""):e});var jn=Te((Jf,gs)=>{gs.exports={name:"@prisma/engines-version",version:"5.15.0-29.12e25d8d06f6ea5a0252864dd9a03b1bb51f3022",main:"index.js",types:"index.d.ts",license:"Apache-2.0",author:"Tim Suchanek ",prisma:{enginesVersion:"12e25d8d06f6ea5a0252864dd9a03b1bb51f3022"},repository:{type:"git",url:"https://github.com/prisma/engines-wrapper.git",directory:"packages/engines-version"},devDependencies:{"@types/node":"18.19.33",typescript:"4.9.5"},files:["index.js","index.d.ts"],scripts:{build:"tsc -d"}}});var Qn=Te(()=>{"use strict";u();c();m();p();d();l()});var Br=Te((ST,Fi)=>{"use strict";u();c();m();p();d();l();Fi.exports=function(){function e(t,r,n,i,o){return tn?n+1:t+1:i===o?r:r+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var i=t.length,o=r.length;i>0&&t.charCodeAt(i-1)===r.charCodeAt(o-1);)i--,o--;for(var s=0;swr,Decimal:()=>ue,Extensions:()=>dr,MetricsClient:()=>Be,NotFoundError:()=>he,PrismaClientInitializationError:()=>I,PrismaClientKnownRequestError:()=>Q,PrismaClientRustPanicError:()=>ye,PrismaClientUnknownRequestError:()=>J,PrismaClientValidationError:()=>W,Public:()=>fr,Sql:()=>X,defineDmmfProperty:()=>qn,empty:()=>Wn,getPrismaClient:()=>Ao,getRuntime:()=>Pe,join:()=>Jn,makeStrictEnum:()=>Ro,objectEnumValues:()=>Lt,raw:()=>kr,sqltag:()=>Lr,warnEnvConflicts:()=>void 0,warnOnce:()=>nt});module.exports=ar(Ya);u();c();m();p();d();l();var dr={};ze(dr,{defineExtension:()=>sn,getExtensionContext:()=>an});u();c();m();p();d();l();u();c();m();p();d();l();function sn(e){return typeof e=="function"?e:t=>t.$extends(e)}u();c();m();p();d();l();function an(e){return e}var fr={};ze(fr,{validator:()=>ln});u();c();m();p();d();l();u();c();m();p();d();l();function ln(...e){return t=>t}u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();var gr,mn,pn,dn,fn=!0;typeof g<"u"&&({FORCE_COLOR:gr,NODE_DISABLE_COLORS:mn,NO_COLOR:pn,TERM:dn}=g.env||{},fn=g.stdout&&g.stdout.isTTY);var Ho={enabled:!mn&&pn==null&&dn!=="dumb"&&(gr!=null&&gr!=="0"||fn)};function D(e,t){let r=new RegExp(`\\x1b\\[${t}m`,"g"),n=`\x1B[${e}m`,i=`\x1B[${t}m`;return function(o){return!Ho.enabled||o==null?o:n+(~(""+o).indexOf(i)?o.replace(r,i+n):o)+i}}var ru=D(0,0),Ct=D(1,22),Tt=D(2,22),nu=D(3,23),gn=D(4,24),iu=D(7,27),ou=D(8,28),su=D(9,29),au=D(30,39),Ne=D(31,39),hn=D(32,39),At=D(33,39),yn=D(34,39),lu=D(35,39),bn=D(36,39),uu=D(37,39),wn=D(90,39),cu=D(90,39),mu=D(40,49),pu=D(41,49),du=D(42,49),fu=D(43,49),gu=D(44,49),hu=D(45,49),yu=D(46,49),bu=D(47,49);u();c();m();p();d();l();var Xo=100,An=["green","yellow","blue","magenta","cyan","red"],Rt=[],Rn=Date.now(),Zo=0,br=typeof g<"u"?g.env:{};globalThis.DEBUG??=br.DEBUG??"";globalThis.DEBUG_COLORS??=br.DEBUG_COLORS?br.DEBUG_COLORS==="true":!0;var Xe={enable(e){typeof e=="string"&&(globalThis.DEBUG=e)},disable(){let e=globalThis.DEBUG;return globalThis.DEBUG="",e},enabled(e){let t=globalThis.DEBUG.split(",").map(i=>i.replace(/[.+?^${}()|[\]\\]/g,"\\$&")),r=t.some(i=>i===""||i[0]==="-"?!1:e.match(RegExp(i.split("*").join(".*")+"$"))),n=t.some(i=>i===""||i[0]!=="-"?!1:e.match(RegExp(i.slice(1).split("*").join(".*")+"$")));return r&&!n},log:(...e)=>{let[t,r,...n]=e,i;typeof require=="function"&&typeof g<"u"&&typeof g.stderr<"u"&&typeof g.stderr.write=="function"?i=(...o)=>{try{let s=(yr(),ar(hr));g.stderr.write(s.format(...o)+` `)}catch{i=console.warn??console.log}}:i=console.warn??console.log,i(`${t} ${r}`,...n)},formatters:{}};function es(e){let t={color:An[Zo++%An.length],enabled:Xe.enabled(e),namespace:e,log:Xe.log,extend:()=>{}},r=(...n)=>{let{enabled:i,namespace:o,color:s,log:a}=t;if(n.length!==0&&Rt.push([o,...n]),Rt.length>Xo&&Rt.shift(),Xe.enabled(o)||i){let f=n.map(C=>typeof C=="string"?C:ts(C)),v=`+${Date.now()-Rn}ms`;Rn=Date.now(),a(o,...f,v)}};return new Proxy(r,{get:(n,i)=>t[i],set:(n,i,o)=>t[i]=o})}var wr=new Proxy(es,{get:(e,t)=>Xe[t],set:(e,t,r)=>Xe[t]=r});function ts(e,t=2){let r=new Set;return JSON.stringify(e,(n,i)=>{if(typeof i=="object"&&i!==null){if(r.has(i))return"[Circular *]";r.add(i)}else if(typeof i=="bigint")return i.toString();return i},t)}function Sn(){Rt.length=0}var ee=wr;u();c();m();p();d();l();u();c();m();p();d();l();var Er=["darwin","darwin-arm64","debian-openssl-1.0.x","debian-openssl-1.1.x","debian-openssl-3.0.x","rhel-openssl-1.0.x","rhel-openssl-1.1.x","rhel-openssl-3.0.x","linux-arm64-openssl-1.1.x","linux-arm64-openssl-1.0.x","linux-arm64-openssl-3.0.x","linux-arm-openssl-1.1.x","linux-arm-openssl-1.0.x","linux-arm-openssl-3.0.x","linux-musl","linux-musl-openssl-3.0.x","linux-musl-arm64-openssl-1.1.x","linux-musl-arm64-openssl-3.0.x","linux-nixos","linux-static-x64","linux-static-arm64","windows","freebsd11","freebsd12","freebsd13","freebsd14","freebsd15","openbsd","netbsd","arm"];u();c();m();p();d();l();var Ln="library";function et(e){let t=ss();return t||(e?.config.engineType==="library"?"library":e?.config.engineType==="binary"?"binary":Ln)}function ss(){let e=g.env.PRISMA_CLIENT_ENGINE_TYPE;return e==="library"?"library":e==="binary"?"binary":void 0}u();c();m();p();d();l();u();c();m();p();d();l();var Oe;(t=>{let e;(k=>(k.findUnique="findUnique",k.findUniqueOrThrow="findUniqueOrThrow",k.findFirst="findFirst",k.findFirstOrThrow="findFirstOrThrow",k.findMany="findMany",k.create="create",k.createMany="createMany",k.createManyAndReturn="createManyAndReturn",k.update="update",k.updateMany="updateMany",k.upsert="upsert",k.delete="delete",k.deleteMany="deleteMany",k.groupBy="groupBy",k.count="count",k.aggregate="aggregate",k.findRaw="findRaw",k.aggregateRaw="aggregateRaw"))(e=t.ModelAction||={})})(Oe||={});var rt={};ze(rt,{error:()=>us,info:()=>ls,log:()=>as,query:()=>cs,should:()=>Dn,tags:()=>tt,warn:()=>xr});u();c();m();p();d();l();var tt={error:Ne("prisma:error"),warn:At("prisma:warn"),info:bn("prisma:info"),query:yn("prisma:query")},Dn={warn:()=>!g.env.PRISMA_DISABLE_WARNINGS};function as(...e){console.log(...e)}function xr(e,...t){Dn.warn()&&console.warn(`${tt.warn} ${e}`,...t)}function ls(e,...t){console.info(`${tt.info} ${e}`,...t)}function us(e,...t){console.error(`${tt.error} ${e}`,...t)}function cs(e,...t){console.log(`${tt.query} ${e}`,...t)}u();c();m();p();d();l();function Ot(e,t){if(!e)throw new Error(`${t}. This should never happen. If you see this error, please, open an issue at https://pris.ly/prisma-prisma-bug-report`)}u();c();m();p();d();l();function ke(e,t){throw new Error(t)}u();c();m();p();d();l();function Pr(e,t){return Object.prototype.hasOwnProperty.call(e,t)}u();c();m();p();d();l();var vr=(e,t)=>e.reduce((r,n)=>(r[t(n)]=n,r),{});u();c();m();p();d();l();function Ue(e,t){let r={};for(let n of Object.keys(e))r[n]=t(e[n],n);return r}u();c();m();p();d();l();function Cr(e,t){if(e.length===0)return;let r=e[0];for(let n=1;n{$n.has(e)||($n.add(e),xr(t,...r))};u();c();m();p();d();l();var Q=class extends Error{constructor(t,{code:r,clientVersion:n,meta:i,batchRequestIdx:o}){super(t),this.name="PrismaClientKnownRequestError",this.code=r,this.clientVersion=n,this.meta=i,Object.defineProperty(this,"batchRequestIdx",{value:o,enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return"PrismaClientKnownRequestError"}};K(Q,"PrismaClientKnownRequestError");var he=class extends Q{constructor(t,r){super(t,{code:"P2025",clientVersion:r}),this.name="NotFoundError"}};K(he,"NotFoundError");u();c();m();p();d();l();var I=class e extends Error{constructor(t,r,n){super(t),this.name="PrismaClientInitializationError",this.clientVersion=r,this.errorCode=n,Error.captureStackTrace(e)}get[Symbol.toStringTag](){return"PrismaClientInitializationError"}};K(I,"PrismaClientInitializationError");u();c();m();p();d();l();var ye=class extends Error{constructor(t,r){super(t),this.name="PrismaClientRustPanicError",this.clientVersion=r}get[Symbol.toStringTag](){return"PrismaClientRustPanicError"}};K(ye,"PrismaClientRustPanicError");u();c();m();p();d();l();var J=class extends Error{constructor(t,{clientVersion:r,batchRequestIdx:n}){super(t),this.name="PrismaClientUnknownRequestError",this.clientVersion=r,Object.defineProperty(this,"batchRequestIdx",{value:n,writable:!0,enumerable:!1})}get[Symbol.toStringTag](){return"PrismaClientUnknownRequestError"}};K(J,"PrismaClientUnknownRequestError");u();c();m();p();d();l();var W=class extends Error{constructor(r,{clientVersion:n}){super(r);this.name="PrismaClientValidationError";this.clientVersion=n}get[Symbol.toStringTag](){return"PrismaClientValidationError"}};K(W,"PrismaClientValidationError");u();c();m();p();d();l();var Be=class{constructor(t){this._engine=t}prometheus(t){return this._engine.metrics({format:"prometheus",...t})}json(t){return this._engine.metrics({format:"json",...t})}};u();c();m();p();d();l();u();c();m();p();d();l();function it(e){let t;return{get(){return t||(t={value:e()}),t.value}}}function qn(e,t){let r=it(()=>ps(t));Object.defineProperty(e,"dmmf",{get:()=>r.get()})}function ps(e){throw new Error("Prisma.dmmf is not available when running in edge runtimes.")}function Tr(e){return Object.entries(e).map(([t,r])=>({name:t,...r}))}u();c();m();p();d();l();var kt=Symbol(),Ar=new WeakMap,be=class{constructor(t){t===kt?Ar.set(this,`Prisma.${this._getName()}`):Ar.set(this,`new Prisma.${this._getNamespace()}.${this._getName()}()`)}_getName(){return this.constructor.name}toString(){return Ar.get(this)}},ot=class extends be{_getNamespace(){return"NullTypes"}},st=class extends ot{};Rr(st,"DbNull");var at=class extends ot{};Rr(at,"JsonNull");var lt=class extends ot{};Rr(lt,"AnyNull");var Lt={classes:{DbNull:st,JsonNull:at,AnyNull:lt},instances:{DbNull:new st(kt),JsonNull:new at(kt),AnyNull:new lt(kt)}};function Rr(e,t){Object.defineProperty(e,"name",{value:t,configurable:!0})}u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();function ut(e){return{ok:!1,error:e,map(){return ut(e)},flatMap(){return ut(e)}}}var Sr=class{constructor(){this.registeredErrors=[]}consumeError(t){return this.registeredErrors[t]}registerNewError(t){let r=0;for(;this.registeredErrors[r]!==void 0;)r++;return this.registeredErrors[r]={error:t},r}},Or=e=>{let t=new Sr,r=Le(t,e.startTransaction.bind(e)),n={adapterName:e.adapterName,errorRegistry:t,queryRaw:Le(t,e.queryRaw.bind(e)),executeRaw:Le(t,e.executeRaw.bind(e)),provider:e.provider,startTransaction:async(...i)=>(await r(...i)).map(s=>ds(t,s))};return e.getConnectionInfo&&(n.getConnectionInfo=fs(t,e.getConnectionInfo.bind(e))),n},ds=(e,t)=>({adapterName:t.adapterName,provider:t.provider,options:t.options,queryRaw:Le(e,t.queryRaw.bind(t)),executeRaw:Le(e,t.executeRaw.bind(t)),commit:Le(e,t.commit.bind(t)),rollback:Le(e,t.rollback.bind(t))});function Le(e,t){return async(...r)=>{try{return await t(...r)}catch(n){let i=e.registerNewError(n);return ut({kind:"GenericJs",id:i})}}}function fs(e,t){return(...r)=>{try{return t(...r)}catch(n){let i=e.registerNewError(n);return ut({kind:"GenericJs",id:i})}}}var To=_e(jn());var cO=_e(Qn());Mn();cn();kn();u();c();m();p();d();l();var X=class e{constructor(t,r){if(t.length-1!==r.length)throw t.length===0?new TypeError("Expected at least 1 string"):new TypeError(`Expected ${t.length} strings to have ${t.length-1} values`);let n=r.reduce((s,a)=>s+(a instanceof e?a.values.length:1),0);this.values=new Array(n),this.strings=new Array(n+1),this.strings[0]=t[0];let i=0,o=0;for(;ie.getPropertyValue(r))},getPropertyDescriptor(r){return e.getPropertyDescriptor?.(r)}}}u();c();m();p();d();l();u();c();m();p();d();l();var Mt={enumerable:!0,configurable:!0,writable:!0};function It(e){let t=new Set(e);return{getOwnPropertyDescriptor:()=>Mt,has:(r,n)=>t.has(n),set:(r,n,i)=>t.add(n)&&Reflect.set(r,n,i),ownKeys:()=>[...t]}}var Gn=Symbol.for("nodejs.util.inspect.custom");function me(e,t){let r=hs(t),n=new Set,i=new Proxy(e,{get(o,s){if(n.has(s))return o[s];let a=r.get(s);return a?a.getPropertyValue(s):o[s]},has(o,s){if(n.has(s))return!0;let a=r.get(s);return a?a.has?.(s)??!0:Reflect.has(o,s)},ownKeys(o){let s=Kn(Reflect.ownKeys(o),r),a=Kn(Array.from(r.keys()),r);return[...new Set([...s,...a,...n])]},set(o,s,a){return r.get(s)?.getPropertyDescriptor?.(s)?.writable===!1?!1:(n.add(s),Reflect.set(o,s,a))},getOwnPropertyDescriptor(o,s){let a=Reflect.getOwnPropertyDescriptor(o,s);if(a&&!a.configurable)return a;let f=r.get(s);return f?f.getPropertyDescriptor?{...Mt,...f?.getPropertyDescriptor(s)}:Mt:a},defineProperty(o,s,a){return n.add(s),Reflect.defineProperty(o,s,a)}});return i[Gn]=function(){let o={...this};return delete o[Gn],o},i}function hs(e){let t=new Map;for(let r of e){let n=r.getKeys();for(let i of n)t.set(i,r)}return t}function Kn(e,t){return e.filter(r=>t.get(r)?.has?.(r)??!0)}u();c();m();p();d();l();function $e(e){return{getKeys(){return e},has(){return!1},getPropertyValue(){}}}u();c();m();p();d();l();function _t(e,t){return{batch:e,transaction:t?.kind==="batch"?{isolationLevel:t.options.isolationLevel}:void 0}}u();c();m();p();d();l();u();c();m();p();d();l();var Ve=class{constructor(t=0,r){this.context=r;this.lines=[];this.currentLine="";this.currentIndent=0;this.currentIndent=t}write(t){return typeof t=="string"?this.currentLine+=t:t.write(this),this}writeJoined(t,r){let n=r.length-1;for(let i=0;i0&&this.currentIndent--,this}addMarginSymbol(t){return this.marginSymbol=t,this}toString(){return this.lines.concat(this.indentedCurrentLine()).join(` `)}getCurrentLineLength(){return this.currentLine.length}indentedCurrentLine(){let t=this.currentLine.padStart(this.currentLine.length+2*this.currentIndent);return this.marginSymbol?this.marginSymbol+t.slice(1):t}};u();c();m();p();d();l();u();c();m();p();d();l();function Hn(e){return e.substring(0,1).toLowerCase()+e.substring(1)}u();c();m();p();d();l();function qe(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function Dt(e){return e.toString()!=="Invalid Date"}u();c();m();p();d();l();l();function je(e){return P.isDecimal(e)?!0:e!==null&&typeof e=="object"&&typeof e.s=="number"&&typeof e.e=="number"&&typeof e.toFixed=="function"&&Array.isArray(e.d)}u();c();m();p();d();l();var mt=class{constructor(t,r,n,i,o){this.modelName=t,this.name=r,this.typeName=n,this.isList=i,this.isEnum=o}_toGraphQLInputType(){let t=this.isList?"List":"",r=this.isEnum?"Enum":"";return`${t}${r}${this.typeName}FieldRefInput<${this.modelName}>`}};function Qe(e){return e instanceof mt}u();c();m();p();d();l();u();c();m();p();d();l();var Ft=class{constructor(t){this.value=t}write(t){t.write(this.value)}markAsError(){this.value.markAsError()}};u();c();m();p();d();l();var Nt=e=>e,Ut={bold:Nt,red:Nt,green:Nt,dim:Nt,enabled:!1},zn={bold:Ct,red:Ne,green:hn,dim:Tt,enabled:!0},Je={write(e){e.writeLine(",")}};u();c();m();p();d();l();var pe=class{constructor(t){this.contents=t;this.isUnderlined=!1;this.color=t=>t}underline(){return this.isUnderlined=!0,this}setColor(t){return this.color=t,this}write(t){let r=t.getCurrentLineLength();t.write(this.color(this.contents)),this.isUnderlined&&t.afterNextNewline(()=>{t.write(" ".repeat(r)).writeLine(this.color("~".repeat(this.contents.length)))})}};u();c();m();p();d();l();var Ee=class{constructor(){this.hasError=!1}markAsError(){return this.hasError=!0,this}};var We=class extends Ee{constructor(){super(...arguments);this.items=[]}addItem(r){return this.items.push(new Ft(r)),this}getField(r){return this.items[r]}getPrintWidth(){return this.items.length===0?2:Math.max(...this.items.map(n=>n.value.getPrintWidth()))+2}write(r){if(this.items.length===0){this.writeEmpty(r);return}this.writeWithItems(r)}writeEmpty(r){let n=new pe("[]");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithItems(r){let{colors:n}=r.context;r.writeLine("[").withIndent(()=>r.writeJoined(Je,this.items).newLine()).write("]"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(n.red("~".repeat(this.getPrintWidth())))})}asObject(){}};u();c();m();p();d();l();var Yn=": ",Bt=class{constructor(t,r){this.name=t;this.value=r;this.hasError=!1}markAsError(){this.hasError=!0}getPrintWidth(){return this.name.length+this.value.getPrintWidth()+Yn.length}write(t){let r=new pe(this.name);this.hasError&&r.underline().setColor(t.context.colors.red),t.write(r).write(Yn).write(this.value)}};u();c();m();p();d();l();var $t=class e extends Ee{constructor(){super(...arguments);this.fields={};this.suggestions=[]}addField(r){this.fields[r.name]=r}addSuggestion(r){this.suggestions.push(r)}getField(r){return this.fields[r]}getDeepField(r){let[n,...i]=r,o=this.getField(n);if(!o)return;let s=o;for(let a of i){let f;if(s.value instanceof e?f=s.value.getField(a):s.value instanceof We&&(f=s.value.getField(Number(a))),!f)return;s=f}return s}getDeepFieldValue(r){return r.length===0?this:this.getDeepField(r)?.value}hasField(r){return!!this.getField(r)}removeAllFields(){this.fields={}}removeField(r){delete this.fields[r]}getFields(){return this.fields}isEmpty(){return Object.keys(this.fields).length===0}getFieldValue(r){return this.getField(r)?.value}getDeepSubSelectionValue(r){let n=this;for(let i of r){if(!(n instanceof e))return;let o=n.getSubSelectionValue(i);if(!o)return;n=o}return n}getDeepSelectionParent(r){let n=this.getSelectionParent();if(!n)return;let i=n;for(let o of r){let s=i.value.getFieldValue(o);if(!s||!(s instanceof e))return;let a=s.getSelectionParent();if(!a)return;i=a}return i}getSelectionParent(){let r=this.getField("select")?.value.asObject();if(r)return{kind:"select",value:r};let n=this.getField("include")?.value.asObject();if(n)return{kind:"include",value:n}}getSubSelectionValue(r){return this.getSelectionParent()?.value.fields[r].value}getPrintWidth(){let r=Object.values(this.fields);return r.length==0?2:Math.max(...r.map(i=>i.getPrintWidth()))+2}write(r){let n=Object.values(this.fields);if(n.length===0&&this.suggestions.length===0){this.writeEmpty(r);return}this.writeWithContents(r,n)}asObject(){return this}writeEmpty(r){let n=new pe("{}");this.hasError&&n.setColor(r.context.colors.red).underline(),r.write(n)}writeWithContents(r,n){r.writeLine("{").withIndent(()=>{r.writeJoined(Je,[...n,...this.suggestions]).newLine()}),r.write("}"),this.hasError&&r.afterNextNewline(()=>{r.writeLine(r.context.colors.red("~".repeat(this.getPrintWidth())))})}};u();c();m();p();d();l();var G=class extends Ee{constructor(r){super();this.text=r}getPrintWidth(){return this.text.length}write(r){let n=new pe(this.text);this.hasError&&n.underline().setColor(r.context.colors.red),r.write(n)}asObject(){}};var Mr=class{constructor(t){this.errorMessages=[];this.arguments=t}write(t){t.write(this.arguments)}addErrorMessage(t){this.errorMessages.push(t)}renderAllMessages(t){return this.errorMessages.map(r=>r(t)).join(` `)}};function Vt(e){return new Mr(Xn(e))}function Xn(e){let t=new $t;for(let[r,n]of Object.entries(e)){let i=new Bt(r,Zn(n));t.addField(i)}return t}function Zn(e){if(typeof e=="string")return new G(JSON.stringify(e));if(typeof e=="number"||typeof e=="boolean")return new G(String(e));if(typeof e=="bigint")return new G(`${e}n`);if(e===null)return new G("null");if(e===void 0)return new G("undefined");if(je(e))return new G(`new Prisma.Decimal("${e.toFixed()}")`);if(e instanceof Uint8Array)return y.isBuffer(e)?new G(`Buffer.alloc(${e.byteLength})`):new G(`new Uint8Array(${e.byteLength})`);if(e instanceof Date){let t=Dt(e)?e.toISOString():"Invalid Date";return new G(`new Date("${t}")`)}return e instanceof be?new G(`Prisma.${e._getName()}`):Qe(e)?new G(`prisma.${Hn(e.modelName)}.$fields.${e.name}`):Array.isArray(e)?bs(e):typeof e=="object"?Xn(e):new G(Object.prototype.toString.call(e))}function bs(e){let t=new We;for(let r of e)t.addItem(Zn(r));return t}function ei(e){if(e===void 0)return"";let t=Vt(e);return new Ve(0,{colors:Ut}).write(t).toString()}u();c();m();p();d();l();var ws="P2037";function qt({error:e,user_facing_error:t},r,n){return t.error_code?new Q(Es(t,n),{code:t.error_code,clientVersion:r,meta:t.meta,batchRequestIdx:t.batch_request_idx}):new J(e,{clientVersion:r,batchRequestIdx:t.batch_request_idx})}function Es(e,t){let r=e.message;return(t==="postgresql"||t==="postgres"||t==="mysql")&&e.error_code===ws&&(r+=` Prisma Accelerate has built-in connection pooling to prevent such errors: https://pris.ly/client/error-accelerate`),r}u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();var Ir=class{getLocation(){return null}};function xe(e){return typeof $EnabledCallSite=="function"&&e!=="minimal"?new $EnabledCallSite:new Ir}u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();var ti={_avg:!0,_count:!0,_sum:!0,_min:!0,_max:!0};function Ge(e={}){let t=Ps(e);return Object.entries(t).reduce((n,[i,o])=>(ti[i]!==void 0?n.select[i]={select:o}:n[i]=o,n),{select:{}})}function Ps(e={}){return typeof e._count=="boolean"?{...e,_count:{_all:e._count}}:e}function jt(e={}){return t=>(typeof e._count=="boolean"&&(t._count=t._count._all),t)}function ri(e,t){let r=jt(e);return t({action:"aggregate",unpacker:r,argsMapper:Ge})(e)}u();c();m();p();d();l();function vs(e={}){let{select:t,...r}=e;return typeof t=="object"?Ge({...r,_count:t}):Ge({...r,_count:{_all:!0}})}function Cs(e={}){return typeof e.select=="object"?t=>jt(e)(t)._count:t=>jt(e)(t)._count._all}function ni(e,t){return t({action:"count",unpacker:Cs(e),argsMapper:vs})(e)}u();c();m();p();d();l();function Ts(e={}){let t=Ge(e);if(Array.isArray(t.by))for(let r of t.by)typeof r=="string"&&(t.select[r]=!0);else typeof t.by=="string"&&(t.select[t.by]=!0);return t}function As(e={}){return t=>(typeof e?._count=="boolean"&&t.forEach(r=>{r._count=r._count._all}),t)}function ii(e,t){return t({action:"groupBy",unpacker:As(e),argsMapper:Ts})(e)}function oi(e,t,r){if(t==="aggregate")return n=>ri(n,r);if(t==="count")return n=>ni(n,r);if(t==="groupBy")return n=>ii(n,r)}u();c();m();p();d();l();function si(e,t){let r=t.fields.filter(i=>!i.relationName),n=vr(r,i=>i.name);return new Proxy({},{get(i,o){if(o in i||typeof o=="symbol")return i[o];let s=n[o];if(s)return new mt(e,o,s.type,s.isList,s.kind==="enum")},...It(Object.keys(n))})}u();c();m();p();d();l();u();c();m();p();d();l();var ai=e=>Array.isArray(e)?e:e.split("."),_r=(e,t)=>ai(t).reduce((r,n)=>r&&r[n],e),li=(e,t,r)=>ai(t).reduceRight((n,i,o,s)=>Object.assign({},_r(e,s.slice(0,o)),{[i]:n}),r);function Rs(e,t){return e===void 0||t===void 0?[]:[...t,"select",e]}function Ss(e,t,r){return t===void 0?e??{}:li(t,r,e||!0)}function Dr(e,t,r,n,i,o){let a=e._runtimeDataModel.models[t].fields.reduce((f,v)=>({...f,[v.name]:v}),{});return f=>{let v=xe(e._errorFormat),C=Rs(n,i),T=Ss(f,o,C),O=r({dataPath:C,callsite:v})(T),R=Os(e,t);return new Proxy(O,{get(L,S){if(!R.includes(S))return L[S];let ne=[a[S].type,r,S],z=[C,T];return Dr(e,...ne,...z)},...It([...R,...Object.getOwnPropertyNames(O)])})}}function Os(e,t){return e._runtimeDataModel.models[t].fields.filter(r=>r.kind==="object").map(r=>r.name)}u();c();m();p();d();l();u();c();m();p();d();l();var ks=_e(_n());var Ls={red:Ne,gray:wn,dim:Tt,bold:Ct,underline:gn,highlightSource:e=>e.highlight()},Ms={red:e=>e,gray:e=>e,dim:e=>e,bold:e=>e,underline:e=>e,highlightSource:e=>e};function Is({message:e,originalMethod:t,isPanic:r,callArguments:n}){return{functionName:`prisma.${t}()`,message:e,isPanic:r??!1,callArguments:n}}function _s({functionName:e,location:t,message:r,isPanic:n,contextLines:i,callArguments:o},s){let a=[""],f=t?" in":":";if(n?(a.push(s.red(`Oops, an unknown error occurred! This is ${s.bold("on us")}, you did nothing wrong.`)),a.push(s.red(`It occurred in the ${s.bold(`\`${e}\``)} invocation${f}`))):a.push(s.red(`Invalid ${s.bold(`\`${e}\``)} invocation${f}`)),t&&a.push(s.underline(Ds(t))),i){a.push("");let v=[i.toString()];o&&(v.push(o),v.push(s.dim(")"))),a.push(v.join("")),o&&a.push("")}else a.push(""),o&&a.push(o),a.push("");return a.push(r),a.join(` `)}function Ds(e){let t=[e.fileName];return e.lineNumber&&t.push(String(e.lineNumber)),e.columnNumber&&t.push(String(e.columnNumber)),t.join(":")}function Ke(e){let t=e.showColors?Ls:Ms,r;return typeof $getTemplateParameters<"u"?r=$getTemplateParameters(e,t):r=Is(e),_s(r,t)}function ui(e,t,r,n){return e===Oe.ModelAction.findFirstOrThrow||e===Oe.ModelAction.findUniqueOrThrow?Fs(t,r,n):n}function Fs(e,t,r){return async n=>{if("rejectOnNotFound"in n.args){let o=Ke({originalMethod:n.clientMethod,callsite:n.callsite,message:"'rejectOnNotFound' option is not supported"});throw new W(o,{clientVersion:t})}return await r(n).catch(o=>{throw o instanceof Q&&o.code==="P2025"?new he(`No ${e} found`,t):o})}}u();c();m();p();d();l();function de(e){return e.replace(/^./,t=>t.toLowerCase())}var Ns=["findUnique","findUniqueOrThrow","findFirst","findFirstOrThrow","create","update","upsert","delete"],Us=["aggregate","count","groupBy"];function Fr(e,t){let r=e._extensions.getAllModelExtensions(t)??{},n=[Bs(e,t),Vs(e,t),ct(r),H("name",()=>t),H("$name",()=>t),H("$parent",()=>e._appliedParent)];return me({},n)}function Bs(e,t){let r=de(t),n=Object.keys(Oe.ModelAction).concat("count");return{getKeys(){return n},getPropertyValue(i){let o=i,s=f=>e._request(f);s=ui(o,t,e._clientVersion,s);let a=f=>v=>{let C=xe(e._errorFormat);return e._createPrismaPromise(T=>{let O={args:v,dataPath:[],action:o,model:t,clientMethod:`${r}.${i}`,jsModelName:r,transaction:T,callsite:C};return s({...O,...f})})};return Ns.includes(o)?Dr(e,t,a):$s(i)?oi(e,i,a):a({})}}}function $s(e){return Us.includes(e)}function Vs(e,t){return Me(H("fields",()=>{let r=e._runtimeDataModel.models[t];return si(t,r)}))}u();c();m();p();d();l();function ci(e){return e.replace(/^./,t=>t.toUpperCase())}var Nr=Symbol();function pt(e){let t=[qs(e),H(Nr,()=>e),H("$parent",()=>e._appliedParent)],r=e._extensions.getAllClientExtensions();return r&&t.push(ct(r)),me(e,t)}function qs(e){let t=Object.keys(e._runtimeDataModel.models),r=t.map(de),n=[...new Set(t.concat(r))];return Me({getKeys(){return n},getPropertyValue(i){let o=ci(i);if(e._runtimeDataModel.models[o]!==void 0)return Fr(e,o);if(e._runtimeDataModel.models[i]!==void 0)return Fr(e,i)},getPropertyDescriptor(i){if(!r.includes(i))return{enumerable:!1}}})}function mi(e){return e[Nr]?e[Nr]:e}function pi(e){if(typeof e=="function")return e(this);if(e.client?.__AccelerateEngine){let r=e.client.__AccelerateEngine;this._originalClient._engine=new r(this._originalClient._accelerateEngineConfig)}let t=Object.create(this._originalClient,{_extensions:{value:this._extensions.append(e)},_appliedParent:{value:this,configurable:!0},$use:{value:void 0},$on:{value:void 0}});return pt(t)}u();c();m();p();d();l();u();c();m();p();d();l();function di({result:e,modelName:t,select:r,omit:n,extensions:i}){let o=i.getAllComputedFields(t);if(!o)return e;let s=[],a=[];for(let f of Object.values(o)){if(n){if(n[f.name])continue;let v=f.needs.filter(C=>n[C]);v.length>0&&a.push($e(v))}else if(r){if(!r[f.name])continue;let v=f.needs.filter(C=>!r[C]);v.length>0&&a.push($e(v))}js(e,f.needs)&&s.push(Qs(f,me(e,s)))}return s.length>0||a.length>0?me(e,[...s,...a]):e}function js(e,t){return t.every(r=>Pr(e,r))}function Qs(e,t){return Me(H(e.name,()=>e.compute(t)))}u();c();m();p();d();l();function Qt({visitor:e,result:t,args:r,runtimeDataModel:n,modelName:i}){if(Array.isArray(t)){for(let s=0;sC.name===o);if(!f||f.kind!=="object"||!f.relationName)continue;let v=typeof s=="object"?s:{};t[o]=Qt({visitor:i,result:t[o],args:v,modelName:f.type,runtimeDataModel:n})}}function gi({result:e,modelName:t,args:r,extensions:n,runtimeDataModel:i}){return n.isEmpty()||e==null||typeof e!="object"||!i.models[t]?e:Qt({result:e,args:r??{},modelName:t,runtimeDataModel:i,visitor:(s,a,f)=>di({result:s,modelName:de(a),select:f.select,omit:f.omit,extensions:n})})}u();c();m();p();d();l();u();c();m();p();d();l();l();function hi(e){if(e instanceof X)return Js(e);if(Array.isArray(e)){let r=[e[0]];for(let n=1;n{let o=t.customDataProxyFetch;return"transaction"in t&&i!==void 0&&(t.transaction?.kind==="batch"&&t.transaction.lock.then(),t.transaction=i),n===r.length?e._executeRequest(t):r[n]({model:t.model,operation:t.model?t.action:t.clientMethod,args:hi(t.args??{}),__internalParams:t,query:(s,a=t)=>{let f=a.customDataProxyFetch;return a.customDataProxyFetch=Pi(o,f),a.args=s,bi(e,a,r,n+1)}})})}function wi(e,t){let{jsModelName:r,action:n,clientMethod:i}=t,o=r?n:i;if(e._extensions.isEmpty())return e._executeRequest(t);let s=e._extensions.getAllQueryCallbacks(r??"$none",o);return bi(e,t,s)}function Ei(e){return t=>{let r={requests:t},n=t[0].extensions.getAllBatchQueryCallbacks();return n.length?xi(r,n,0,e):e(r)}}function xi(e,t,r,n){if(r===t.length)return n(e);let i=e.customDataProxyFetch,o=e.requests[0].transaction;return t[r]({args:{queries:e.requests.map(s=>({model:s.modelName,operation:s.action,args:s.args})),transaction:o?{isolationLevel:o.kind==="batch"?o.isolationLevel:void 0}:void 0},__internalParams:e,query(s,a=e){let f=a.customDataProxyFetch;return a.customDataProxyFetch=Pi(i,f),xi(a,t,r+1,n)}})}var yi=e=>e;function Pi(e=yi,t=yi){return r=>e(t(r))}u();c();m();p();d();l();u();c();m();p();d();l();function Ci(e,t,r){let n=de(r);return!t.result||!(t.result.$allModels||t.result[n])?e:Ws({...e,...vi(t.name,e,t.result.$allModels),...vi(t.name,e,t.result[n])})}function Ws(e){let t=new ce,r=(n,i)=>t.getOrCreate(n,()=>i.has(n)?[n]:(i.add(n),e[n]?e[n].needs.flatMap(o=>r(o,i)):[n]));return Ue(e,n=>({...n,needs:r(n.name,new Set)}))}function vi(e,t,r){return r?Ue(r,({needs:n,compute:i},o)=>({name:o,needs:n?Object.keys(n).filter(s=>n[s]):[],compute:Gs(t,o,i)})):{}}function Gs(e,t,r){let n=e?.[t]?.compute;return n?i=>r({...i,[t]:n(i)}):r}function Ti(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(e[n.name])for(let i of n.needs)r[i]=!0;return r}function Ai(e,t){if(!t)return e;let r={...e};for(let n of Object.values(t))if(!e[n.name])for(let i of n.needs)delete r[i];return r}var Jt=class{constructor(t,r){this.extension=t;this.previous=r;this.computedFieldsCache=new ce;this.modelExtensionsCache=new ce;this.queryCallbacksCache=new ce;this.clientExtensions=it(()=>this.extension.client?{...this.previous?.getAllClientExtensions(),...this.extension.client}:this.previous?.getAllClientExtensions());this.batchCallbacks=it(()=>{let t=this.previous?.getAllBatchQueryCallbacks()??[],r=this.extension.query?.$__internalBatch;return r?t.concat(r):t})}getAllComputedFields(t){return this.computedFieldsCache.getOrCreate(t,()=>Ci(this.previous?.getAllComputedFields(t),this.extension,t))}getAllClientExtensions(){return this.clientExtensions.get()}getAllModelExtensions(t){return this.modelExtensionsCache.getOrCreate(t,()=>{let r=de(t);return!this.extension.model||!(this.extension.model[r]||this.extension.model.$allModels)?this.previous?.getAllModelExtensions(t):{...this.previous?.getAllModelExtensions(t),...this.extension.model.$allModels,...this.extension.model[r]}})}getAllQueryCallbacks(t,r){return this.queryCallbacksCache.getOrCreate(`${t}:${r}`,()=>{let n=this.previous?.getAllQueryCallbacks(t,r)??[],i=[],o=this.extension.query;return!o||!(o[t]||o.$allModels||o[r]||o.$allOperations)?n:(o[t]!==void 0&&(o[t][r]!==void 0&&i.push(o[t][r]),o[t].$allOperations!==void 0&&i.push(o[t].$allOperations)),t!=="$none"&&o.$allModels!==void 0&&(o.$allModels[r]!==void 0&&i.push(o.$allModels[r]),o.$allModels.$allOperations!==void 0&&i.push(o.$allModels.$allOperations)),o[r]!==void 0&&i.push(o[r]),o.$allOperations!==void 0&&i.push(o.$allOperations),n.concat(i))})}getAllBatchQueryCallbacks(){return this.batchCallbacks.get()}},Wt=class e{constructor(t){this.head=t}static empty(){return new e}static single(t){return new e(new Jt(t))}isEmpty(){return this.head===void 0}append(t){return new e(new Jt(t,this.head))}getAllComputedFields(t){return this.head?.getAllComputedFields(t)}getAllClientExtensions(){return this.head?.getAllClientExtensions()}getAllModelExtensions(t){return this.head?.getAllModelExtensions(t)}getAllQueryCallbacks(t,r){return this.head?.getAllQueryCallbacks(t,r)??[]}getAllBatchQueryCallbacks(){return this.head?.getAllBatchQueryCallbacks()??[]}};u();c();m();p();d();l();var Ri=ee("prisma:client"),Si={Vercel:"vercel","Netlify CI":"netlify"};function Oi({postinstall:e,ciName:t,clientVersion:r}){if(Ri("checkPlatformCaching:postinstall",e),Ri("checkPlatformCaching:ciName",t),e===!0&&t&&t in Si){let n=`Prisma has detected that this project was built on ${t}, which caches dependencies. This leads to an outdated Prisma Client because Prisma's auto-generation isn't triggered. To fix this, make sure to run the \`prisma generate\` command during the build process. Learn how: https://pris.ly/d/${Si[t]}-build`;throw console.error(n),new I(n,r)}}u();c();m();p();d();l();function ki(e,t){return e?e.datasources?e.datasources:e.datasourceUrl?{[t[0]]:{url:e.datasourceUrl}}:{}:{}}u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();var Ks="Cloudflare-Workers",Hs="node";function Li(){return typeof Netlify=="object"?"netlify":typeof EdgeRuntime=="string"?"edge-light":globalThis.navigator?.userAgent===Ks?"workerd":globalThis.Deno?"deno":globalThis.__lagon__?"lagon":globalThis.process?.release?.name===Hs?"node":globalThis.Bun?"bun":globalThis.fastly?"fastly":"unknown"}var zs={node:"Node.js",workerd:"Cloudflare Workers",deno:"Deno and Deno Deploy",netlify:"Netlify Edge Functions","edge-light":"Vercel Edge Functions or Edge Middleware"};function Pe(){let e=Li();return{id:e,prettyName:zs[e]||e,isEdge:["workerd","deno","netlify","edge-light"].includes(e)}}u();c();m();p();d();l();u();c();m();p();d();l();function Gt({inlineDatasources:e,overrideDatasources:t,env:r,clientVersion:n}){let i,o=Object.keys(e)[0],s=e[o]?.url,a=t[o]?.url;if(o===void 0?i=void 0:a?i=a:s?.value?i=s.value:s?.fromEnvVar&&(i=r[s.fromEnvVar]),s?.fromEnvVar!==void 0&&i===void 0)throw Pe().id==="workerd"?new I(`error: Environment variable not found: ${s.fromEnvVar}. In Cloudflare module Workers, environment variables are available only in the Worker's \`env\` parameter of \`fetch\`. To solve this, provide the connection string directly: https://pris.ly/d/cloudflare-datasource-url`,n):new I(`error: Environment variable not found: ${s.fromEnvVar}.`,n);if(i===void 0)throw new I("error: Missing URL environment variable, value, or override.",n);return i}u();c();m();p();d();l();u();c();m();p();d();l();function Mi(e){if(e?.kind==="itx")return e.options.id}u();c();m();p();d();l();var Ur,Ii={async loadLibrary(e){let{clientVersion:t,adapter:r,engineWasm:n}=e;if(r===void 0)throw new I(`The \`adapter\` option for \`PrismaClient\` is required in this context (${Pe().prettyName})`,t);if(n===void 0)throw new I("WASM engine was unexpectedly `undefined`",t);Ur===void 0&&(Ur=(async()=>{let o=n.getRuntime(),s=await n.getQueryEngineWasmModule();if(s==null)throw new I("The loaded wasm module was unexpectedly `undefined` or `null` once loaded",t);let a={"./query_engine_bg.js":o},f=new WebAssembly.Instance(s,a);return o.__wbg_set_wasm(f.exports),o.QueryEngine})());let i=await Ur;return{debugPanic(){return Promise.reject("{}")},dmmf(){return Promise.resolve("{}")},version(){return{commit:"unknown",version:"unknown"}},QueryEngine:i}}};var Ys="P2036",fe=ee("prisma:client:libraryEngine");function Xs(e){return e.item_type==="query"&&"query"in e}function Zs(e){return"level"in e?e.level==="error"&&e.message==="PANIC":!1}var MC=[...Er,"native"],_i=0,ft=class{constructor(t,r){this.name="LibraryEngine";this.libraryLoader=r??Ii,this.config=t,this.libraryStarted=!1,this.logQueries=t.logQueries??!1,this.logLevel=t.logLevel??"error",this.logEmitter=t.logEmitter,this.datamodel=t.inlineSchema,t.enableDebugLogs&&(this.logLevel="debug");let n=Object.keys(t.overrideDatasources)[0],i=t.overrideDatasources[n]?.url;n!==void 0&&i!==void 0&&(this.datasourceOverrides={[n]:i}),this.libraryInstantiationPromise=this.instantiateLibrary(),this.checkForTooManyEngines()}checkForTooManyEngines(){this.config.adapter&&["wasm"].includes("wasm")||_i===10&&console.warn(`${At("warn(prisma-client)")} This is the 10th instance of Prisma Client being started. Make sure this is intentional.`)}async applyPendingMigrations(){throw new Error("Cannot call this method from this type of engine instance")}async transaction(t,r,n){await this.start();let i=JSON.stringify(r),o;if(t==="start"){let a=JSON.stringify({max_wait:n.maxWait,timeout:n.timeout,isolation_level:n.isolationLevel});o=await this.engine?.startTransaction(a,i)}else t==="commit"?o=await this.engine?.commitTransaction(n.id,i):t==="rollback"&&(o=await this.engine?.rollbackTransaction(n.id,i));let s=this.parseEngineResponse(o);if(ea(s)){let a=this.getExternalAdapterError(s);throw a?a.error:new Q(s.message,{code:s.error_code,clientVersion:this.config.clientVersion,meta:s.meta})}return s}async instantiateLibrary(){if(fe("internalSetup"),this.libraryInstantiationPromise)return this.libraryInstantiationPromise;this.binaryTarget=await this.getCurrentBinaryTarget(),await this.loadEngine(),this.version()}async getCurrentBinaryTarget(){}parseEngineResponse(t){if(!t)throw new J("Response from the Engine was empty",{clientVersion:this.config.clientVersion});try{return JSON.parse(t)}catch{throw new J("Unable to JSON.parse response from engine",{clientVersion:this.config.clientVersion})}}async loadEngine(){if(!this.engine){this.QueryEngineConstructor||(this.library=await this.libraryLoader.loadLibrary(this.config),this.QueryEngineConstructor=this.library.QueryEngine);try{let t=new b(this),{adapter:r}=this.config;r&&fe("Using driver adapter: %O",r),this.engine=new this.QueryEngineConstructor({datamodel:this.datamodel,env:g.env,logQueries:this.config.logQueries??!1,ignoreEnvVarErrors:!0,datasourceOverrides:this.datasourceOverrides??{},logLevel:this.logLevel,configDir:this.config.cwd,engineProtocol:"json"},n=>{t.deref()?.logger(n)},r),_i++}catch(t){let r=t,n=this.parseInitError(r.message);throw typeof n=="string"?r:new I(n.message,this.config.clientVersion,n.error_code)}}}logger(t){let r=this.parseEngineResponse(t);if(r){if("span"in r){this.config.tracingHelper.createEngineSpan(r);return}r.level=r?.level.toLowerCase()??"unknown",Xs(r)?this.logEmitter.emit("query",{timestamp:new Date,query:r.query,params:r.params,duration:Number(r.duration_ms),target:r.module_path}):(Zs(r),this.logEmitter.emit(r.level,{timestamp:new Date,message:r.message,target:r.module_path}))}}parseInitError(t){try{return JSON.parse(t)}catch{}return t}parseRequestError(t){try{return JSON.parse(t)}catch{}return t}onBeforeExit(){throw new Error('"beforeExit" hook is not applicable to the library engine since Prisma 5.0.0, it is only relevant and implemented for the binary engine. Please add your event listener to the `process` object directly instead.')}async start(){if(await this.libraryInstantiationPromise,await this.libraryStoppingPromise,this.libraryStartingPromise)return fe(`library already starting, this.libraryStarted: ${this.libraryStarted}`),this.libraryStartingPromise;if(this.libraryStarted)return;let t=async()=>{fe("library starting");try{let r={traceparent:this.config.tracingHelper.getTraceParent()};await this.engine?.connect(JSON.stringify(r)),this.libraryStarted=!0,fe("library started")}catch(r){let n=this.parseInitError(r.message);throw typeof n=="string"?r:new I(n.message,this.config.clientVersion,n.error_code)}finally{this.libraryStartingPromise=void 0}};return this.libraryStartingPromise=this.config.tracingHelper.runInChildSpan("connect",t),this.libraryStartingPromise}async stop(){if(await this.libraryStartingPromise,await this.executingQueryPromise,this.libraryStoppingPromise)return fe("library is already stopping"),this.libraryStoppingPromise;if(!this.libraryStarted)return;let t=async()=>{await new Promise(n=>setTimeout(n,5)),fe("library stopping");let r={traceparent:this.config.tracingHelper.getTraceParent()};await this.engine?.disconnect(JSON.stringify(r)),this.libraryStarted=!1,this.libraryStoppingPromise=void 0,fe("library stopped")};return this.libraryStoppingPromise=this.config.tracingHelper.runInChildSpan("disconnect",t),this.libraryStoppingPromise}version(){return this.versionInfo=this.library?.version(),this.versionInfo?.version??"unknown"}debugPanic(t){return this.library?.debugPanic(t)}async request(t,{traceparent:r,interactiveTransaction:n}){fe(`sending request, this.libraryStarted: ${this.libraryStarted}`);let i=JSON.stringify({traceparent:r}),o=JSON.stringify(t);try{await this.start(),this.executingQueryPromise=this.engine?.query(o,i,n?.id),this.lastQuery=o;let s=this.parseEngineResponse(await this.executingQueryPromise);if(s.errors)throw s.errors.length===1?this.buildQueryError(s.errors[0]):new J(JSON.stringify(s.errors),{clientVersion:this.config.clientVersion});if(this.loggerRustPanic)throw this.loggerRustPanic;return{data:s,elapsed:0}}catch(s){if(s instanceof I)throw s;s.code==="GenericFailure"&&s.message?.startsWith("PANIC:");let a=this.parseRequestError(s.message);throw typeof a=="string"?s:new J(`${a.message} ${a.backtrace}`,{clientVersion:this.config.clientVersion})}}async requestBatch(t,{transaction:r,traceparent:n}){fe("requestBatch");let i=_t(t,r);await this.start(),this.lastQuery=JSON.stringify(i),this.executingQueryPromise=this.engine.query(this.lastQuery,JSON.stringify({traceparent:n}),Mi(r));let o=await this.executingQueryPromise,s=this.parseEngineResponse(o);if(s.errors)throw s.errors.length===1?this.buildQueryError(s.errors[0]):new J(JSON.stringify(s.errors),{clientVersion:this.config.clientVersion});let{batchResult:a,errors:f}=s;if(Array.isArray(a))return a.map(v=>v.errors&&v.errors.length>0?this.loggerRustPanic??this.buildQueryError(v.errors[0]):{data:v,elapsed:0});throw f&&f.length===1?new Error(f[0].error):new Error(JSON.stringify(s))}buildQueryError(t){t.user_facing_error.is_panic;let r=this.getExternalAdapterError(t.user_facing_error);return r?r.error:qt(t,this.config.clientVersion,this.config.activeProvider)}getExternalAdapterError(t){if(t.error_code===Ys&&this.config.adapter){let r=t.meta?.id;Ot(typeof r=="number","Malformed external JS error received from the engine");let n=this.config.adapter.errorRegistry.consumeError(r);return Ot(n,"External error with reported id was not registered"),n}}async metrics(t){await this.start();let r=await this.engine.metrics(JSON.stringify(t));return t.format==="prometheus"?r:this.parseEngineResponse(r)}};function ea(e){return typeof e=="object"&&e!==null&&e.error_code!==void 0}u();c();m();p();d();l();var gt="Accelerate has not been setup correctly. Make sure your client is using `.$extends(withAccelerate())`. See https://pris.ly/d/accelerate-getting-started",Kt=class{constructor(t){this.config=t;this.name="AccelerateEngine";this.resolveDatasourceUrl=this.config.accelerateUtils?.resolveDatasourceUrl;this.getBatchRequestPayload=this.config.accelerateUtils?.getBatchRequestPayload;this.prismaGraphQLToJSError=this.config.accelerateUtils?.prismaGraphQLToJSError;this.PrismaClientUnknownRequestError=this.config.accelerateUtils?.PrismaClientUnknownRequestError;this.PrismaClientInitializationError=this.config.accelerateUtils?.PrismaClientInitializationError;this.PrismaClientKnownRequestError=this.config.accelerateUtils?.PrismaClientKnownRequestError;this.debug=this.config.accelerateUtils?.debug;this.engineVersion=this.config.accelerateUtils?.engineVersion;this.clientVersion=this.config.accelerateUtils?.clientVersion}onBeforeExit(t){}async start(){}async stop(){}version(t){return"unknown"}transaction(t,r,n){throw new I(gt,this.config.clientVersion)}metrics(t){throw new I(gt,this.config.clientVersion)}request(t,r){throw new I(gt,this.config.clientVersion)}requestBatch(t,r){throw new I(gt,this.config.clientVersion)}applyPendingMigrations(){throw new I(gt,this.config.clientVersion)}};function Di({copyEngine:e=!0},t){let r;try{r=Gt({inlineDatasources:t.inlineDatasources,overrideDatasources:t.overrideDatasources,env:{...t.env,...g.env},clientVersion:t.clientVersion})}catch{}e&&r?.startsWith("prisma://")&&nt("recommend--no-engine","In production, we recommend using `prisma generate --no-engine` (See: `prisma generate --help`)");let n=et(t.generator),i=!!(r?.startsWith("prisma://")||!e),o=!!t.adapter,s=n==="library",a=n==="binary";if(i&&o||o&&!1){let f;throw e?r?.startsWith("prisma://")?f=["Prisma Client was configured to use the `adapter` option but the URL was a `prisma://` URL.","Please either use the `prisma://` URL or remove the `adapter` from the Prisma Client constructor."]:f=["Prisma Client was configured to use both the `adapter` and Accelerate, please chose one."]:f=["Prisma Client was configured to use the `adapter` option but `prisma generate` was run with `--no-engine`.","Please run `prisma generate` without `--no-engine` to be able to use Prisma Client with the adapter."],new W(f.join(` `),{clientVersion:t.clientVersion})}if(o)return new ft(t);if(i)return new Kt(t);{let f=[`PrismaClient failed to initialize because it wasn't configured to run in this environment (${Pe().prettyName}).`,"In order to run Prisma Client in an edge runtime, you will need to configure one of the following options:","- Enable Driver Adapters: https://pris.ly/d/driver-adapters","- Enable Accelerate: https://pris.ly/d/accelerate"];throw new W(f.join(` `),{clientVersion:t.clientVersion})}throw new W("Invalid client engine type, please use `library` or `binary`",{clientVersion:t.clientVersion})}u();c();m();p();d();l();function Ht({generator:e}){return e?.previewFeatures??[]}u();c();m();p();d();l();u();c();m();p();d();l();u();c();m();p();d();l();var Vi=_e(Br());u();c();m();p();d();l();function Bi(e,t){let r=$i(e),n=ta(r),i=na(n);i?zt(i,t):t.addErrorMessage(()=>"Unknown error")}function $i(e){return e.errors.flatMap(t=>t.kind==="Union"?$i(t):[t])}function ta(e){let t=new Map,r=[];for(let n of e){if(n.kind!=="InvalidArgumentType"){r.push(n);continue}let i=`${n.selectionPath.join(".")}:${n.argumentPath.join(".")}`,o=t.get(i);o?t.set(i,{...n,argument:{...n.argument,typeNames:ra(o.argument.typeNames,n.argument.typeNames)}}):t.set(i,n)}return r.push(...t.values()),r}function ra(e,t){return[...new Set(e.concat(t))]}function na(e){return Cr(e,(t,r)=>{let n=Ni(t),i=Ni(r);return n!==i?n-i:Ui(t)-Ui(r)})}function Ni(e){let t=0;return Array.isArray(e.selectionPath)&&(t+=e.selectionPath.length),Array.isArray(e.argumentPath)&&(t+=e.argumentPath.length),t}function Ui(e){switch(e.kind){case"InvalidArgumentValue":case"ValueTooLarge":return 20;case"InvalidArgumentType":return 10;case"RequiredArgumentMissing":return-10;default:return 0}}u();c();m();p();d();l();var re=class{constructor(t,r){this.name=t;this.value=r;this.isRequired=!1}makeRequired(){return this.isRequired=!0,this}write(t){let{colors:{green:r}}=t.context;t.addMarginSymbol(r(this.isRequired?"+":"?")),t.write(r(this.name)),this.isRequired||t.write(r("?")),t.write(r(": ")),typeof this.value=="string"?t.write(r(this.value)):t.write(this.value)}};u();c();m();p();d();l();var Yt=class{constructor(){this.fields=[]}addField(t,r){return this.fields.push({write(n){let{green:i,dim:o}=n.context.colors;n.write(i(o(`${t}: ${r}`))).addMarginSymbol(i(o("+")))}}),this}write(t){let{colors:{green:r}}=t.context;t.writeLine(r("{")).withIndent(()=>{t.writeJoined(Je,this.fields).newLine()}).write(r("}")).addMarginSymbol(r("+"))}};function zt(e,t){switch(e.kind){case"MutuallyExclusiveFields":ia(e,t);break;case"IncludeOnScalar":oa(e,t);break;case"EmptySelection":sa(e,t);break;case"UnknownSelectionField":ua(e,t);break;case"UnknownArgument":ca(e,t);break;case"UnknownInputField":ma(e,t);break;case"RequiredArgumentMissing":pa(e,t);break;case"InvalidArgumentType":da(e,t);break;case"InvalidArgumentValue":fa(e,t);break;case"ValueTooLarge":ga(e,t);break;case"SomeFieldsMissing":ha(e,t);break;case"TooManyFieldsGiven":ya(e,t);break;case"Union":Bi(e,t);break;default:throw new Error("not implemented: "+e.kind)}}function ia(e,t){let r=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();r&&(r.getField(e.firstField)?.markAsError(),r.getField(e.secondField)?.markAsError()),t.addErrorMessage(n=>`Please ${n.bold("either")} use ${n.green(`\`${e.firstField}\``)} or ${n.green(`\`${e.secondField}\``)}, but ${n.red("not both")} at the same time.`)}function oa(e,t){let[r,n]=Xt(e.selectionPath),i=e.outputType,o=t.arguments.getDeepSelectionParent(r)?.value;if(o&&(o.getField(n)?.markAsError(),i))for(let s of i.fields)s.isRelation&&o.addSuggestion(new re(s.name,"true"));t.addErrorMessage(s=>{let a=`Invalid scalar field ${s.red(`\`${n}\``)} for ${s.bold("include")} statement`;return i?a+=` on model ${s.bold(i.name)}. ${ht(s)}`:a+=".",a+=` Note that ${s.bold("include")} statements only accept relation fields.`,a})}function sa(e,t){let r=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(r){let n=r.getField("omit")?.value.asObject();if(n){aa(e,t,n);return}}la(e,t)}function aa(e,t,r){r.removeAllFields();for(let n of e.outputType.fields)r.addSuggestion(new re(n.name,"false"));t.addErrorMessage(n=>`The ${n.red("omit")} statement includes every field of the model ${n.bold(e.outputType.name)}. At least one field must be included in the result`)}function la(e,t){let r=e.outputType,n=t.arguments.getDeepSelectionParent(e.selectionPath)?.value,i=n?.isEmpty()??!1;n&&(n.removeAllFields(),Qi(n,r)),t.addErrorMessage(o=>i?`The ${o.red("`select`")} statement for type ${o.bold(r.name)} must not be empty. ${ht(o)}`:`The ${o.red("`select`")} statement for type ${o.bold(r.name)} needs ${o.bold("at least one truthy value")}.`)}function ua(e,t){let[r,n]=Xt(e.selectionPath),i=t.arguments.getDeepSubSelectionValue(r)?.asObject(),o;if(i){let s=i.getFieldValue("select")?.asObject(),a=i.getFieldValue("include")?.asObject(),f=i.getFieldValue("omit")?.asObject();s?.hasField(n)?(o="select",s.getField(n)?.markAsError(),Qi(s,e.outputType)):a?.hasField(n)?(o="include",a.getField(n)?.markAsError(),ba(a,e.outputType)):f?.hasField(n)&&(o="omit",f.getField(n)?.markAsError(),wa(f,e.outputType))}t.addErrorMessage(s=>{let a=[`Unknown field ${s.red(`\`${n}\``)}`];return o&&a.push(`for ${s.bold(o)} statement`),a.push(`on model ${s.bold(`\`${e.outputType.name}\``)}.`),a.push(ht(s)),a.join(" ")})}function ca(e,t){let r=e.argumentPath[0],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&(n.getField(r)?.markAsError(),Ea(n,e.arguments)),t.addErrorMessage(i=>qi(i,r,e.arguments.map(o=>o.name)))}function ma(e,t){let[r,n]=Xt(e.argumentPath),i=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(i){i.getDeepField(e.argumentPath)?.markAsError();let o=i.getDeepFieldValue(r)?.asObject();o&&Ji(o,e.inputType)}t.addErrorMessage(o=>qi(o,n,e.inputType.fields.map(s=>s.name)))}function qi(e,t,r){let n=[`Unknown argument \`${e.red(t)}\`.`],i=Pa(t,r);return i&&n.push(`Did you mean \`${e.green(i)}\`?`),r.length>0&&n.push(ht(e)),n.join(" ")}function pa(e,t){let r;t.addErrorMessage(f=>r?.value instanceof G&&r.value.text==="null"?`Argument \`${f.green(o)}\` must not be ${f.red("null")}.`:`Argument \`${f.green(o)}\` is missing.`);let n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(!n)return;let[i,o]=Xt(e.argumentPath),s=new Yt,a=n.getDeepFieldValue(i)?.asObject();if(a)if(r=a.getField(o),r&&a.removeField(o),e.inputTypes.length===1&&e.inputTypes[0].kind==="object"){for(let f of e.inputTypes[0].fields)s.addField(f.name,f.typeNames.join(" | "));a.addSuggestion(new re(o,s).makeRequired())}else{let f=e.inputTypes.map(ji).join(" | ");a.addSuggestion(new re(o,f).makeRequired())}}function ji(e){return e.kind==="list"?`${ji(e.elementType)}[]`:e.name}function da(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=Zt("or",e.argument.typeNames.map(s=>i.green(s)));return`Argument \`${i.bold(r)}\`: Invalid value provided. Expected ${o}, provided ${i.red(e.inferredType)}.`})}function fa(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();n&&n.getDeepFieldValue(e.argumentPath)?.markAsError(),t.addErrorMessage(i=>{let o=[`Invalid value for argument \`${i.bold(r)}\``];if(e.underlyingError&&o.push(`: ${e.underlyingError}`),o.push("."),e.argument.typeNames.length>0){let s=Zt("or",e.argument.typeNames.map(a=>i.green(a)));o.push(` Expected ${s}.`)}return o.join("")})}function ga(e,t){let r=e.argument.name,n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i;if(n){let s=n.getDeepField(e.argumentPath)?.value;s?.markAsError(),s instanceof G&&(i=s.text)}t.addErrorMessage(o=>{let s=["Unable to fit value"];return i&&s.push(o.red(i)),s.push(`into a 64-bit signed integer for field \`${o.bold(r)}\``),s.join(" ")})}function ha(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject();if(n){let i=n.getDeepFieldValue(e.argumentPath)?.asObject();i&&Ji(i,e.inputType)}t.addErrorMessage(i=>{let o=[`Argument \`${i.bold(r)}\` of type ${i.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1?e.constraints.requiredFields?o.push(`${i.green("at least one of")} ${Zt("or",e.constraints.requiredFields.map(s=>`\`${i.bold(s)}\``))} arguments.`):o.push(`${i.green("at least one")} argument.`):o.push(`${i.green(`at least ${e.constraints.minFieldCount}`)} arguments.`),o.push(ht(i)),o.join(" ")})}function ya(e,t){let r=e.argumentPath[e.argumentPath.length-1],n=t.arguments.getDeepSubSelectionValue(e.selectionPath)?.asObject(),i=[];if(n){let o=n.getDeepFieldValue(e.argumentPath)?.asObject();o&&(o.markAsError(),i=Object.keys(o.getFields()))}t.addErrorMessage(o=>{let s=[`Argument \`${o.bold(r)}\` of type ${o.bold(e.inputType.name)} needs`];return e.constraints.minFieldCount===1&&e.constraints.maxFieldCount==1?s.push(`${o.green("exactly one")} argument,`):e.constraints.maxFieldCount==1?s.push(`${o.green("at most one")} argument,`):s.push(`${o.green(`at most ${e.constraints.maxFieldCount}`)} arguments,`),s.push(`but you provided ${Zt("and",i.map(a=>o.red(a)))}. Please choose`),e.constraints.maxFieldCount===1?s.push("one."):s.push(`${e.constraints.maxFieldCount}.`),s.join(" ")})}function Qi(e,t){for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new re(r.name,"true"))}function ba(e,t){for(let r of t.fields)r.isRelation&&!e.hasField(r.name)&&e.addSuggestion(new re(r.name,"true"))}function wa(e,t){for(let r of t.fields)!e.hasField(r.name)&&!r.isRelation&&e.addSuggestion(new re(r.name,"true"))}function Ea(e,t){for(let r of t)e.hasField(r.name)||e.addSuggestion(new re(r.name,r.typeNames.join(" | ")))}function Ji(e,t){if(t.kind==="object")for(let r of t.fields)e.hasField(r.name)||e.addSuggestion(new re(r.name,r.typeNames.join(" | ")))}function Xt(e){let t=[...e],r=t.pop();if(!r)throw new Error("unexpected empty path");return[t,r]}function ht({green:e,enabled:t}){return"Available options are "+(t?`listed in ${e("green")}`:"marked with ?")+"."}function Zt(e,t){if(t.length===1)return t[0];let r=[...t],n=r.pop();return`${r.join(", ")} ${e} ${n}`}var xa=3;function Pa(e,t){let r=1/0,n;for(let i of t){let o=(0,Vi.default)(e,i);o>xa||o({name:t.name,typeName:"boolean",isRelation:t.kind==="object"}))}}isRawAction(){return["executeRaw","queryRaw","runCommandRaw","findRaw","aggregateRaw"].includes(this.params.action)}isPreviewFeatureOn(t){return this.params.previewFeatures.includes(t)}getComputedFields(){if(this.params.modelName)return this.params.extensions.getAllComputedFields(this.params.modelName)}findField(t){return this.model?.fields.find(r=>r.name===t)}nestSelection(t){let r=this.findField(t),n=r?.kind==="object"?r.type:void 0;return new e({...this.params,modelName:n,selectionPath:this.params.selectionPath.concat(t)})}nestArgument(t){return new e({...this.params,argumentPath:this.params.argumentPath.concat(t)})}};u();c();m();p();d();l();var Hi=e=>({command:e});u();c();m();p();d();l();u();c();m();p();d();l();var zi=e=>e.strings.reduce((t,r,n)=>`${t}@P${n}${r}`);u();c();m();p();d();l();l();function yt(e){try{return Yi(e,"fast")}catch{return Yi(e,"slow")}}function Yi(e,t){return JSON.stringify(e.map(r=>Ma(r,t)))}function Ma(e,t){return typeof e=="bigint"?{prisma__type:"bigint",prisma__value:e.toString()}:qe(e)?{prisma__type:"date",prisma__value:e.toJSON()}:ue.isDecimal(e)?{prisma__type:"decimal",prisma__value:e.toJSON()}:y.isBuffer(e)?{prisma__type:"bytes",prisma__value:e.toString("base64")}:Ia(e)||ArrayBuffer.isView(e)?{prisma__type:"bytes",prisma__value:y.from(e).toString("base64")}:typeof e=="object"&&t==="slow"?Zi(e):e}function Ia(e){return e instanceof ArrayBuffer||e instanceof SharedArrayBuffer?!0:typeof e=="object"&&e!==null?e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer":!1}function Zi(e){if(typeof e!="object"||e===null)return e;if(typeof e.toJSON=="function")return e.toJSON();if(Array.isArray(e))return e.map(Xi);let t={};for(let r of Object.keys(e))t[r]=Xi(e[r]);return t}function Xi(e){return typeof e=="bigint"?e.toString():Zi(e)}var _a=/^(\s*alter\s)/i,eo=ee("prisma:client");function qr(e,t,r,n){if(!(e!=="postgresql"&&e!=="cockroachdb")&&r.length>0&&_a.exec(t))throw new Error(`Running ALTER using ${n} is not supported Using the example below you can still execute your query with Prisma, but please note that it is vulnerable to SQL injection attacks and requires you to take care of input sanitization. Example: await prisma.$executeRawUnsafe(\`ALTER USER prisma WITH PASSWORD '\${password}'\`) More Information: https://pris.ly/d/execute-raw `)}var jr=({clientMethod:e,activeProvider:t})=>r=>{let n="",i;if(Array.isArray(r)){let[o,...s]=r;n=o,i={values:yt(s||[]),__prismaRawParameters__:!0}}else switch(t){case"sqlite":case"mysql":{n=r.sql,i={values:yt(r.values),__prismaRawParameters__:!0};break}case"cockroachdb":case"postgresql":case"postgres":{n=r.text,i={values:yt(r.values),__prismaRawParameters__:!0};break}case"sqlserver":{n=zi(r),i={values:yt(r.values),__prismaRawParameters__:!0};break}default:throw new Error(`The ${t} provider does not support ${e}`)}return i?.values?eo(`prisma.${e}(${n}, ${i.values})`):eo(`prisma.${e}(${n})`),{query:n,parameters:i}},to={requestArgsToMiddlewareArgs(e){return[e.strings,...e.values]},middlewareArgsToRequestArgs(e){let[t,...r]=e;return new X(t,r)}},ro={requestArgsToMiddlewareArgs(e){return[e]},middlewareArgsToRequestArgs(e){return e[0]}};u();c();m();p();d();l();function Qr(e){return function(r){let n,i=(o=e)=>{try{return o===void 0||o?.kind==="itx"?n??=no(r(o)):no(r(o))}catch(s){return Promise.reject(s)}};return{then(o,s){return i().then(o,s)},catch(o){return i().catch(o)},finally(o){return i().finally(o)},requestTransaction(o){let s=i(o);return s.requestTransaction?s.requestTransaction(o):s},[Symbol.toStringTag]:"PrismaPromise"}}}function no(e){return typeof e.then=="function"?e:Promise.resolve(e)}u();c();m();p();d();l();var io={isEnabled(){return!1},getTraceParent(){return"00-10-10-00"},async createEngineSpan(){},getActiveContext(){},runInChildSpan(e,t){return t()}},Jr=class{isEnabled(){return this.getGlobalTracingHelper().isEnabled()}getTraceParent(t){return this.getGlobalTracingHelper().getTraceParent(t)}createEngineSpan(t){return this.getGlobalTracingHelper().createEngineSpan(t)}getActiveContext(){return this.getGlobalTracingHelper().getActiveContext()}runInChildSpan(t,r){return this.getGlobalTracingHelper().runInChildSpan(t,r)}getGlobalTracingHelper(){return globalThis.PRISMA_INSTRUMENTATION?.helper??io}};function oo(e){return e.includes("tracing")?new Jr:io}u();c();m();p();d();l();function so(e,t=()=>{}){let r,n=new Promise(i=>r=i);return{then(i){return--e===0&&r(t()),i?.(n)}}}u();c();m();p();d();l();var Da=["$connect","$disconnect","$on","$transaction","$use","$extends"],ao=Da;u();c();m();p();d();l();function lo(e){return typeof e=="string"?e:e.reduce((t,r)=>{let n=typeof r=="string"?r:r.level;return n==="query"?t:t&&(r==="info"||t==="info")?"info":n},void 0)}u();c();m();p();d();l();var tr=class{constructor(){this._middlewares=[]}use(t){this._middlewares.push(t)}get(t){return this._middlewares[t]}has(t){return!!this._middlewares[t]}length(){return this._middlewares.length}};u();c();m();p();d();l();var co=_e(Bn());u();c();m();p();d();l();function rr(e){return typeof e.batchRequestIdx=="number"}u();c();m();p();d();l();l();function nr(e){return e===null?e:Array.isArray(e)?e.map(nr):typeof e=="object"?Fa(e)?Na(e):Ue(e,nr):e}function Fa(e){return e!==null&&typeof e=="object"&&typeof e.$type=="string"}function Na({$type:e,value:t}){switch(e){case"BigInt":return BigInt(t);case"Bytes":return y.from(t,"base64");case"DateTime":return new Date(t);case"Decimal":return new ue(t);case"Json":return JSON.parse(t);default:ke(t,"Unknown tagged value")}}u();c();m();p();d();l();function uo(e){if(e.action!=="findUnique"&&e.action!=="findUniqueOrThrow")return;let t=[];return e.modelName&&t.push(e.modelName),e.query.arguments&&t.push(Wr(e.query.arguments)),t.push(Wr(e.query.selection)),t.join("")}function Wr(e){return`(${Object.keys(e).sort().map(r=>{let n=e[r];return typeof n=="object"&&n!==null?`(${r} ${Wr(n)})`:r}).join(" ")})`}u();c();m();p();d();l();var Ua={aggregate:!1,aggregateRaw:!1,createMany:!0,createManyAndReturn:!0,createOne:!0,deleteMany:!0,deleteOne:!0,executeRaw:!0,findFirst:!1,findFirstOrThrow:!1,findMany:!1,findRaw:!1,findUnique:!1,findUniqueOrThrow:!1,groupBy:!1,queryRaw:!1,runCommandRaw:!0,updateMany:!0,updateOne:!0,upsertOne:!0};function Gr(e){return Ua[e]}u();c();m();p();d();l();var ir=class{constructor(t){this.options=t;this.tickActive=!1;this.batches={}}request(t){let r=this.options.batchBy(t);return r?(this.batches[r]||(this.batches[r]=[],this.tickActive||(this.tickActive=!0,g.nextTick(()=>{this.dispatchBatches(),this.tickActive=!1}))),new Promise((n,i)=>{this.batches[r].push({request:t,resolve:n,reject:i})})):this.options.singleLoader(t)}dispatchBatches(){for(let t in this.batches){let r=this.batches[t];delete this.batches[t],r.length===1?this.options.singleLoader(r[0].request).then(n=>{n instanceof Error?r[0].reject(n):r[0].resolve(n)}).catch(n=>{r[0].reject(n)}):(r.sort((n,i)=>this.options.batchOrder(n.request,i.request)),this.options.batchLoader(r.map(n=>n.request)).then(n=>{if(n instanceof Error)for(let i=0;i{for(let i=0;i{let{transaction:o,otelParentCtx:s}=n[0],a=n.map(T=>T.protocolQuery),f=this.client._tracingHelper.getTraceParent(s),v=n.some(T=>Gr(T.protocolQuery.action));return(await this.client._engine.requestBatch(a,{traceparent:f,transaction:$a(o),containsWrite:v,customDataProxyFetch:i})).map((T,O)=>{if(T instanceof Error)return T;try{return this.mapQueryEngineResult(n[O],T)}catch(R){return R}})}),singleLoader:async n=>{let i=n.transaction?.kind==="itx"?mo(n.transaction):void 0,o=await this.client._engine.request(n.protocolQuery,{traceparent:this.client._tracingHelper.getTraceParent(),interactiveTransaction:i,isWrite:Gr(n.protocolQuery.action),customDataProxyFetch:n.customDataProxyFetch});return this.mapQueryEngineResult(n,o)},batchBy:n=>n.transaction?.id?`transaction-${n.transaction.id}`:uo(n.protocolQuery),batchOrder(n,i){return n.transaction?.kind==="batch"&&i.transaction?.kind==="batch"?n.transaction.index-i.transaction.index:0}})}async request(t){try{return await this.dataloader.request(t)}catch(r){let{clientMethod:n,callsite:i,transaction:o,args:s,modelName:a}=t;this.handleAndLogRequestError({error:r,clientMethod:n,callsite:i,transaction:o,args:s,modelName:a})}}mapQueryEngineResult({dataPath:t,unpacker:r},n){let i=n?.data,o=n?.elapsed,s=this.unpack(i,t,r);return g.env.PRISMA_CLIENT_GET_TIME?{data:s,elapsed:o}:s}handleAndLogRequestError(t){try{this.handleRequestError(t)}catch(r){throw this.logEmitter&&this.logEmitter.emit("error",{message:r.message,target:t.clientMethod,timestamp:new Date}),r}}handleRequestError({error:t,clientMethod:r,callsite:n,transaction:i,args:o,modelName:s}){if(Ba(t),Va(t,i)||t instanceof he)throw t;if(t instanceof Q&&qa(t)){let f=po(t.meta);er({args:o,errors:[f],callsite:n,errorFormat:this.client._errorFormat,originalMethod:r,clientVersion:this.client._clientVersion})}let a=t.message;if(n&&(a=Ke({callsite:n,originalMethod:r,isPanic:t.isPanic,showColors:this.client._errorFormat==="pretty",message:a})),a=this.sanitizeMessage(a),t.code){let f=s?{modelName:s,...t.meta}:t.meta;throw new Q(a,{code:t.code,clientVersion:this.client._clientVersion,meta:f,batchRequestIdx:t.batchRequestIdx})}else{if(t.isPanic)throw new ye(a,this.client._clientVersion);if(t instanceof J)throw new J(a,{clientVersion:this.client._clientVersion,batchRequestIdx:t.batchRequestIdx});if(t instanceof I)throw new I(a,this.client._clientVersion);if(t instanceof ye)throw new ye(a,this.client._clientVersion)}throw t.clientVersion=this.client._clientVersion,t}sanitizeMessage(t){return this.client._errorFormat&&this.client._errorFormat!=="pretty"?(0,co.default)(t):t}unpack(t,r,n){if(!t||(t.data&&(t=t.data),!t))return t;let i=Object.values(t)[0],o=r.filter(a=>a!=="select"&&a!=="include"),s=nr(_r(i,o));return n?n(s):s}get[Symbol.toStringTag](){return"RequestHandler"}};function $a(e){if(e){if(e.kind==="batch")return{kind:"batch",options:{isolationLevel:e.isolationLevel}};if(e.kind==="itx")return{kind:"itx",options:mo(e)};ke(e,"Unknown transaction kind")}}function mo(e){return{id:e.id,payload:e.payload}}function Va(e,t){return rr(e)&&t?.kind==="batch"&&e.batchRequestIdx!==t.index}function qa(e){return e.code==="P2009"||e.code==="P2012"}function po(e){if(e.kind==="Union")return{kind:"Union",errors:e.errors.map(po)};if(Array.isArray(e.selectionPath)){let[,...t]=e.selectionPath;return{...e,selectionPath:t}}return e}u();c();m();p();d();l();var fo="5.15.0";var go=fo;u();c();m();p();d();l();l();function ho(e){return e.map(t=>{let r={};for(let n of Object.keys(t))r[n]=yo(t[n]);return r})}function yo({prisma__type:e,prisma__value:t}){switch(e){case"bigint":return BigInt(t);case"bytes":return y.from(t,"base64");case"decimal":return new ue(t);case"datetime":case"date":return new Date(t);case"time":return new Date(`1970-01-01T${t}Z`);case"array":return t.map(yo);default:return t}}u();c();m();p();d();l();var xo=_e(Br());u();c();m();p();d();l();var N=class extends Error{constructor(t){super(t+` Read more at https://pris.ly/d/client-constructor`),this.name="PrismaClientConstructorValidationError"}get[Symbol.toStringTag](){return"PrismaClientConstructorValidationError"}};K(N,"PrismaClientConstructorValidationError");var bo=["datasources","datasourceUrl","errorFormat","adapter","log","transactionOptions","__internal"],wo=["pretty","colorless","minimal"],Eo=["info","query","warn","error"],Qa={datasources:(e,{datasourceNames:t})=>{if(e){if(typeof e!="object"||Array.isArray(e))throw new N(`Invalid value ${JSON.stringify(e)} for "datasources" provided to PrismaClient constructor`);for(let[r,n]of Object.entries(e)){if(!t.includes(r)){let i=He(r,t)||` Available datasources: ${t.join(", ")}`;throw new N(`Unknown datasource ${r} provided to PrismaClient constructor.${i}`)}if(typeof n!="object"||Array.isArray(n))throw new N(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. It should have this form: { url: "CONNECTION_STRING" }`);if(n&&typeof n=="object")for(let[i,o]of Object.entries(n)){if(i!=="url")throw new N(`Invalid value ${JSON.stringify(e)} for datasource "${r}" provided to PrismaClient constructor. It should have this form: { url: "CONNECTION_STRING" }`);if(typeof o!="string")throw new N(`Invalid value ${JSON.stringify(o)} for datasource "${r}" provided to PrismaClient constructor. It should have this form: { url: "CONNECTION_STRING" }`)}}}},adapter:(e,t)=>{if(e===null)return;if(e===void 0)throw new N('"adapter" property must not be undefined, use null to conditionally disable driver adapters.');if(!Ht(t).includes("driverAdapters"))throw new N('"adapter" property can only be provided to PrismaClient constructor when "driverAdapters" preview feature is enabled.');if(et()==="binary")throw new N('Cannot use a driver adapter with the "binary" Query Engine. Please use the "library" Query Engine.')},datasourceUrl:e=>{if(typeof e<"u"&&typeof e!="string")throw new N(`Invalid value ${JSON.stringify(e)} for "datasourceUrl" provided to PrismaClient constructor. Expected string or undefined.`)},errorFormat:e=>{if(e){if(typeof e!="string")throw new N(`Invalid value ${JSON.stringify(e)} for "errorFormat" provided to PrismaClient constructor.`);if(!wo.includes(e)){let t=He(e,wo);throw new N(`Invalid errorFormat ${e} provided to PrismaClient constructor.${t}`)}}},log:e=>{if(!e)return;if(!Array.isArray(e))throw new N(`Invalid value ${JSON.stringify(e)} for "log" provided to PrismaClient constructor.`);function t(r){if(typeof r=="string"&&!Eo.includes(r)){let n=He(r,Eo);throw new N(`Invalid log level "${r}" provided to PrismaClient constructor.${n}`)}}for(let r of e){t(r);let n={level:t,emit:i=>{let o=["stdout","event"];if(!o.includes(i)){let s=He(i,o);throw new N(`Invalid value ${JSON.stringify(i)} for "emit" in logLevel provided to PrismaClient constructor.${s}`)}}};if(r&&typeof r=="object")for(let[i,o]of Object.entries(r))if(n[i])n[i](o);else throw new N(`Invalid property ${i} for "log" provided to PrismaClient constructor`)}},transactionOptions:e=>{if(!e)return;let t=e.maxWait;if(t!=null&&t<=0)throw new N(`Invalid value ${t} for maxWait in "transactionOptions" provided to PrismaClient constructor. maxWait needs to be greater than 0`);let r=e.timeout;if(r!=null&&r<=0)throw new N(`Invalid value ${r} for timeout in "transactionOptions" provided to PrismaClient constructor. timeout needs to be greater than 0`)},__internal:e=>{if(!e)return;let t=["debug","engine","configOverride"];if(typeof e!="object")throw new N(`Invalid value ${JSON.stringify(e)} for "__internal" to PrismaClient constructor`);for(let[r]of Object.entries(e))if(!t.includes(r)){let n=He(r,t);throw new N(`Invalid property ${JSON.stringify(r)} for "__internal" provided to PrismaClient constructor.${n}`)}}};function Po(e,t){for(let[r,n]of Object.entries(e)){if(!bo.includes(r)){let i=He(r,bo);throw new N(`Unknown property ${r} provided to PrismaClient constructor.${i}`)}Qa[r](n,t)}if(e.datasourceUrl&&e.datasources)throw new N('Can not use "datasourceUrl" and "datasources" options at the same time. Pick one of them')}function He(e,t){if(t.length===0||typeof e!="string")return"";let r=Ja(e,t);return r?` Did you mean "${r}"?`:""}function Ja(e,t){if(t.length===0)return null;let r=t.map(i=>({value:i,distance:(0,xo.default)(e,i)}));r.sort((i,o)=>i.distance{let n=new Array(e.length),i=null,o=!1,s=0,a=()=>{o||(s++,s===e.length&&(o=!0,i?r(i):t(n)))},f=v=>{o||(o=!0,r(v))};for(let v=0;v{n[v]=C,a()},C=>{if(!rr(C)){f(C);return}C.batchRequestIdx===v?f(C):(i||(i=C),a())})})}var ve=ee("prisma:client");typeof globalThis=="object"&&(globalThis.NODE_CLIENT=!0);var Wa={requestArgsToMiddlewareArgs:e=>e,middlewareArgsToRequestArgs:e=>e},Ga=Symbol.for("prisma.client.transaction.id"),Ka={id:0,nextId(){return++this.id}};function Ao(e){class t{constructor(n){this._originalClient=this;this._middlewares=new tr;this._createPrismaPromise=Qr();this.$extends=pi;e=n?.__internal?.configOverride?.(e)??e,Oi(e),n&&Po(n,e);let i=n?.adapter?Or(n.adapter):void 0,o=new St().on("error",()=>{});this._extensions=Wt.empty(),this._previewFeatures=Ht(e),this._clientVersion=e.clientVersion??go,this._activeProvider=e.activeProvider,this._tracingHelper=oo(this._previewFeatures);let s={rootEnvPath:e.relativeEnvPaths.rootEnvPath&&Ze.resolve(e.dirname,e.relativeEnvPaths.rootEnvPath),schemaEnvPath:e.relativeEnvPaths.schemaEnvPath&&Ze.resolve(e.dirname,e.relativeEnvPaths.schemaEnvPath)},a=e.injectableEdgeEnv?.();try{let f=n??{},v=f.__internal??{},C=v.debug===!0;C&&ee.enable("prisma:client");let T=Ze.resolve(e.dirname,e.relativePath);un.existsSync(T)||(T=e.dirname),ve("dirname",e.dirname),ve("relativePath",e.relativePath),ve("cwd",T);let O=v.engine||{};if(f.errorFormat?this._errorFormat=f.errorFormat:g.env.NODE_ENV==="production"?this._errorFormat="minimal":g.env.NO_COLOR?this._errorFormat="colorless":this._errorFormat="colorless",this._runtimeDataModel=e.runtimeDataModel,this._engineConfig={cwd:T,dirname:e.dirname,enableDebugLogs:C,allowTriggerPanic:O.allowTriggerPanic,datamodelPath:Ze.join(e.dirname,e.filename??"schema.prisma"),prismaPath:O.binaryPath??void 0,engineEndpoint:O.endpoint,generator:e.generator,showColors:this._errorFormat==="pretty",logLevel:f.log&&lo(f.log),logQueries:f.log&&!!(typeof f.log=="string"?f.log==="query":f.log.find(R=>typeof R=="string"?R==="query":R.level==="query")),env:a?.parsed??{},flags:[],engineWasm:e.engineWasm,clientVersion:e.clientVersion,engineVersion:e.engineVersion,previewFeatures:this._previewFeatures,activeProvider:e.activeProvider,inlineSchema:e.inlineSchema,overrideDatasources:ki(f,e.datasourceNames),inlineDatasources:e.inlineDatasources,inlineSchemaHash:e.inlineSchemaHash,tracingHelper:this._tracingHelper,transactionOptions:{maxWait:f.transactionOptions?.maxWait??2e3,timeout:f.transactionOptions?.timeout??5e3,isolationLevel:f.transactionOptions?.isolationLevel},logEmitter:o,isBundled:e.isBundled,adapter:i},this._accelerateEngineConfig={...this._engineConfig,accelerateUtils:{resolveDatasourceUrl:Gt,getBatchRequestPayload:_t,prismaGraphQLToJSError:qt,PrismaClientUnknownRequestError:J,PrismaClientInitializationError:I,PrismaClientKnownRequestError:Q,debug:ee("prisma:client:accelerateEngine"),engineVersion:To.version,clientVersion:e.clientVersion}},ve("clientVersion",e.clientVersion),this._engine=Di(e,this._engineConfig),this._requestHandler=new or(this,o),f.log)for(let R of f.log){let L=typeof R=="string"?R:R.emit==="stdout"?R.level:null;L&&this.$on(L,S=>{rt.log(`${rt.tags[L]??""}`,S.message||S.query)})}this._metrics=new Be(this._engine)}catch(f){throw f.clientVersion=this._clientVersion,f}return this._appliedParent=pt(this)}get[Symbol.toStringTag](){return"PrismaClient"}$use(n){this._middlewares.use(n)}$on(n,i){n==="beforeExit"?this._engine.onBeforeExit(i):n&&this._engineConfig.logEmitter.on(n,i)}$connect(){try{return this._engine.start()}catch(n){throw n.clientVersion=this._clientVersion,n}}async $disconnect(){try{await this._engine.stop()}catch(n){throw n.clientVersion=this._clientVersion,n}finally{Sn()}}$executeRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"executeRaw",args:o,transaction:n,clientMethod:i,argsMapper:jr({clientMethod:i,activeProvider:a}),callsite:xe(this._errorFormat),dataPath:[],middlewareArgsMapper:s})}$executeRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0){let[s,a]=Co(n,i);return qr(this._activeProvider,s.text,s.values,Array.isArray(n)?"prisma.$executeRaw``":"prisma.$executeRaw(sql``)"),this.$executeRawInternal(o,"$executeRaw",s,a)}throw new W("`$executeRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#executeraw\n",{clientVersion:this._clientVersion})})}$executeRawUnsafe(n,...i){return this._createPrismaPromise(o=>(qr(this._activeProvider,n,i,"prisma.$executeRawUnsafe(, [...values])"),this.$executeRawInternal(o,"$executeRawUnsafe",[n,...i])))}$runCommandRaw(n){if(e.activeProvider!=="mongodb")throw new W(`The ${e.activeProvider} provider does not support $runCommandRaw. Use the mongodb provider.`,{clientVersion:this._clientVersion});return this._createPrismaPromise(i=>this._request({args:n,clientMethod:"$runCommandRaw",dataPath:[],action:"runCommandRaw",argsMapper:Hi,callsite:xe(this._errorFormat),transaction:i}))}async $queryRawInternal(n,i,o,s){let a=this._activeProvider;return this._request({action:"queryRaw",args:o,transaction:n,clientMethod:i,argsMapper:jr({clientMethod:i,activeProvider:a}),callsite:xe(this._errorFormat),dataPath:[],middlewareArgsMapper:s}).then(ho)}$queryRaw(n,...i){return this._createPrismaPromise(o=>{if(n.raw!==void 0||n.sql!==void 0)return this.$queryRawInternal(o,"$queryRaw",...Co(n,i));throw new W("`$queryRaw` is a tag function, please use it like the following:\n```\nconst result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`\n```\n\nOr read our docs at https://www.prisma.io/docs/concepts/components/prisma-client/raw-database-access#queryraw\n",{clientVersion:this._clientVersion})})}$queryRawUnsafe(n,...i){return this._createPrismaPromise(o=>this.$queryRawInternal(o,"$queryRawUnsafe",[n,...i]))}_transactionWithArray({promises:n,options:i}){let o=Ka.nextId(),s=so(n.length),a=n.map((f,v)=>{if(f?.[Symbol.toStringTag]!=="PrismaPromise")throw new Error("All elements of the array need to be Prisma Client promises. Hint: Please make sure you are not awaiting the Prisma client calls you intended to pass in the $transaction function.");let C=i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel,T={kind:"batch",id:o,index:v,isolationLevel:C,lock:s};return f.requestTransaction?.(T)??f});return vo(a)}async _transactionWithCallback({callback:n,options:i}){let o={traceparent:this._tracingHelper.getTraceParent()},s={maxWait:i?.maxWait??this._engineConfig.transactionOptions.maxWait,timeout:i?.timeout??this._engineConfig.transactionOptions.timeout,isolationLevel:i?.isolationLevel??this._engineConfig.transactionOptions.isolationLevel},a=await this._engine.transaction("start",o,s),f;try{let v={kind:"itx",...a};f=await n(this._createItxClient(v)),await this._engine.transaction("commit",o,a)}catch(v){throw await this._engine.transaction("rollback",o,a).catch(()=>{}),v}return f}_createItxClient(n){return pt(me(mi(this),[H("_appliedParent",()=>this._appliedParent._createItxClient(n)),H("_createPrismaPromise",()=>Qr(n)),H(Ga,()=>n.id),$e(ao)]))}$transaction(n,i){let o;typeof n=="function"?this._engineConfig.adapter?.adapterName==="@prisma/adapter-d1"?o=()=>{throw new Error("Cloudflare D1 does not support interactive transactions. We recommend you to refactor your queries with that limitation in mind, and use batch transactions with `prisma.$transactions([])` where applicable.")}:o=()=>this._transactionWithCallback({callback:n,options:i}):o=()=>this._transactionWithArray({promises:n,options:i});let s={name:"transaction",attributes:{method:"$transaction"}};return this._tracingHelper.runInChildSpan(s,o)}_request(n){n.otelParentCtx=this._tracingHelper.getActiveContext();let i=n.middlewareArgsMapper??Wa,o={args:i.requestArgsToMiddlewareArgs(n.args),dataPath:n.dataPath,runInTransaction:!!n.transaction,action:n.action,model:n.model},s={middleware:{name:"middleware",middleware:!0,attributes:{method:"$use"},active:!1},operation:{name:"operation",attributes:{method:o.action,model:o.model,name:o.model?`${o.model}.${o.action}`:o.action}}},a=-1,f=async v=>{let C=this._middlewares.get(++a);if(C)return this._tracingHelper.runInChildSpan(s.middleware,M=>C(v,ne=>(M?.end(),f(ne))));let{runInTransaction:T,args:O,...R}=v,L={...n,...R};O&&(L.args=i.middlewareArgsToRequestArgs(O)),n.transaction!==void 0&&T===!1&&delete L.transaction;let S=await wi(this,L);return L.model?gi({result:S,modelName:L.model,args:L.args,extensions:this._extensions,runtimeDataModel:this._runtimeDataModel}):S};return this._tracingHelper.runInChildSpan(s.operation,()=>f(o))}async _executeRequest({args:n,clientMethod:i,dataPath:o,callsite:s,action:a,model:f,argsMapper:v,transaction:C,unpacker:T,otelParentCtx:O,customDataProxyFetch:R}){try{n=v?v(n):n;let L={name:"serialize"},S=this._tracingHelper.runInChildSpan(L,()=>Wi({modelName:f,runtimeDataModel:this._runtimeDataModel,action:a,args:n,clientMethod:i,callsite:s,extensions:this._extensions,errorFormat:this._errorFormat,clientVersion:this._clientVersion,previewFeatures:this._previewFeatures}));return ee.enabled("prisma:client")&&(ve("Prisma Client call:"),ve(`prisma.${i}(${ei(n)})`),ve("Generated request:"),ve(JSON.stringify(S,null,2)+` `)),C?.kind==="batch"&&await C.lock,this._requestHandler.request({protocolQuery:S,modelName:f,action:a,clientMethod:i,dataPath:o,callsite:s,args:n,extensions:this._extensions,transaction:C,unpacker:T,otelParentCtx:O,otelChildCtx:this._tracingHelper.getActiveContext(),customDataProxyFetch:R})}catch(L){throw L.clientVersion=this._clientVersion,L}}get $metrics(){if(!this._hasPreviewFlag("metrics"))throw new W("`metrics` preview feature must be enabled in order to access metrics API",{clientVersion:this._clientVersion});return this._metrics}_hasPreviewFlag(n){return!!this._engineConfig.previewFeatures?.includes(n)}$applyPendingMigrations(){return this._engine.applyPendingMigrations()}}return t}function Co(e,t){return Ha(e)?[new X(e,t),to]:[e,ro]}function Ha(e){return Array.isArray(e)&&Array.isArray(e.raw)}u();c();m();p();d();l();var za=new Set(["toJSON","$$typeof","asymmetricMatch",Symbol.iterator,Symbol.toStringTag,Symbol.isConcatSpreadable,Symbol.toPrimitive]);function Ro(e){return new Proxy(e,{get(t,r){if(r in t)return t[r];if(!za.has(r))throw new TypeError(`Invalid enum value: ${String(r)}`)}})}u();c();m();p();d();l();l();0&&(module.exports={Debug,Decimal,Extensions,MetricsClient,NotFoundError,PrismaClientInitializationError,PrismaClientKnownRequestError,PrismaClientRustPanicError,PrismaClientUnknownRequestError,PrismaClientValidationError,Public,Sql,defineDmmfProperty,empty,getPrismaClient,getRuntime,join,makeStrictEnum,objectEnumValues,raw,sqltag,warnEnvConflicts,warnOnce}); //# sourceMappingURL=wasm.js.map ================================================ FILE: server/src/common/prisma-client/schema.prisma ================================================ model GenTable { tableId Int @id @default(autoincrement()) @map("table_id") @db.UnsignedInt tableName String? @default("") @map("table_name") @db.VarChar(200) tableComment String? @default("") @map("table_comment") @db.VarChar(500) subTableName String? @map("sub_table_name") @db.VarChar(64) subTableFkName String? @map("sub_table_fk_name") @db.VarChar(64) className String? @default("") @map("class_name") @db.VarChar(100) tplCategory String? @default("crud") @map("tpl_category") @db.VarChar(200) tplWebType String? @default("") @map("tpl_web_type") @db.VarChar(30) packageName String? @map("package_name") @db.VarChar(100) moduleName String? @map("module_name") @db.VarChar(30) businessName String? @map("business_name") @db.VarChar(30) functionName String? @map("function_name") @db.VarChar(50) functionAuthor String? @map("function_author") @db.VarChar(50) genType String? @default("0") @map("gen_type") @db.Char(1) genPath String? @default("/") @map("gen_path") @db.VarChar(200) options String? @map("options") @db.VarChar(1000) createBy String? @default("") @map("create_by") @db.VarChar(64) createTime String? @map("create_time") @db.VarChar(25) updateBy String? @default("") @map("update_by") @db.VarChar(64) updateTime String? @map("update_time") @db.VarChar(25) remark String? @db.VarChar(500) tableColumns GenTableColumn[] @@map("gen_table") } model GenTableColumn { columnId Int @id @default(autoincrement()) @map("column_id") @db.UnsignedInt tableId Int? @map("table_id") @db.UnsignedInt columnName String? @map("column_name") @db.VarChar(200) columnComment String? @map("column_comment") @db.VarChar(500) columnType String? @map("column_type") @db.VarChar(100) javaType String? @map("java_type") @db.VarChar(500) javaField String? @map("java_field") @db.VarChar(200) isPk String? @map("is_pk") @db.Char(1) isIncrement String? @map("is_increment") @db.Char(1) isRequired String? @map("is_required") @db.Char(1) isInsert String? @map("is_insert") @db.Char(1) isEdit String? @map("is_edit") @db.Char(1) isList String? @map("is_list") @db.Char(1) isQuery String? @map("is_query") @db.Char(1) queryType String? @default("EQ") @map("query_type") @db.VarChar(200) htmlType String? @map("html_type") @db.VarChar(200) dictType String? @default("") @map("dict_type") @db.VarChar(200) sort Int? @map("sort") createBy String? @default("") @map("create_by") @db.VarChar(64) createTime String? @map("create_time") @db.VarChar(25) updateBy String? @default("") @map("update_by") @db.VarChar(64) updateTime String? @map("update_time") @db.VarChar(25) table GenTable? @relation(fields: [tableId], references: [tableId]) @@index([tableId]) @@map("gen_table_column") } model SysConfig { configId Int @id @default(autoincrement()) @map("config_id") configName String? @default("") @map("config_name") @db.VarChar(100) configKey String? @default("") @map("config_key") @db.VarChar(100) configValue String? @default("") @map("config_value") @db.VarChar(500) configType String? @default("N") @map("config_type") @db.Char(1) createBy String? @default("") @map("create_by") @db.VarChar(64) createTime String? @map("create_time") @db.VarChar(25) updateBy String? @default("") @map("update_by") @db.VarChar(64) updateTime String? @map("update_time") @db.VarChar(25) remark String? @map("remark") @db.VarChar(500) @@map("sys_config") } model SysDept { deptId Int @id @default(autoincrement()) @map("dept_id") @db.UnsignedInt parentId Int? @default(0) @map("parent_id") @db.UnsignedInt ancestors String? @default("") @map("ancestors") @db.VarChar(50) deptName String? @default("") @map("dept_name") @db.VarChar(30) orderNum Int? @default(0) @map("order_num") leader String? @map("leader") @db.VarChar(20) phone String? @map("phone") @db.VarChar(11) email String? @map("email") @db.VarChar(50) status String? @default("1") @map("status") @db.Char(1) createBy String? @default("") @map("create_by") @db.VarChar(64) createTime String? @map("create_time") @db.VarChar(25) updateBy String? @default("") @map("update_by") @db.VarChar(64) updateTime String? @map("update_time") @db.VarChar(25) users SysUser[] roles SysRoleDept[] @@map("sys_dept") } model SysDictData { dictCode Int @id @default(autoincrement()) @map("dict_code") @db.UnsignedInt dictSort Int? @default(0) @map("dict_sort") dictLabel String? @default("") @map("dict_label") @db.VarChar(100) dictValue String? @default("") @map("dict_value") @db.VarChar(100) dictType String? @default("") @map("dict_type") @db.VarChar(100) cssClass String? @map("css_class") @db.VarChar(100) listClass String? @map("list_class") @db.VarChar(100) isDefault String? @default("N") @map("is_default") @db.Char(1) status String? @default("1") @map("status") @db.Char(1) createBy String? @default("") @map("create_by") @db.VarChar(64) createTime String? @map("create_time") @db.VarChar(25) updateBy String? @default("") @map("update_by") @db.VarChar(64) updateTime String? @map("update_time") @db.VarChar(25) remark String? @map("remark") @db.VarChar(500) sysDictType SysDictType? @relation(fields: [dictType], references: [dictType]) @@index([dictType]) @@map("sys_dict_data") } model SysDictType { dictId Int @id @default(autoincrement()) @map("dict_id") @db.UnsignedInt dictName String? @default("") @map("dict_name") @db.VarChar(100) dictType String? @unique(map: "dict_type") @default("") @map("dict_type") @db.VarChar(100) status String? @default("1") @map("status") @db.Char(1) createBy String? @default("") @map("create_by") @db.VarChar(64) createTime String? @map("create_time") @db.VarChar(25) updateBy String? @default("") @map("update_by") @db.VarChar(64) updateTime String? @map("update_time") @db.VarChar(25) remark String? @map("remark") @db.VarChar(500) dictDatas SysDictData[] @@map("sys_dict_type") } model SysLogininfor { infoId Int @id @default(autoincrement()) @map("info_id") @db.UnsignedInt userName String? @default("") @map("user_name") @db.VarChar(50) ipaddr String? @default("") @map("ipaddr") @db.VarChar(128) loginLocation String? @default("") @map("login_location") @db.VarChar(255) browser String? @default("") @map("browser") @db.VarChar(50) os String? @default("") @map("os") @db.VarChar(50) status String? @default("1") @map("status") @db.Char(1) msg String? @default("") @map("msg") @db.VarChar(255) loginTime String? @map("login_time") @db.VarChar(25) @@index([loginTime], map: "idx_sys_logininfor_lt") @@index([status], map: "idx_sys_logininfor_s") @@map("sys_logininfor") } model SysMenu { menuId Int @id @default(autoincrement()) @map("menu_id") @db.UnsignedInt menuName String @map("menu_name") @db.VarChar(50) parentId Int? @default(0) @map("parent_id") @db.UnsignedInt orderNum Int? @default(0) @map("order_num") path String? @default("") @map("path") @db.VarChar(200) component String? @map("component") @db.VarChar(255) query String? @map("query") @db.VarChar(255) isFrame Int? @default(0) @map("is_frame") isCache Int? @default(1) @map("is_cache") menuType String? @default("") @map("menu_type") @db.Char(1) visible String? @default("1") @map("visible") @db.Char(1) status String? @default("1") @map("status") @db.Char(1) perms String? @map("perms") @db.VarChar(100) icon String? @default("#") @map("icon") @db.VarChar(100) createBy String? @default("") @map("create_by") @db.VarChar(64) createTime String? @map("create_time") @db.VarChar(25) updateBy String? @default("") @map("update_by") @db.VarChar(64) updateTime String? @map("update_time") @db.VarChar(25) remark String? @default("") @map("remark") @db.VarChar(500) roles SysRoleMenu[] @@map("sys_menu") } model SysNotice { noticeId Int @id @default(autoincrement()) @map("notice_id") noticeTitle String @map("notice_title") @db.VarChar(50) noticeType String @map("notice_type") @db.Char(1) noticeContent String? @map("notice_content") @db.MediumText status String? @default("1") @map("status") @db.Char(1) createBy String? @default("") @map("create_by") @db.VarChar(64) createTime String? @map("create_time") @db.VarChar(25) updateBy String? @default("") @map("update_by") @db.VarChar(64) updateTime String? @map("update_time") @db.VarChar(25) remark String? @map("remark") @db.VarChar(255) @@map("sys_notice") } model SysPost { postId Int @id @default(autoincrement()) @map("post_id") @db.UnsignedInt postCode String @map("post_code") @db.VarChar(64) postName String @map("post_name") @db.VarChar(50) postSort Int @map("post_sort") status String @default("1") @map("status") @db.Char(1) createBy String? @default("") @map("create_by") @db.VarChar(64) createTime String? @map("create_time") @db.VarChar(25) updateBy String? @default("") @map("update_by") @db.VarChar(64) updateTime String? @map("update_time") @db.VarChar(25) remark String? @map("remark") @db.VarChar(500) users SysUserPost[] @@map("sys_post") } model SysUserPost { userId Int @map("user_id") @db.UnsignedInt postId Int @map("post_id") @db.UnsignedInt user SysUser @relation(fields: [userId], references: [userId]) post SysPost @relation(fields: [postId], references: [postId]) @@id([userId, postId]) @@index([postId]) @@map("sys_user_post") } model SysRoleDept { roleId Int @map("role_id") @db.UnsignedInt deptId Int @map("dept_id") @db.UnsignedInt role SysRole @relation(fields: [roleId], references: [roleId]) dept SysDept @relation(fields: [deptId], references: [deptId]) @@id([roleId, deptId]) @@index([deptId]) @@map("sys_role_dept") } model SysRoleMenu { roleId Int @map("role_id") @db.UnsignedInt menuId Int @map("menu_id") @db.UnsignedInt menu SysMenu @relation(fields: [menuId], references: [menuId]) role SysRole @relation(fields: [roleId], references: [roleId]) @@id([roleId, menuId]) @@index([menuId]) @@map("sys_role_menu") } model SysUser { userId Int @id @default(autoincrement()) @map("user_id") @db.UnsignedInt deptId Int? @map("dept_id") @db.UnsignedInt userName String @map("user_name") @db.VarChar(30) nickName String @map("nick_name") @db.VarChar(30) userType String? @default("00") @map("user_type") @db.VarChar(2) email String? @default("") @map("email") @db.VarChar(50) phonenumber String? @default("") @map("phonenumber") @db.VarChar(11) sex String? @default("0") @map("sex") @db.Char(1) avatar String? @default("") @map("avatar") @db.VarChar(100) password String? @default("") @map("password") @db.VarChar(100) status String? @default("1") @map("status") @db.Char(1) loginIp String? @default("") @map("login_ip") @db.VarChar(128) loginDate String? @map("login_date") @db.VarChar(25) createBy String? @default("") @map("create_by") @db.VarChar(64) createTime String? @map("create_time") @db.VarChar(25) updateBy String? @default("") @map("update_by") @db.VarChar(64) updateTime String? @map("update_time") @db.VarChar(25) remark String? @map("remark") @db.VarChar(500) dept SysDept? @relation(fields: [deptId], references: [deptId]) roles SysUserRole[] posts SysUserPost[] @@index([deptId]) @@map("sys_user") } model SysRole { roleId Int @id @default(autoincrement()) @map("role_id") @db.UnsignedInt roleName String @map("role_name") @db.VarChar(30) roleKey String @map("role_key") @db.VarChar(100) roleSort Int @map("role_sort") dataScope String? @default("5") @map("data_scope") @db.Char(1) menuCheckStrictly Int? @default(1) @map("menu_check_strictly") @db.TinyInt deptCheckStrictly Int? @default(1) @map("dept_check_strictly") @db.TinyInt status String @default("1") @map("status") @db.Char(1) createBy String? @default("") @map("create_by") @db.VarChar(64) createTime String? @map("create_time") @db.VarChar(25) updateBy String? @default("") @map("update_by") @db.VarChar(64) updateTime String? @map("update_time") @db.VarChar(25) remark String? @map("remark") @db.VarChar(500) users SysUserRole[] menus SysRoleMenu[] depts SysRoleDept[] @@map("sys_role") } model SysUserRole { userId Int @map("user_id") @db.UnsignedInt roleId Int @map("role_id") @db.UnsignedInt user SysUser @relation(fields: [userId], references: [userId]) role SysRole @relation(fields: [roleId], references: [roleId]) @@id([userId, roleId]) @@index([roleId]) @@map("sys_user_role") } generator client { provider = "prisma-client-js" output = "./common/prisma-client" previewFeatures = ["views", "relationJoins", "prismaSchemaFolder", "omitApi"] //这里可以指定平台引擎,native就是当前系统, 如果需要其他系统的自行添加,或者到目标系统执行npx prisma generate binaryTargets = ["native"] // binaryTargets = ["native", "windows", "linux-musl","debian-openssl-3.0.x","darwin","darwin-arm64"] } datasource db { provider = "mysql" url = env("DATABASE_URL") relationMode = "prisma" } ================================================ FILE: server/src/common/prisma-client/wasm.d.ts ================================================ export * from './index' ================================================ FILE: server/src/common/prisma-client/wasm.js ================================================ Object.defineProperty(exports, "__esModule", { value: true }); const { Decimal, objectEnumValues, makeStrictEnum, Public, getRuntime, } = require('./runtime/index-browser.js') const Prisma = {} exports.Prisma = Prisma exports.$Enums = {} /** * Prisma Client JS version: 5.15.0 * Query Engine version: 12e25d8d06f6ea5a0252864dd9a03b1bb51f3022 */ Prisma.prismaVersion = { client: "5.15.0", engine: "12e25d8d06f6ea5a0252864dd9a03b1bb51f3022" } Prisma.PrismaClientKnownRequestError = () => { const runtimeName = getRuntime().prettyName; throw new Error(`PrismaClientKnownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, )}; Prisma.PrismaClientUnknownRequestError = () => { const runtimeName = getRuntime().prettyName; throw new Error(`PrismaClientUnknownRequestError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, )} Prisma.PrismaClientRustPanicError = () => { const runtimeName = getRuntime().prettyName; throw new Error(`PrismaClientRustPanicError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, )} Prisma.PrismaClientInitializationError = () => { const runtimeName = getRuntime().prettyName; throw new Error(`PrismaClientInitializationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, )} Prisma.PrismaClientValidationError = () => { const runtimeName = getRuntime().prettyName; throw new Error(`PrismaClientValidationError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, )} Prisma.NotFoundError = () => { const runtimeName = getRuntime().prettyName; throw new Error(`NotFoundError is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, )} Prisma.Decimal = Decimal /** * Re-export of sql-template-tag */ Prisma.sql = () => { const runtimeName = getRuntime().prettyName; throw new Error(`sqltag is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, )} Prisma.empty = () => { const runtimeName = getRuntime().prettyName; throw new Error(`empty is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, )} Prisma.join = () => { const runtimeName = getRuntime().prettyName; throw new Error(`join is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, )} Prisma.raw = () => { const runtimeName = getRuntime().prettyName; throw new Error(`raw is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, )} Prisma.validator = Public.validator /** * Extensions */ Prisma.getExtensionContext = () => { const runtimeName = getRuntime().prettyName; throw new Error(`Extensions.getExtensionContext is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, )} Prisma.defineExtension = () => { const runtimeName = getRuntime().prettyName; throw new Error(`Extensions.defineExtension is unable to run in this browser environment, or has been bundled for the browser (running in ${runtimeName}). In case this error is unexpected for you, please report it in https://pris.ly/prisma-prisma-bug-report`, )} /** * Shorthand utilities for JSON filtering */ Prisma.DbNull = objectEnumValues.instances.DbNull Prisma.JsonNull = objectEnumValues.instances.JsonNull Prisma.AnyNull = objectEnumValues.instances.AnyNull Prisma.NullTypes = { DbNull: objectEnumValues.classes.DbNull, JsonNull: objectEnumValues.classes.JsonNull, AnyNull: objectEnumValues.classes.AnyNull } /** * Enums */ exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ ReadUncommitted: 'ReadUncommitted', ReadCommitted: 'ReadCommitted', RepeatableRead: 'RepeatableRead', Serializable: 'Serializable' }); exports.Prisma.GenTableScalarFieldEnum = { tableId: 'tableId', tableName: 'tableName', tableComment: 'tableComment', subTableName: 'subTableName', subTableFkName: 'subTableFkName', className: 'className', tplCategory: 'tplCategory', tplWebType: 'tplWebType', packageName: 'packageName', moduleName: 'moduleName', businessName: 'businessName', functionName: 'functionName', functionAuthor: 'functionAuthor', genType: 'genType', genPath: 'genPath', options: 'options', createBy: 'createBy', createTime: 'createTime', updateBy: 'updateBy', updateTime: 'updateTime', remark: 'remark' }; exports.Prisma.RelationLoadStrategy = { query: 'query', join: 'join' }; exports.Prisma.GenTableColumnScalarFieldEnum = { columnId: 'columnId', tableId: 'tableId', columnName: 'columnName', columnComment: 'columnComment', columnType: 'columnType', javaType: 'javaType', javaField: 'javaField', isPk: 'isPk', isIncrement: 'isIncrement', isRequired: 'isRequired', isInsert: 'isInsert', isEdit: 'isEdit', isList: 'isList', isQuery: 'isQuery', queryType: 'queryType', htmlType: 'htmlType', dictType: 'dictType', sort: 'sort', createBy: 'createBy', createTime: 'createTime', updateBy: 'updateBy', updateTime: 'updateTime' }; exports.Prisma.SysConfigScalarFieldEnum = { configId: 'configId', configName: 'configName', configKey: 'configKey', configValue: 'configValue', configType: 'configType', createBy: 'createBy', createTime: 'createTime', updateBy: 'updateBy', updateTime: 'updateTime', remark: 'remark' }; exports.Prisma.SysDeptScalarFieldEnum = { deptId: 'deptId', parentId: 'parentId', ancestors: 'ancestors', deptName: 'deptName', orderNum: 'orderNum', leader: 'leader', phone: 'phone', email: 'email', status: 'status', createBy: 'createBy', createTime: 'createTime', updateBy: 'updateBy', updateTime: 'updateTime' }; exports.Prisma.SysDictDataScalarFieldEnum = { dictCode: 'dictCode', dictSort: 'dictSort', dictLabel: 'dictLabel', dictValue: 'dictValue', dictType: 'dictType', cssClass: 'cssClass', listClass: 'listClass', isDefault: 'isDefault', status: 'status', createBy: 'createBy', createTime: 'createTime', updateBy: 'updateBy', updateTime: 'updateTime', remark: 'remark' }; exports.Prisma.SysDictTypeScalarFieldEnum = { dictId: 'dictId', dictName: 'dictName', dictType: 'dictType', status: 'status', createBy: 'createBy', createTime: 'createTime', updateBy: 'updateBy', updateTime: 'updateTime', remark: 'remark' }; exports.Prisma.SysLogininforScalarFieldEnum = { infoId: 'infoId', userName: 'userName', ipaddr: 'ipaddr', loginLocation: 'loginLocation', browser: 'browser', os: 'os', status: 'status', msg: 'msg', loginTime: 'loginTime' }; exports.Prisma.SysMenuScalarFieldEnum = { menuId: 'menuId', menuName: 'menuName', parentId: 'parentId', orderNum: 'orderNum', path: 'path', component: 'component', query: 'query', isFrame: 'isFrame', isCache: 'isCache', menuType: 'menuType', visible: 'visible', status: 'status', perms: 'perms', icon: 'icon', createBy: 'createBy', createTime: 'createTime', updateBy: 'updateBy', updateTime: 'updateTime', remark: 'remark' }; exports.Prisma.SysNoticeScalarFieldEnum = { noticeId: 'noticeId', noticeTitle: 'noticeTitle', noticeType: 'noticeType', noticeContent: 'noticeContent', status: 'status', createBy: 'createBy', createTime: 'createTime', updateBy: 'updateBy', updateTime: 'updateTime', remark: 'remark' }; exports.Prisma.SysPostScalarFieldEnum = { postId: 'postId', postCode: 'postCode', postName: 'postName', postSort: 'postSort', status: 'status', createBy: 'createBy', createTime: 'createTime', updateBy: 'updateBy', updateTime: 'updateTime', remark: 'remark' }; exports.Prisma.SysUserPostScalarFieldEnum = { userId: 'userId', postId: 'postId' }; exports.Prisma.SysRoleDeptScalarFieldEnum = { roleId: 'roleId', deptId: 'deptId' }; exports.Prisma.SysRoleMenuScalarFieldEnum = { roleId: 'roleId', menuId: 'menuId' }; exports.Prisma.SysUserScalarFieldEnum = { userId: 'userId', deptId: 'deptId', userName: 'userName', nickName: 'nickName', userType: 'userType', email: 'email', phonenumber: 'phonenumber', sex: 'sex', avatar: 'avatar', password: 'password', status: 'status', loginIp: 'loginIp', loginDate: 'loginDate', createBy: 'createBy', createTime: 'createTime', updateBy: 'updateBy', updateTime: 'updateTime', remark: 'remark' }; exports.Prisma.SysRoleScalarFieldEnum = { roleId: 'roleId', roleName: 'roleName', roleKey: 'roleKey', roleSort: 'roleSort', dataScope: 'dataScope', menuCheckStrictly: 'menuCheckStrictly', deptCheckStrictly: 'deptCheckStrictly', status: 'status', createBy: 'createBy', createTime: 'createTime', updateBy: 'updateBy', updateTime: 'updateTime', remark: 'remark' }; exports.Prisma.SysUserRoleScalarFieldEnum = { userId: 'userId', roleId: 'roleId' }; exports.Prisma.SortOrder = { asc: 'asc', desc: 'desc' }; exports.Prisma.NullsOrder = { first: 'first', last: 'last' }; exports.Prisma.ModelName = { GenTable: 'GenTable', GenTableColumn: 'GenTableColumn', SysConfig: 'SysConfig', SysDept: 'SysDept', SysDictData: 'SysDictData', SysDictType: 'SysDictType', SysLogininfor: 'SysLogininfor', SysMenu: 'SysMenu', SysNotice: 'SysNotice', SysPost: 'SysPost', SysUserPost: 'SysUserPost', SysRoleDept: 'SysRoleDept', SysRoleMenu: 'SysRoleMenu', SysUser: 'SysUser', SysRole: 'SysRole', SysUserRole: 'SysUserRole' }; /** * This is a stub Prisma Client that will error at runtime if called. */ class PrismaClient { constructor() { return new Proxy(this, { get(target, prop) { let message const runtime = getRuntime() if (runtime.isEdge) { message = `PrismaClient is not configured to run in ${runtime.prettyName}. In order to run Prisma Client on edge runtime, either: - Use Prisma Accelerate: https://pris.ly/d/accelerate - Use Driver Adapters: https://pris.ly/d/driver-adapters `; } else { message = 'PrismaClient is unable to run in this browser environment, or has been bundled for the browser (running in `' + runtime.prettyName + '`).' } message += ` If this is unexpected, please open an issue: https://pris.ly/prisma-prisma-bug-report` throw new Error(message) } }) } } exports.PrismaClient = PrismaClient Object.assign(exports, Prisma) ================================================ FILE: server/src/common/result/Result.ts ================================================ import { HttpStatus } from '@/common/constant/HttpStatus'; import { TableDataInfo } from '../domain/TableDataInfo'; import { nowDateTime } from '@/common/utils'; import { ApiProperty } from '@nestjs/swagger'; export default class Result { @ApiProperty({ example: 200, description: '响应code', }) code: number = HttpStatus.SUCCESS; @ApiProperty({ example: true, description: '请求是否成功处理', }) success: boolean = true; @ApiProperty({ example: '成功', description: '接口备注信息', }) msg: string = '成功'; @ApiProperty({ default: null, description: '返回数据', }) data: T = null; @ApiProperty({ example: '2024-04-28 22:32:35', description: '处理时间', }) time: string | null = null; constructor( code: number = HttpStatus.SUCCESS, success: boolean = true, msg: string = '成功', data: T = null, ) { this.code = code; this.success = success; this.msg = msg; this.data = data; this.time = nowDateTime(); } static Ok(data: K = null, msg: string = '成功') { return new Result(HttpStatus.SUCCESS, true, msg, data); } static ok(data: K = null, msg: string = '成功') { return new Result(HttpStatus.SUCCESS, true, msg, data); } static Error(msg: string = 'error', code: number = HttpStatus.ERROR) { return new Result(code, false, msg, null); } static BadRequest(msg: string = 'bad request') { return new Result(HttpStatus.BAD_REQUEST, false, msg, null); } static NotFound(msg: string = 'notFound') { return Result.Error(msg, HttpStatus.NOT_FOUND); } static Unauthorized(msg: string = '身份校验不通过!') { return Result.Error(msg, HttpStatus.UNAUTHORIZED); } static Forbidden(msg: string = '您没有权限!') { return Result.Error(msg, HttpStatus.FORBIDDEN); } static Validation(msg: string = '参数不正确!') { return Result.Error(msg, HttpStatus.Validation); } static Frequent(msg: string = '您的ip请求过于频繁!') { return Result.Error(msg, HttpStatus.FREQUENT_REQUESTS); } static toAjax(affectRows: number) { return affectRows > 0 ? Result.ok(null, '操作成功!') : Result.Error('操作失败!'); } static TableData(data: { rows: L[]; total: number }) { return new TableDataInfo( data.rows, data.total, HttpStatus.SUCCESS, '查询成功', ); } } ================================================ FILE: server/src/common/service/auth/auth.service.ts ================================================ import { LoginBody } from '@/admin/system/auth/dto/LoginBody'; import { redisUtils } from '@/common/utils/redisUtils'; import { Config } from '@/config'; import { BadRequestException, Injectable } from '@nestjs/common'; import * as bowser from 'bowser'; import { HmacSHA256 } from 'crypto-js'; import { PrismaService } from '@/common/service/prisma/prisma.service'; import * as libqqwry from 'lib-qqwry'; import { SysLogininfor, SysRole, SysUser } from '@prismaClient'; import * as jwt from 'jsonwebtoken'; import { Constants } from '@/common/constant/Constants'; import { Request } from 'express'; import { nowDateTime } from '@/common/utils'; import { ValidationException } from '@/common/exception/ValidationException'; import { capitalize } from 'lodash'; import * as assert from 'assert'; import { randomUUID } from 'crypto'; const qqwry = libqqwry(); //ip解析 qqwry.speed(); //启用内存急速模式; @Injectable() export class AuthService { constructor(private prisma: PrismaService) {} /**@desc 登录 */ async login(loginBody: LoginBody, req: Request) { const { username, password, uuid } = loginBody; let loginInfo: SysLogininfor; //用户登录日志 { loginInfo = { infoId: undefined, userName: username, ipaddr: req.ip, loginLocation: '未知', browser: '未知', os: '未知', status: '0', msg: '', loginTime: nowDateTime(), }; try { if (req.ip?.includes('127.0.0.1') || req.ip == '::1') { loginInfo.ipaddr = '127.0.0.1'; loginInfo.loginLocation = '内网IP'; } else { const d = qqwry.searchIP(req.ip); loginInfo.loginLocation = d.Country; } } catch (e) {} const agent = req.headers['user-agent']; try { const d = bowser.parse(agent); loginInfo.os = d.os.name + ' ' + d.os.versionName; loginInfo.browser = d.browser.name + ' ' + d.browser?.version?.split('.')?.[0] || ''; } catch (e) {} } //登录验证码是否开启 { //是否开启验证码 const enable = await redisUtils.get( Constants.SYS_CONFIG_KEY + 'sys.account.captchaEnabled', ); const captchaEnabled: boolean = enable == '' ? true : enable === 'true'; if (captchaEnabled) { let code = loginBody.code; if (!uuid || !code) { throw new ValidationException('参数不正确!'); } code = code.toLowerCase(); const isPass = await this.validaCaptcha(uuid, code); if (!isPass) { loginInfo.msg = '验证码错误!'; await this.prisma.sysLogininfor.create({ data: loginInfo, }); throw new BadRequestException('验证码错误!'); } } } //ip是否被封禁 { const ips = ( await redisUtils.get(Constants.SYS_CONFIG_KEY + 'sys.login.blackIPList') ).split(','); if (ips.length) { const isBlack = ips.some((v) => v === req.ip); if (isBlack) { loginInfo.msg = 'ip:' + loginInfo.ipaddr + '被封禁'; await this.prisma.sysLogininfor.create({ data: loginInfo, }); } assert(!isBlack, '你的ip已经被封禁!'); } } //验证用户密码是否正确 { const user = await this.prisma.sysUser.findFirst({ where: { userName: username, }, select: { userId: true, password: true, status: true, dept: { select: { deptName: true, }, }, }, }); if (!user) { loginInfo.msg = '用户不存在'; await this.prisma.sysLogininfor.create({ data: loginInfo, }); throw new BadRequestException('用户不存在'); } if (user.password !== this.encrypt(password)) { loginInfo.msg = '密码不正确'; await this.prisma.sysLogininfor.create({ data: loginInfo, }); throw new BadRequestException('密码不正确'); } if (user.status !== '1') { loginInfo.msg = '账号被封禁'; await this.prisma.sysLogininfor.create({ data: loginInfo, }); throw new BadRequestException('账号被封禁'); } loginInfo.status = '1'; loginInfo.msg = '登录成功'; await this.prisma.sysLogininfor.create({ data: loginInfo, }); const cacheInfo = { tokenId: randomUUID(), userId: user.userId, deptName: user.dept?.deptName, userName: loginInfo.userName, ipaddr: loginInfo.ipaddr, loginLocation: loginInfo.loginLocation, browser: loginInfo.browser, os: loginInfo.os, loginTime: loginInfo.loginTime, }; const token = this.createToken(cacheInfo); //存储token await redisUtils.set( Constants.LOGIN_TOKEN_KEY + cacheInfo.tokenId, JSON.stringify(cacheInfo), Config.token.expiresIn, ); //初始化用户信息存到reids缓存包括权限。。 await this.refreshUserInfo(user.userId); return token; } } //获取用户信息,包括权限和角色 async getUserInfo(userId: number) { //如果redis有用户信息直接返回 const userinfo: SysUser & { roles: string[]; permissions: string[] } = JSON.parse( (await redisUtils.get(Constants.LOGIN_CACHE_TOKEN_KEY + userId)) || null, ); if (userinfo !== null) return userinfo; const user = await this.prisma.sysUser.findFirst({ where: { userId: userId, status: '1', //正常状态 }, include: { dept: true, roles: { include: { role: true, }, }, }, }); if (!user) return null; const ro = user.roles.map((v) => v.role).filter((v) => v.status === '1'); const permissions = await this.getRolePermission(ro); const result = { ...user, roles: ro.map((v) => v.roleKey), permissions, }; //存储到redis缓存,下次直接拿 await redisUtils.set( Constants.LOGIN_CACHE_TOKEN_KEY + userId, JSON.stringify(result), Config.token.expiresIn, ); return result; } //强制刷新redis缓存的用户信息 async refreshUserInfo(userId: number) { const user = await this.prisma.sysUser.findFirst({ where: { userId: userId, status: '1', //正常状态 }, include: { dept: true, roles: { include: { role: true, }, }, }, }); if (!user) return null; const ro = user.roles.map((v) => v.role).filter((v) => v.status === '1'); const permissions = await this.getRolePermission(ro); const result = { ...user, roles: ro.map((v) => v.roleKey), permissions, }; //存储到redis缓存,下次直接拿 await redisUtils.set( Constants.LOGIN_CACHE_TOKEN_KEY + userId, JSON.stringify(result), Config.token.expiresIn, ); return true; } //获取用户能访问的路由 async getRouters(userId: number) { //超级管理员,返回全部信息 if (await this.isAdmin(userId)) { const r = await this.prisma.sysMenu.findMany({ where: { menuType: { in: ['M', 'C'], }, status: '1', }, orderBy: [ { parentId: 'asc', }, { orderNum: 'asc', }, ], }); return this.MenuTree(r, 'menuId', 'parentId', 0); } else { const r: any = await this.prisma .$queryRaw`select distinct m.menu_id as menuId, m.parent_id as parentId, m.menu_name as menuName, m.path, m.component, m.query, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame as isFrame, m.is_cache as isCache, m.menu_type as menuType, m.icon, m.order_num as orderNum, m.create_time as createTime from sys_menu m left join sys_role_menu rm on m.menu_id = rm.menu_id left join sys_user_role ur on rm.role_id = ur.role_id left join sys_role ro on ur.role_id = ro.role_id left join sys_user u on ur.user_id = u.user_id where u.user_id = ${userId} and m.menu_type in ('M', 'C') and m.status = 1 and ro.status = 1 order by m.parent_id, m.order_num`; return this.MenuTree(r, 'menuId', 'parentId', 0); } } //获取角色组所有权限 async getRolePermission(roles: SysRole[]) { //如果角色具有所有权限 if (roles.some((v) => v.dataScope === '1')) return ['*:*:*']; const perms: string[] = []; for (let i = 0; i < roles.length; i++) { const r: { perms: string }[] = await this.prisma .$queryRaw`select distinct a.perms from sys_menu a left join sys_role_menu b on a.menu_id = b.menu_id where a.status = '1' and b.role_id = ${roles[i].roleId}`; for (const item of r) { if (item && item.perms?.includes(':') && !perms.includes(item.perms)) { perms.push(item.perms); } } } return perms; } //获取用户角色 async getUserRoles(userId: number) { return (await this.getUserInfo(userId)).roles; } //获取用户权限 async getUserPermissions(userId: number) { return (await this.getUserInfo(userId)).permissions; } //检查用户是否含有权限 async hasPermission(permission: string, userId: number) { const AllPermission = '*:*:*'; const permissions = await this.getUserPermissions(userId); return ( permissions.includes(AllPermission) || permissions.some((v) => v === permission) ); } //检测用户是否属于某个角色 async hasRole(role: string, userId: number) { const roles = await this.getUserRoles(userId); return roles.some((v) => v === role); } //检测用户是否管理员 async isAdmin(userId: number) { return ( userId === 1 || (await this.getUserPermissions(userId)).includes('*:*:*') ); } /**@desc 菜单树形化 */ MenuTree(arr = [], id = 'id', pid = 'pid', rootValue = 0) { const result = []; const map = {}; for (const item of arr) { map[item[id]] = { component: item.component, hidden: item.visible == 0, name: capitalize(item.path?.replaceAll('/', '')), path: item.path, meta: { icon: item.icon, link: null, noCache: item.isCache == 0, title: item.menuName, }, children: map[item[id]]?.children || [], }; if (item[pid] == rootValue && item.menuType === 'M') { map[item[id]].alwaysShow = true; map[item[id]].component = map[item[id]].component || 'Layout'; map[item[id]].redirect = 'noRedirect'; map[item[id]].path = '/' + (map[item[id]].path || map[item[id]].path); result.push(map[item[id]]); } else if (item[pid] == rootValue && item.menuType === 'C') { //是外链 if (item.isFrame == '1') { result.unshift({ component: 'Layout', hidden: item.visible == 0, name: item.path, path: item.path, meta: { icon: item.icon, link: true, noCache: item.isCache == 0, title: item.menuName, }, }); } else { //顶级菜单 result.unshift({ path: '/', component: 'Layout', hidden: item.visible == 0, meta: { icon: item.icon, link: null, noCache: item.isCache == 0, title: item.menuName, }, children: [ { component: item.component, hidden: item.visible == 0, name: capitalize(item.path?.replaceAll('/', '')), path: item.path, meta: { icon: item.icon, link: null, noCache: item.isCache == 0, title: item.menuName, }, }, ], }); } } else { if (!map[item[pid]]) { map[item[pid]] = { children: [], }; } map[item[pid]].children.push(map[item[id]]); } } for (const k in map) { if (!map[k].children.length) { delete map[k].children; } else { map[k]['alwaysShow'] = true; map[k]['redirect'] = 'noRedirect'; if (!map[k]['component']) { map[k]['component'] = 'ParentView'; } } } return result; } /** * @desc 检查验证码是否正确 */ async validaCaptcha(uuid: string, code: string) { const r = await redisUtils.get(Constants.CAPTCHA_CODE_KEY + uuid); if (r != code) { redisUtils.del(Constants.CAPTCHA_CODE_KEY + uuid); return false; } else { return true; } } /** * @desc 密码加密 */ encrypt(str: string): string { return HmacSHA256(str, Config.crypto.psdSecret).toString(); } /**@desc 创建token */ createToken(payload) { return jwt.sign(payload, Config.token.secret, { expiresIn: Config.token.expiresIn, }); } /**@desc 解析token */ verifyToken(token: string) { return new Promise((resolve, reject) => { jwt.verify(token, Config.token.secret, (err, data) => { if (err) { reject(err); } else { resolve(data); } }); }); } } ================================================ FILE: server/src/common/service/gen/gen-template/js/api.js.vm ================================================ import request from '@/utils/request' /**@description 查询${functionName}列表 */ export function list${BusinessName}(query) { return request({ url: '/${moduleName}/${businessName}/list', method: 'get', params: query }) } /**@description 查询${functionName}详细 */ export function get${BusinessName}(${pkColumn.javaField}) { return request({ url: '/${moduleName}/${businessName}/' + ${pkColumn.javaField}, method: 'get' }) } /**@description 新增${functionName} */ export function add${BusinessName}(data) { return request({ url: '/${moduleName}/${businessName}', method: 'post', data: data }) } /**@description 修改${functionName} */ export function update${BusinessName}(data) { return request({ url: '/${moduleName}/${businessName}', method: 'put', data: data }) } /**@description 删除${functionName} */ export function del${BusinessName}(${pkColumn.javaField}) { return request({ url: '/${moduleName}/${businessName}/' + ${pkColumn.javaField}, method: 'delete' }) } ================================================ FILE: server/src/common/service/gen/gen-template/node/controller.ts.vm ================================================ import { Body, Controller, Delete, Get, Param, ParseArrayPipe, ParseIntPipe, Post, Put, Query, Req, Res } from '@nestjs/common'; import { ParseIntArrayPipe } from '@/common/pipe/parse-int-array.pipe'; import Result from '@/common/result/Result'; import { ApiBody, ApiOperation, ApiQuery, ApiResponse, ApiTags, ApiBearerAuth } from '@nestjs/swagger'; import { RequirePermission } from '@/common/decorator/require-premission.decorator'; import { nowDateTime } from '@/common/utils'; import { ${className}Service } from './service/${filename}.service'; import { Query${className}Dto, Create${className}Dto, Update${className}Dto } from './dto/index'; import { Response } from 'express'; import { $modelName1 } from '@prismaClient'; import { TableDataInfo } from '@/common/domain/TableDataInfo'; @ApiTags("${functionName}") @ApiBearerAuth() @Controller('${moduleName}/${businessName}') export class ${className}Controller { constructor(private ${businessName}Service: ${className}Service) { } @ApiOperation({ summary: "查询${functionName}列表" }) @ApiResponse({ type: TableDataInfo<${modelName1}> }) @RequirePermission("${moduleName}:${businessName}:list") @Get("/list") async list${BusinessName}(@Query() q: Query${className}Dto): Promise> { return Result.TableData(await this.${businessName}Service.select${BusinessName}List(q)) } @ApiOperation({ summary: "查询${functionName}所有" }) @ApiResponse({ type: Result<${modelName1}[]> }) @RequirePermission("${moduleName}:${businessName}:list") @Get("/data") async list${BusinessName}Data(): Promise> { return Result.ok(await this.${businessName}Service.select${BusinessName}All()) } @ApiOperation({ summary: "导出${functionName}xlsx文件" }) @RequirePermission("${moduleName}:${businessName}:export") @Get("/export") async export(@Res() res: Response): Promise { return this.${businessName}Service.export${BusinessName}(res) } @ApiOperation({ summary: "查询${functionName}详细" }) @ApiResponse({ type: Result<${modelName1}> }) @RequirePermission("${moduleName}:${businessName}:list") @Get("/:${pkName}") async get${BusinessName}(@Param("${pkName}"#if(${pkColumn.javaType.toLowerCase()}=="number"), ParseIntPipe#end) ${pkName}: ${pkColumn.javaType.toLowerCase()}): Promise> { return Result.ok(await this.${businessName}Service.select${BusinessName}By${UpperPkName}(${pkName})) } @ApiOperation({ summary: "新增${functionName}" }) @ApiResponse({ type: Result<${modelName1}> }) @ApiBody({ type: Create${className}Dto }) @RequirePermission("${moduleName}:${businessName}:add") @Post("/") async add${BusinessName}(@Body() ${entityName}: Create${className}Dto, @Req() req): Promise> { #if(${hasBaseDomain}) ${entityName} = { ...${entityName}, createTime: nowDateTime(), updateTime: nowDateTime(), createBy: req.user?.userName, updateBy: req.user?.userName } #else #if(${hasCreateTime}) ${entityName}["createTime"] = nowDateTime() #end #if(${hasUpdateTime}) ${entityName}["updateTime"] = nowDateTime() #end #end return Result.ok(await this.${businessName}Service.add${BusinessName}(${entityName})) } @ApiOperation({ summary: "修改${functionName}" }) @ApiResponse({ type: Result }) @ApiBody({ type: Update${className}Dto }) @RequirePermission("${moduleName}:${businessName}:edit") @Put("/") async update${BusinessName}(@Body() ${entityName}: Update${className}Dto, @Req() req): Promise> { #if($hasBaseDomain) ${entityName} = { ...${entityName}, updateTime: nowDateTime(), updateBy: req.user?.userName } #elseif(${hasUpdateTime}) ${entityName}["updateTime"] = nowDateTime() #end await this.${businessName}Service. update${BusinessName}(${entityName}) return Result.ok("修改成功!") } @ApiOperation({ summary: "删除${functionName}" }) @ApiResponse({ type: Result }) @RequirePermission("${moduleName}:${businessName}:remove") @Delete("/:ids") async del${BusinessName}(@Param("ids", #if(${pkColumn.javaType.toLowerCase()}=="number")ParseIntArrayPipe#else ParseArrayPipe#end) ${pkName}s: ${pkColumn.javaType.toLowerCase()}[]): Promise> { let { count } = await this.${businessName}Service.delete${BusinessName}By${UpperPkName}s(${pkName}s) return Result.toAjax(count) } } ================================================ FILE: server/src/common/service/gen/gen-template/node/dto.ts.vm ================================================ import { BaseDomain } from "@/common/domain/BaseDomain" import { ApiProperty } from "@nestjs/swagger" import { Transform } from "class-transformer" import { IsNotEmpty, IsNumber, IsString, IsOptional } from "class-validator" import { queryDomain } from "@/common/domain/queryDomain"; /**@description 查询${functionName}Dto */ export class Query${className}Dto extends queryDomain { #foreach($column in $columns) #set($type=$column.javaType.toLowerCase()) #if($column.query && $column.queryType != "BETWEEN") @ApiProperty({description:"$column.columnComment", required:false}) @IsOptional() #if($column.javaType=="Number") @Transform((v) => +v.value) @IsNumber()#end ${column.javaField}: ${type} | null #end #end @ApiProperty({description:"排序列", required:false}) @IsOptional() @IsString() orderByColumn?: string @ApiProperty({description:"排序方向(desc/asc)", required:false}) @IsOptional() @IsString() isAsc?: string } /**@description 创建${functionName}Dto */ export class Create${className}Dto #if(${hasBaseDomain}) extends BaseDomain #end{ #foreach($column in $columns) #set($type=$column.javaType.toLowerCase()) #if($column.columnName != $pkColumn.columnName || !$pkColumn.increment) #if($column.required) @ApiProperty({description:"$column.columnComment", required:true}) @IsNotEmpty({ message: "$column.columnComment不能为空" }) #else @ApiProperty({description:"$column.columnComment", required:false}) @IsOptional() #end #if($column.javaType=="Number") @Transform((v) => +v.value) @IsNumber() #else @IsString() #end ${column.javaField}#if(!$column.required)?#end: ${type} #end #end } /**@description 更新${functionName}Dto */ export class Update${className}Dto #if(${hasBaseDomain}) extends BaseDomain #end{ #foreach($column in $columns) #set($type=$column.javaType.toLowerCase()) #if($column.columnName == $pkColumn.columnName) @ApiProperty({description:"$column.columnComment"}) @IsNotEmpty({ message: "$column.columnComment不能为空" }) #if($column.javaType=="Number") @Transform((v) => +v.value) @IsNumber() #else @IsString() #end ${column.javaField}#if(!$column.required && $column.columnName != $pkColumn.columnName)?#end: ${type} #end #if($column.columnName != $pkColumn.columnName && $column.edit) #if($column.required) @ApiProperty({description:"$column.columnComment", required:true}) @IsNotEmpty({ message: "$column.columnComment不能为空" }) #else @ApiProperty({description:"$column.columnComment", required:false}) @IsOptional() #end #if($column.javaType=="Number") @Transform((v) => +v.value) @IsNumber() #else @IsString() #end ${column.javaField}#if(!$column.required)?#end: ${type} #end #end } ================================================ FILE: server/src/common/service/gen/gen-template/node/service.ts.vm ================================================ import { Injectable } from '@nestjs/common'; import { PrismaService } from '@/common/service/prisma/prisma.service'; import { Response } from 'express'; import { exportTable } from '@/common/utils'; import { Query${className}Dto, Create${className}Dto, Update${className}Dto } from '../dto/index'; import { Prisma } from '@prismaClient'; import { isNotEmpty,isEmpty } from 'class-validator'; @Injectable() export class ${className}Service { constructor(private prisma: PrismaService) { } #set($service="this.prisma."+$modelName) /**@description 查询${functionName}所有 */ async select${BusinessName}All () { return ${service}.findMany() } /**@description 分页查询${functionName}列表 */ async select${BusinessName}List (q: Query${className}Dto) { let queryCondition: Prisma.${modelName1}WhereInput = {} #foreach($column in $columns) #set($queryType=$column.queryType) #set($javaField=$column.javaField) #set($javaType=$column.javaType) #set($columnName=$column.columnName) #set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) #if($column.query) #if($column.queryType == "EQ") if (isNotEmpty(q["$javaField"])) { queryCondition.$javaField = { equals: q.$javaField } } #elseif($queryType == "NE") if (isNotEmpty(q["$javaField"])) { queryCondition.$javaField = { not: q.$javaField } } #elseif($queryType == "GT") if (isNotEmpty(q["$javaField"])) { queryCondition.$javaField = { gt: q.$javaField } } #elseif($queryType == "GTE") if (isNotEmpty(q["$javaField"])) { queryCondition.$javaField = { gte: q.$javaField } } #elseif($queryType == "LT") if (isNotEmpty(q["$javaField"])) { queryCondition.$javaField = { lt: q.$javaField } } #elseif($queryType == "LTE") if (isNotEmpty(q["$javaField"])) { queryCondition.$javaField = { lte: q.$javaField } } #elseif($queryType == "LIKE") if (isNotEmpty(q["$javaField"])) { queryCondition.$javaField = { contains: q.$javaField } } #elseif($queryType == "BETWEEN") if (isNotEmpty(q.params.begin$AttrName) && isNotEmpty(q.params.end$AttrName)) { queryCondition.$javaField = { lte: q.params.end$AttrName, gte: q.params.begin$AttrName } } #end #end #end // 构建排序条件 let orderBy = {}; if (isNotEmpty(q.orderByColumn)) { orderBy[q.orderByColumn] = q.isAsc?.toLowerCase() === 'ascending' ? 'asc' : 'desc'; } else { // 默认排序,通常按创建时间或ID降序 orderBy = { ${pkName}: 'desc' }; } return { rows: await ${service}.findMany({ skip: (q.pageNum - 1) * q.pageSize, take: q.pageSize, where: queryCondition, orderBy: orderBy, }), total: await ${service}.count({ where: queryCondition }) } } /**@description 查询${functionName}详情 */ async select${BusinessName}By${UpperPkName} (${pkName}: ${pkColumn.javaType.toLowerCase()}) { return ${service}.findUnique({ where: { ${pkName} } }) } /**@description 新增${functionName} */ async add${BusinessName} (${entityName}: Create${className}Dto) { #foreach($column in $columns) #if(($column.columnName != $pkColumn.columnName || !$pkColumn.increment) && $column.columnName!="uuid") if(isEmpty(${entityName}["$column.javaField"])) { delete ${entityName}["$column.javaField"] } #end #end return await ${service}.create({ data: ${entityName} }) } /**@description 修改${functionName} */ async update${BusinessName} (${entityName}: Update${className}Dto) { #foreach($column in $columns) #if($column.columnName != $pkColumn.columnName && $column.columnName !="uuid") if(isEmpty(${entityName}["$column.javaField"])) { delete ${entityName}["$column.javaField"] } #end #end return await ${service}.update({ where: { ${pkName}: ${entityName}.${pkName} }, data: ${entityName} }) } /**@description 批量删除${functionName} */ async delete${BusinessName}By${UpperPkName}s (${pkName}s: ${pkColumn.javaType.toLowerCase()}[]) { return ${service}.deleteMany({ where: { ${pkName}: { in: ${pkName}s } } }) } /**@description 单个删除${functionName} */ async delete${BusinessName}By${UpperPkName} (${pkName}: ${pkColumn.javaType.toLowerCase()}) { return ${service}.delete({ where: { ${pkName} } }) } /**@description 导出${functionName}所有数据为xlsx */ async export${BusinessName} (res: Response) { let title = ${columnNames} let data = (await ${service}.findMany()).map(v => Object.values(v)) data.unshift(title) exportTable(data, res) } } ================================================ FILE: server/src/common/service/gen/gen-template/sql/sql.vm ================================================ -- 菜单 SQL insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) values('${functionName}', '${parentMenuId}', '1', '${businessName}', '${moduleName}/${businessName}/index', 0, 1, 'C', '1', '1', '${moduleName}:${businessName}:list', '#', 'admin', sysdate(), '', null, '${functionName}菜单'); -- 按钮父菜单ID SELECT @parentId := LAST_INSERT_ID(); -- 按钮 SQL insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) values('${functionName}查询', @parentId, '1', '#', '', 0, 1, 'F', '1', '1', '${moduleName}:${businessName}:query','#', 'admin', sysdate(), '', null, ''); insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) values('${functionName}新增', @parentId, '2', '#', '', 0, 1, 'F', '1', '1', '${moduleName}:${businessName}:add', '#', 'admin', sysdate(), '', null, ''); insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) values('${functionName}修改', @parentId, '3', '#', '', 0, 1, 'F', '1', '1', '${moduleName}:${businessName}:edit', '#', 'admin', sysdate(), '', null, ''); insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) values('${functionName}删除', @parentId, '4', '#', '', 0, 1, 'F', '1', '1', '${moduleName}:${businessName}:remove', '#', 'admin', sysdate(), '', null, ''); insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) values('${functionName}导出', @parentId, '5', '#', '', 0, 1, 'F', '1', '1', '${moduleName}:${businessName}:export', '#', 'admin', sysdate(), '', null, ''); ================================================ FILE: server/src/common/service/gen/gen-template/vue/index.vue.vm ================================================ ================================================ FILE: server/src/common/service/gen/gen.service.ts ================================================ import { BadRequestException, Injectable } from '@nestjs/common'; import { PrismaService } from '@/common/service/prisma/prisma.service'; import { Prisma } from '@prismaClient'; import { queryGenTableDto } from '@/admin/gen/dto/queryGenTableDto'; import { isNotEmpty } from 'class-validator'; import { queryDataBaseDto } from '@/admin/gen/dto/queryDatabaseDto'; import { formatDate, nowDate, nowDateTime, toPascalCase } from '@/common/utils'; import { camelCase, kebabCase, toLower, upperFirst } from 'lodash'; import { GenConstants } from '@/common/constant/GenConstants'; import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from 'fs'; import { dirname, join } from 'path'; import { Config } from '@/config'; import * as Velocity from 'velocityjs'; import * as archiver from 'archiver'; import { Response } from 'express'; @Injectable() export class GenService { constructor(private prisma: PrismaService) {} //查询生成表数据 async listTable(q: queryGenTableDto) { const queryCondition: Prisma.GenTableWhereInput = {}; if (isNotEmpty(q.tableName)) { queryCondition.tableName = { contains: q.tableName, }; } if (isNotEmpty(q.tableComment)) { queryCondition.tableComment = { contains: q.tableComment, }; } if (isNotEmpty(q.params.beginTime) && isNotEmpty(q.params.endTime)) { queryCondition.createTime = { gte: q.params.beginTime, lte: q.params.endTime, }; } return { rows: await this.prisma.genTable.findMany({ skip: (q.pageNum - 1) * q.pageSize, take: q.pageSize, where: queryCondition, orderBy: { updateTime: 'desc', }, }), total: await this.prisma.genTable.count({ where: queryCondition, }), }; } //查询db数据库列表 async listDbTable(q: queryDataBaseDto) { const params = []; let sql = ` select table_name as tableName, table_comment as tableComment, create_time as createTime, update_time as updateTime from information_schema.tables where table_schema = (select database()) and table_name NOT LIKE 'qrtz_%' and table_name NOT LIKE 'gen_%' and table_name NOT IN (select table_name from gen_table)`; let sqlCount = ` select count(*) as total from information_schema.tables where table_schema = (select database()) and table_name NOT LIKE 'qrtz_%' and table_name NOT LIKE 'gen_%' and table_name NOT IN (select table_name from gen_table) `; if (isNotEmpty(q.tableName)) { sql += ` and table_name like concat("%", ?,"%") `; sqlCount += ` and table_name like concat("%", ?,"%") `; params.push(q.tableName); } if (isNotEmpty(q.tableComment)) { sql += ` and table_comment like concat("%", ?,"%") `; sqlCount += ` and table_comment like concat("%", ?,"%") `; params.push(q.tableComment); } sql += ` ORDER BY create_time desc, update_time desc limit ${(q.pageNum - 1) * q.pageSize},${q.pageSize} `; return { rows: await this.prisma .$queryRawUnsafe(sql, ...params) .then((res) => res.map((v) => ({ ...v, createTime: formatDate(v.createTime), updateTime: formatDate(v.updateTime), })), ), total: Number( (await this.prisma.$queryRawUnsafe(sqlCount, ...params))[0]?.total, ), }; } //修改代码生成信息 updateGenTable(info: any) { if (!info) throw new BadRequestException('请传入数据!'); if (info?.params?.parentMenuId) { info.options = JSON.stringify({ parentMenuId: info?.params?.parentMenuId, }); } const columns = info.columns?.map((v) => { delete v.pk; delete v.increment; delete v.required; delete v.insert; delete v.edit; delete v.list; delete v.query; v.updateTime = nowDateTime(); v.updateBy = 'admin'; return v; }); delete info.dicts; delete info.columns; delete info.tableColumns; delete info.columnsKey; delete info.parentMenuId; delete info.BusinessName; delete info.pkName; delete info.UpperPkName; delete info.pkColumn; delete info.UpperPkName; delete info.params; const id = info.tableId; delete info.tableId; delete info.dictsNoSymbol; return this.prisma.$transaction(async (prisma) => { await prisma.genTable.update({ where: { tableId: id, }, data: info, }); for (const column of columns) { await prisma.genTableColumn.update({ where: { columnId: column.columnId, }, data: column, }); } }); } //导入表 async importTable(tableNames: string[]) { if (!tableNames?.length) return null; return this.prisma.$transaction(async (prisma) => { //获取需要插入的表基本信息 const tableList: Table[] = await this.selectDbTableListByNames(tableNames); for (const table of tableList) { const tableName = table.tableName; //初始化table表信息,并插入数据库 let tableInfo = { ...table, className: Config.gen.autoRemovePre ? toPascalCase( tableName.replace( new RegExp(Config.gen.tablePrefix.join('|')), '', ), ) : toPascalCase(tableName), //实体类名称 packageName: Config.gen.packageName, //生成模块路径 moduleName: Config.gen.moduleName, //子系统名,模块下的目录 businessName: tableName.slice(tableName.lastIndexOf('_') + 1), //生成业务名 tableComment: table.tableComment?.trim() || table.tableName, functionName: table.tableComment?.trim() || table.tableName, //生成功能名 functionAuthor: Config.gen.author, //作者 tplWebType: 'element-plus', tplCategory: 'crud', genType: '0', genPath: '/', createBy: 'admin', updateBy: 'admin', createTime: nowDateTime(), updateTime: nowDateTime(), }; tableInfo = await prisma.genTable.create({ data: tableInfo, }); //获取表的列信息,初始化并插入数据库 const tableColumn: any = await this.getTableColumnInfo(tableName); for (const column of tableColumn) { this.initTableColumn(column, tableInfo); column.sort = Number(column.sort); await prisma.genTableColumn.create({ data: column }); } } }); } //删除表数据 async delTable(ids: number[]) { return this.prisma.$transaction(async (prisma) => { //删除tableColumn表信息 await prisma.genTableColumn.deleteMany({ where: { tableId: { in: ids, }, }, }); //删除table表信息 await prisma.genTable.deleteMany({ where: { tableId: { in: ids, }, }, }); return true; }); } //生成代码压缩包 async genCode(tableNames: string[], res: Response) { try { console.log('代码生成中...', tableNames.join(',')); if (existsSync(join(__dirname, 'temp'))) { try { rmSync(join(__dirname, 'temp'), { recursive: true }); } catch (e) {} } for (const tableName of tableNames) { const info = await this.getTableInfoByTableName(tableName); info.columns.forEach((v) => { v.columnComment = v.columnComment || v.columnName; }); const data = { ...info, modelName: camelCase(info.tableName), modelName1: toPascalCase(info.tableName), filename: kebabCase(info.tableName), entityName: camelCase(info.className), columnNames: JSON.stringify( info.columns?.map((v) => v.columnComment || v.columnName) || [], ), hasCreateTime: info.columnsKey.includes('create_time'), hasUpdateTime: info.columnsKey.includes('update_time'), hasBaseDomain: info.columnsKey.includes('create_time') && info.columnsKey.includes('update_time') && info.columnsKey.includes('create_by') && info.columnsKey.includes('update_by'), }; const servicePath = join( __dirname, `temp/node/${data.packageName}/${data.moduleName}/${data.businessName}/service/${data.filename}.service.ts`, ); const controllerPath = join( __dirname, `temp/node/${data.packageName}/${data.moduleName}/${data.businessName}/${data.filename}.controller.ts`, ); const dtoPath = join( __dirname, `temp/node/${data.packageName}/${data.moduleName}/${data.businessName}/dto/index.ts`, ); const vuePath = join( __dirname, `temp/vue/views/${data.moduleName}/${data.businessName}/index.vue`, ); const apiPath = join( __dirname, `temp/vue/api/${data.moduleName}/${data.businessName}.js`, ); const sqlPath = join(__dirname, `temp/${data.businessName}.sql`); const vueTemplateStr = readFileSync( join(__dirname, './gen-template/vue/index.vue.vm'), ).toString(); const jsTemplateStr = readFileSync( join(__dirname, './gen-template/js/api.js.vm'), ).toString(); const sqlTemplateStr = readFileSync( join(__dirname, './gen-template/sql/sql.vm'), ).toString(); const serviceTemplateStr = readFileSync( join(__dirname, './gen-template/node/service.ts.vm'), ).toString(); const dtoTemplateStr = readFileSync( join(__dirname, './gen-template/node/dto.ts.vm'), ).toString(); const controllerTemplateStr = readFileSync( join(__dirname, './gen-template/node/controller.ts.vm'), ).toString(); const vueData = Velocity.render(vueTemplateStr, data).replace( /(\n\s*\n)+/g, '\n', ); const apiData = Velocity.render(jsTemplateStr, data).replace( /(\n\s*\n)+/g, '\n', ); const sqlData = Velocity.render(sqlTemplateStr, data).replace( /(\n\s*\n)+/g, '\n', ); const serviceData = Velocity.render(serviceTemplateStr, data).replace( /(\n\s*\n)+/g, '\n', ); const dtoData = Velocity.render(dtoTemplateStr, data).replace( /(\n\s*\n)+/g, '\n', ); const controllerData = Velocity.render( controllerTemplateStr, data, ).replace(/(\n\s*\n)+/g, '\n'); writeFile(servicePath, serviceData); writeFile(controllerPath, controllerData); writeFile(dtoPath, dtoData); writeFile(vuePath, vueData); writeFile(apiPath, apiData); writeFile(sqlPath, sqlData); } console.log('代码生成完毕!'); res.setHeader('content-type', 'application/octet-stream;charset=UTF-8'); res.setHeader('content-disposition', 'attachment;filename="carole.zip"'); res.setHeader('Access-Control-Expose-Headers', 'Content-Disposition'); res.setHeader('X-Content-Type-Options', 'nosniff'); res.setHeader('Transfer-Encoding', 'chunked'); // 创建一个archiver实例,指定压缩包类型为zip const archive = archiver('zip', { zlib: { level: 9 }, // 设置压缩级别,最高级别为9 }); const output = res; // 将输出流与archiver实例进行关联 archive.pipe(output); // 添加要压缩的文件或文件夹 archive.directory(join(__dirname, 'temp'), false); // 压缩过程中出错时触发的回调函数 archive.on('error', function (err) { console.log(err); res.end(); }); output.on('close', function () { res.end(); }); // 完成压缩 archive.finalize(); } catch (error) { console.log(error); res.end(); } } //预览生成代码 async previewTable(tableId: number) { const info = await this.getTableInfoById(tableId); info.columns.forEach((v) => { v.columnComment = v.columnComment || v.columnName; }); const data = { ...info, modelName: camelCase(info.tableName), modelName1: toPascalCase(info.tableName), filename: kebabCase(info.tableName), entityName: camelCase(info.className), columnNames: JSON.stringify( info.columns?.map((v) => v.columnComment || v.columnName) || [], ), hasCreateTime: info.columnsKey.includes('create_time'), hasUpdateTime: info.columnsKey.includes('update_time'), hasBaseDomain: info.columnsKey.includes('create_time') && info.columnsKey.includes('update_time') && info.columnsKey.includes('create_by') && info.columnsKey.includes('update_by'), }; const vueTemplateStr = readFileSync( join(__dirname, './gen-template/vue/index.vue.vm'), ).toString(); const jsTemplateStr = readFileSync( join(__dirname, './gen-template/js/api.js.vm'), ).toString(); const sqlTemplateStr = readFileSync( join(__dirname, './gen-template/sql/sql.vm'), ).toString(); const serviceTemplateStr = readFileSync( join(__dirname, './gen-template/node/service.ts.vm'), ).toString(); const dtoTemplateStr = readFileSync( join(__dirname, './gen-template/node/dto.ts.vm'), ).toString(); const controllerTemplateStr = readFileSync( join(__dirname, './gen-template/node/controller.ts.vm'), ).toString(); const vueData = Velocity.render(vueTemplateStr, data).replace( /(\n\s*\n)+/g, '\n', ); const apiData = Velocity.render(jsTemplateStr, data).replace( /(\n\s*\n)+/g, '\n', ); const sqlData = Velocity.render(sqlTemplateStr, data).replace( /(\n\s*\n)+/g, '\n', ); const serviceData = Velocity.render(serviceTemplateStr, data).replace( /(\n\s*\n)+/g, '\n', ); const dtoData = Velocity.render(dtoTemplateStr, data).replace( /(\n\s*\n)+/g, '\n', ); const controllerData = Velocity.render(controllerTemplateStr, data).replace( /(\n\s*\n)+/g, '\n', ); return { 'gen-template/node/service.ts.vm': serviceData, 'gen-template/node/controller.ts.vm': controllerData, 'gen-template/node/dto.ts.vm': dtoData, 'gen-template/vue/index.vue.vm': vueData, 'gen-template/js/api.js.vm': apiData, 'gen-template/sql/sql.vm': sqlData, }; } //同步数据库, 我们导入了需要生成代码的数据表,但是我们更改了数据库的结构(比如删除了一些字段,和添加了一些字段),同步更新表数据 async synchDb(tableName: string) { return this.prisma.$transaction(async (prisma) => { const table = await this.getTableInfoByTableName(tableName); if (!table) throw new BadRequestException('同步数据失败,原表结构不存在!'); //已在数据库中的表列信息 const tableColumns = table.tableColumns; //更改后的数据库表的列信息 const columns: any = await this.getTableColumnInfo(tableName); if (!columns || !columns?.length) throw new BadRequestException('同步数据失败,原表结构不存在!'); //存储之前就存在已生成的列信息 const tableColumnMap = {}; for (const v of tableColumns) { tableColumnMap[v.columnName] = v; } //更新或插入列 for (const column of columns) { //初始化column的值 this.initTableColumn(column, table); //如果之前存储过,更新 if (tableColumnMap[column.columnName]) { //之前存储的列 const prevColumn = tableColumnMap[column.columnName]; column.columnId = prevColumn.columnId; column.sort = Number(column); if (column.isList === '1') { // 如果是列表,继续保留查询方式/字典类型选项 column.dictType = prevColumn.dictType; column.queryType = prevColumn.queryType; } await prisma.genTableColumn.update({ where: { columnId: column.columnId, }, data: column, }); } //插入 else { column.sort = Number(column); await prisma.genTableColumn.create({ data: column, }); } } //删除已经不存在表中数据 if (tableColumns.length > 0) { const delColumns = tableColumns .filter((v) => !columns.some((z) => z.columnName === v.columnName)) .map((v) => v.columnId); if (delColumns.length > 0) { await prisma.genTableColumn.deleteMany({ where: { columnId: { in: delColumns, }, }, }); } } }); } //批量获取表的基本信息(包含注释) selectDbTableListByNames(names: string[]) { if (!names.length) return null; return this.prisma.$queryRawUnsafe( `select table_name as tableName, table_comment as tableComment, create_time as createTime, update_time as updateTime from information_schema.tables where table_schema = (select database()) and table_name NOT LIKE 'qrtz_%' and table_name NOT LIKE 'gen_%' and table_name NOT IN (select table_name from gen_table) and table_name IN (${'?,'.repeat(names.length).slice(0, -1)})`, ...names, ); } //根据表名获取表的字段信息以及注释 async getTableColumnInfo(tableName: string) { if (!tableName) return null; return this.prisma.$queryRaw< ColumnInfo[] >`select column_name as columnName, (case when (is_nullable = 'no' && column_key != 'PRI') then '1' else '0' end) as isRequired, (case when column_key = 'PRI' then '1' else '0' end) as isPk, ordinal_position as sort, column_comment as columnComment, (case when extra = 'auto_increment' then '1' else '0' end) as isIncrement, column_type as columnType from information_schema.columns where table_schema = (select database()) and table_name = ${tableName} order by ordinal_position`; } //根据id查询表详细信息 getTableInfoById(id: number) { return this.prisma.genTable .findFirst({ where: { tableId: id, }, include: { tableColumns: true, }, }) .then((tableInfo) => { if (!tableInfo) return null; const dicts: string[] = []; const tableColumns = tableInfo?.tableColumns?.map((v) => { if (v.dictType) { dicts.push(`'${v.dictType}'`); } return { ...v, pk: Boolean(+v.isPk), increment: Boolean(+v.isIncrement), required: Boolean(+v.isRequired), insert: Boolean(+v.isInsert), edit: Boolean(+v.isEdit), list: Boolean(+v.isList), query: Boolean(+v.isQuery), }; }); const pkColumn = tableColumns?.find( (v: any) => Boolean(+v.isPk) && Boolean(+v.isIncrement), ) || tableColumns[0]; const data = { ...tableInfo, dicts: dicts.join(','), dictsNoSymbol: dicts.join(',').replace(/"|'/g, ''), columns: tableColumns, tableColumns, columnsKey: JSON.stringify( tableInfo?.tableColumns?.map((v) => v.columnName), ), parentMenuId: +JSON.parse(tableInfo.options || null)?.parentMenuId || 0, BusinessName: upperFirst(tableInfo.businessName), pkColumn, pkName: pkColumn.javaField, UpperPkName: upperFirst(pkColumn.javaField), }; return data; }); } //根据表名查询表详细信息 getTableInfoByTableName(tableName: string) { return this.prisma.genTable .findFirst({ where: { tableName, }, include: { tableColumns: true, }, }) .then((tableInfo) => { if (!tableInfo) return null; const dicts: string[] = []; const tableColumns = tableInfo?.tableColumns?.map((v) => { if (v.dictType) { dicts.push(`"${v.dictType}"`); } return { ...v, pk: Boolean(+v.isPk), increment: Boolean(+v.isIncrement), required: Boolean(+v.isRequired), insert: Boolean(+v.isInsert), edit: Boolean(+v.isEdit), list: Boolean(+v.isList), query: Boolean(+v.isQuery), }; }); const pkColumn = tableColumns?.find( (v: any) => Boolean(+v.isPk) && Boolean(+v.isIncrement), ) || tableColumns[0]; const data = { ...tableInfo, dicts: dicts.join(','), dictsNoSymbol: dicts.join(',').replace(/"|'/g, ''), columns: tableColumns, tableColumns, columnsKey: JSON.stringify( tableInfo?.tableColumns?.map((v) => v.columnName), ), parentMenuId: +JSON.parse(tableInfo.options || null)?.parentMenuId || 0, BusinessName: upperFirst(tableInfo.businessName), pkColumn, pkName: pkColumn.javaField, UpperPkName: upperFirst(pkColumn.javaField), }; return data; }); } //初始化表列的字段信息 initTableColumn(column: any, table: any) { const columnName = column.columnName; const dataType = column.columnType; column.tableId = table.tableId; column.javaField = camelCase(columnName); column.javaType = GenConstants.TYPE_STRING; column.queryType = GenConstants.QUERY_EQ; column.createBy = column.createBy || 'admin'; column.columnComment = column.columnComment || column.columnName; column.createTime = column.createTime || nowDateTime(); column.updateBy = 'admin'; column.updateTime = nowDateTime(); if (arraysContains(GenConstants.COLUMNTYPE_TEXT, dataType)) { column.htmlType = GenConstants.HTML_TEXTAREA; } else if (arraysContains(GenConstants.COLUMNTYPE_STR, dataType)) { const len = getColumnLength(dataType); column.htmlType = len >= 500 ? GenConstants.HTML_TEXTAREA : GenConstants.HTML_INPUT; } else if (arraysContains(GenConstants.COLUMNTYPE_TIME, dataType)) { column.javaType = GenConstants.TYPE_DATE; column.htmlType = GenConstants.HTML_DATETIME; } else if (arraysContains(GenConstants.COLUMNTYPE_NUMBER, dataType)) { column.htmlType = GenConstants.HTML_INPUT; column.javaType = GenConstants.TYPE_NUMBER; } // 插入字段(默认所有字段都需要插入) column.isInsert = GenConstants.REQUIRE; // 编辑字段 if ( !arraysContains(GenConstants.COLUMNNAME_NOT_EDIT, columnName) && column.isPk != 1 ) { column.isEdit = GenConstants.REQUIRE; } // 列表字段 if ( !arraysContains(GenConstants.COLUMNNAME_NOT_LIST, columnName) && column.isPk != 1 ) { column.isList = GenConstants.REQUIRE; } // 查询字段 if ( !arraysContains(GenConstants.COLUMNNAME_NOT_QUERY, columnName) && column.isPk != 1 && column.htmlType != GenConstants.HTML_TEXTAREA ) { column.isQuery = GenConstants.REQUIRE; } const lowerColumnName = toLower(columnName); // 查询字段类型 if (lowerColumnName.includes('name')) { column.queryType = GenConstants.QUERY_LIKE; } // 状态字段设置单选框 if (lowerColumnName.includes('status')) { column.htmlType = GenConstants.HTML_RADIO; } // 类型&性别字段设置下拉框 else if ( lowerColumnName.includes('type') || lowerColumnName.includes('sex') ) { column.htmlType = GenConstants.HTML_SELECT; } //日期字段设置日期控件 else if ( lowerColumnName.includes('time') || lowerColumnName.includes('_date') || lowerColumnName.includes('Date') ) { column.htmlType = GenConstants.HTML_DATETIME; column.queryType = GenConstants.QUERY_BETWEEN; } // 图片字段设置图片上传控件 else if (lowerColumnName.includes('image')) { column.htmlType = GenConstants.HTML_IMAGE_UPLOAD; } // 文件字段设置文件上传控件 else if (lowerColumnName.includes('file')) { column.htmlType = GenConstants.HTML_FILE_UPLOAD; } // 内容字段设置富文本控件 else if (lowerColumnName.includes('content')) { column.htmlType = GenConstants.HTML_EDITOR; } } /**@desc 运行任意sql */ excute(sql: string) { const sqls = sql.split(';').filter((v) => !!v.trim()); return this.prisma.$transaction(async (db) => { const res = []; for (const sql of sqls) { res.push( sql.includes('select') ? await db.$queryRawUnsafe(sql) : await db.$executeRawUnsafe(sql), ); } return res; }); } } /** 检查数据中是有某个值在str中包含 */ function arraysContains(arr = [], str = '') { return arr.some((v) => v.includes(str) || str.includes(v)); } /** 获取数据库varchar()括号的长度 */ function getColumnLength(str = '') { if (str.includes('(')) { return +str.slice(str.indexOf('(') + 1, str.indexOf(')')); } else { return 0; } } /** 递归创建目录 */ function mkdir(dir) { try { if (!existsSync(dir)) { mkdirSync(dir, { recursive: true }); } } catch (e) {} } /** 写入文件数据,并且同时创建目录 */ function writeFile(p, data) { mkdir(dirname(p)); writeFileSync(p, data); } ================================================ FILE: server/src/common/service/prisma/prisma.service.ts ================================================ import { Config } from '@/config'; import { Injectable, OnModuleInit, OnModuleDestroy } from '@nestjs/common'; import { PrismaClient } from '../../prisma-client'; @Injectable() export class PrismaService extends PrismaClient implements OnModuleInit, OnModuleDestroy { constructor() { super({ log: Config.prisma.logEnable ? Config.prisma.log : [], datasourceUrl: process.env.DATABASE_URL, }); } async onModuleInit() { this.$connect(); } async onModuleDestroy() { await this.$disconnect(); } } ================================================ FILE: server/src/common/swagger/vo/index.ts ================================================ import { ApiProperty } from '@nestjs/swagger'; export class ResponseVo { @ApiProperty({ example: 200, description: '响应code', }) code: number; @ApiProperty({ example: true, description: '请求是否成功处理', }) 'success': boolean; @ApiProperty({ example: 'successful', description: '接口备注信息', }) 'msg': string; @ApiProperty({ default: null, description: '返回数据', }) 'data': T; @ApiProperty({ example: '2024-04-28 22:32:35', description: '处理时间', }) 'time': string; } export class ResponseTableVo { @ApiProperty({ example: 0, description: '总记录数', }) total: number; @ApiProperty({ default: null, description: '列表数据', }) rows: T[]; @ApiProperty({ example: 200, description: '消息状态码', }) code: number; @ApiProperty({ example: '查询成功', description: '消息内容', }) msg: string; } ================================================ FILE: server/src/common/types/gen.d.ts ================================================ interface Table { tableName: string | null | undefined; tableComment: string | null | undefined; createTime: Date | null | undefined; updateTime: Date | null | undefined; } interface ColumnInfo { columnName: string | null | undefined; isRequired: string | null | undefined; isPk: string | null | undefined; isIncrement: string | null | undefined; sort: int | null | undefined; columnComment: string | null | undefined; columnType: string | null | undefined; } ================================================ FILE: server/src/common/utils/Valids.ts ================================================ //邮箱 export function isEmail(value: string) { return /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test( value, ); } //手机号 export function isPhone(value: string) { return /^(?:(?:\+|00)86)?1(?:(?:3[\d])|(?:4[5-79])|(?:5[0-35-9])|(?:6[5-7])|(?:7[0-8])|(?:8[\d])|(?:9[01256789]))\d{8}$/.test( value, ); } //是否中文汉字 export function isChinese(value: string) { return /^(?:[\u3400-\u4DB5\u4E00-\u9FEA\uFA0E\uFA0F\uFA11\uFA13\uFA14\uFA1F\uFA21\uFA23\uFA24\uFA27-\uFA29]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0])+$/.test( value, ); } //base64 export function isBase64(value: string) { return /^\s*data:(?:[a-z]+\/[a-z0-9-+.]+(?:;[a-z-]+=[a-z0-9-]+)?)?(?:;base64)?,([a-z0-9!$&',()*+;=\-._~:@/?%\s]*?)\s*$/i.test( value, ); } //图片url export function isImgUrl(value: string) { return /^https?:\/\/(.+\/)+.+(\.(gif|png|jpg|jpeg|webp|svg|psd|bmp|tif))$/i.test( value, ); } //版本号 export function isVersion(value: string) { return /^\d+(?:\.\d+){2}$/.test(value); } //UUID export function isUUID(value: string) { return /^[a-f\d]{4}(?:[a-f\d]{4}-){4}[a-f\d]{12}$/i.test(value); } //必须带端口号的网址(或ip) export function isUrlAndPort(value: string) { return /^((ht|f)tps?:\/\/)?[\w-]+(\.[\w-]+)+:\d{1,5}\/?$/.test(value); } //迅雷网址 export function isThunderx(value: string) { return /^thunderx?:\/\/[a-zA-Z\d]+=$/.test(value); } //子网掩码 export function isSubnet(value: string) { return /^(254|252|248|240|224|192|128)\.0\.0\.0|255\.(254|252|248|240|224|192|128|0)\.0\.0|255\.255\.(254|252|248|240|224|192|128|0)\.0|255\.255\.255\.(255|254|252|248|240|224|192|128|0)$/.test( value, ); } //window文件路径 export function isFilePath(value: string) { return /^[a-zA-Z]:\\(?:\w+\\)*\w+\.\w+$/.test(value); } //window文件夹路径 export function isDirPath(value: string) { return /^[a-zA-Z]:\\(?:\w+\\?)*$/.test(value); } //html注释 export function isHtmlAnnotation(value: string) { return //g.test(value); } //md5 32位 export function isMd5(value: string) { return /^[a-fA-F0-9]{32}$/.test(value); } //视频url export function isVideoUrl(value: string) { return /^https?:\/\/(.+\/)+.+(\.(swf|avi|flv|mpg|rm|mov|wav|asf|3gp|mkv|rmvb|mp4|m3u8))$/i.test( value, ); } //24小时制时间(HH:mm:ss) export function isTime24(value: string) { return /^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d$/.test(value); } //12小时制时间(HH:mm:ss) export function isTime12(value: string) { return /^(?:1[0-2]|0?[1-9]):[0-5]\d:[0-5]\d$/.test(value); } //数字/货币金额(支持负数、千分位分隔符) export function isMoney(value: string) { return /^-?\d{1,3}(,\d{3})*(\.\d{1,2})?$/.test(value); } //银行卡号(10到30位, 覆盖对公/私账户, 参考[微信支付] export function isBankNumber(value: string) { return /^[1-9]\d{9,29}$/.test(value); } //日期(严谨, 支持闰年判断) export function isDate(value: string) { return /^(([0-9]{3}[1-9]|[0-9]{2}[1-9][0-9]{1}|[0-9]{1}[1-9][0-9]{2}|[1-9][0-9]{3})-(((0[13578]|1[02])-(0[1-9]|[12][0-9]|3[01]))|((0[469]|11)-(0[1-9]|[12][0-9]|30))|(02-(0[1-9]|[1][0-9]|2[0-8]))))|((([0-9]{2})(0[48]|[2468][048]|[13579][26])|((0[48]|[2468][048]|[3579][26])00))-02-29)$/.test( value, ); } //中国省 export function isProvince(value: string) { return /^浙江|上海|北京|天津|重庆|黑龙江|吉林|辽宁|内蒙古|河北|新疆|甘肃|青海|陕西|宁夏|河南|山东|山西|安徽|湖北|湖南|江苏|四川|贵州|云南|广西|西藏|江西|广东|福建|台湾|海南|香港|澳门$/.test( value, ); } //身份证号, 支持1/2代(15位/18位数字 export function isIdentify(value: string) { return /^\d{6}((((((19|20)\d{2})(0[13-9]|1[012])(0[1-9]|[12]\d|30))|(((19|20)\d{2})(0[13578]|1[02])31)|((19|20)\d{2})02(0[1-9]|1\d|2[0-8])|((((19|20)([13579][26]|[2468][048]|0[48]))|(2000))0229))\d{3})|((((\d{2})(0[13-9]|1[012])(0[1-9]|[12]\d|30))|((\d{2})(0[13578]|1[02])31)|((\d{2})02(0[1-9]|1\d|2[0-8]))|(([13579][26]|[2468][048]|0[048])0229))\d{2}))(\d|X|x)$/.test( value, ); } //帐号是否合法(字母开头,允许5-16字节,允许字母数字下划线组合 export function isAccount(value: string) { return /^\w{5,15}$/.test(value); } //纯数字 export function isNumber(value: string) { return /^\d+$/.test(value); } //html标签(宽松匹配) export function isHtmlTag(value: string) { return /<(\w+)[^>]*>(.*?<\/\1>)?/.test(value); } //qq号格式正确 export function isQQNumber(value: string) { return /^[1-9][0-9]{4,10}$/.test(value); } //密码强度校验,最少6位,包括至少1个大写字母,1个小写字母,1个数字,1个特殊字符 !@#$%^&*? export function isPasswordHighs(value: string) { return /^\S*(?=\S{6,})(?=\S*\d)(?=\S*[A-Z])(?=\S*[a-z])(?=\S*[!@#$%^&*?])\S*$/.test( value, ); } //大写字母,小写字母,数字,特殊符号 `@#$%^&*`~()-+=` 中任意3项密码 export function isPassword(value: string) { return /^(?![a-zA-Z]+$)(?![A-Z0-9]+$)(?![A-Z\W_!@#$%^&*`~()-+=]+$)(?![a-z0-9]+$)(?![a-z\W_!@#$%^&*`~()-+=]+$)(?![0-9\W_!@#$%^&*`~()-+=]+$)[a-zA-Z0-9\W_!@#$%^&*`~()-+=]/.test( value, ); } //ipV4[:端口] export function isIpv4(value: string) { return /^((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.){3}(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(?::(?:[0-9]|[1-9][0-9]{1,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?$/.test( value, ); } //ip-v6[:端口] export function isIpv6(value: string) { return /(^(?:(?:(?:[0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))$)|(^\[(?:(?:(?:[0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){4}:([0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){3}:([0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){2}:([0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){6}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(([0-9A-Fa-f]{1,4}:){0,5}:((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|(::([0-9A-Fa-f]{1,4}:){0,5}((\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b)\.){3}(\b((25[0-5])|(1\d{2})|(2[0-4]\d)|(\d{1,2}))\b))|([0-9A-Fa-f]{1,4}::([0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})|(::([0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})|(([0-9A-Fa-f]{1,4}:){1,7}:))\](?::(?:[0-9]|[1-9][0-9]{1,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?$)/i.test( value, ); } //16进制颜色 export function isHexColor(value: string) { return /^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3}|[a-fA-F0-9]{8}|[a-fA-F0-9]{4})$/.test( value, ); } //微信号(wx),6至20位,以字母开头,字母,数字,减号,下划线 export function isWxAccount(value: string) { return /^[a-zA-Z][-_a-zA-Z0-9]{5,19}$/.test(value); } //邮政编码(中国) export function isPostalCode(value: string) { return /^(0[1-7]|1[0-356]|2[0-7]|3[0-6]|4[0-7]|5[1-7]|6[1-7]|7[0-5]|8[013-6])\d{4}$/.test( value, ); } //mac地址 export function isMacAddr(value: string) { return /^(([a-f0-9][0,2,4,6,8,a,c,e]:([a-f0-9]{2}:){4})|([a-f0-9][0,2,4,6,8,a,c,e]-([a-f0-9]{2}-){4}))[a-f0-9]{2}$/i.test( value, ); } //域名(非网址, 不包含协议) export function isDomain(value: string) { return /^([0-9a-zA-Z-]{1,}\.)+([a-zA-Z]{2,})$/.test(value); } //Null或者empty export function isNullOrEmpty(value: string) { return value === null || value === undefined || value === ''; } ================================================ FILE: server/src/common/utils/cache.ts ================================================ import { Logger } from "@nestjs/common"; //缓存数据到内存中,过时自动刷新 class CacheTool { cache: Map constructor() { this.cache = new Map() } /** * * @param key 缓存的键 * @param value 缓存的value * @param initFunction 初始值和刷新值的函数 * @param expirationTime 过期时间,毫秒 * @param isRefresh 过期是否自动刷新 */ set(key: string, value: any, initFunction?: Function, expirationTime: number = Infinity, isRefresh: boolean = true) { return this.init(key, value, initFunction, expirationTime, isRefresh) } async get(key: string) { const item = this.cache.get(key); if (!item) return null; // 检查是否过期 if (!this.isExpire(key)) { return item.value; } // 处理过期数据 if (item.initFunction) { if (item.isRefresh) { return this.refresh(key); } } // 删除过期数据 this.cache.delete(key); return null; } /** * * @param key 缓存的键 * @param value 缓存的value * @param initFunction 初始值和刷新值的函数 * @param expirationTime 过期时间,毫秒 * @param isRefresh 过期是否自动刷新 */ async init(key: string, value: any, initFunction?: Function, expirationTime: number = Infinity, isRefresh: boolean = true) { const expiration = Date.now() + expirationTime; if (value) { return this.cache.set(key, { expirationTime, value, expiration, initFunction, isRefresh }); } else { return this.cache.set(key, { expirationTime, value: (await Promise.resolve(initFunction())), expiration, initFunction, isRefresh }); } } async refresh(key: string, value?: any) { const item = this.cache.get(key); try { if (!item || !item.isRefresh) return null if (value) { this.init(key, value, item.initFunction, item.expirationTime); return value; } else if (item.initFunction) { const refreshedValue = await Promise.resolve(item.initFunction()); if (refreshedValue !== undefined) { this.init(key, refreshedValue, item.initFunction, item.expirationTime); return refreshedValue; } } } catch (error) { Logger.error(error); return; } } delete(key: string) { return this.cache.delete(key) } keys() { return this.cache.keys() } values() { return this.cache.values() } size() { return this.cache.size } isExpire(key: string) { let item = this.cache.get(key) return !item || Date.now() > item.expiration } } export const cacheService = new CacheTool() ================================================ FILE: server/src/common/utils/captcha.ts ================================================ import * as svgCaptcha from 'svg-captcha'; const options = { // 验证码字符集,可以是字母、数字或者组合 charPreset: '0123456789QWERTYUIOPSDFGHJKLAZXCVBNMzxcvbnmasdfghjklqwertyuiop', // 验证码长度 size: 4, // 验证码字体大小 fontSize: 60, // 验证码图像宽度 width: 150, // 验证码图像高度 height: 50, // 干扰线的数量 noise: 2, // 验证码背景颜色 background: '#ffffff', // 验证码文字颜色 // color: "#33ccff", // 验证码文字倾斜度 rotate: 15, // 验证码字符间距 letterSpacing: 0, // 验证码噪点的颜色 noiseColor: '#000000', // 验证码噪点的透明度 opacity: 0.1, // 验证码噪点的密度 pointSize: 1, // 验证码噪点的样式,可以是 'circle' 或 'line' pointStyle: 'circle', // 验证码噪点的半径 pointRadius: 2, // 验证码噪点的位置,可以是 'random' 或 'top' 或 'left' 或 'right' 或 'bottom' pointPosition: 'random', }; export function createMath() { return svgCaptcha.createMathExpr({ ...options, mathMin: 1, mathMax: 50, mathOperator: '+-', }); } export function createText() { return svgCaptcha.create(options); } ================================================ FILE: server/src/common/utils/email.ts ================================================ import { Config } from '@/config'; import { createTransport, Transporter } from 'nodemailer'; import * as assert from 'assert'; import Mail from 'nodemailer/lib/mailer'; import { isEmail } from 'class-validator'; let transporter: Transporter; //邮件并发数量 const maxConcurrentTasks = 10; let runningTasks: Promise[] = []; const emailQueue: (() => Promise)[] = []; // 添加邮件任务到队列 function addEmailTaskToQueue(task: () => Promise) { emailQueue.push(task); processQueue(); // 尝试处理队列 } // 处理邮件任务队列 function processQueue() { if (runningTasks.length >= maxConcurrentTasks || emailQueue.length === 0) { return; // 并发数已达上限,或无任务 } // 从队列取一个任务 const nextTask = emailQueue.shift(); if (nextTask) { const taskPromise = nextTask() .catch(error => console.error(error)) .finally(() => { // 移除已完成的任务 runningTasks = runningTasks.filter(task => task !== taskPromise); processQueue(); // 继续处理下一个任务 }); runningTasks.push(taskPromise); } } if (Config.mail.enable) { transporter = createTransport(Config.mail.config); checkConnect(); } // 测试发件 /* async function test() { await sendCode("bobbi6837@gmail.com", "12323") console.log("发送成功") } test() */ /** * @desc 检查邮箱服务器是否能正常连接! */ function checkConnect() { return transporter .verify() .then(() => console.log('邮箱服务器连接成功!')) .catch((error) => console.log('邮箱服务器连接失败!', error)); } /** * @description 发送邮件 */ export async function sendMail(options: Mail.Options & { to: string }) { return new Promise(async (resolve, reject) => { addEmailTaskToQueue(async () => { const t = setTimeout(() => { reject('邮件发送失败:超时!'); }, Config.mail.timeout); assert( options.to.split(',').every((v) => isEmail(v)), '邮箱格式不正确!', ); options = { subject: '我是一封神奇的邮箱!', from: Config.mail.config.auth.user, text: '测试!!!', // to: '',//发送到多个用户中间用,连接 // text: 'test',//发送文本 // html: '

Hello,world!

', //可以发送html ...options, }; try { const res = await transporter.sendMail(options); return resolve('邮件发送成功~ :' + res.accepted.toString()); } catch (err) { console.log('邮件发送失败!', err); return reject('邮件发送失败!'); } finally { clearTimeout(t); } }) }); } /** * @desc 发送验证码模版 */ export async function sendCode(email: string, code: string | number) { const mail = { subject: '验证码', to: email, html: `
Dear: ${email}

> 欧尼酱,您在本站的验证码已送达哦~请勿泄露

您收到的验证码为:

${code}

虽然行为本身毫无意义,但是需要曾尽力了这个事实呀,我是这么想的。

验证码3分钟以内有效,请尽快使用

本邮件为系统自动发送,请勿直接回复~

© 2020-${new Date().getFullYear()} carole.top

`, }; return sendMail(mail); } ================================================ FILE: server/src/common/utils/index.ts ================================================ import * as fs from 'fs'; import * as dayjs1 from 'dayjs'; import * as utc from 'dayjs/plugin/utc'; import * as timezone from 'dayjs/plugin/timezone'; import 'dayjs/locale/zh-cn'; import { Response } from 'express'; import { build } from 'node-xlsx'; import { camelCase } from 'lodash'; dayjs1.extend(utc); dayjs1.extend(timezone); dayjs1.locale('zh-cn'); // 设置时区为上海 dayjs1.tz.setDefault('Asia/Shanghai'); export const dayjs = dayjs1.tz; export const nowDate = () => dayjs().format('YYYY-MM-DD'); export const nowDateTime = () => dayjs().format('YYYY-MM-DD HH:mm:ss'); export const formatDate = (date: Date, format = 'YYYY-MM-DD HH:mm:ss') => date && dayjs(date).format(format); export const localDate = () => new Date(new Date().toLocaleString()); // 创建文件夹 export const createFolder = function (folder) { try { fs.accessSync(folder); } catch (e) { fs.mkdirSync(folder, { recursive: true }); } }; /** * @desc 执行具有并发限制的异步任务池。 * @param poolLimit - 并发限制,指定同时执行的最大异步任务数量。 * @param iterable - 包含异步任务的可迭代对象。 * @param iteratorFn - 异步任务的迭代函数,接受一个参数并返回一个Promise。 * @returns - 返回一个Promise,当所有异步任务完成时解析为一个包含所有结果的数组。 */ export function asyncPool( poolLimit: number, iterable: any[], iteratorFn: Function, ): Promise { let i = 0; const ret = []; const executing = new Set(); const enqueue = function () { if (i === iterable.length) { return Promise.resolve(); } const item = iterable[i++]; const p = Promise.resolve().then(() => iteratorFn(item, iterable)); ret.push(p); executing.add(p); const clean = () => executing.delete(p); p.then(clean).catch(clean); let r: any = Promise.resolve(); if (executing.size >= poolLimit) { r = Promise.race(executing); } return r.then(() => enqueue()); }; return enqueue().then(() => Promise.all(ret)); } /**@desc 数组树形化 */ export function tree(arr = [], id = 'id', pid = 'pid', rootValue = 0) { const result = []; // 存放结果集 const map = {}; for (const item of arr) { map[item[id]] = { ...item, children: map[item[id]]?.children || [], }; if (item[pid] == rootValue) { result.push(map[item[id]]); } else { if (!map[item[pid]]) { map[item[pid]] = { children: [], }; } map[item[pid]].children.push(map[item[id]]); } } return result; } /**@desc 转换为camelCase并且首字母大写 */ export function toPascalCase(str) { return str[0].toUpperCase() + camelCase(str).slice(1); } /** @description 导出表为xlsx文件返回 */ export async function exportTable(data: any[][], res: Response) { const buffer = build([ { name: 'sheet', data, options: {}, }, ]); res.setHeader( 'Content-Type', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', ); res.setHeader('Content-Disposition', 'attachment;filename=sheet.xlsx'); res.setHeader('Access-Control-Expose-Headers', 'Content-Disposition'); res.setHeader('X-Content-Type-Options', 'nosniff'); // 将 Excel 文件的二进制流数据返回给客户端 res.end(buffer, 'binary'); } //读取json文件,自动解析为js对象 export function readJsonFile(path: string) { return JSON.parse(fs.readFileSync(path).toString() || null) } ================================================ FILE: server/src/common/utils/prismaUtil.js ================================================ const { execSync } = require("child_process"); const { readFileSync, writeFileSync, copyFileSync, existsSync, rmSync } = require("fs"); const { join } = require("path"); const _ = require("lodash") function toPascalCase(str = "") { return str[0].toUpperCase() + _.camelCase(str).slice(1) } const prismaPath = join(__dirname, "../../prisma/introspected.prisma") /** 生成prisma的model */ function generatePrismaModel(isChangeOriginFile = true) { try { //执行从数据库生成model if (existsSync(prismaPath)) { throw new Error(prismaPath + "文件已存在!") } execSync("npx prisma db pull") if (!existsSync(prismaPath)) { execSync("npx prisma generate") return null } //生成的文件内容 let content = readFileSync(prismaPath).toString() if (!content) return null //去掉注释 content = content.replaceAll(/\/\/\/.*?\n/g, "") //转换为驼峰并加上字段和表名map映射关系 content = content.replace(/model\s([a-zA-Z-_]+)\s\{([^}]+)\}/g, (m, p1, p2) => { let r = `model ${toPascalCase(p1)} {` r += p2.replace(/^\s*?([a-zA-Z-_]+)[^\n]+/gm, (m1, z1) => { return m1.replace(z1, _.camelCase(z1)) + ` @map("${z1}")` }).replace(/\[([^\]]+)\]/g, (m, p1, p2) => { return "[" + p1.split(",").map(v => _.camelCase(v.trim())).join(",") + "]" }) r += `\n @@map("${p1}")\n}` return r }) writeFileSync(prismaPath, content) execSync("npx prisma generate") } catch (error) { console.log("prisma代码生成失败:", error) return null } } function updatePrismaModel() { execSync("npx prisma db pull") execSync("npx prisma generate") } function main() { let mode = process.argv.slice(2)[0] || "-generate" if (mode === "-update") { console.log("更新中...") updatePrismaModel() console.log("更新完毕!") } else if (mode === "-generate") { console.log("生成中...") generatePrismaModel() console.log("生成完毕!") } setTimeout(() => { process.exit(0) }, 500) } main() ================================================ FILE: server/src/common/utils/redisUtils.ts ================================================ import Redis, { RedisOptions } from 'ioredis'; import { createPool, Pool } from 'generic-pool'; import { Config } from '@/config'; const redisConfig: RedisOptions = { ...Config.redis, host: Config.redis.host || 'localhost', port: Config.redis.port || 6379, db: Config.redis.db || 0, disconnectTimeout: 60 * 5 * 1000, }; class RedisUtils { private pool: Pool; constructor(config: RedisOptions) { this.pool = createPool( { create: async () => { return new Redis(config); }, destroy: async (client) => { await client.quit(); }, }, { max: 10, min: 2, idleTimeoutMillis: 60 * 5 * 1000, acquireTimeoutMillis: 8 * 1000, }, ); } private async useClient( callback: (client: Redis) => Promise, ): Promise { const client = await this.pool.acquire(); try { return await callback(client); } finally { this.pool.release(client); } } async set( key: string, value: string, expire?: number, mode?: 'NX' | 'XX' ): Promise { return this.useClient(async (client) => { if (expire && mode) { return (client as any).set(key, value, 'EX', expire, mode); } else if (expire) { return await client.set(key, value, 'EX', expire); } else { return await client.set(key, value); } }); } async get(key: string): Promise { return this.useClient((client) => client.get(key)); } async del(key: string): Promise { return this.useClient((client) => client.del(key)); } async hset(key: string, field: string, value: string): Promise { return this.useClient((client) => client.hset(key, field, value)); } async hget(key: string, field: string): Promise { return this.useClient((client) => client.hget(key, field)); } async hdel(key: string, field: string): Promise { return this.useClient((client) => client.hdel(key, field)); } async incr(key: string): Promise { return this.useClient((client) => client.incr(key)); } async decr(key: string): Promise { return this.useClient((client) => client.decr(key)); } async lpush(key: string, value: string): Promise { return this.useClient((client) => client.lpush(key, value)); } async rpush(key: string, value: string): Promise { return this.useClient((client) => client.rpush(key, value)); } async lpop(key: string): Promise { return this.useClient((client) => client.lpop(key)); } async rpop(key: string): Promise { return this.useClient((client) => client.rpop(key)); } async scanStream(match: string): Promise { return this.useClient(async (client) => { const stream = client.scanStream({ match, count: 200 }); const keys: string[] = []; return new Promise((resolve, reject) => { stream.on('data', (resultKeys: string[]) => { keys.push(...resultKeys); }); stream.on('end', () => resolve(keys)); stream.on('error', (err: Error) => reject(err)); }); }); } async mget(keys: string[]): Promise<(string | null)[]> { return this.useClient((client) => client.mget(keys)); } async testConnection() { try { const client = await this.pool.acquire(); await client.ping(); this.pool.release(client); console.log('Redis连接成功!'); } catch (error) { console.error('Redis连接失败: ', error); } } async getRedisInfo() { return this.useClient(async (client) => { try { // 获取 Redis INFO const info = await client.info(); // 获取 Redis DBSIZE const dbSize = await client.dbsize(); // 获取 Redis COMMANDSTATS const commandStats = await client.call('info', 'commandstats'); // 解析 INFO const parsedInfo = parseRedisInfo(info); // 解析 COMMANDSTATS const parsedCommandStats = parseCommandStats(commandStats); return { commandStats: parsedCommandStats, info: parsedInfo, dbSize: dbSize, }; } catch (err) { console.error('Error fetching Redis info:', err); } }); } } const redisUtils = new RedisUtils(redisConfig); redisUtils.testConnection(); export { redisUtils }; function parseRedisInfo(info) { const lines = info.split('\r\n'); const result = {}; lines.forEach((line) => { if (line && line[0] !== '#') { const parts = line.split(':'); if (parts.length === 2) { result[parts[0]] = parts[1]; } } }); return result; } function parseCommandStats(commandStats) { const lines = commandStats.split('\r\n'); const result = []; lines.forEach((line) => { if (line && line.startsWith('cmdstat_')) { const parts = line.split(':'); if (parts.length === 2) { const name = parts[0].substring(8); const values = parts[1].split(','); const valueObj: any = {}; values.forEach((value) => { const [key, val] = value.split('='); valueObj[key] = val; }); result.push({ name: name, value: valueObj?.calls || '0' }); } } }); return result; } /** * 分布式锁执行器 * @param key 锁的唯一标识 * @param action 要执行的业务函数(异步) * @param expire 锁的自动释放时间(秒),防止业务崩溃导致死锁,默认 30 秒 */ export async function runWithLock(key: string, action: () => Promise, expire = 30): Promise { const lockKey = `lock:${key}`; // 1. 尝试加锁 (SET NX EX) const lock = await redisUtils.set(lockKey, "1", expire, 'NX'); if (!lock) { // 抢锁失败,说明相同业务正在处理中 throw new Error('请求处理中,请稍后再试'); } try { // 2. 抢锁成功,执行传入的业务函数 return await action(); } finally { // 3. 无论成功还是失败,执行完一定要释放锁 await redisUtils.del(lockKey); } } ================================================ FILE: server/src/common/utils/systemInfo.ts ================================================ import * as si from 'systeminformation'; import * as os from 'os'; import * as dayjs from 'dayjs'; //获取cpu async function getCpu(): Promise { return si .currentLoad() .then((data) => { return { cpuNum: data.cpus.length, sys: data.currentLoadSystem.toFixed(2), used: data.currentLoadUser.toFixed(2), free: data.currentLoadIdle.toFixed(2), }; }) .catch((error) => { console.error('获取CPU使用率时出错:', error); return undefined; }); } //获取系统内存 async function getSysMemory() { const totalMemory = os.totalmem(); const freeMemory = os.freemem(); const usedMemory = totalMemory - freeMemory; return { total: formatMemory(totalMemory), used: formatMemory(usedMemory), free: formatMemory(freeMemory), usage: ((usedMemory / totalMemory) * 100).toFixed(2), }; } //获取系统信息 async function getSystemInfo() { const info = await si.osInfo(); const ip = await si.networkGatewayDefault(); return { computerName: info.hostname, computerIp: ip, userDir: process.mainModule.path, osName: info.distro || info.platform, platform: info.platform, release: info.release, serial: info.serial, osArch: info.arch, nodeVersion: process.version, serverDate: new Date().toLocaleString(), }; } async function getDickInfo() { return (await si.fsSize()).map((v) => ({ dirName: v.fs, sysTypeName: v.type, typeName: v.mount, total: formatMemory(v.size) + ' GB', used: formatMemory(v.used) + ' GB', free: formatMemory(v.available) + ' GB', usage: v.use, })); } //获取当前项目的信息 async function getProject() { const mem = process.memoryUsage(); for (const k in mem) { mem[k] = formatMemory(mem[k], 'MB'); } const memTotal = mem.heapTotal; // let memTotal = mem.rss + mem.heapTotal+mem.arrayBuffers return { total: +memTotal.toFixed(2), used: +mem.heapUsed.toFixed(2), //使用百分比 free: +(memTotal - mem.heapUsed).toFixed(2), //剩余 usage: ((mem.heapUsed / memTotal) * 100).toFixed(2), //剩余百分比 home: process.execPath, version: process.version, startTime: dayjs(Date.now() - process.uptime() * 1000).format( 'YYYY-MM-DD HH:mm:ss', ), runTime: formatTime(process.uptime()), runPath: process.mainModule.path, runFile: process.mainModule.filename, inputArgs: JSON.stringify(process.argv.slice(2)), name: process.release.name, pid: process.pid, ppid: process.ppid, }; } //秒转换为 `天 小时 分钟` function formatTime(seconds) { const days = Math.floor(seconds / (24 * 60 * 60)); const hours = Math.floor((seconds % (24 * 60 * 60)) / (60 * 60)); const minutes = Math.floor((seconds % (60 * 60)) / 60); return `${days}天${hours}小时${minutes}分钟`; } //格式化内存单位GB function formatMemory(memory, unit = 'GB') { const type = { GB: 1024 * 1024 * 1024, MB: 1024 * 1024, }; return +(memory / type[unit]).toFixed(2); } //获取以上全部信息 async function getServerInfo() { const data = await Promise.all([ getProject(), getSystemInfo(), getSysMemory(), getCpu(), getDickInfo(), ]); return { cpu: data[3], mem: data[2], project: data[0], sys: data[1], sysFiles: data[4], }; } export { getProject, getSystemInfo, getSysMemory, getCpu, getDickInfo, getServerInfo, }; ================================================ FILE: server/src/config-development.json ================================================ { "port": 3000, "contextPath": "/v1", "swagger": { "enable": true, "prefix": "/api" }, "captcha": { "mode": "math", "expiresIn": 120 }, "rateLimit": { "storage": "redis", "ttl": 120000, "limit": 60 }, "crypto": { "psdSecret": "carole123456" }, "token": { "secret": "carole123456", "expiresIn": 86400 }, "prisma": { "logEnable": false, "log": ["query", "info", "warn", "error"] }, "redis": { "host": "127.0.0.1", "port": 6379, "db": 5, "password": "" }, "upload": { "path": "/Users/carole/carole-admin/upload", "config": { "img": { "fileSize": 2097152, "files": 1, "fieldSize": 524288, "fields": 100, "fieldNameSize": 100, "parts": 100, "headerPairs": 100 }, "file": { "fileSize": 104857600, "files": 10, "fieldSize": 524288, "fields": 100, "fieldNameSize": 100, "parts": 100, "headerPairs": 100 } } }, "gen": { "author": "carole", "packageName": "admin", "moduleName": "system", "autoRemovePre": false, "tablePrefix": ["sys_"] }, "mail": { "enable": false, "timeout": 30000, "config": { "host": null, "port": 465, "auth": { "user": null, "pass": null }, "secure": true, "tls": { "rejectUnauthorized": false } } } } ================================================ FILE: server/src/config-production.json ================================================ { "port": 3000, "contextPath": "/v1", "swagger": { "enable": true, "prefix": "/api" }, "captcha": { "mode": "math", "expiresIn": 120 }, "rateLimit": { "storage": "redis", "ttl": 120000, "limit": 60 }, "crypto": { "psdSecret": "carole123456" }, "token": { "secret": "carole123456", "expiresIn": 86400 }, "prisma": { "logEnable": false, "log": ["query", "info", "warn", "error"] }, "redis": { "host": "127.0.0.1", "port": 6379, "db": 5, "password": "" }, "upload": { "path": "/Users/carole/carole-admin/upload", "config": { "img": { "fileSize": 2097152, "files": 1, "fieldSize": 524288, "fields": 100, "fieldNameSize": 100, "parts": 100, "headerPairs": 100 }, "file": { "fileSize": 104857600, "files": 10, "fieldSize": 524288, "fields": 100, "fieldNameSize": 100, "parts": 100, "headerPairs": 100 } } }, "gen": { "author": "carole", "packageName": "admin", "moduleName": "system", "autoRemovePre": false, "tablePrefix": ["sys_"] }, "mail": { "enable": false, "timeout": 30000, "config": { "host": null, "port": 465, "auth": { "user": null, "pass": null }, "secure": true, "tls": { "rejectUnauthorized": false } } } } ================================================ FILE: server/src/config.ts ================================================ import * as dotenv from 'dotenv'; import { join } from 'path'; import { watch } from 'fs'; import { readJsonFile } from './common/utils'; dotenv.config({ path: join(__dirname, `.env`) }); //运行模式,根据不同的模式加载不同的配置文件 development=>开发环境 production=>生产环境 export let runMode: "development" | "production" = "development"; const config_file_path = join(__dirname, `config-${runMode}.json`) /* 根据运行模式加载文件后,会覆盖默认配置 可直接修改对应的json文件 config-${runMode}.json 或者删除json文件中对应的key,默认就使用下面的配置。 后台提供了默认的配置文件修改,Config也会自动加载修改后的配置。 */ export const Config = { // 是否是演示模式 is_demo:false, // 是否由后端托管前端文件 is_managed_by_backend: false, //托管文件所在的目录路径 backend_directory: join(__dirname,"./front/"), //服务器的HTTP端口,默认为3000 port: 3000, //# 应用的访问路径前缀 contextPath: '/v1', swagger: { //是否启用swagger enable: true, //接口文档路径 prefix: '/api', }, captcha: { //验证码类型 math或text mode: 'math', //验证码过期时间 expiresIn: 60 * 2, }, //配置文件列表,管理后台可快捷编辑同步Config数据 注意:开发环境运行在dist目录,修改的也是dist里面的配置文件 //根据业务可能会有多个配置文件 ConfigFileMap: { "production_config": { desc: "生产环境配置", filePath: join(__dirname, "./config-production.json") }, "dev_config": { desc: "开发环境配置", filePath: join(__dirname, "./config-production.json") } }, //接口限流 2分钟内同一个接口允许60次请求 rateLimit: { //数据存储在redis or memory storage: 'redis', ttl: 2 * 60 * 1000, limit: 60, }, crypto: { //密码加密秘钥 psdSecret: 'carole123456', }, token: { // token加密秘钥 secret: 'carole123456', //过期时间秒 expiresIn: 60 * 60 * 24, }, prisma: { //是否显示执行的sql指令 logEnable: false, //显示那些日志 log: ['query', 'info', 'warn', 'error'] as any }, //redis连接配置 redis: { //主机地址 host: '127.0.0.1', //端口 port: 6379, //数据库 db: 5, //密码 password: "" }, upload: { //上传文件存储基目录 请设置一个绝对路径 path: join(__dirname, "uploads"), config: { img: { fileSize: 2 * 1024 * 1024, files: 1, fieldSize: 0.5 * 1024 * 1024, fields: 100, fieldNameSize: 100, parts: 100, headerPairs: 100, }, file: { fileSize: 100 * 1024 * 1024, files: 10, fieldSize: 0.5 * 1024 * 1024, fields: 100, fieldNameSize: 100, parts: 100, headerPairs: 100, }, }, }, //生成配置 gen: { //作者 author: 'carole', //默认生成模块 packageName: 'admin', //子模块目录 moduleName: 'system', //是否去除表前缀,默认是false autoRemovePre: false, //表前缀(生成类名不会包含表前缀,多个用逗号分隔) tablePrefix: ['sys_'], }, //邮件发送配置 mail: { //是否启用邮箱 enable: false, //超时设置, 30秒未发送邮件,则返回失败 timeout: 30 * 1000, config: { //邮箱服务器 qq:smtp.qq.com 网易: smtp.163.com host: "", //端口 port: 465, auth: { //用户名 user: "", //密码 pass: "", }, // 端口465设置true, 其他false secure: true, tls: { //建立 TLS 连接时是否应该拒绝未经授权的服务器证书 rejectUnauthorized: false, }, }, }, }; initConfig(); export function initConfig() { let data = readJsonFile(config_file_path) if (data) { for (let k in data) { Config[k] = data[k]; } } } // 监听config文件变化 watch(config_file_path, (eventType, filename) => { if (eventType === 'change') { try { initConfig(); console.log('config已更新') } catch (err) { console.log('更新config失败:', err) } } }) //是否开发环境 export function isDevelopment() { return runMode === "development"; } //是否生产环境 export function isProduction() { return runMode === "production"; } ================================================ FILE: server/src/main.ts ================================================ import 'module-alias/register'; import { NestFactory } from '@nestjs/core'; import { AppModule } from './app.module'; import { NestExpressApplication } from '@nestjs/platform-express'; import { Config } from '@/config'; import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger'; import { lightBlue } from 'kolorist'; import { Constants } from './common/constant/Constants'; async function bootstrap() { const app = await NestFactory.create(AppModule); app.set('trust proxy', true); app.disable('x-powered-by'); app.setGlobalPrefix(Config.contextPath || '/'); app.enableCors(); //是否由后端托管前端管理系统文件 if (Config.is_managed_by_backend) { app.useStaticAssets(Config.backend_directory, { prefix: "/", setHeaders: (res, filePath) => { if (filePath.endsWith('.html')) { // 禁止 HTML 文件缓存 res.setHeader('Cache-Control', 'no-cache, no-store, must-revalidate'); res.setHeader('Pragma', 'no-cache'); res.setHeader('Expires', '0'); } else { // 其他文件缓存一天 res.setHeader('Cache-Control', 'public, max-age=86400'); } } }); } app.useStaticAssets(Config.upload.path, { prefix: Config.contextPath.replace(/\/$/, '') + '/file', maxAge: 86400000 * 365, }); app.useStaticAssets(Config.upload.path, { prefix: Config.contextPath.replace(/\/$/, '') + Constants.FILE_PREFIX, maxAge: 86400000 * 365, }); if (Config.swagger.enable) { const options = new DocumentBuilder() .setTitle('Carole后台管理系统接口文档') .setDescription('Carole后台管理系统接口文档') .setVersion('1.0') .addBearerAuth() .addTag('NestJS') .build(); const document = SwaggerModule.createDocument(app, options); SwaggerModule.setup( Config.contextPath.replace(/\/$/, '') + Config.swagger.prefix, app, document, ); } await app.listen(Config.port); console.log( lightBlue(`server is running to http://localhost:${Config.port}`), ); } bootstrap(); ================================================ FILE: server/src/prisma/schema/gen.prisma ================================================ model GenTable { tableId Int @id @default(autoincrement()) @map("table_id") @db.UnsignedInt tableName String? @default("") @map("table_name") @db.VarChar(200) tableComment String? @default("") @map("table_comment") @db.VarChar(500) subTableName String? @map("sub_table_name") @db.VarChar(64) subTableFkName String? @map("sub_table_fk_name") @db.VarChar(64) className String? @default("") @map("class_name") @db.VarChar(100) tplCategory String? @default("crud") @map("tpl_category") @db.VarChar(200) tplWebType String? @default("") @map("tpl_web_type") @db.VarChar(30) packageName String? @map("package_name") @db.VarChar(100) moduleName String? @map("module_name") @db.VarChar(30) businessName String? @map("business_name") @db.VarChar(30) functionName String? @map("function_name") @db.VarChar(50) functionAuthor String? @map("function_author") @db.VarChar(50) genType String? @default("0") @map("gen_type") @db.Char(1) genPath String? @default("/") @map("gen_path") @db.VarChar(200) options String? @map("options") @db.VarChar(1000) createBy String? @default("") @map("create_by") @db.VarChar(64) createTime String? @map("create_time") @db.VarChar(25) updateBy String? @default("") @map("update_by") @db.VarChar(64) updateTime String? @map("update_time") @db.VarChar(25) remark String? @db.VarChar(500) tableColumns GenTableColumn[] @@map("gen_table") } model GenTableColumn { columnId Int @id @default(autoincrement()) @map("column_id") @db.UnsignedInt tableId Int? @map("table_id") @db.UnsignedInt columnName String? @map("column_name") @db.VarChar(200) columnComment String? @map("column_comment") @db.VarChar(500) columnType String? @map("column_type") @db.VarChar(100) javaType String? @map("java_type") @db.VarChar(500) javaField String? @map("java_field") @db.VarChar(200) isPk String? @map("is_pk") @db.Char(1) isIncrement String? @map("is_increment") @db.Char(1) isRequired String? @map("is_required") @db.Char(1) isInsert String? @map("is_insert") @db.Char(1) isEdit String? @map("is_edit") @db.Char(1) isList String? @map("is_list") @db.Char(1) isQuery String? @map("is_query") @db.Char(1) queryType String? @default("EQ") @map("query_type") @db.VarChar(200) htmlType String? @map("html_type") @db.VarChar(200) dictType String? @default("") @map("dict_type") @db.VarChar(200) sort Int? @map("sort") createBy String? @default("") @map("create_by") @db.VarChar(64) createTime String? @map("create_time") @db.VarChar(25) updateBy String? @default("") @map("update_by") @db.VarChar(64) updateTime String? @map("update_time") @db.VarChar(25) table GenTable? @relation(fields: [tableId], references: [tableId]) @@index([tableId]) @@map("gen_table_column") } ================================================ FILE: server/src/prisma/schema/system.prisma ================================================ model SysConfig { configId Int @id @default(autoincrement()) @map("config_id") configName String? @default("") @map("config_name") @db.VarChar(100) configKey String? @default("") @map("config_key") @db.VarChar(100) configValue String? @default("") @map("config_value") @db.VarChar(500) configType String? @default("N") @map("config_type") @db.Char(1) createBy String? @default("") @map("create_by") @db.VarChar(64) createTime String? @map("create_time") @db.VarChar(25) updateBy String? @default("") @map("update_by") @db.VarChar(64) updateTime String? @map("update_time") @db.VarChar(25) remark String? @map("remark") @db.VarChar(500) @@map("sys_config") } model SysDept { deptId Int @id @default(autoincrement()) @map("dept_id") @db.UnsignedInt parentId Int? @default(0) @map("parent_id") @db.UnsignedInt ancestors String? @default("") @map("ancestors") @db.VarChar(50) deptName String? @default("") @map("dept_name") @db.VarChar(30) orderNum Int? @default(0) @map("order_num") leader String? @map("leader") @db.VarChar(20) phone String? @map("phone") @db.VarChar(11) email String? @map("email") @db.VarChar(50) status String? @default("1") @map("status") @db.Char(1) createBy String? @default("") @map("create_by") @db.VarChar(64) createTime String? @map("create_time") @db.VarChar(25) updateBy String? @default("") @map("update_by") @db.VarChar(64) updateTime String? @map("update_time") @db.VarChar(25) users SysUser[] roles SysRoleDept[] @@map("sys_dept") } model SysDictData { dictCode Int @id @default(autoincrement()) @map("dict_code") @db.UnsignedInt dictSort Int? @default(0) @map("dict_sort") dictLabel String? @default("") @map("dict_label") @db.VarChar(100) dictValue String? @default("") @map("dict_value") @db.VarChar(100) dictType String? @default("") @map("dict_type") @db.VarChar(100) cssClass String? @map("css_class") @db.VarChar(100) listClass String? @map("list_class") @db.VarChar(100) isDefault String? @default("N") @map("is_default") @db.Char(1) status String? @default("1") @map("status") @db.Char(1) createBy String? @default("") @map("create_by") @db.VarChar(64) createTime String? @map("create_time") @db.VarChar(25) updateBy String? @default("") @map("update_by") @db.VarChar(64) updateTime String? @map("update_time") @db.VarChar(25) remark String? @map("remark") @db.VarChar(500) sysDictType SysDictType? @relation(fields: [dictType], references: [dictType]) @@index([dictType]) @@map("sys_dict_data") } model SysDictType { dictId Int @id @default(autoincrement()) @map("dict_id") @db.UnsignedInt dictName String? @default("") @map("dict_name") @db.VarChar(100) dictType String? @unique(map: "dict_type") @default("") @map("dict_type") @db.VarChar(100) status String? @default("1") @map("status") @db.Char(1) createBy String? @default("") @map("create_by") @db.VarChar(64) createTime String? @map("create_time") @db.VarChar(25) updateBy String? @default("") @map("update_by") @db.VarChar(64) updateTime String? @map("update_time") @db.VarChar(25) remark String? @map("remark") @db.VarChar(500) dictDatas SysDictData[] @@map("sys_dict_type") } model SysLogininfor { infoId Int @id @default(autoincrement()) @map("info_id") @db.UnsignedInt userName String? @default("") @map("user_name") @db.VarChar(50) ipaddr String? @default("") @map("ipaddr") @db.VarChar(128) loginLocation String? @default("") @map("login_location") @db.VarChar(255) browser String? @default("") @map("browser") @db.VarChar(50) os String? @default("") @map("os") @db.VarChar(50) status String? @default("1") @map("status") @db.Char(1) msg String? @default("") @map("msg") @db.VarChar(255) loginTime String? @map("login_time") @db.VarChar(25) @@index([loginTime], map: "idx_sys_logininfor_lt") @@index([status], map: "idx_sys_logininfor_s") @@map("sys_logininfor") } model SysMenu { menuId Int @id @default(autoincrement()) @map("menu_id") @db.UnsignedInt menuName String @map("menu_name") @db.VarChar(50) parentId Int? @default(0) @map("parent_id") @db.UnsignedInt orderNum Int? @default(0) @map("order_num") path String? @default("") @map("path") @db.VarChar(200) component String? @map("component") @db.VarChar(255) query String? @map("query") @db.VarChar(255) isFrame Int? @default(0) @map("is_frame") isCache Int? @default(1) @map("is_cache") menuType String? @default("") @map("menu_type") @db.Char(1) visible String? @default("1") @map("visible") @db.Char(1) status String? @default("1") @map("status") @db.Char(1) perms String? @map("perms") @db.VarChar(100) icon String? @default("#") @map("icon") @db.VarChar(100) createBy String? @default("") @map("create_by") @db.VarChar(64) createTime String? @map("create_time") @db.VarChar(25) updateBy String? @default("") @map("update_by") @db.VarChar(64) updateTime String? @map("update_time") @db.VarChar(25) remark String? @default("") @map("remark") @db.VarChar(500) roles SysRoleMenu[] @@map("sys_menu") } model SysNotice { noticeId Int @id @default(autoincrement()) @map("notice_id") noticeTitle String @map("notice_title") @db.VarChar(50) noticeType String @map("notice_type") @db.Char(1) noticeContent String? @map("notice_content") @db.MediumText status String? @default("1") @map("status") @db.Char(1) createBy String? @default("") @map("create_by") @db.VarChar(64) createTime String? @map("create_time") @db.VarChar(25) updateBy String? @default("") @map("update_by") @db.VarChar(64) updateTime String? @map("update_time") @db.VarChar(25) remark String? @map("remark") @db.VarChar(255) @@map("sys_notice") } model SysPost { postId Int @id @default(autoincrement()) @map("post_id") @db.UnsignedInt postCode String @map("post_code") @db.VarChar(64) postName String @map("post_name") @db.VarChar(50) postSort Int @map("post_sort") status String @default("1") @map("status") @db.Char(1) createBy String? @default("") @map("create_by") @db.VarChar(64) createTime String? @map("create_time") @db.VarChar(25) updateBy String? @default("") @map("update_by") @db.VarChar(64) updateTime String? @map("update_time") @db.VarChar(25) remark String? @map("remark") @db.VarChar(500) users SysUserPost[] @@map("sys_post") } model SysUserPost { userId Int @map("user_id") @db.UnsignedInt postId Int @map("post_id") @db.UnsignedInt user SysUser @relation(fields: [userId], references: [userId]) post SysPost @relation(fields: [postId], references: [postId]) @@id([userId, postId]) @@index([postId]) @@map("sys_user_post") } model SysRoleDept { roleId Int @map("role_id") @db.UnsignedInt deptId Int @map("dept_id") @db.UnsignedInt role SysRole @relation(fields: [roleId], references: [roleId]) dept SysDept @relation(fields: [deptId], references: [deptId]) @@id([roleId, deptId]) @@index([deptId]) @@map("sys_role_dept") } model SysRoleMenu { roleId Int @map("role_id") @db.UnsignedInt menuId Int @map("menu_id") @db.UnsignedInt menu SysMenu @relation(fields: [menuId], references: [menuId]) role SysRole @relation(fields: [roleId], references: [roleId]) @@id([roleId, menuId]) @@index([menuId]) @@map("sys_role_menu") } model SysUser { userId Int @id @default(autoincrement()) @map("user_id") @db.UnsignedInt deptId Int? @map("dept_id") @db.UnsignedInt userName String @map("user_name") @db.VarChar(30) nickName String @map("nick_name") @db.VarChar(30) userType String? @default("00") @map("user_type") @db.VarChar(2) email String? @default("") @map("email") @db.VarChar(50) phonenumber String? @default("") @map("phonenumber") @db.VarChar(11) sex String? @default("0") @map("sex") @db.Char(1) avatar String? @default("") @map("avatar") @db.VarChar(100) password String? @default("") @map("password") @db.VarChar(100) status String? @default("1") @map("status") @db.Char(1) loginIp String? @default("") @map("login_ip") @db.VarChar(128) loginDate String? @map("login_date") @db.VarChar(25) createBy String? @default("") @map("create_by") @db.VarChar(64) createTime String? @map("create_time") @db.VarChar(25) updateBy String? @default("") @map("update_by") @db.VarChar(64) updateTime String? @map("update_time") @db.VarChar(25) remark String? @map("remark") @db.VarChar(500) dept SysDept? @relation(fields: [deptId], references: [deptId]) roles SysUserRole[] posts SysUserPost[] @@index([deptId]) @@map("sys_user") } model SysRole { roleId Int @id @default(autoincrement()) @map("role_id") @db.UnsignedInt roleName String @map("role_name") @db.VarChar(30) roleKey String @map("role_key") @db.VarChar(100) roleSort Int @map("role_sort") dataScope String? @default("5") @map("data_scope") @db.Char(1) menuCheckStrictly Int? @default(1) @map("menu_check_strictly") @db.TinyInt deptCheckStrictly Int? @default(1) @map("dept_check_strictly") @db.TinyInt status String @default("1") @map("status") @db.Char(1) createBy String? @default("") @map("create_by") @db.VarChar(64) createTime String? @map("create_time") @db.VarChar(25) updateBy String? @default("") @map("update_by") @db.VarChar(64) updateTime String? @map("update_time") @db.VarChar(25) remark String? @map("remark") @db.VarChar(500) users SysUserRole[] menus SysRoleMenu[] depts SysRoleDept[] @@map("sys_role") } model SysUserRole { userId Int @map("user_id") @db.UnsignedInt roleId Int @map("role_id") @db.UnsignedInt user SysUser @relation(fields: [userId], references: [userId]) role SysRole @relation(fields: [roleId], references: [roleId]) @@id([userId, roleId]) @@index([roleId]) @@map("sys_user_role") } ================================================ FILE: server/src/prisma/schema.prisma ================================================ generator client { provider = "prisma-client-js" output = "./common/prisma-client" previewFeatures = ["views", "relationJoins", "prismaSchemaFolder", "omitApi"] //这里可以指定平台引擎,native就是当前系统, 如果需要其他系统的自行添加,或者到目标系统执行npx prisma generate binaryTargets = ["native"] // binaryTargets = ["native", "windows", "linux-musl","debian-openssl-3.0.x","darwin","darwin-arm64"] } datasource db { provider = "mysql" url = env("DATABASE_URL") relationMode = "prisma" } ================================================ FILE: server/src/schedule/index.ts ================================================ import { Injectable } from '@nestjs/common'; // import { Cron } from '@nestjs/schedule'; @Injectable() export class TasksService { //cron任务,每隔两秒执行一次 // @Cron('*/2 * * * * *') // testCron() { // console.log("cron excute...") // } } ================================================ FILE: server/test/app.e2e-spec.ts ================================================ import { Test, TestingModule } from '@nestjs/testing'; import { INestApplication } from '@nestjs/common'; import * as request from 'supertest'; import { AppModule } from './../src/app.module'; describe('AppController (e2e)', () => { let app: INestApplication; beforeEach(async () => { const moduleFixture: TestingModule = await Test.createTestingModule({ imports: [AppModule], }).compile(); app = moduleFixture.createNestApplication(); await app.init(); }); it('/ (GET)', () => { return request(app.getHttpServer()) .get('/') .expect(200) .expect('Hello World!'); }); }); ================================================ FILE: server/test/jest-e2e.json ================================================ { "moduleFileExtensions": ["js", "json", "ts"], "rootDir": ".", "testEnvironment": "node", "testRegex": ".e2e-spec.ts$", "transform": { "^.+\\.(t|j)s$": "ts-jest" } } ================================================ FILE: server/test/password.js ================================================ const path = require("path") const dotenv = require("dotenv").config({path:path.join(__dirname, "../src/.env")}) const HmacSHA256 = require("crypto-js/hmac-sha256") const key = process.env.psdSecret console.log(HmacSHA256("carole", key).toString()) console.log(HmacSHA256("123456", key).toString()) ================================================ FILE: server/tsconfig.build.json ================================================ { "extends": "./tsconfig.json", "exclude": ["node_modules", "test", "dist", "**/*spec.ts"], "compilerOptions": { "paths": { "@prismaClient": ["src/common/prisma-client"], "@/*": ["src/*"] }, "module": "commonjs", "declaration": false, "removeComments": true, "emitDecoratorMetadata": true, "experimentalDecorators": true, "allowSyntheticDefaultImports": true, "target": "ES2021", "sourceMap": true, "outDir": "./dist", "baseUrl": "./", "incremental": true, "skipLibCheck": true, "strictNullChecks": false, "noImplicitAny": false, "strictBindCallApply": false, "forceConsistentCasingInFileNames": false, "noFallthroughCasesInSwitch": false, } } ================================================ FILE: server/tsconfig.json ================================================ { "compilerOptions": { "paths": { "@prismaClient": ["src/common/prisma-client"], "@/*": ["src/*"] }, "module": "commonjs", "declaration": true, "removeComments": true, "emitDecoratorMetadata": true, "experimentalDecorators": true, "allowSyntheticDefaultImports": true, "target": "ES2021", "sourceMap": true, "outDir": "./dist", "baseUrl": "./", "incremental": true, "skipLibCheck": true, "strictNullChecks": false, "noImplicitAny": false, "strictBindCallApply": false, "forceConsistentCasingInFileNames": false, "noFallthroughCasesInSwitch": false, } } ================================================ FILE: server/更新prisma的model.bat ================================================ node ./src/common/utils/prismaUtil.js -update ================================================ FILE: server/更新prisma的model.sh ================================================ #!/bin/bash node ./src/common/utils/prismaUtil.js -update ================================================ FILE: server/驼峰生成prisma的model.bat ================================================ node ./src/common/utils/prismaUtil.js -generate ================================================ FILE: server/驼峰生成prisma的model.sh ================================================ #!/bin/bash node ./src/common/utils/prismaUtil.js -generate