diff --git a/README.md b/README.md index 29b1308..9a61aa0 100644 --- a/README.md +++ b/README.md @@ -73,8 +73,21 @@ npm run dev # http://localhost:3000 ### 관리자 비밀번호 변경 +`package.json`이 있는 프로젝트 루트에서 실행합니다. 비밀번호는 **8자 이상**이어야 합니다. + ```bash -npm run admin:password -- admin '새로운비밀번호' +npm run admin:password -- admin 'NewStrongPassword!2026' +``` + +- 로컬에서는 `.env`의 `DATABASE_URL`(기본 `file:./dev.db`, Prisma 기준 `prisma/dev.db`)을 변경합니다. +- 운영 서버의 런타임 디렉터리(`/srv/yonggong`)에는 `package.json`과 `scripts/`가 없으므로 + 아래처럼 **소스 빌드 디렉터리**에서 실행해야 합니다. (`npm run`을 런타임 디렉터리에서 + 실행하면 `ENOENT: package.json` 오류가 납니다.) + +```bash +cd /srv/yonggong/build +sudo env DOTENV_CONFIG_PATH=/srv/yonggong/.env.production \ + npm run admin:password -- admin 'NewStrongPassword!2026' ``` ### 자주 쓰는 명령 @@ -90,7 +103,7 @@ npm run typecheck # 타입 검사 | 변수 | 설명 | 예시 | | --- | --- | --- | -| `DATABASE_URL` | DB 접속 문자열 | `file:./dev.db` | +| `DATABASE_URL` | DB 접속 문자열 (상대 SQLite 경로는 `prisma/` 기준) | `file:./dev.db` | | `AUTH_SECRET` | 관리자 세션 서명 키 (32자 이상) | 임의 문자열 | | `NEXT_PUBLIC_SITE_URL` | 공개 사이트 주소 (SEO/OG/RSS) | `https://saftyovhcable.kr` | | `ADMIN_LOGIN_ID` | 최초 관리자 아이디 | `admin` | diff --git a/next.config.ts b/next.config.ts index adeaf56..ab3c3e0 100644 --- a/next.config.ts +++ b/next.config.ts @@ -19,9 +19,7 @@ const nextConfig: NextConfig = { "./.env.*", "./Dockerfile", "./docker-compose.yml", - // Node.js 런타임에서는 바이너리 엔진을 사용하므로 Edge용 wasm 사본은 불필요합니다. - "./node_modules/@prisma/client/runtime/*.wasm-base64.js", - "./node_modules/@prisma/client/runtime/*.wasm-base64.mjs", + // Prisma 7 WASM 쿼리 컴파일러는 런타임에 필요하므로 제외하지 않습니다. ], }, experimental: { diff --git a/package-lock.json b/package-lock.json index e434255..584b408 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,8 +8,11 @@ "name": "yonggong-website", "version": "0.1.0", "dependencies": { - "@prisma/client": "6.19.3", + "@prisma/adapter-better-sqlite3": "7.10.1", + "@prisma/client": "7.10.1", "bcryptjs": "3.0.3", + "better-sqlite3": "^12.6.0", + "dotenv": "^18.0.10", "jose": "6.2.13", "lucide-react": "1.61.0", "next": "16.4.3", @@ -22,10 +25,11 @@ }, "devDependencies": { "@tailwindcss/postcss": "4.3.3", + "@types/better-sqlite3": "^9.6.0", "@types/node": "26.6.5", "@types/react": "19.3.0", "@types/react-dom": "19.3.0", - "prisma": "6.19.3", + "prisma": "7.10.1", "tailwindcss": "4.3.3", "tsx": "4.23.15", "typescript": "5.9.3" @@ -44,6 +48,36 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/@electric-sql/pglite": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@electric-sql/pglite/-/pglite-0.4.3.tgz", + "integrity": "sha512-ichuWTgtd4mOM1G4SpyGJa5trT03lWbMypDV0fUXUCXg5hiHqVAz/bZyV68NqmkLB7WcYmj1RMJVSp8HV/v/ZQ==", + "devOptional": true, + "license": "Apache-2.0" + }, + "node_modules/@electric-sql/pglite-socket": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@electric-sql/pglite-socket/-/pglite-socket-0.1.3.tgz", + "integrity": "sha512-LAciWM0M1dCL8hlsxu2venbVZcdxema0BtDfpWYVqr+Y468UADw0pFWidhKw1M8sfJ8rdLT71tjMmnirf/IZRQ==", + "devOptional": true, + "license": "Apache-2.0", + "bin": { + "pglite-server": "dist/scripts/server.js" + }, + "peerDependencies": { + "@electric-sql/pglite": "0.4.3" + } + }, + "node_modules/@electric-sql/pglite-tools": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@electric-sql/pglite-tools/-/pglite-tools-0.3.3.tgz", + "integrity": "sha512-AlzLJTRJ8+UFgK8CmxIpyIpJ0+YaFw02IiOSdYrqxwPXdSyeIShz8aa9Tq+tYFXdPwcaMp/Fc80mQZ1dkOQ/wg==", + "devOptional": true, + "license": "Apache-2.0", + "peerDependencies": { + "@electric-sql/pglite": "0.4.3" + } + }, "node_modules/@emnapi/runtime": { "version": "1.11.3", "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.11.3.tgz", @@ -1241,18 +1275,30 @@ "node": ">= 10" } }, - "node_modules/@prisma/client": { - "version": "6.19.3", - "resolved": "https://registry.npmjs.org/@prisma/client/-/client-6.19.3.tgz", - "integrity": "sha512-mKq3jQFhjvko5LTJFHGilsuQs+W+T3Gm451NzuTDGQxwCzwXHYnIu2zGkRoW+Exq3Rob7yp2MfzSrdIiZVhrBg==", - "hasInstallScript": true, + "node_modules/@prisma/adapter-better-sqlite3": { + "version": "7.10.1", + "resolved": "https://registry.npmjs.org/@prisma/adapter-better-sqlite3/-/adapter-better-sqlite3-7.10.1.tgz", + "integrity": "sha512-iD7UgO7/wSrslDdb0WvRSBS5v36KRCL3biTrCuGetbR/IIKL+PxyGgiZlfMyqY2yjAfS+tXWXkFVVkiESiXskQ==", "license": "Apache-2.0", + "dependencies": { + "@prisma/driver-adapter-utils": "7.10.1", + "better-sqlite3": "^12.6.0" + } + }, + "node_modules/@prisma/client": { + "version": "7.10.1", + "resolved": "https://registry.npmjs.org/@prisma/client/-/client-7.10.1.tgz", + "integrity": "sha512-5tgAbFGh//zVOC6WPNVgziOErJHYkUE+wmqCwbIyq6IrTXUYtv9y2iBFGh/Owo99Mx0+cr0j1FOrxkYBMuyhaQ==", + "license": "Apache-2.0", + "dependencies": { + "@prisma/client-runtime-utils": "7.10.1" + }, "engines": { - "node": ">=18.18" + "node": "^20.19 || ^22.12 || >=24.0" }, "peerDependencies": { "prisma": "*", - "typescript": ">=5.1.0" + "typescript": ">=5.4.0" }, "peerDependenciesMeta": { "prisma": { @@ -1263,67 +1309,332 @@ } } }, + "node_modules/@prisma/client-runtime-utils": { + "version": "7.10.1", + "resolved": "https://registry.npmjs.org/@prisma/client-runtime-utils/-/client-runtime-utils-7.10.1.tgz", + "integrity": "sha512-AzoATVIgmO3lcZfM443+9SI7+cyLMW2+Psw4op8WQHpHvHCX//CKxv8fwhiL0yGWF8DjdQrFewxrZo5McBdB8g==", + "license": "Apache-2.0" + }, "node_modules/@prisma/config": { - "version": "6.19.3", - "resolved": "https://registry.npmjs.org/@prisma/config/-/config-6.19.3.tgz", - "integrity": "sha512-CBPT44BjlQxEt8kiMEauji2WHTDoVBOKl7UlewXmUgBPnr/oPRZC3psci5chJnYmH0ivEIog2OU9PGWoki3DLQ==", + "version": "7.10.1", + "resolved": "https://registry.npmjs.org/@prisma/config/-/config-7.10.1.tgz", + "integrity": "sha512-+0swF5ELUa3P/9cIR26+gpYjjCbGE0qvEBZhV4zMDkYsrtHjZ884MQbOnWFWXj600N0sSJNnHbtBqe12yDngWg==", "devOptional": true, "license": "Apache-2.0", "dependencies": { - "c12": "3.1.0", - "deepmerge-ts": "7.1.5", - "effect": "3.21.0", + "c12": "3.3.4", + "deepmerge-ts": "8.0.2", + "effect": "3.20.0", "empathic": "2.0.0" } }, "node_modules/@prisma/debug": { - "version": "6.19.3", - "resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-6.19.3.tgz", - "integrity": "sha512-ljkJ+SgpXNktLG0Q/n4JGYCkKf0f8oYLyjImS2I8e2q2WCfdRRtWER062ZV/ixaNP2M2VKlWXVJiGzZaUgbKZw==", - "devOptional": true, + "version": "7.10.1", + "resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-7.10.1.tgz", + "integrity": "sha512-eFCAkGZ13D/qPg48JBlG5IWi9cSBBOC7oG3abDPcAkYioDWlIjh0YJJLK2J7qo5S+xWWD8I6egAN/8KbCaiMCA==", "license": "Apache-2.0" }, + "node_modules/@prisma/dev": { + "version": "0.24.17", + "resolved": "https://registry.npmjs.org/@prisma/dev/-/dev-0.24.17.tgz", + "integrity": "sha512-UvdZzmpFwknnfreh6Jije84ekkYGPYEJhXG1tFzCsCfQyzJifrOo38eZc0qajzvaC6OLUOrN9ML5XfCnEZL9DA==", + "devOptional": true, + "license": "ISC", + "dependencies": { + "@electric-sql/pglite": "0.4.3", + "@electric-sql/pglite-socket": "0.1.3", + "@electric-sql/pglite-tools": "0.3.3", + "@prisma/get-platform": "7.2.0", + "@prisma/query-plan-executor": "7.2.0", + "@prisma/streams-local": "0.1.11", + "find-my-way": "9.7.0", + "foreground-child": "3.3.1", + "get-port-please": "3.2.0", + "pathe": "2.0.3", + "proper-lockfile": "4.1.2", + "remeda": "2.33.4", + "std-env": "3.10.0", + "valibot": "1.4.2", + "zeptomatch": "2.1.0" + } + }, + "node_modules/@prisma/driver-adapter-utils": { + "version": "7.10.1", + "resolved": "https://registry.npmjs.org/@prisma/driver-adapter-utils/-/driver-adapter-utils-7.10.1.tgz", + "integrity": "sha512-DJ4c6xvVnm3s9ZUyql9nCUicADSqyvH+CjXRCM9L6m5zJxCNmebCElG6X4irICq3rosBwlX+S19Dxq/4IrZk3A==", + "license": "Apache-2.0", + "dependencies": { + "@prisma/debug": "7.10.1" + } + }, "node_modules/@prisma/engines": { - "version": "6.19.3", - "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-6.19.3.tgz", - "integrity": "sha512-RSYxtlYFl5pJ8ZePgMv0lZ9IzVCOdTPOegrs2qcbAEFrBI1G33h6wyC9kjQvo0DnYEhEVY0X4LsuFHXLKQk88g==", + "version": "7.10.1", + "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-7.10.1.tgz", + "integrity": "sha512-R6/ghv1Bu36FhCdQLFof1pNtyoWoeDzJLYeTKjgqb4eGtOAJx7ZqJtcm4pzkahLfZ9rYz8AkmsMDwkyiYbXPCQ==", "devOptional": true, "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { - "@prisma/debug": "6.19.3", - "@prisma/engines-version": "7.1.1-3.c2990dca591cba766e3b7ef5d9e8a84796e47ab7", - "@prisma/fetch-engine": "6.19.3", - "@prisma/get-platform": "6.19.3" + "@prisma/debug": "7.10.1", + "@prisma/engines-version": "8.1.0-1.d1b3f377ca835d73fd50954a5e22128b9ebdd6b8", + "@prisma/fetch-engine": "7.10.1", + "@prisma/get-platform": "7.10.1" } }, "node_modules/@prisma/engines-version": { - "version": "7.1.1-3.c2990dca591cba766e3b7ef5d9e8a84796e47ab7", - "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-7.1.1-3.c2990dca591cba766e3b7ef5d9e8a84796e47ab7.tgz", - "integrity": "sha512-03bgb1VD5gvuumNf+7fVGBzfpJPjmqV423l/WxsWk2cNQ42JD0/SsFBPhN6z8iAvdHs07/7ei77SKu7aZfq8bA==", + "version": "8.1.0-1.d1b3f377ca835d73fd50954a5e22128b9ebdd6b8", + "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-8.1.0-1.d1b3f377ca835d73fd50954a5e22128b9ebdd6b8.tgz", + "integrity": "sha512-XjXmwjN2NE340RpXoXv8ZF8aNAvr0FE+7gNfkKeW6vyjXs7F8uxvEbWQoVrhioXDQoIsnNmv7r+wxvzfdEZaWA==", "devOptional": true, "license": "Apache-2.0" }, - "node_modules/@prisma/fetch-engine": { - "version": "6.19.3", - "resolved": "https://registry.npmjs.org/@prisma/fetch-engine/-/fetch-engine-6.19.3.tgz", - "integrity": "sha512-tKtl/qco9Nt7LU5iKhpultD8O4vMCZcU2CHjNTnRrL1QvSUr5W/GcyFPjNL87GtRrwBc7ubXXD9xy4EvLvt8JA==", + "node_modules/@prisma/engines/node_modules/@prisma/get-platform": { + "version": "7.10.1", + "resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-7.10.1.tgz", + "integrity": "sha512-iVnghHne5vcaobBjPVCMEjh5r/1UCj394EIGTUclasFRatpR/MQwcM2veLv5kgoFSyYP54nch/lNFCQRYcDxvg==", "devOptional": true, "license": "Apache-2.0", "dependencies": { - "@prisma/debug": "6.19.3", - "@prisma/engines-version": "7.1.1-3.c2990dca591cba766e3b7ef5d9e8a84796e47ab7", - "@prisma/get-platform": "6.19.3" + "@prisma/debug": "7.10.1" + } + }, + "node_modules/@prisma/fetch-engine": { + "version": "7.10.1", + "resolved": "https://registry.npmjs.org/@prisma/fetch-engine/-/fetch-engine-7.10.1.tgz", + "integrity": "sha512-qZezeaExLWG2ptbHOrMxdiWluKHgqEclTdJbvY6pk6+Wg7EiVkeq5U3cXz9ti8nd0bngNvsDgledLHVRg5LF1w==", + "devOptional": true, + "license": "Apache-2.0", + "dependencies": { + "@prisma/debug": "7.10.1", + "@prisma/engines-version": "8.1.0-1.d1b3f377ca835d73fd50954a5e22128b9ebdd6b8", + "@prisma/get-platform": "7.10.1" + } + }, + "node_modules/@prisma/fetch-engine/node_modules/@prisma/get-platform": { + "version": "7.10.1", + "resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-7.10.1.tgz", + "integrity": "sha512-iVnghHne5vcaobBjPVCMEjh5r/1UCj394EIGTUclasFRatpR/MQwcM2veLv5kgoFSyYP54nch/lNFCQRYcDxvg==", + "devOptional": true, + "license": "Apache-2.0", + "dependencies": { + "@prisma/debug": "7.10.1" } }, "node_modules/@prisma/get-platform": { - "version": "6.19.3", - "resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-6.19.3.tgz", - "integrity": "sha512-xFj1VcJ1N3MKooOQAGO0W5tsd0W2QzIvW7DD7c/8H14Zmp4jseeWAITm+w2LLoLrlhoHdPPh0NMZ8mfL6puoHA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-7.2.0.tgz", + "integrity": "sha512-k1V0l0Td1732EHpAfi2eySTezyllok9dXb6UQanajkJQzPUGi3vO2z7jdkz67SypFTdmbnyGYxvEvYZdZsMAVA==", "devOptional": true, "license": "Apache-2.0", "dependencies": { - "@prisma/debug": "6.19.3" + "@prisma/debug": "7.2.0" + } + }, + "node_modules/@prisma/get-platform/node_modules/@prisma/debug": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-7.2.0.tgz", + "integrity": "sha512-YSGTiSlBAVJPzX4ONZmMotL+ozJwQjRmZweQNIq/ER0tQJKJynNkRB3kyvt37eOfsbMCXk3gnLF6J9OJ4QWftw==", + "devOptional": true, + "license": "Apache-2.0" + }, + "node_modules/@prisma/query-plan-executor": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@prisma/query-plan-executor/-/query-plan-executor-7.2.0.tgz", + "integrity": "sha512-EOZmNzcV8uJ0mae3DhTsiHgoNCuu1J9mULQpGCh62zN3PxPTd+qI9tJvk5jOst8WHKQNwJWR3b39t0XvfBB0WQ==", + "devOptional": true, + "license": "Apache-2.0" + }, + "node_modules/@prisma/streams-local": { + "version": "0.1.11", + "resolved": "https://registry.npmjs.org/@prisma/streams-local/-/streams-local-0.1.11.tgz", + "integrity": "sha512-0TcebL559MByKqTJ+SsrFIEg228iw8UCVRFckzgfRSiJqczhs+MuAgWOF9lnOIV/IVqvu+KMnFTH0eDeTQMpUg==", + "devOptional": true, + "license": "Apache-2.0", + "dependencies": { + "ajv": "^8.12.0", + "better-result": "^2.7.0", + "env-paths": "^3.0.0", + "proper-lockfile": "^4.1.2" + }, + "engines": { + "bun": ">=1.2.0", + "node": ">=22.0.0" + } + }, + "node_modules/@prisma/studio-core": { + "version": "0.33.0", + "resolved": "https://registry.npmjs.org/@prisma/studio-core/-/studio-core-0.33.0.tgz", + "integrity": "sha512-V2fX/nKEymNTrHXwfP26PGjoLStO35Ogu+ex7CFJbLrMYEcZxxZpiSNOs7px23Hk5mzLWvM5RsqG6Ka+rha+wg==", + "devOptional": true, + "license": "Apache-2.0", + "dependencies": { + "@radix-ui/react-toggle": "1.1.10", + "@visx/curve": "4.0.1-alpha.0", + "@visx/event": "4.0.1-alpha.0", + "@visx/grid": "4.0.1-alpha.0", + "@visx/group": "4.0.1-alpha.0", + "@visx/responsive": "4.0.1-alpha.0", + "@visx/scale": "4.0.1-alpha.0", + "@visx/shape": "4.0.1-alpha.0", + "d3-array": "3.2.4", + "d3-shape": "3.2.0", + "elkjs": "0.11.1" + }, + "engines": { + "node": "^20.19 || ^22.12 || >=24.0", + "pnpm": "8" + }, + "peerDependencies": { + "@types/react": "^18.0.0 || ^19.0.0", + "react": "^18.0.0 || ^19.0.0", + "react-dom": "^18.0.0 || ^19.0.0" + } + }, + "node_modules/@radix-ui/primitive": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.1.3.tgz", + "integrity": "sha512-JTF99U/6XIjCBo0wqkU5sK10glYe27MRRsfwoiq5zzOEZLHU3A3KCMa5X/azekYRCJ0HlwI0crAXS/5dEHTzDg==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/@radix-ui/react-compose-refs": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.2.tgz", + "integrity": "sha512-z4eqJvfiNnFMHIIvXP3CY57y2WJs5g2v3X0zm9mEJkrkNv4rDxu+sg9Jh8EkXyeqBkB7SOcboo9dMVqhyrACIg==", + "devOptional": true, + "license": "MIT", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-primitive": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.1.3.tgz", + "integrity": "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "@radix-ui/react-slot": "1.2.3" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-slot": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.2.3.tgz", + "integrity": "sha512-aeNmHnBxbi2St0au6VBVC7JXFlhLlOnvIIlePNniyUNAClzmtAUEY8/pBiK3iHjufOlwA+c20/8jngo7xcrg8A==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "@radix-ui/react-compose-refs": "1.1.2" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-toggle": { + "version": "1.1.10", + "resolved": "https://registry.npmjs.org/@radix-ui/react-toggle/-/react-toggle-1.1.10.tgz", + "integrity": "sha512-lS1odchhFTeZv3xwHH31YPObmJn8gOg7Lq12inrr0+BH/l3Tsq32VfjqH1oh80ARM3mlkfMic15n0kg4sD1poQ==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.1.3", + "@radix-ui/react-primitive": "2.1.3", + "@radix-ui/react-use-controllable-state": "1.2.2" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-use-controllable-state": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.2.2.tgz", + "integrity": "sha512-BjasUjixPFdS+NKkypcyyN5Pmg83Olst0+c6vGov0diwTEo6mgdqVR6hxcEgFuh4QrAs7Rc+9KuGJ9TVCj0Zzg==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "@radix-ui/react-use-effect-event": "0.0.2", + "@radix-ui/react-use-layout-effect": "1.1.1" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-use-effect-event": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-effect-event/-/react-use-effect-event-0.0.2.tgz", + "integrity": "sha512-Qp8WbZOBe+blgpuUT+lw2xheLP8q0oatc9UpmiemEICxGvFLYmHm9QowVZGHtJlGbS6A6yJ3iViad/2cVjnOiA==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "@radix-ui/react-use-layout-effect": "1.1.1" + }, + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/@radix-ui/react-use-layout-effect": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.1.1.tgz", + "integrity": "sha512-RbJRS4UWQFkzHTTwVymMTUv8EqYhOp8dOOviLj2ugtTiXRaRQS7GLGxZTLL1jWhMeoSCf5zmcZkqTl9IiYfXcQ==", + "devOptional": true, + "license": "MIT", + "peerDependencies": { + "@types/react": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } } }, "node_modules/@standard-schema/spec": { @@ -1577,6 +1888,72 @@ "node": ">=14.0.0" } }, + "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@emnapi/core": { + "version": "1.11.1", + "dev": true, + "inBundle": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/wasi-threads": "1.2.2", + "tslib": "^2.4.0" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@emnapi/runtime": { + "version": "1.11.1", + "dev": true, + "inBundle": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@emnapi/wasi-threads": { + "version": "1.2.2", + "dev": true, + "inBundle": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@napi-rs/wasm-runtime": { + "version": "1.1.4", + "dev": true, + "inBundle": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@tybys/wasm-util": "^0.10.1" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Brooooooklyn" + }, + "peerDependencies": { + "@emnapi/core": "^1.7.1", + "@emnapi/runtime": "^1.7.1" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@tybys/wasm-util": { + "version": "0.10.2", + "dev": true, + "inBundle": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/tslib": { + "version": "2.8.1", + "dev": true, + "inBundle": true, + "license": "0BSD", + "optional": true + }, "node_modules/@tailwindcss/oxide-win32-arm64-msvc": { "version": "4.3.3", "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.3.3.tgz", @@ -1625,6 +2002,105 @@ "tailwindcss": "4.3.3" } }, + "node_modules/@types/better-sqlite3": { + "version": "9.6.0", + "resolved": "https://registry.npmjs.org/@types/better-sqlite3/-/better-sqlite3-9.6.0.tgz", + "integrity": "sha512-ZEEwBSgMu7GYJOynoagg5X9JbxfL6dTJDsgViJIqh67jV44kyOr9RXfmFjLK5rzC4MWssP06t9hu/JwGDnUbCg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/d3-array": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/d3-array/-/d3-array-3.0.3.tgz", + "integrity": "sha512-Reoy+pKnvsksN0lQUlcH6dOGjRZ/3WRwXR//m+/8lt1BXeI4xyaUZoqULNjyXXRuh0Mj4LNpkCvhUpQlY3X5xQ==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/@types/d3-color": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@types/d3-color/-/d3-color-3.1.0.tgz", + "integrity": "sha512-HKuicPHJuvPgCD+np6Se9MQvS6OCbJmOjGvylzMJRlDwUXjKTTXs6Pwgk79O09Vj/ho3u1ofXnhFOaEWWPrlwA==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/@types/d3-delaunay": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@types/d3-delaunay/-/d3-delaunay-6.0.1.tgz", + "integrity": "sha512-tLxQ2sfT0p6sxdG75c6f/ekqxjyYR0+LwPrsO1mbC9YDBzPJhs2HbJJRrn8Ez1DBoHRo2yx7YEATI+8V1nGMnQ==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/@types/d3-format": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@types/d3-format/-/d3-format-3.0.1.tgz", + "integrity": "sha512-5KY70ifCCzorkLuIkDe0Z9YTf9RR2CjBX1iaJG+rgM/cPP+sO+q9YdQ9WdhQcgPj1EQiJ2/0+yUkkziTG6Lubg==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/@types/d3-geo": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@types/d3-geo/-/d3-geo-3.1.0.tgz", + "integrity": "sha512-856sckF0oP/diXtS4jNsiQw/UuK5fQG8l/a9VVLeSouf1/PPbBE1i1W852zVwKwYCBkFJJB7nCFTbk6UMEXBOQ==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "@types/geojson": "*" + } + }, + "node_modules/@types/d3-interpolate": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@types/d3-interpolate/-/d3-interpolate-3.0.1.tgz", + "integrity": "sha512-jx5leotSeac3jr0RePOH1KdR9rISG91QIE4Q2PYTu4OymLTZfA3SrnURSLzKH48HmXVUru50b8nje4E79oQSQw==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "@types/d3-color": "*" + } + }, + "node_modules/@types/d3-path": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@types/d3-path/-/d3-path-3.1.1.tgz", + "integrity": "sha512-VMZBYyQvbGmWyWVea0EHs/BwLgxc+MKi1zLDCONksozI4YJMcTt8ZEuIR4Sb1MMTE8MMW49v0IwI5+b7RmfWlg==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/@types/d3-scale": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-scale/-/d3-scale-4.0.2.tgz", + "integrity": "sha512-Yk4htunhPAwN0XGlIwArRomOjdoBFXC3+kCxK2Ubg7I9shQlVSJy/pG/Ht5ASN+gdMIalpk8TJ5xV74jFsetLA==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "@types/d3-time": "*" + } + }, + "node_modules/@types/d3-shape": { + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/@types/d3-shape/-/d3-shape-3.1.7.tgz", + "integrity": "sha512-VLvUQ33C+3J+8p+Daf+nYSOsjB4GXp19/S/aGo60m9h1v6XaxjiT82lKVWJCfzhtuZ3yD7i/TPeC/fuKLLOSmg==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "@types/d3-path": "*" + } + }, + "node_modules/@types/d3-time": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/d3-time/-/d3-time-3.0.0.tgz", + "integrity": "sha512-sZLCdHvBUcNby1cB6Fd3ZBrABbjz3v1Vm90nysCQ6Vt7vd6e/h9Lt7SiJUoEX0l4Dzc7P5llKyhqSi1ycSf1Hg==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/@types/d3-time-format": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@types/d3-time-format/-/d3-time-format-2.1.0.tgz", + "integrity": "sha512-/myT3I7EwlukNOX2xVdMzb8FRgNzRMpsZddwst9Ld/VFe6LyJyRp0s32l/V9XoUzk+Gqu56F/oGk6507+8BxrA==", + "devOptional": true, + "license": "MIT" + }, "node_modules/@types/debug": { "version": "4.1.13", "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.13.tgz", @@ -1649,6 +2125,13 @@ "@types/estree": "*" } }, + "node_modules/@types/geojson": { + "version": "7946.0.16", + "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.16.tgz", + "integrity": "sha512-6C8nqWur3j98U6+lXDfTUWIfgvZU+EumvpHKcYjujKH7woYyLj2sUmff0tRhrqM7BohUw7Pz3ZB1jj2gW9Fvmg==", + "devOptional": true, + "license": "MIT" + }, "node_modules/@types/hast": { "version": "3.0.5", "resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.5.tgz", @@ -1658,6 +2141,13 @@ "@types/unist": "*" } }, + "node_modules/@types/lodash": { + "version": "4.17.27", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.27.tgz", + "integrity": "sha512-VenMRv/eKNrspX9v3H4dbmjsrnCOYdYBG3kxXKk3dG6X+urBGcj2Prww3xw1U5K4FV/mE4h5GbWd0szEKf+9ew==", + "devOptional": true, + "license": "MIT" + }, "node_modules/@types/mdast": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.4.tgz", @@ -1677,7 +2167,7 @@ "version": "26.6.5", "resolved": "https://registry.npmjs.org/@types/node/-/node-26.6.5.tgz", "integrity": "sha512-uMzsv9stDdofIZBx4UGh4Z9ZgXnGC9seRDscilBcTHAeOFk67MZg/k9bWVfO+bk4qZmG+l52hRnLwUiH2LnJTg==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "undici-types": "~8.9.0" @@ -1696,7 +2186,7 @@ "version": "19.3.0", "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.3.0.tgz", "integrity": "sha512-ZI7bU42mZXXKHn/qNLEw2IrbiINU7X5+vfgdixBHkCNpYWXjKgfQ/P+uyGb5CjOLB9UcnTeg3rylQtV2hym44Q==", - "dev": true, + "devOptional": true, "license": "MIT", "peerDependencies": { "@types/react": "^19.3.0" @@ -1714,6 +2204,184 @@ "integrity": "sha512-1mEZtMKPM09vDmQt5y7YvmN2+DFTP7Tg0EWXdic8/C6VRnpb33e4ghisCIE3WZjsE2N8mf+QV1Zqh7ZFYLWInQ==", "license": "ISC" }, + "node_modules/@visx/curve": { + "version": "4.0.1-alpha.0", + "resolved": "https://registry.npmjs.org/@visx/curve/-/curve-4.0.1-alpha.0.tgz", + "integrity": "sha512-jRu61Uz274pV1zyioXmboyrLutYbnKsgjj4njSGCnhdXj5GkZvZbg+ThDb6oOzoAnJOBRLz4rzPlWvNJOzuVMg==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "@visx/vendor": "4.0.0-alpha.0" + } + }, + "node_modules/@visx/event": { + "version": "4.0.1-alpha.0", + "resolved": "https://registry.npmjs.org/@visx/event/-/event-4.0.1-alpha.0.tgz", + "integrity": "sha512-EQqCMSv/s8NbFjo+hz3FKsvvYfP+2QslsFJ/24/O5l/W+7UC6J6aAvO0ujVwrTwdYbuQ+vhxKi1xdPdKR/qj1g==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "@types/react": "*", + "@visx/point": "4.0.1-alpha.0" + } + }, + "node_modules/@visx/grid": { + "version": "4.0.1-alpha.0", + "resolved": "https://registry.npmjs.org/@visx/grid/-/grid-4.0.1-alpha.0.tgz", + "integrity": "sha512-rycutGmTHO+znNdPumheWMglm7YfpffvRwUkVy5zy4WoORIuKTMkDxwnOzHG2xMxU3EE/YCd37xFV5AxA30yeg==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "@types/react": "*", + "@visx/curve": "4.0.1-alpha.0", + "@visx/group": "4.0.1-alpha.0", + "@visx/point": "4.0.1-alpha.0", + "@visx/scale": "4.0.1-alpha.0", + "@visx/shape": "4.0.1-alpha.0", + "classnames": "^2.3.1" + }, + "peerDependencies": { + "react": "^16.14.0 || ^17.0.0-0 || ^18.0.0-0 || ^19.0.0-0" + } + }, + "node_modules/@visx/group": { + "version": "4.0.1-alpha.0", + "resolved": "https://registry.npmjs.org/@visx/group/-/group-4.0.1-alpha.0.tgz", + "integrity": "sha512-V19l7iQ7jccBv8kao/EByuI6o4xtxzzLV9nqVI1hRvmdzTVsuLpqlwzYCZUXJaTVvUWf8s4D2SQFjGkj/Nw+0w==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "@types/react": "*", + "classnames": "^2.3.1" + }, + "peerDependencies": { + "react": "^16.14.0 || ^17.0.0-0 || ^18.0.0-0 || ^19.0.0-0" + } + }, + "node_modules/@visx/point": { + "version": "4.0.1-alpha.0", + "resolved": "https://registry.npmjs.org/@visx/point/-/point-4.0.1-alpha.0.tgz", + "integrity": "sha512-ijTfr/Nx09f03vIj9nyTr3z4Xth4Y75427UaogJh6dnIRLMEFHQOwNu791sbfiNj0a+ZXuaE32h0vKrFe4/8Qg==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/@visx/responsive": { + "version": "4.0.1-alpha.0", + "resolved": "https://registry.npmjs.org/@visx/responsive/-/responsive-4.0.1-alpha.0.tgz", + "integrity": "sha512-o+1zGywQZY0+yOx3Iw87wc4bbPJRr/HnIukTwfOz4UVyj9pB1OQNVHB7OORO1+LBHJceWpB31co/ZV9KHncKrA==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "@types/lodash": "^4.17.13", + "@types/react": "*", + "lodash": "^4.17.21" + }, + "peerDependencies": { + "react": "^16.14.0 || ^17.0.0-0 || ^18.0.0-0 || ^19.0.0-0" + } + }, + "node_modules/@visx/scale": { + "version": "4.0.1-alpha.0", + "resolved": "https://registry.npmjs.org/@visx/scale/-/scale-4.0.1-alpha.0.tgz", + "integrity": "sha512-nzjeE87vFSAXGWFiiNfBpNLAf0Q8Qmf6syvKLjqNi4kGZkdhbUll3E/59YsgWXmjM8+llPLWzGsP+JPvo5eq1A==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "@visx/vendor": "4.0.0-alpha.0" + } + }, + "node_modules/@visx/shape": { + "version": "4.0.1-alpha.0", + "resolved": "https://registry.npmjs.org/@visx/shape/-/shape-4.0.1-alpha.0.tgz", + "integrity": "sha512-62QeiVNmPlterQGwhkEDcbq7M0MqY0lBsK5QKXtM9ZoPZWkuGV3aykA3+Xu20B2FAvyJq4LqJzBc7Sxr+EAdbA==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "@types/lodash": "^4.17.13", + "@types/react": "*", + "@visx/curve": "4.0.1-alpha.0", + "@visx/group": "4.0.1-alpha.0", + "@visx/scale": "4.0.1-alpha.0", + "@visx/vendor": "4.0.0-alpha.0", + "classnames": "^2.3.1", + "lodash": "^4.17.21" + }, + "peerDependencies": { + "react": "^16.14.0 || ^17.0.0-0 || ^18.0.0-0 || ^19.0.0-0" + } + }, + "node_modules/@visx/vendor": { + "version": "4.0.0-alpha.0", + "resolved": "https://registry.npmjs.org/@visx/vendor/-/vendor-4.0.0-alpha.0.tgz", + "integrity": "sha512-6I+MuqXBcv9jnlcVowHoHKSdk9gXTWkHLKyqBwRWg7LY6A3Ei8SHfubpqGV5rBUSppxMq2RszPJUS6w+H0YgmQ==", + "devOptional": true, + "license": "MIT and ISC", + "dependencies": { + "@types/d3-array": "3.0.3", + "@types/d3-color": "3.1.0", + "@types/d3-delaunay": "6.0.1", + "@types/d3-format": "3.0.1", + "@types/d3-geo": "3.1.0", + "@types/d3-interpolate": "3.0.1", + "@types/d3-path": "3.1.1", + "@types/d3-scale": "4.0.2", + "@types/d3-shape": "3.1.7", + "@types/d3-time": "3.0.0", + "@types/d3-time-format": "2.1.0", + "d3-array": "3.2.1", + "d3-color": "3.1.0", + "d3-delaunay": "6.0.2", + "d3-format": "3.1.0", + "d3-geo": "3.1.0", + "d3-interpolate": "3.0.1", + "d3-path": "3.1.0", + "d3-scale": "4.0.2", + "d3-shape": "3.2.0", + "d3-time": "3.1.0", + "d3-time-format": "4.1.0", + "internmap": "2.0.3" + } + }, + "node_modules/@visx/vendor/node_modules/d3-array": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-3.2.1.tgz", + "integrity": "sha512-gUY/qeHq/yNqqoCKNq4vtpFLdoCdvyNpWoC/KNjhGbhDuQpAM9sIQQKkXSNpXa9h5KySs/gzm7R88WkUutgwWQ==", + "devOptional": true, + "license": "ISC", + "dependencies": { + "internmap": "1 - 2" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/ajv": { + "version": "8.20.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.20.0.tgz", + "integrity": "sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/aws-ssl-profiles": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/aws-ssl-profiles/-/aws-ssl-profiles-1.1.2.tgz", + "integrity": "sha512-NZKeq9AfyQvEeNlN0zSYAaWrmBffJh3IELMZfRpJVWgrpEbtEpnjvzqBPf+mxoI287JohRDoa+/nsfqqiZmF6g==", + "devOptional": true, + "license": "MIT", + "engines": { + "node": ">= 6.0.0" + } + }, "node_modules/bail": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/bail/-/bail-2.0.2.tgz", @@ -1724,6 +2392,26 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, "node_modules/baseline-browser-mapping": { "version": "2.11.32", "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.11.32.tgz", @@ -1745,28 +2433,93 @@ "bcrypt": "bin/bcrypt" } }, + "node_modules/better-result": { + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/better-result/-/better-result-2.10.0.tgz", + "integrity": "sha512-oQhh0y1qo2/ZKdAAEvHZAqKKiHOFU5k/bW96fE2ScgQOVkJRiHwB+nOS1SgFsYqRlxMDWvefXi9Q3px7QvgNDw==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/better-sqlite3": { + "version": "12.11.1", + "resolved": "https://registry.npmjs.org/better-sqlite3/-/better-sqlite3-12.11.1.tgz", + "integrity": "sha512-dq9AtApgg5PGFtBzPFSBl3HZQjHok5gaQCM6zh2Yk0aSmDCs1CbnVI8/HgASQkNKsWFpseIO9beg5xxpYhbIfA==", + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "bindings": "^1.5.0", + "prebuild-install": "^7.1.1" + }, + "engines": { + "node": "20.x || 22.x || 23.x || 24.x || 25.x || 26.x" + } + }, + "node_modules/bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "license": "MIT", + "dependencies": { + "file-uri-to-path": "1.0.0" + } + }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "license": "MIT", + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, "node_modules/c12": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/c12/-/c12-3.1.0.tgz", - "integrity": "sha512-uWoS8OU1MEIsOv8p/5a82c3H31LsWVR5qiyXVfBNOzfffjUWtPnhAb4BYI2uG2HfGmZmFjCtui5XNWaps+iFuw==", + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/c12/-/c12-3.3.4.tgz", + "integrity": "sha512-cM0ApFQSBXuourJejzwv/AuPRvAxordTyParRVcHjjtXirtkzM0uK2L9TTn9s0cXZbG7E55jCivRQzoxYmRAlA==", "devOptional": true, "license": "MIT", "dependencies": { - "chokidar": "^4.0.3", - "confbox": "^0.2.2", - "defu": "^6.1.4", - "dotenv": "^16.6.1", - "exsolve": "^1.0.7", - "giget": "^2.0.0", - "jiti": "^2.4.2", + "chokidar": "^5.0.0", + "confbox": "^0.2.4", + "defu": "^6.1.6", + "dotenv": "^17.3.1", + "exsolve": "^1.0.8", + "giget": "^3.2.0", + "jiti": "^2.6.1", "ohash": "^2.0.11", "pathe": "^2.0.3", - "perfect-debounce": "^1.0.0", - "pkg-types": "^2.2.0", - "rc9": "^2.1.2" + "perfect-debounce": "^2.1.0", + "pkg-types": "^2.3.0", + "rc9": "^3.0.1" }, "peerDependencies": { - "magicast": "^0.3.5" + "magicast": "*" }, "peerDependenciesMeta": { "magicast": { @@ -1774,6 +2527,19 @@ } } }, + "node_modules/c12/node_modules/dotenv": { + "version": "17.4.2", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.4.2.tgz", + "integrity": "sha512-nI4U3TottKAcAD9LLud4Cb7b2QztQMUEfHbvhTH09bqXTxnSie8WnjPALV/WMCrJZ6UV/qHJ6L03OqO3LcdYZw==", + "devOptional": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, "node_modules/caniuse-lite": { "version": "1.0.30001819", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001819.tgz", @@ -1845,30 +2611,33 @@ } }, "node_modules/chokidar": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", - "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-5.0.0.tgz", + "integrity": "sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw==", "devOptional": true, "license": "MIT", "dependencies": { - "readdirp": "^4.0.1" + "readdirp": "^5.0.0" }, "engines": { - "node": ">= 14.16.0" + "node": ">= 20.19.0" }, "funding": { "url": "https://paulmillr.com/funding/" } }, - "node_modules/citty": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/citty/-/citty-0.1.6.tgz", - "integrity": "sha512-tskPPKEs8D2KPafUypv2gxwJP8h/OaJmC82QQGGDQcHvXX43xF2VDACcJVmZ0EuSxkpO9Kc4MlrA3q0+FG58AQ==", + "node_modules/chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "license": "ISC" + }, + "node_modules/classnames": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.5.1.tgz", + "integrity": "sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==", "devOptional": true, - "license": "MIT", - "dependencies": { - "consola": "^3.2.3" - } + "license": "MIT" }, "node_modules/client-only": { "version": "0.0.1", @@ -1893,14 +2662,19 @@ "devOptional": true, "license": "MIT" }, - "node_modules/consola": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/consola/-/consola-3.4.2.tgz", - "integrity": "sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==", + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "devOptional": true, "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, "engines": { - "node": "^14.18.0 || >=16.10.0" + "node": ">= 8" } }, "node_modules/csstype": { @@ -1909,6 +2683,144 @@ "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", "license": "MIT" }, + "node_modules/d3-array": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-3.2.4.tgz", + "integrity": "sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg==", + "devOptional": true, + "license": "ISC", + "dependencies": { + "internmap": "1 - 2" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-color": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-color/-/d3-color-3.1.0.tgz", + "integrity": "sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==", + "devOptional": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-delaunay": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/d3-delaunay/-/d3-delaunay-6.0.2.tgz", + "integrity": "sha512-IMLNldruDQScrcfT+MWnazhHbDJhcRJyOEBAJfwQnHle1RPh6WDuLvxNArUju2VSMSUuKlY5BGHRJ2cYyoFLQQ==", + "devOptional": true, + "license": "ISC", + "dependencies": { + "delaunator": "5" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-format": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-format/-/d3-format-3.1.0.tgz", + "integrity": "sha512-YyUI6AEuY/Wpt8KWLgZHsIU86atmikuoOmCfommt0LYHiQSPjvX2AcFc38PX0CBpr2RCyZhjex+NS/LPOv6YqA==", + "devOptional": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-geo": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-geo/-/d3-geo-3.1.0.tgz", + "integrity": "sha512-JEo5HxXDdDYXCaWdwLRt79y7giK8SbhZJbFWXqbRTolCHFI5jRqteLzCsq51NKbUoX0PjBVSohxrx+NoOUujYA==", + "devOptional": true, + "license": "ISC", + "dependencies": { + "d3-array": "2.5.0 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-interpolate": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-3.0.1.tgz", + "integrity": "sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==", + "devOptional": true, + "license": "ISC", + "dependencies": { + "d3-color": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-path": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-3.1.0.tgz", + "integrity": "sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ==", + "devOptional": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-scale": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-4.0.2.tgz", + "integrity": "sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ==", + "devOptional": true, + "license": "ISC", + "dependencies": { + "d3-array": "2.10.0 - 3", + "d3-format": "1 - 3", + "d3-interpolate": "1.2.0 - 3", + "d3-time": "2.1.1 - 3", + "d3-time-format": "2 - 4" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-shape": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-3.2.0.tgz", + "integrity": "sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA==", + "devOptional": true, + "license": "ISC", + "dependencies": { + "d3-path": "^3.1.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-time": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/d3-time/-/d3-time-3.1.0.tgz", + "integrity": "sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q==", + "devOptional": true, + "license": "ISC", + "dependencies": { + "d3-array": "2 - 3" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/d3-time-format": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/d3-time-format/-/d3-time-format-4.1.0.tgz", + "integrity": "sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg==", + "devOptional": true, + "license": "ISC", + "dependencies": { + "d3-time": "1 - 3" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/debug": { "version": "4.4.3", "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", @@ -1939,14 +2851,48 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/decompress-response": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", + "license": "MIT", + "dependencies": { + "mimic-response": "^3.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "license": "MIT", + "engines": { + "node": ">=4.0.0" + } + }, "node_modules/deepmerge-ts": { - "version": "7.1.5", - "resolved": "https://registry.npmjs.org/deepmerge-ts/-/deepmerge-ts-7.1.5.tgz", - "integrity": "sha512-HOJkrhaYsweh+W+e74Yn7YStZOilkoPb6fycpwNLKzSPtruFs48nYis0zy5yJz1+ktUhHxoRDJ27RQAWLIJVJw==", + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/deepmerge-ts/-/deepmerge-ts-8.0.2.tgz", + "integrity": "sha512-uqbvqLUMrc6p0MO+WBRtTxY55hmyh94WRwI5a++PZe54X+bfVh59FSN7uWCBCW1CCVjzjnrwzfI8zidE2obMMw==", "devOptional": true, + "funding": [ + { + "type": "ko-fi", + "url": "https://ko-fi.com/rebeccastevens" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/deepmerge-ts" + } + ], "license": "BSD-3-Clause", "engines": { - "node": ">=16.0.0" + "node": ">=16.9.0" } }, "node_modules/defu": { @@ -1956,6 +2902,16 @@ "devOptional": true, "license": "MIT" }, + "node_modules/delaunator": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/delaunator/-/delaunator-5.1.0.tgz", + "integrity": "sha512-AGrQ4QSgssa1NGmWmLPqN5NY2KajF5MqxetNEO+o0n3ZwZZeTmt7bBnvzHWrmkZFxGgr4HdyFgelzgi06otLuQ==", + "devOptional": true, + "license": "ISC", + "dependencies": { + "robust-predicates": "^3.0.2" + } + }, "node_modules/dequal": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", @@ -1976,7 +2932,6 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", - "devOptional": true, "license": "Apache-2.0", "engines": { "node": ">=8" @@ -1996,11 +2951,13 @@ } }, "node_modules/dotenv": { - "version": "16.6.1", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.6.1.tgz", - "integrity": "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==", - "devOptional": true, + "version": "18.0.10", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-18.0.10.tgz", + "integrity": "sha512-89FAA1xchzK2mxVWdr5F/0rldwiueXs6zJM86rO66EzekR1iBdiXRthyG+m5GvkJaFH3C2LESzamTkgndmLT2A==", "license": "BSD-2-Clause", + "bin": { + "dotenv": "dist/cli.cjs" + }, "engines": { "node": ">=12" }, @@ -2009,9 +2966,9 @@ } }, "node_modules/effect": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/effect/-/effect-3.21.0.tgz", - "integrity": "sha512-PPN80qRokCd1f015IANNhrwOnLO7GrrMQfk4/lnZRE/8j7UPWrNNjPV0uBrZutI/nHzernbW+J0hdqQysHiSnQ==", + "version": "3.20.0", + "resolved": "https://registry.npmjs.org/effect/-/effect-3.20.0.tgz", + "integrity": "sha512-qMLfDJscrNG8p/aw+IkT9W7fgj50Z4wG5bLBy0Txsxz8iUHjDIkOgO3SV0WZfnQbNG2VJYb0b+rDLMrhM4+Krw==", "devOptional": true, "license": "MIT", "dependencies": { @@ -2019,6 +2976,13 @@ "fast-check": "^3.23.1" } }, + "node_modules/elkjs": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/elkjs/-/elkjs-0.11.1.tgz", + "integrity": "sha512-zxxR9k+rx5ktMwT/FwyLdPCrq7xN6e4VGGHH8hA01vVYKjTFik7nHOxBnAYtrgYUB1RpAiLvA1/U2YraWxyKKg==", + "devOptional": true, + "license": "EPL-2.0" + }, "node_modules/empathic": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/empathic/-/empathic-2.0.0.tgz", @@ -2029,6 +2993,15 @@ "node": ">=14" } }, + "node_modules/end-of-stream": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.5.tgz", + "integrity": "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==", + "license": "MIT", + "dependencies": { + "once": "^1.4.0" + } + }, "node_modules/enhanced-resolve": { "version": "5.26.0", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.26.0.tgz", @@ -2043,6 +3016,19 @@ "node": ">=10.13.0" } }, + "node_modules/env-paths": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-3.0.0.tgz", + "integrity": "sha512-dtJUTepzMW3Lm/NPxRf3wP4642UWhjL2sQxc+ym2YMj1m/H2zDNQOlezafzkHwn6sMstjHTwG6iQQsctDW/b1A==", + "devOptional": true, + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/esbuild": { "version": "0.28.2", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.2.tgz", @@ -2107,10 +3093,19 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/expand-template": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", + "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", + "license": "(MIT OR WTFPL)", + "engines": { + "node": ">=6" + } + }, "node_modules/exsolve": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/exsolve/-/exsolve-1.1.3.tgz", - "integrity": "sha512-kuzL9zherLQoqDeQaS55AiiIg1kb4KYXaSusTtgZTPlvKP2gGCI82LNmBNh5RjDVUXIcmgx+/Mx7vPwRzBbhJA==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/exsolve/-/exsolve-1.2.0.tgz", + "integrity": "sha512-h1pQPR9XoeSMdntRNCjyTznaume4UpfXrULBnlkZ2CUM/G5eSa+pBByGldO5uR8dxbPC+OuJXsPPNf+JZ81ADg==", "devOptional": true, "license": "MIT" }, @@ -2143,6 +3138,91 @@ "node": ">=8.0.0" } }, + "node_modules/fast-decode-uri-component": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/fast-decode-uri-component/-/fast-decode-uri-component-1.0.1.tgz", + "integrity": "sha512-WKgKWg5eUxvRZGwW8FvfbaH7AXSh2cL+3j5fMGzUMCxWBJ3dV3a7Wz8y2f/uQ0e3B6WmodD3oS54jTQ9HVTIIg==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/fast-querystring": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/fast-querystring/-/fast-querystring-1.1.2.tgz", + "integrity": "sha512-g6KuKWmFXc0fID8WWH0jit4g0AGBoJhCkJMb1RmbsSEUNvQ+ZC8D6CUZ+GtF8nMzSPXnhiePyyqqipzNNEnHjg==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "fast-decode-uri-component": "^1.0.1" + } + }, + "node_modules/fast-uri": { + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.9.tgz", + "integrity": "sha512-hS/0Wt3Ya043oKXs0sIxrMpKQITXhMLIrVAKKXi4gozGC9v7YRWVnXIZzjNPTO02M9BdxLCWqK1yRXgNziVyJQ==", + "devOptional": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "license": "MIT" + }, + "node_modules/find-my-way": { + "version": "9.7.0", + "resolved": "https://registry.npmjs.org/find-my-way/-/find-my-way-9.7.0.tgz", + "integrity": "sha512-f2JHn75x2JlwUwLenZypgczR7YWMb/uO9BvUXtus+JMgkbIkLADd38cI4EiV+OQqrGo1Zlq6V8wnqMJ8e62wUQ==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-querystring": "^1.0.0", + "safe-regex2": "^5.0.0" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/foreground-child": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", + "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", + "devOptional": true, + "license": "ISC", + "dependencies": { + "cross-spawn": "^7.0.6", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", + "license": "MIT" + }, "node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", @@ -2158,31 +3238,60 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, - "node_modules/giget": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/giget/-/giget-2.0.0.tgz", - "integrity": "sha512-L5bGsVkxJbJgdnwyuheIunkGatUF/zssUoxxjACCseZYAVbaqdh9Tsmmlkl8vYan09H7sbvKt4pS8GqKLBrEzA==", + "node_modules/generate-function": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz", + "integrity": "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==", "devOptional": true, "license": "MIT", "dependencies": { - "citty": "^0.1.6", - "consola": "^3.4.0", - "defu": "^6.1.4", - "node-fetch-native": "^1.6.6", - "nypm": "^0.6.0", - "pathe": "^2.0.3" - }, + "is-property": "^1.0.2" + } + }, + "node_modules/get-port-please": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/get-port-please/-/get-port-please-3.2.0.tgz", + "integrity": "sha512-I9QVvBw5U/hw3RmWpYKRumUeaDgxTPd401x364rLmWBJcOQ753eov1eTgzDqRG9bqFIfDc7gfzcQEWrUri3o1A==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/giget": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/giget/-/giget-3.3.1.tgz", + "integrity": "sha512-r+mvuDjrjMpsdw46Kmeydb8bdHm7wOKw8wNBtTndkjbPjgAp5oUJUxRE76wZFknxIPokfWvep2qSXK37aXE6zg==", + "devOptional": true, + "license": "MIT", "bin": { "giget": "dist/cli.mjs" } }, + "node_modules/github-from-package": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", + "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==", + "license": "MIT" + }, "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true, + "devOptional": true, "license": "ISC" }, + "node_modules/grammex": { + "version": "3.1.13", + "resolved": "https://registry.npmjs.org/grammex/-/grammex-3.1.13.tgz", + "integrity": "sha512-LnPnhOBLEJEVKS8WFDVaA397L9Kq55Q9oSITJiVLHVdhAclfUkWzQv74KhvZHKL2Q09Pb1XdsrOsZ4LfTFFTEg==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/graphmatch": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/graphmatch/-/graphmatch-1.1.1.tgz", + "integrity": "sha512-5ykVn/EXM1hF0XCaWh05VbYvEiOL2lY1kBxZtaYsyvjp7cmWOU1XsAdfQBwClraEofXDT197lFbXOEVMHpvQOg==", + "devOptional": true, + "license": "MIT" + }, "node_modules/hast-util-to-jsx-runtime": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/hast-util-to-jsx-runtime/-/hast-util-to-jsx-runtime-2.3.6.tgz", @@ -2233,12 +3342,71 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/iconv-lite": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.3.tgz", + "integrity": "sha512-IKXpvIzjnC9XTAUbVBcMfGS0EPaIXtW6v+zr+RRp+hqULEpo0owZax6wyRwPOJbWbzjYspQwusTsfVr0ifh4uQ==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "license": "ISC" + }, "node_modules/inline-style-parser": { "version": "0.2.7", "resolved": "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.2.7.tgz", "integrity": "sha512-Nb2ctOyNR8DqQoR0OwRG95uNWIC0C1lCgf5Naz5H6Ji72KZ8OcFZLz2P5sNgwlyoJ8Yif11oMuYs5pBQa86csA==", "license": "MIT" }, + "node_modules/internmap": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/internmap/-/internmap-2.0.3.tgz", + "integrity": "sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==", + "devOptional": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, "node_modules/is-alphabetical": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-2.0.1.tgz", @@ -2295,6 +3463,20 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-property": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", + "integrity": "sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "devOptional": true, + "license": "ISC" + }, "node_modules/jiti": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.7.0.tgz", @@ -2314,6 +3496,13 @@ "url": "https://github.com/sponsors/panva" } }, + "node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "devOptional": true, + "license": "MIT" + }, "node_modules/lightningcss": { "version": "1.32.0", "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.32.0.tgz", @@ -2587,6 +3776,20 @@ "url": "https://opencollective.com/parcel" } }, + "node_modules/lodash": { + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.18.1.tgz", + "integrity": "sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/long": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/long/-/long-5.3.2.tgz", + "integrity": "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==", + "devOptional": true, + "license": "Apache-2.0" + }, "node_modules/longest-streak": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/longest-streak/-/longest-streak-3.1.0.tgz", @@ -2597,6 +3800,22 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/lru.min": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/lru.min/-/lru.min-1.1.5.tgz", + "integrity": "sha512-5J9ysMYUpYIg9RF2vJpy9SinEmSviFSe0GyPpCQ4L5QSkLAgeLXlTAOu2ZwWUU5m+0SBl6gUU1R1ZQB3aKypfA==", + "devOptional": true, + "license": "MIT", + "engines": { + "bun": ">=1.0.0", + "deno": ">=1.30.0", + "node": ">=8.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wellwelwel" + } + }, "node_modules/lucide-react": { "version": "1.61.0", "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-1.61.0.tgz", @@ -3488,12 +4707,74 @@ ], "license": "MIT" }, + "node_modules/mimic-response": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/mkdirp-classic": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", + "license": "MIT" + }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "license": "MIT" }, + "node_modules/mysql2": { + "version": "3.24.4", + "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.24.4.tgz", + "integrity": "sha512-A2olluVlj0mvgyIRRISMEzXc51m+21mRtcMVjJyIpt2GG98+XrC9m9HzsqcMsX2LcnfccJvY5NB22g8fENBnOA==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "aws-ssl-profiles": "^1.1.2", + "generate-function": "^2.3.1", + "iconv-lite": "^0.7.3", + "long": "^5.3.2", + "lru.min": "^1.1.4", + "named-placeholders": "^1.1.6", + "sql-escaper": "^1.5.1" + }, + "engines": { + "node": ">= 8.0" + }, + "peerDependencies": { + "@types/node": ">= 8" + } + }, + "node_modules/named-placeholders": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/named-placeholders/-/named-placeholders-1.1.6.tgz", + "integrity": "sha512-Tz09sEL2EEuv5fFowm419c1+a/jSMiBjI9gHxVLrVdbUkkNUUfjsVYs9pVZu5oCon/kmRh9TfLEObFtkVxmY0w==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "lru.min": "^1.1.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, "node_modules/nanoid": { "version": "3.3.20", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.20.tgz", @@ -3512,6 +4793,12 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, + "node_modules/napi-build-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-2.0.0.tgz", + "integrity": "sha512-GEbrYkbfF7MoNaoh2iGG84Mnf/WZfB0GdGEsM8wz7Expx/LlWf5U8t9nvJKXSp3qr5IsEbK04cBGhol/KwOsWA==", + "license": "MIT" + }, "node_modules/next": { "version": "16.4.3", "resolved": "https://registry.npmjs.org/next/-/next-16.4.3.tgz", @@ -3593,38 +4880,18 @@ "node": "^10 || ^12 || >=14" } }, - "node_modules/node-fetch-native": { - "version": "1.6.7", - "resolved": "https://registry.npmjs.org/node-fetch-native/-/node-fetch-native-1.6.7.tgz", - "integrity": "sha512-g9yhqoedzIUm0nTnTqAQvueMPVOuIY16bqgAJJC8XOOubYFNwz6IER9qs0Gq2Xd0+CecCKFjtdDTMA4u4xG06Q==", - "devOptional": true, - "license": "MIT" - }, - "node_modules/nypm": { - "version": "0.6.11", - "resolved": "https://registry.npmjs.org/nypm/-/nypm-0.6.11.tgz", - "integrity": "sha512-wrVBTLWDu7nTUKGWplQebWOXWnhaIwyKQhBxobH/CGxJHoVw27r9vG5ba7kdZnxG+f4rC6dZd6m2oHmpkOcO7g==", - "devOptional": true, + "node_modules/node-abi": { + "version": "3.104.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.104.0.tgz", + "integrity": "sha512-J2lVAHTQ8v1J7hl2k1eX70d/Fm+HE1EyUes2dOew59JgBlAW6NB7DABI8kdrgRPehhepJd18p1ivekA8BF7AOg==", "license": "MIT", "dependencies": { - "citty": "^0.2.2", - "pathe": "^2.0.3", - "tinyexec": "^1.3.1" - }, - "bin": { - "nypm": "dist/cli.mjs" + "semver": "^7.3.5" }, "engines": { - "node": ">=18" + "node": ">=10" } }, - "node_modules/nypm/node_modules/citty": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/citty/-/citty-0.2.2.tgz", - "integrity": "sha512-+6vJA3L98yv+IdfKGZHBNiGW5KHn22e/JwID0Strsz8h4S/csAu/OuICwxrg44k5MRiZHWIo8XXuJgQTriRP4w==", - "devOptional": true, - "license": "MIT" - }, "node_modules/ohash": { "version": "2.0.12", "resolved": "https://registry.npmjs.org/ohash/-/ohash-2.0.12.tgz", @@ -3632,6 +4899,15 @@ "devOptional": true, "license": "MIT" }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, "node_modules/parse-entities": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-4.0.2.tgz", @@ -3657,6 +4933,16 @@ "integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==", "license": "MIT" }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "devOptional": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/pathe": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", @@ -3665,9 +4951,9 @@ "license": "MIT" }, "node_modules/perfect-debounce": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/perfect-debounce/-/perfect-debounce-1.0.0.tgz", - "integrity": "sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/perfect-debounce/-/perfect-debounce-2.1.0.tgz", + "integrity": "sha512-LjgdTytVFXeUgtHZr9WYViYSM/g8MkcTPYDlPa3cDqMirHjKiSZPYd6DoL7pK8AJQr+uWkQvCjHNdiMqsrJs+g==", "devOptional": true, "license": "MIT" }, @@ -3690,9 +4976,9 @@ } }, "node_modules/pkg-types/node_modules/confbox": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.3.1.tgz", - "integrity": "sha512-cKUSoKa8YxFZZSmraVi7onONx3amu77ngK3kGpsYHDH7drPwCRkQE1RYMPlLRrMtnciRj274XNRxcHxnKmDSnA==", + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.3.2.tgz", + "integrity": "sha512-ZUAKhKlkCOrIGKc8cj7zek9s9z1mveHif/25nUshI2BzCRzF7KH7KHa+Lnh2ubq+e1tIlaFuP763mzW4qVoehg==", "devOptional": true, "license": "MIT" }, @@ -3725,32 +5011,100 @@ "node": "^10 || ^12 || >=14" } }, + "node_modules/postgres": { + "version": "3.4.7", + "resolved": "https://registry.npmjs.org/postgres/-/postgres-3.4.7.tgz", + "integrity": "sha512-Jtc2612XINuBjIl/QTWsV5UvE8UHuNblcO3vVADSrKsrc6RqGX6lOW1cEo3CM2v0XG4Nat8nI+YM7/f26VxXLw==", + "devOptional": true, + "license": "Unlicense", + "engines": { + "node": ">=12" + }, + "funding": { + "type": "individual", + "url": "https://github.com/sponsors/porsager" + } + }, + "node_modules/prebuild-install": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.3.tgz", + "integrity": "sha512-8Mf2cbV7x1cXPUILADGI3wuhfqWvtiLA1iclTDbFRZkgRQS0NqsPZphna9V+HyTEadheuPmjaJMsbzKQFOzLug==", + "deprecated": "No longer maintained. Please contact the author of the relevant native addon; alternatives are available.", + "license": "MIT", + "dependencies": { + "detect-libc": "^2.0.0", + "expand-template": "^2.0.3", + "github-from-package": "0.0.0", + "minimist": "^1.2.3", + "mkdirp-classic": "^0.5.3", + "napi-build-utils": "^2.0.0", + "node-abi": "^3.3.0", + "pump": "^3.0.0", + "rc": "^1.2.7", + "simple-get": "^4.0.0", + "tar-fs": "^2.0.0", + "tunnel-agent": "^0.6.0" + }, + "bin": { + "prebuild-install": "bin.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/prisma": { - "version": "6.19.3", - "resolved": "https://registry.npmjs.org/prisma/-/prisma-6.19.3.tgz", - "integrity": "sha512-++ZJ0ijLrDJF6hNB4t4uxg2br3fC4H9Yc9tcbjr2fcNFP3rh/SBNrAgjhsqBU4Ght8JPrVofG/ZkXfnSfnYsFg==", + "version": "7.10.1", + "resolved": "https://registry.npmjs.org/prisma/-/prisma-7.10.1.tgz", + "integrity": "sha512-GoVeErHGGtsSjsflQ1r2BA3RKTXtxNraQJz8OLkLhoLr7OgCscdx4qw4WMM4HnERYc+a1cq2VnMNbep+vOjNcQ==", "devOptional": true, "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { - "@prisma/config": "6.19.3", - "@prisma/engines": "6.19.3" + "@prisma/config": "7.10.1", + "@prisma/dev": "0.24.17", + "@prisma/engines": "7.10.1", + "@prisma/studio-core": "0.33.0", + "mysql2": "3.24.4", + "postgres": "3.4.7" }, "bin": { "prisma": "build/index.js" }, "engines": { - "node": ">=18.18" + "node": "^20.19 || ^22.12 || >=24.0" }, "peerDependencies": { - "typescript": ">=5.1.0" + "better-sqlite3": ">=9.0.0", + "typescript": ">=5.4.0" }, "peerDependenciesMeta": { + "better-sqlite3": { + "optional": true + }, "typescript": { "optional": true } } }, + "node_modules/proper-lockfile": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/proper-lockfile/-/proper-lockfile-4.1.2.tgz", + "integrity": "sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.4", + "retry": "^0.12.0", + "signal-exit": "^3.0.2" + } + }, + "node_modules/proper-lockfile/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "devOptional": true, + "license": "ISC" + }, "node_modules/property-information": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/property-information/-/property-information-7.2.0.tgz", @@ -3761,6 +5115,16 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/pump": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.4.tgz", + "integrity": "sha512-VS7sjc6KR7e1ukRFhQSY5LM2uBWAUPiOPa/A3mkKmiMwSmRFUITt0xuj+/lesgnCv+dPIEYlkzrcyXgquIHMcA==", + "license": "MIT", + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, "node_modules/pure-rand": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", @@ -3778,15 +5142,30 @@ ], "license": "MIT" }, + "node_modules/rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "license": "(BSD-2-Clause OR MIT OR Apache-2.0)", + "dependencies": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "bin": { + "rc": "cli.js" + } + }, "node_modules/rc9": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/rc9/-/rc9-2.1.2.tgz", - "integrity": "sha512-btXCnMmRIBINM2LDZoEmOogIZU7Qe7zn4BpomSKZ/ykbLObuBdvG+mFq11DL6fjH1DRwHhrlgtYWG96bJiC7Cg==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/rc9/-/rc9-3.1.0.tgz", + "integrity": "sha512-ufjkNVzbRHKcCOmTahZkmVsyc3W+MSk3jY03m+a7tGHkIsdVMG9l10/3HvFbWkkKzY5VFp3pkRsIo/UYgmFL7Q==", "devOptional": true, "license": "MIT", "dependencies": { - "defu": "^6.1.4", - "destr": "^2.0.3" + "defu": "^6.1.7", + "destr": "^2.0.5" } }, "node_modules/react": { @@ -3837,14 +5216,28 @@ "react": ">=18" } }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/readdirp": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", - "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-5.1.1.tgz", + "integrity": "sha512-Kko+Y5XQ6fM+Ce3dq3m9YGxnacYZYl9cA1wZjaF3Vbry2L3i1qVg8+CAgNPsXRArPMUMCaOR7oa9Nqntc43JKA==", "devOptional": true, "license": "MIT", "engines": { - "node": ">= 14.18.0" + "node": ">= 20.19.0" }, "funding": { "type": "individual", @@ -3917,6 +5310,103 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/remeda": { + "version": "2.33.4", + "resolved": "https://registry.npmjs.org/remeda/-/remeda-2.33.4.tgz", + "integrity": "sha512-ygHswjlc/opg2VrtiYvUOPLjxjtdKvjGz1/plDhkG66hjNjFr1xmfrs2ClNFo/E6TyUFiwYNh53bKV26oBoMGQ==", + "devOptional": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/remeda" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "devOptional": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ret": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.5.1.tgz", + "integrity": "sha512-Z/nyvABwcRnRD2mMP7Kz6G1dFZZqX1mNErOnxF42OCQKE07b9k9hK9SQxHL3LFEZUdzQaLM4dId1E/E6Vm4WhA==", + "devOptional": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", + "devOptional": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/robust-predicates": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/robust-predicates/-/robust-predicates-3.0.3.tgz", + "integrity": "sha512-NS3levdsRIUOmiJ8FZWCP7LG3QpJyrs/TE0Zpf1yvZu8cAJJ6QMW92H1c7kWpdIHo8RvmLxN/o2JXTKHp74lUA==", + "devOptional": true, + "license": "Unlicense" + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safe-regex2": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-regex2/-/safe-regex2-5.1.2.tgz", + "integrity": "sha512-tAtCGFPPP02VroDVzp4daGi6bC7jWG+41D47GKf18FeH/ubvKQHT9VmhAkvtjNOmJwqtApzWeUpEhkyEYULvmw==", + "devOptional": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "MIT", + "dependencies": { + "ret": "~0.5.0" + }, + "bin": { + "safe-regex2": "bin/safe-regex2.js" + } + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "devOptional": true, + "license": "MIT" + }, "node_modules/scheduler": { "version": "0.28.0", "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.28.0.tgz", @@ -3928,7 +5418,6 @@ "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", "license": "ISC", - "optional": true, "bin": { "semver": "bin/semver.js" }, @@ -3992,6 +5481,87 @@ } } }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "devOptional": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "devOptional": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/simple-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", + "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/simple-get": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz", + "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "decompress-response": "^6.0.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, "node_modules/source-map-js": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.2.tgz", @@ -4011,6 +5581,38 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/sql-escaper": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/sql-escaper/-/sql-escaper-1.9.1.tgz", + "integrity": "sha512-4p522TVYaJXTbMlYgAwacjyg3EJyYe9KYWYlYJVwZG1YjtzxU5m5iSzsZoGI69Po7j3i/2tKlpZQi7uvhTL+WA==", + "devOptional": true, + "license": "MIT", + "engines": { + "bun": ">=1.0.0", + "deno": ">=2.0.0", + "node": ">=12.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/mysqljs/sql-escaper?sponsor=1" + } + }, + "node_modules/std-env": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.10.0.tgz", + "integrity": "sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg==", + "devOptional": true, + "license": "MIT" + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, "node_modules/stringify-entities": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-4.0.4.tgz", @@ -4025,6 +5627,15 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/style-to-js": { "version": "1.1.21", "resolved": "https://registry.npmjs.org/style-to-js/-/style-to-js-1.1.21.tgz", @@ -4087,14 +5698,32 @@ "url": "https://opencollective.com/webpack" } }, - "node_modules/tinyexec": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.3.1.tgz", - "integrity": "sha512-GCvB3aoys96IuDFBMcTB46JOR6mdMtAToqwiW8JlWhsoh1mhHi/xn9ss/Dg7N555GiJyEt2qzoG/NHCwM6h1EA==", - "devOptional": true, + "node_modules/tar-fs": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.6.tgz", + "integrity": "sha512-vsdruOmnweDIXJXWpfc5aszWMVOj6qFI+dXxNuprh6Kt+WrGJh1MQL/2xYUEzI3EX86o9b2Rop8ziIF5Ol/UoQ==", "license": "MIT", + "dependencies": { + "chownr": "^1.1.1", + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^2.1.4" + } + }, + "node_modules/tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "license": "MIT", + "dependencies": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, "engines": { - "node": ">=18" + "node": ">=6" } }, "node_modules/trim-lines": { @@ -4142,6 +5771,18 @@ "fsevents": "~2.3.3" } }, + "node_modules/tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", + "license": "Apache-2.0", + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" + } + }, "node_modules/typescript": { "version": "5.9.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", @@ -4160,7 +5801,7 @@ "version": "8.9.0", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.9.0.tgz", "integrity": "sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg==", - "dev": true, + "devOptional": true, "license": "MIT" }, "node_modules/unified": { @@ -4250,6 +5891,27 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "license": "MIT" + }, + "node_modules/valibot": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/valibot/-/valibot-1.4.2.tgz", + "integrity": "sha512-gjdCvJ6d3RyHAneqxMYMW9QMCwYMb3jpOO0IyHZV1bnRHFBHrX3VkIILt5XYR0WhwHiH7Mty8ovuPZ/O3gamrg==", + "devOptional": true, + "license": "MIT", + "peerDependencies": { + "typescript": ">=5" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, "node_modules/vfile": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.3.tgz", @@ -4278,6 +5940,39 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "devOptional": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "license": "ISC" + }, + "node_modules/zeptomatch": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/zeptomatch/-/zeptomatch-2.1.0.tgz", + "integrity": "sha512-KiGErG2J0G82LSpniV0CtIzjlJ10E04j02VOudJsPyPwNZgGnRKQy7I1R7GMyg/QswnE4l7ohSGrQbQbjXPPDA==", + "devOptional": true, + "license": "MIT", + "dependencies": { + "grammex": "^3.1.11", + "graphmatch": "^1.1.0" + } + }, "node_modules/zod": { "version": "3.25.76", "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz", diff --git a/package.json b/package.json index c849e2b..c703e04 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "private": true, "scripts": { "dev": "next dev", - "build": "prisma generate && next build", + "build": "next build", "start": "next start", "typecheck": "tsc --noEmit", "db:generate": "prisma generate", @@ -18,8 +18,11 @@ "seed": "tsx prisma/seed.ts" }, "dependencies": { - "@prisma/client": "6.19.3", + "@prisma/adapter-better-sqlite3": "7.10.1", + "@prisma/client": "7.10.1", "bcryptjs": "3.0.3", + "better-sqlite3": "^12.6.0", + "dotenv": "^18.0.10", "jose": "6.2.13", "lucide-react": "1.61.0", "next": "16.4.3", @@ -35,7 +38,8 @@ "@types/node": "26.6.5", "@types/react": "19.3.0", "@types/react-dom": "19.3.0", - "prisma": "6.19.3", + "@types/better-sqlite3": "^9.6.0", + "prisma": "7.10.1", "tailwindcss": "4.3.3", "tsx": "4.23.15", "typescript": "5.9.3" diff --git a/prisma.config.ts b/prisma.config.ts new file mode 100644 index 0000000..c2ef577 --- /dev/null +++ b/prisma.config.ts @@ -0,0 +1,15 @@ +import "dotenv/config"; +import { defineConfig } from "prisma/config"; + +// Prisma 7 loads the datasource URL from the config file, not from schema.prisma. +// Runtime clients use the same DATABASE_URL through PrismaBetterSqlite3. +export default defineConfig({ + schema: "prisma/schema.prisma", + migrations: { + path: "prisma/migrations", + seed: "tsx prisma/seed.ts", + }, + datasource: { + url: process.env.DATABASE_URL ?? "", + }, +}); diff --git a/prisma/schema.prisma b/prisma/schema.prisma index e84af56..f09e7e8 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -2,12 +2,12 @@ // 운영 환경에서 MySQL로 전환할 때는 provider와 DATABASE_URL만 변경하고 // `prisma migrate dev`로 마이그레이션을 다시 생성하세요. generator client { - provider = "prisma-client-js" + provider = "prisma-client" + output = "../src/generated/prisma" } datasource db { provider = "sqlite" - url = env("DATABASE_URL") } model AdminUser { diff --git a/prisma/seed.ts b/prisma/seed.ts index a6f4432..7a827a0 100644 --- a/prisma/seed.ts +++ b/prisma/seed.ts @@ -1,9 +1,16 @@ -import { PrismaClient } from "@prisma/client"; +import "dotenv/config"; +import { PrismaBetterSqlite3 } from "@prisma/adapter-better-sqlite3"; +import { PrismaClient } from "../src/generated/prisma/client"; import bcrypt from "bcryptjs"; import fs from "node:fs/promises"; import path from "node:path"; +import { resolveDatabaseUrl } from "../src/lib/db-url"; -const prisma = new PrismaClient(); +const adapter = new PrismaBetterSqlite3( + { url: resolveDatabaseUrl(process.env.DATABASE_URL ?? "file:./dev.db") }, + { timestampFormat: "unixepoch-ms" }, +); +const prisma = new PrismaClient({ adapter }); const uploadRoot = path.resolve(process.env.UPLOAD_DIR ?? "./storage/uploads"); diff --git a/scripts/set-admin-password.ts b/scripts/set-admin-password.ts index ec783af..ce6d659 100644 --- a/scripts/set-admin-password.ts +++ b/scripts/set-admin-password.ts @@ -7,10 +7,17 @@ * 예시: * npm run admin:password -- admin 'NewStrongPassword!2026' */ -import { PrismaClient } from "@prisma/client"; +import "dotenv/config"; +import { PrismaBetterSqlite3 } from "@prisma/adapter-better-sqlite3"; +import { PrismaClient } from "../src/generated/prisma/client"; import bcrypt from "bcryptjs"; +import { resolveDatabaseUrl } from "../src/lib/db-url"; -const prisma = new PrismaClient(); +const adapter = new PrismaBetterSqlite3( + { url: resolveDatabaseUrl(process.env.DATABASE_URL ?? "file:./dev.db") }, + { timestampFormat: "unixepoch-ms" }, +); +const prisma = new PrismaClient({ adapter }); async function main() { const [, , loginIdArg, passwordArg] = process.argv; diff --git a/src/generated/prisma/browser.ts b/src/generated/prisma/browser.ts new file mode 100644 index 0000000..1861b9d --- /dev/null +++ b/src/generated/prisma/browser.ts @@ -0,0 +1,49 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * This file should be your main import to use Prisma-related types and utilities in a browser. + * Use it to get access to models, enums, and input types. + * + * This file does not contain a `PrismaClient` class, nor several other helpers that are intended as server-side only. + * See `client.ts` for the standard, server-side entry point. + * + * 🟢 You can import this file directly. + */ + +import * as Prisma from './internal/prismaNamespaceBrowser' +export { Prisma } +export * as $Enums from './enums' +export * from './enums'; +/** + * Model AdminUser + * + */ +export type AdminUser = Prisma.AdminUserModel +/** + * Model Post + * + */ +export type Post = Prisma.PostModel +/** + * Model Attachment + * + */ +export type Attachment = Prisma.AttachmentModel +/** + * Model Inquiry + * + */ +export type Inquiry = Prisma.InquiryModel +/** + * Model AuditLog + * + */ +export type AuditLog = Prisma.AuditLogModel +/** + * Model Setting + * + */ +export type Setting = Prisma.SettingModel diff --git a/src/generated/prisma/client.ts b/src/generated/prisma/client.ts new file mode 100644 index 0000000..9d42b68 --- /dev/null +++ b/src/generated/prisma/client.ts @@ -0,0 +1,73 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * This file should be your main import to use Prisma. Through it you get access to all the models, enums, and input types. + * If you're looking for something you can import in the client-side of your application, please refer to the `browser.ts` file instead. + * + * 🟢 You can import this file directly. + */ + +import * as process from 'node:process' +import * as path from 'node:path' +import { fileURLToPath } from 'node:url' +globalThis['__dirname'] = path.dirname(fileURLToPath(import.meta.url)) + +import * as runtime from "@prisma/client/runtime/client" +import * as $Enums from "./enums" +import * as $Class from "./internal/class" +import * as Prisma from "./internal/prismaNamespace" + +export * as $Enums from './enums' +export * from "./enums" +/** + * ## Prisma Client + * + * Type-safe database client for TypeScript + * @example + * ``` + * const prisma = new PrismaClient({ + * adapter: new PrismaPg({ connectionString: process.env.DATABASE_URL }) + * }) + * // Fetch zero or more AdminUsers + * const adminUsers = await prisma.adminUser.findMany() + * ``` + * + * Read more in our [docs](https://pris.ly/d/client). + */ +export const PrismaClient = $Class.getPrismaClientClass() +export type PrismaClient = $Class.PrismaClient +export { Prisma } + +/** + * Model AdminUser + * + */ +export type AdminUser = Prisma.AdminUserModel +/** + * Model Post + * + */ +export type Post = Prisma.PostModel +/** + * Model Attachment + * + */ +export type Attachment = Prisma.AttachmentModel +/** + * Model Inquiry + * + */ +export type Inquiry = Prisma.InquiryModel +/** + * Model AuditLog + * + */ +export type AuditLog = Prisma.AuditLogModel +/** + * Model Setting + * + */ +export type Setting = Prisma.SettingModel diff --git a/src/generated/prisma/commonInputTypes.ts b/src/generated/prisma/commonInputTypes.ts new file mode 100644 index 0000000..5340b70 --- /dev/null +++ b/src/generated/prisma/commonInputTypes.ts @@ -0,0 +1,402 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * This file exports various common sort, input & filter types that are not directly linked to a particular model. + * + * 🟢 You can import this file directly. + */ + +import type * as runtime from "@prisma/client/runtime/client" +import * as $Enums from "./enums" +import type * as Prisma from "./internal/prismaNamespace" + + +export type StringFilter<$PrismaModel = never> = { + equals?: string | Prisma.StringFieldRefInput<$PrismaModel> + in?: string[] + notIn?: string[] + lt?: string | Prisma.StringFieldRefInput<$PrismaModel> + lte?: string | Prisma.StringFieldRefInput<$PrismaModel> + gt?: string | Prisma.StringFieldRefInput<$PrismaModel> + gte?: string | Prisma.StringFieldRefInput<$PrismaModel> + contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + not?: Prisma.NestedStringFilter<$PrismaModel> | string +} + +export type StringNullableFilter<$PrismaModel = never> = { + equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null + in?: string[] | null + notIn?: string[] | null + lt?: string | Prisma.StringFieldRefInput<$PrismaModel> + lte?: string | Prisma.StringFieldRefInput<$PrismaModel> + gt?: string | Prisma.StringFieldRefInput<$PrismaModel> + gte?: string | Prisma.StringFieldRefInput<$PrismaModel> + contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + not?: Prisma.NestedStringNullableFilter<$PrismaModel> | string | null +} + +export type DateTimeNullableFilter<$PrismaModel = never> = { + equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> | null + in?: Date[] | string[] | null + notIn?: Date[] | string[] | null + lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + not?: Prisma.NestedDateTimeNullableFilter<$PrismaModel> | Date | string | null +} + +export type DateTimeFilter<$PrismaModel = never> = { + equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + in?: Date[] | string[] + notIn?: Date[] | string[] + lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + not?: Prisma.NestedDateTimeFilter<$PrismaModel> | Date | string +} + +export type SortOrderInput = { + sort: Prisma.SortOrder + nulls?: Prisma.NullsOrder +} + +export type StringWithAggregatesFilter<$PrismaModel = never> = { + equals?: string | Prisma.StringFieldRefInput<$PrismaModel> + in?: string[] + notIn?: string[] + lt?: string | Prisma.StringFieldRefInput<$PrismaModel> + lte?: string | Prisma.StringFieldRefInput<$PrismaModel> + gt?: string | Prisma.StringFieldRefInput<$PrismaModel> + gte?: string | Prisma.StringFieldRefInput<$PrismaModel> + contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + not?: Prisma.NestedStringWithAggregatesFilter<$PrismaModel> | string + _count?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedStringFilter<$PrismaModel> + _max?: Prisma.NestedStringFilter<$PrismaModel> +} + +export type StringNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null + in?: string[] | null + notIn?: string[] | null + lt?: string | Prisma.StringFieldRefInput<$PrismaModel> + lte?: string | Prisma.StringFieldRefInput<$PrismaModel> + gt?: string | Prisma.StringFieldRefInput<$PrismaModel> + gte?: string | Prisma.StringFieldRefInput<$PrismaModel> + contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + not?: Prisma.NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null + _count?: Prisma.NestedIntNullableFilter<$PrismaModel> + _min?: Prisma.NestedStringNullableFilter<$PrismaModel> + _max?: Prisma.NestedStringNullableFilter<$PrismaModel> +} + +export type DateTimeNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> | null + in?: Date[] | string[] | null + notIn?: Date[] | string[] | null + lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + not?: Prisma.NestedDateTimeNullableWithAggregatesFilter<$PrismaModel> | Date | string | null + _count?: Prisma.NestedIntNullableFilter<$PrismaModel> + _min?: Prisma.NestedDateTimeNullableFilter<$PrismaModel> + _max?: Prisma.NestedDateTimeNullableFilter<$PrismaModel> +} + +export type DateTimeWithAggregatesFilter<$PrismaModel = never> = { + equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + in?: Date[] | string[] + notIn?: Date[] | string[] + lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + not?: Prisma.NestedDateTimeWithAggregatesFilter<$PrismaModel> | Date | string + _count?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedDateTimeFilter<$PrismaModel> + _max?: Prisma.NestedDateTimeFilter<$PrismaModel> +} + +export type IntFilter<$PrismaModel = never> = { + equals?: number | Prisma.IntFieldRefInput<$PrismaModel> + in?: number[] + notIn?: number[] + lt?: number | Prisma.IntFieldRefInput<$PrismaModel> + lte?: number | Prisma.IntFieldRefInput<$PrismaModel> + gt?: number | Prisma.IntFieldRefInput<$PrismaModel> + gte?: number | Prisma.IntFieldRefInput<$PrismaModel> + not?: Prisma.NestedIntFilter<$PrismaModel> | number +} + +export type BoolFilter<$PrismaModel = never> = { + equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel> + not?: Prisma.NestedBoolFilter<$PrismaModel> | boolean +} + +export type IntWithAggregatesFilter<$PrismaModel = never> = { + equals?: number | Prisma.IntFieldRefInput<$PrismaModel> + in?: number[] + notIn?: number[] + lt?: number | Prisma.IntFieldRefInput<$PrismaModel> + lte?: number | Prisma.IntFieldRefInput<$PrismaModel> + gt?: number | Prisma.IntFieldRefInput<$PrismaModel> + gte?: number | Prisma.IntFieldRefInput<$PrismaModel> + not?: Prisma.NestedIntWithAggregatesFilter<$PrismaModel> | number + _count?: Prisma.NestedIntFilter<$PrismaModel> + _avg?: Prisma.NestedFloatFilter<$PrismaModel> + _sum?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedIntFilter<$PrismaModel> + _max?: Prisma.NestedIntFilter<$PrismaModel> +} + +export type BoolWithAggregatesFilter<$PrismaModel = never> = { + equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel> + not?: Prisma.NestedBoolWithAggregatesFilter<$PrismaModel> | boolean + _count?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedBoolFilter<$PrismaModel> + _max?: Prisma.NestedBoolFilter<$PrismaModel> +} + +export type IntNullableFilter<$PrismaModel = never> = { + equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null + in?: number[] | null + notIn?: number[] | null + lt?: number | Prisma.IntFieldRefInput<$PrismaModel> + lte?: number | Prisma.IntFieldRefInput<$PrismaModel> + gt?: number | Prisma.IntFieldRefInput<$PrismaModel> + gte?: number | Prisma.IntFieldRefInput<$PrismaModel> + not?: Prisma.NestedIntNullableFilter<$PrismaModel> | number | null +} + +export type IntNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null + in?: number[] | null + notIn?: number[] | null + lt?: number | Prisma.IntFieldRefInput<$PrismaModel> + lte?: number | Prisma.IntFieldRefInput<$PrismaModel> + gt?: number | Prisma.IntFieldRefInput<$PrismaModel> + gte?: number | Prisma.IntFieldRefInput<$PrismaModel> + not?: Prisma.NestedIntNullableWithAggregatesFilter<$PrismaModel> | number | null + _count?: Prisma.NestedIntNullableFilter<$PrismaModel> + _avg?: Prisma.NestedFloatNullableFilter<$PrismaModel> + _sum?: Prisma.NestedIntNullableFilter<$PrismaModel> + _min?: Prisma.NestedIntNullableFilter<$PrismaModel> + _max?: Prisma.NestedIntNullableFilter<$PrismaModel> +} + +export type NestedStringFilter<$PrismaModel = never> = { + equals?: string | Prisma.StringFieldRefInput<$PrismaModel> + in?: string[] + notIn?: string[] + lt?: string | Prisma.StringFieldRefInput<$PrismaModel> + lte?: string | Prisma.StringFieldRefInput<$PrismaModel> + gt?: string | Prisma.StringFieldRefInput<$PrismaModel> + gte?: string | Prisma.StringFieldRefInput<$PrismaModel> + contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + not?: Prisma.NestedStringFilter<$PrismaModel> | string +} + +export type NestedStringNullableFilter<$PrismaModel = never> = { + equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null + in?: string[] | null + notIn?: string[] | null + lt?: string | Prisma.StringFieldRefInput<$PrismaModel> + lte?: string | Prisma.StringFieldRefInput<$PrismaModel> + gt?: string | Prisma.StringFieldRefInput<$PrismaModel> + gte?: string | Prisma.StringFieldRefInput<$PrismaModel> + contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + not?: Prisma.NestedStringNullableFilter<$PrismaModel> | string | null +} + +export type NestedDateTimeNullableFilter<$PrismaModel = never> = { + equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> | null + in?: Date[] | string[] | null + notIn?: Date[] | string[] | null + lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + not?: Prisma.NestedDateTimeNullableFilter<$PrismaModel> | Date | string | null +} + +export type NestedDateTimeFilter<$PrismaModel = never> = { + equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + in?: Date[] | string[] + notIn?: Date[] | string[] + lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + not?: Prisma.NestedDateTimeFilter<$PrismaModel> | Date | string +} + +export type NestedStringWithAggregatesFilter<$PrismaModel = never> = { + equals?: string | Prisma.StringFieldRefInput<$PrismaModel> + in?: string[] + notIn?: string[] + lt?: string | Prisma.StringFieldRefInput<$PrismaModel> + lte?: string | Prisma.StringFieldRefInput<$PrismaModel> + gt?: string | Prisma.StringFieldRefInput<$PrismaModel> + gte?: string | Prisma.StringFieldRefInput<$PrismaModel> + contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + not?: Prisma.NestedStringWithAggregatesFilter<$PrismaModel> | string + _count?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedStringFilter<$PrismaModel> + _max?: Prisma.NestedStringFilter<$PrismaModel> +} + +export type NestedIntFilter<$PrismaModel = never> = { + equals?: number | Prisma.IntFieldRefInput<$PrismaModel> + in?: number[] + notIn?: number[] + lt?: number | Prisma.IntFieldRefInput<$PrismaModel> + lte?: number | Prisma.IntFieldRefInput<$PrismaModel> + gt?: number | Prisma.IntFieldRefInput<$PrismaModel> + gte?: number | Prisma.IntFieldRefInput<$PrismaModel> + not?: Prisma.NestedIntFilter<$PrismaModel> | number +} + +export type NestedStringNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null + in?: string[] | null + notIn?: string[] | null + lt?: string | Prisma.StringFieldRefInput<$PrismaModel> + lte?: string | Prisma.StringFieldRefInput<$PrismaModel> + gt?: string | Prisma.StringFieldRefInput<$PrismaModel> + gte?: string | Prisma.StringFieldRefInput<$PrismaModel> + contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + not?: Prisma.NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null + _count?: Prisma.NestedIntNullableFilter<$PrismaModel> + _min?: Prisma.NestedStringNullableFilter<$PrismaModel> + _max?: Prisma.NestedStringNullableFilter<$PrismaModel> +} + +export type NestedIntNullableFilter<$PrismaModel = never> = { + equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null + in?: number[] | null + notIn?: number[] | null + lt?: number | Prisma.IntFieldRefInput<$PrismaModel> + lte?: number | Prisma.IntFieldRefInput<$PrismaModel> + gt?: number | Prisma.IntFieldRefInput<$PrismaModel> + gte?: number | Prisma.IntFieldRefInput<$PrismaModel> + not?: Prisma.NestedIntNullableFilter<$PrismaModel> | number | null +} + +export type NestedDateTimeNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> | null + in?: Date[] | string[] | null + notIn?: Date[] | string[] | null + lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + not?: Prisma.NestedDateTimeNullableWithAggregatesFilter<$PrismaModel> | Date | string | null + _count?: Prisma.NestedIntNullableFilter<$PrismaModel> + _min?: Prisma.NestedDateTimeNullableFilter<$PrismaModel> + _max?: Prisma.NestedDateTimeNullableFilter<$PrismaModel> +} + +export type NestedDateTimeWithAggregatesFilter<$PrismaModel = never> = { + equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + in?: Date[] | string[] + notIn?: Date[] | string[] + lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> + not?: Prisma.NestedDateTimeWithAggregatesFilter<$PrismaModel> | Date | string + _count?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedDateTimeFilter<$PrismaModel> + _max?: Prisma.NestedDateTimeFilter<$PrismaModel> +} + +export type NestedBoolFilter<$PrismaModel = never> = { + equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel> + not?: Prisma.NestedBoolFilter<$PrismaModel> | boolean +} + +export type NestedIntWithAggregatesFilter<$PrismaModel = never> = { + equals?: number | Prisma.IntFieldRefInput<$PrismaModel> + in?: number[] + notIn?: number[] + lt?: number | Prisma.IntFieldRefInput<$PrismaModel> + lte?: number | Prisma.IntFieldRefInput<$PrismaModel> + gt?: number | Prisma.IntFieldRefInput<$PrismaModel> + gte?: number | Prisma.IntFieldRefInput<$PrismaModel> + not?: Prisma.NestedIntWithAggregatesFilter<$PrismaModel> | number + _count?: Prisma.NestedIntFilter<$PrismaModel> + _avg?: Prisma.NestedFloatFilter<$PrismaModel> + _sum?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedIntFilter<$PrismaModel> + _max?: Prisma.NestedIntFilter<$PrismaModel> +} + +export type NestedFloatFilter<$PrismaModel = never> = { + equals?: number | Prisma.FloatFieldRefInput<$PrismaModel> + in?: number[] + notIn?: number[] + lt?: number | Prisma.FloatFieldRefInput<$PrismaModel> + lte?: number | Prisma.FloatFieldRefInput<$PrismaModel> + gt?: number | Prisma.FloatFieldRefInput<$PrismaModel> + gte?: number | Prisma.FloatFieldRefInput<$PrismaModel> + not?: Prisma.NestedFloatFilter<$PrismaModel> | number +} + +export type NestedBoolWithAggregatesFilter<$PrismaModel = never> = { + equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel> + not?: Prisma.NestedBoolWithAggregatesFilter<$PrismaModel> | boolean + _count?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedBoolFilter<$PrismaModel> + _max?: Prisma.NestedBoolFilter<$PrismaModel> +} + +export type NestedIntNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null + in?: number[] | null + notIn?: number[] | null + lt?: number | Prisma.IntFieldRefInput<$PrismaModel> + lte?: number | Prisma.IntFieldRefInput<$PrismaModel> + gt?: number | Prisma.IntFieldRefInput<$PrismaModel> + gte?: number | Prisma.IntFieldRefInput<$PrismaModel> + not?: Prisma.NestedIntNullableWithAggregatesFilter<$PrismaModel> | number | null + _count?: Prisma.NestedIntNullableFilter<$PrismaModel> + _avg?: Prisma.NestedFloatNullableFilter<$PrismaModel> + _sum?: Prisma.NestedIntNullableFilter<$PrismaModel> + _min?: Prisma.NestedIntNullableFilter<$PrismaModel> + _max?: Prisma.NestedIntNullableFilter<$PrismaModel> +} + +export type NestedFloatNullableFilter<$PrismaModel = never> = { + equals?: number | Prisma.FloatFieldRefInput<$PrismaModel> | null + in?: number[] | null + notIn?: number[] | null + lt?: number | Prisma.FloatFieldRefInput<$PrismaModel> + lte?: number | Prisma.FloatFieldRefInput<$PrismaModel> + gt?: number | Prisma.FloatFieldRefInput<$PrismaModel> + gte?: number | Prisma.FloatFieldRefInput<$PrismaModel> + not?: Prisma.NestedFloatNullableFilter<$PrismaModel> | number | null +} + + diff --git a/src/generated/prisma/enums.ts b/src/generated/prisma/enums.ts new file mode 100644 index 0000000..043572d --- /dev/null +++ b/src/generated/prisma/enums.ts @@ -0,0 +1,15 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* +* This file exports all enum related types from the schema. +* +* 🟢 You can import this file directly. +*/ + + + +// This file is empty because there are no enums in the schema. +export {} diff --git a/src/generated/prisma/internal/class.ts b/src/generated/prisma/internal/class.ts new file mode 100644 index 0000000..22a35a7 --- /dev/null +++ b/src/generated/prisma/internal/class.ts @@ -0,0 +1,254 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * WARNING: This is an internal file that is subject to change! + * + * 🛑 Under no circumstances should you import this file directly! 🛑 + * + * Please import the `PrismaClient` class from the `client.ts` file instead. + */ + +import * as runtime from "@prisma/client/runtime/client" +import type * as Prisma from "./prismaNamespace" + + +const config: runtime.GetPrismaClientConfig = { + "previewFeatures": [], + "clientVersion": "7.10.1", + "engineVersion": "d1b3f377ca835d73fd50954a5e22128b9ebdd6b8", + "activeProvider": "sqlite", + "inlineSchema": "// 개발 환경에서는 SQLite를 사용합니다.\n// 운영 환경에서 MySQL로 전환할 때는 provider와 DATABASE_URL만 변경하고\n// `prisma migrate dev`로 마이그레이션을 다시 생성하세요.\ngenerator client {\n provider = \"prisma-client\"\n output = \"../src/generated/prisma\"\n}\n\ndatasource db {\n provider = \"sqlite\"\n}\n\nmodel AdminUser {\n id String @id @default(cuid())\n loginId String @unique\n passwordHash String\n name String\n role String @default(\"ADMIN\") // ADMIN | EDITOR\n totpSecret String?\n lastLoginAt DateTime?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n posts Post[]\n auditLogs AuditLog[]\n}\n\nmodel Post {\n id Int @id @default(autoincrement())\n type String // NOTICE | ARCHIVE\n category String?\n title String\n content String\n isPinned Boolean @default(false)\n status String @default(\"PUBLISHED\") // DRAFT | PUBLISHED\n viewCount Int @default(0)\n authorId String?\n author AdminUser? @relation(fields: [authorId], references: [id], onDelete: SetNull)\n publishedAt DateTime @default(now())\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n attachments Attachment[]\n\n @@index([type, status, publishedAt])\n @@index([type, category])\n}\n\nmodel Attachment {\n id Int @id @default(autoincrement())\n postId Int?\n post Post? @relation(fields: [postId], references: [id], onDelete: Cascade)\n originalName String\n storageKey String @unique\n mimeType String\n size Int\n downloadCount Int @default(0)\n createdAt DateTime @default(now())\n\n @@index([postId])\n}\n\nmodel Inquiry {\n id Int @id @default(autoincrement())\n name String\n email String\n phone String?\n title String\n content String\n consent Boolean @default(false)\n status String @default(\"NEW\") // NEW | IN_PROGRESS | DONE\n ip String?\n createdAt DateTime @default(now())\n\n @@index([status, createdAt])\n}\n\nmodel AuditLog {\n id Int @id @default(autoincrement())\n adminId String?\n admin AdminUser? @relation(fields: [adminId], references: [id], onDelete: SetNull)\n action String\n targetType String?\n targetId String?\n ip String?\n createdAt DateTime @default(now())\n\n @@index([createdAt])\n}\n\nmodel Setting {\n key String @id\n value String\n updatedAt DateTime @updatedAt\n}\n", + "runtimeDataModel": { + "models": {}, + "enums": {}, + "types": {} + }, + "parameterizationSchema": { + "strings": [], + "graph": "" + } +} + +config.runtimeDataModel = JSON.parse("{\"models\":{\"AdminUser\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"loginId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"passwordHash\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"role\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"totpSecret\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"lastLoginAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"posts\",\"kind\":\"object\",\"type\":\"Post\",\"relationName\":\"AdminUserToPost\"},{\"name\":\"auditLogs\",\"kind\":\"object\",\"type\":\"AuditLog\",\"relationName\":\"AdminUserToAuditLog\"}],\"dbName\":null,\"schema\":null},\"Post\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"type\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"category\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"title\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"content\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"isPinned\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"status\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"viewCount\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"authorId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"author\",\"kind\":\"object\",\"type\":\"AdminUser\",\"relationName\":\"AdminUserToPost\"},{\"name\":\"publishedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"attachments\",\"kind\":\"object\",\"type\":\"Attachment\",\"relationName\":\"AttachmentToPost\"}],\"dbName\":null,\"schema\":null},\"Attachment\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"postId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"post\",\"kind\":\"object\",\"type\":\"Post\",\"relationName\":\"AttachmentToPost\"},{\"name\":\"originalName\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"storageKey\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"mimeType\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"size\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"downloadCount\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null,\"schema\":null},\"Inquiry\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"email\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"phone\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"title\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"content\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"consent\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"status\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"ip\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null,\"schema\":null},\"AuditLog\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"adminId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"admin\",\"kind\":\"object\",\"type\":\"AdminUser\",\"relationName\":\"AdminUserToAuditLog\"},{\"name\":\"action\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"targetType\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"targetId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"ip\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null,\"schema\":null},\"Setting\":{\"fields\":[{\"name\":\"key\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"value\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":null,\"schema\":null}},\"enums\":{},\"types\":{}}") +config.parameterizationSchema = { + strings: JSON.parse("[\"where\",\"orderBy\",\"cursor\",\"author\",\"post\",\"attachments\",\"_count\",\"posts\",\"admin\",\"auditLogs\",\"AdminUser.findUnique\",\"AdminUser.findUniqueOrThrow\",\"AdminUser.findFirst\",\"AdminUser.findFirstOrThrow\",\"AdminUser.findMany\",\"data\",\"AdminUser.createOne\",\"AdminUser.createMany\",\"AdminUser.createManyAndReturn\",\"AdminUser.updateOne\",\"AdminUser.updateMany\",\"AdminUser.updateManyAndReturn\",\"create\",\"update\",\"AdminUser.upsertOne\",\"AdminUser.deleteOne\",\"AdminUser.deleteMany\",\"having\",\"_min\",\"_max\",\"AdminUser.groupBy\",\"AdminUser.aggregate\",\"Post.findUnique\",\"Post.findUniqueOrThrow\",\"Post.findFirst\",\"Post.findFirstOrThrow\",\"Post.findMany\",\"Post.createOne\",\"Post.createMany\",\"Post.createManyAndReturn\",\"Post.updateOne\",\"Post.updateMany\",\"Post.updateManyAndReturn\",\"Post.upsertOne\",\"Post.deleteOne\",\"Post.deleteMany\",\"_avg\",\"_sum\",\"Post.groupBy\",\"Post.aggregate\",\"Attachment.findUnique\",\"Attachment.findUniqueOrThrow\",\"Attachment.findFirst\",\"Attachment.findFirstOrThrow\",\"Attachment.findMany\",\"Attachment.createOne\",\"Attachment.createMany\",\"Attachment.createManyAndReturn\",\"Attachment.updateOne\",\"Attachment.updateMany\",\"Attachment.updateManyAndReturn\",\"Attachment.upsertOne\",\"Attachment.deleteOne\",\"Attachment.deleteMany\",\"Attachment.groupBy\",\"Attachment.aggregate\",\"Inquiry.findUnique\",\"Inquiry.findUniqueOrThrow\",\"Inquiry.findFirst\",\"Inquiry.findFirstOrThrow\",\"Inquiry.findMany\",\"Inquiry.createOne\",\"Inquiry.createMany\",\"Inquiry.createManyAndReturn\",\"Inquiry.updateOne\",\"Inquiry.updateMany\",\"Inquiry.updateManyAndReturn\",\"Inquiry.upsertOne\",\"Inquiry.deleteOne\",\"Inquiry.deleteMany\",\"Inquiry.groupBy\",\"Inquiry.aggregate\",\"AuditLog.findUnique\",\"AuditLog.findUniqueOrThrow\",\"AuditLog.findFirst\",\"AuditLog.findFirstOrThrow\",\"AuditLog.findMany\",\"AuditLog.createOne\",\"AuditLog.createMany\",\"AuditLog.createManyAndReturn\",\"AuditLog.updateOne\",\"AuditLog.updateMany\",\"AuditLog.updateManyAndReturn\",\"AuditLog.upsertOne\",\"AuditLog.deleteOne\",\"AuditLog.deleteMany\",\"AuditLog.groupBy\",\"AuditLog.aggregate\",\"Setting.findUnique\",\"Setting.findUniqueOrThrow\",\"Setting.findFirst\",\"Setting.findFirstOrThrow\",\"Setting.findMany\",\"Setting.createOne\",\"Setting.createMany\",\"Setting.createManyAndReturn\",\"Setting.updateOne\",\"Setting.updateMany\",\"Setting.updateManyAndReturn\",\"Setting.upsertOne\",\"Setting.deleteOne\",\"Setting.deleteMany\",\"Setting.groupBy\",\"Setting.aggregate\",\"AND\",\"OR\",\"NOT\",\"key\",\"value\",\"updatedAt\",\"equals\",\"in\",\"notIn\",\"lt\",\"lte\",\"gt\",\"gte\",\"not\",\"contains\",\"startsWith\",\"endsWith\",\"id\",\"adminId\",\"action\",\"targetType\",\"targetId\",\"ip\",\"createdAt\",\"name\",\"email\",\"phone\",\"title\",\"content\",\"consent\",\"status\",\"postId\",\"originalName\",\"storageKey\",\"mimeType\",\"size\",\"downloadCount\",\"type\",\"category\",\"isPinned\",\"viewCount\",\"authorId\",\"publishedAt\",\"loginId\",\"passwordHash\",\"role\",\"totpSecret\",\"lastLoginAt\",\"every\",\"some\",\"none\",\"is\",\"isNot\",\"connectOrCreate\",\"upsert\",\"createMany\",\"set\",\"disconnect\",\"delete\",\"connect\",\"updateMany\",\"deleteMany\",\"increment\",\"decrement\",\"multiply\",\"divide\"]"), + graph: "vQI7YA4HAADRAQAgCQAA0gEAIHIAAM8BADBzAAAHABB0AADPAQAwd0AAsAEAIYMBAQAAAAGJAUAAsAEAIYoBAQCvAQAhnQEBAAAAAZ4BAQCvAQAhnwEBAK8BACGgAQEAvwEAIaEBQADQAQAhAQAAAAEAIBEDAADLAQAgBQAA1AEAIHIAANMBADBzAAADABB0AADTAQAwd0AAsAEAIYMBAgC-AQAhiQFAALABACGNAQEArwEAIY4BAQCvAQAhkAEBAK8BACGXAQEArwEAIZgBAQC_AQAhmQEgAMABACGaAQIAvgEAIZsBAQC_AQAhnAFAALABACEEAwAAqQIAIAUAAKsCACCYAQAA2gEAIJsBAADaAQAgEQMAAMsBACAFAADUAQAgcgAA0wEAMHMAAAMAEHQAANMBADB3QACwAQAhgwECAAAAAYkBQACwAQAhjQEBAK8BACGOAQEArwEAIZABAQCvAQAhlwEBAK8BACGYAQEAvwEAIZkBIADAAQAhmgECAL4BACGbAQEAvwEAIZwBQACwAQAhAwAAAAMAIAEAAAQAMAIAAAUAIA4HAADRAQAgCQAA0gEAIHIAAM8BADBzAAAHABB0AADPAQAwd0AAsAEAIYMBAQCvAQAhiQFAALABACGKAQEArwEAIZ0BAQCvAQAhngEBAK8BACGfAQEArwEAIaABAQC_AQAhoQFAANABACEBAAAABwAgDAQAAM4BACByAADMAQAwcwAACQAQdAAAzAEAMIMBAgC-AQAhiQFAALABACGRAQIAzQEAIZIBAQCvAQAhkwEBAK8BACGUAQEArwEAIZUBAgC-AQAhlgECAL4BACECBAAAqgIAIJEBAADaAQAgDAQAAM4BACByAADMAQAwcwAACQAQdAAAzAEAMIMBAgAAAAGJAUAAsAEAIZEBAgDNAQAhkgEBAK8BACGTAQEAAAABlAEBAK8BACGVAQIAvgEAIZYBAgC-AQAhAwAAAAkAIAEAAAoAMAIAAAsAIAEAAAADACABAAAACQAgCwgAAMsBACByAADKAQAwcwAADwAQdAAAygEAMIMBAgC-AQAhhAEBAL8BACGFAQEArwEAIYYBAQC_AQAhhwEBAL8BACGIAQEAvwEAIYkBQACwAQAhBQgAAKkCACCEAQAA2gEAIIYBAADaAQAghwEAANoBACCIAQAA2gEAIAsIAADLAQAgcgAAygEAMHMAAA8AEHQAAMoBADCDAQIAAAABhAEBAL8BACGFAQEArwEAIYYBAQC_AQAhhwEBAL8BACGIAQEAvwEAIYkBQACwAQAhAwAAAA8AIAEAABAAMAIAABEAIAEAAAAHACABAAAAAwAgAQAAAA8AIAEAAAABACAEBwAApwIAIAkAAKgCACCgAQAA2gEAIKEBAADaAQAgAwAAAAcAIAEAABcAMAIAAAEAIAMAAAAHACABAAAXADACAAABACADAAAABwAgAQAAFwAwAgAAAQAgCwcAAKUCACAJAACmAgAgd0AAAAABgwEBAAAAAYkBQAAAAAGKAQEAAAABnQEBAAAAAZ4BAQAAAAGfAQEAAAABoAEBAAAAAaEBQAAAAAEBDwAAGwAgCXdAAAAAAYMBAQAAAAGJAUAAAAABigEBAAAAAZ0BAQAAAAGeAQEAAAABnwEBAAAAAaABAQAAAAGhAUAAAAABAQ8AAB0AMAEPAAAdADALBwAAiwIAIAkAAIwCACB3QADZAQAhgwEBANgBACGJAUAA2QEAIYoBAQDYAQAhnQEBANgBACGeAQEA2AEAIZ8BAQDYAQAhoAEBAOABACGhAUAAigIAIQIAAAABACAPAAAgACAJd0AA2QEAIYMBAQDYAQAhiQFAANkBACGKAQEA2AEAIZ0BAQDYAQAhngEBANgBACGfAQEA2AEAIaABAQDgAQAhoQFAAIoCACECAAAABwAgDwAAIgAgAgAAAAcAIA8AACIAIAMAAAABACAWAAAbACAXAAAgACABAAAAAQAgAQAAAAcAIAUGAACHAgAgHAAAiQIAIB0AAIgCACCgAQAA2gEAIKEBAADaAQAgDHIAAMYBADBzAAApABB0AADGAQAwd0AAqAEAIYMBAQCnAQAhiQFAAKgBACGKAQEApwEAIZ0BAQCnAQAhngEBAKcBACGfAQEApwEAIaABAQCzAQAhoQFAAMcBACEDAAAABwAgAQAAKAAwGwAAKQAgAwAAAAcAIAEAABcAMAIAAAEAIAEAAAAFACABAAAABQAgAwAAAAMAIAEAAAQAMAIAAAUAIAMAAAADACABAAAEADACAAAFACADAAAAAwAgAQAABAAwAgAABQAgDgMAAIUCACAFAACGAgAgd0AAAAABgwECAAAAAYkBQAAAAAGNAQEAAAABjgEBAAAAAZABAQAAAAGXAQEAAAABmAEBAAAAAZkBIAAAAAGaAQIAAAABmwEBAAAAAZwBQAAAAAEBDwAAMQAgDHdAAAAAAYMBAgAAAAGJAUAAAAABjQEBAAAAAY4BAQAAAAGQAQEAAAABlwEBAAAAAZgBAQAAAAGZASAAAAABmgECAAAAAZsBAQAAAAGcAUAAAAABAQ8AADMAMAEPAAAzADABAAAABwAgDgMAAPcBACAFAAD4AQAgd0AA2QEAIYMBAgDhAQAhiQFAANkBACGNAQEA2AEAIY4BAQDYAQAhkAEBANgBACGXAQEA2AEAIZgBAQDgAQAhmQEgAOkBACGaAQIA4QEAIZsBAQDgAQAhnAFAANkBACECAAAABQAgDwAANwAgDHdAANkBACGDAQIA4QEAIYkBQADZAQAhjQEBANgBACGOAQEA2AEAIZABAQDYAQAhlwEBANgBACGYAQEA4AEAIZkBIADpAQAhmgECAOEBACGbAQEA4AEAIZwBQADZAQAhAgAAAAMAIA8AADkAIAIAAAADACAPAAA5ACABAAAABwAgAwAAAAUAIBYAADEAIBcAADcAIAEAAAAFACABAAAAAwAgBwYAAPIBACAcAAD1AQAgHQAA9AEAIC4AAPMBACAvAAD2AQAgmAEAANoBACCbAQAA2gEAIA9yAADFAQAwcwAAQQAQdAAAxQEAMHdAAKgBACGDAQIAsgEAIYkBQACoAQAhjQEBAKcBACGOAQEApwEAIZABAQCnAQAhlwEBAKcBACGYAQEAswEAIZkBIAC6AQAhmgECALIBACGbAQEAswEAIZwBQACoAQAhAwAAAAMAIAEAAEAAMBsAAEEAIAMAAAADACABAAAEADACAAAFACABAAAACwAgAQAAAAsAIAMAAAAJACABAAAKADACAAALACADAAAACQAgAQAACgAwAgAACwAgAwAAAAkAIAEAAAoAMAIAAAsAIAkEAADxAQAggwECAAAAAYkBQAAAAAGRAQIAAAABkgEBAAAAAZMBAQAAAAGUAQEAAAABlQECAAAAAZYBAgAAAAEBDwAASQAgCIMBAgAAAAGJAUAAAAABkQECAAAAAZIBAQAAAAGTAQEAAAABlAEBAAAAAZUBAgAAAAGWAQIAAAABAQ8AAEsAMAEPAABLADABAAAAAwAgCQQAAPABACCDAQIA4QEAIYkBQADZAQAhkQECAO8BACGSAQEA2AEAIZMBAQDYAQAhlAEBANgBACGVAQIA4QEAIZYBAgDhAQAhAgAAAAsAIA8AAE8AIAiDAQIA4QEAIYkBQADZAQAhkQECAO8BACGSAQEA2AEAIZMBAQDYAQAhlAEBANgBACGVAQIA4QEAIZYBAgDhAQAhAgAAAAkAIA8AAFEAIAIAAAAJACAPAABRACABAAAAAwAgAwAAAAsAIBYAAEkAIBcAAE8AIAEAAAALACABAAAACQAgBgYAAOoBACAcAADtAQAgHQAA7AEAIC4AAOsBACAvAADuAQAgkQEAANoBACALcgAAwQEAMHMAAFkAEHQAAMEBADCDAQIAsgEAIYkBQACoAQAhkQECAMIBACGSAQEApwEAIZMBAQCnAQAhlAEBAKcBACGVAQIAsgEAIZYBAgCyAQAhAwAAAAkAIAEAAFgAMBsAAFkAIAMAAAAJACABAAAKADACAAALACANcgAAvQEAMHMAAF8AEHQAAL0BADCDAQIAAAABiAEBAL8BACGJAUAAsAEAIYoBAQCvAQAhiwEBAK8BACGMAQEAvwEAIY0BAQCvAQAhjgEBAK8BACGPASAAwAEAIZABAQCvAQAhAQAAAFwAIAEAAABcACANcgAAvQEAMHMAAF8AEHQAAL0BADCDAQIAvgEAIYgBAQC_AQAhiQFAALABACGKAQEArwEAIYsBAQCvAQAhjAEBAL8BACGNAQEArwEAIY4BAQCvAQAhjwEgAMABACGQAQEArwEAIQKIAQAA2gEAIIwBAADaAQAgAwAAAF8AIAEAAGAAMAIAAFwAIAMAAABfACABAABgADACAABcACADAAAAXwAgAQAAYAAwAgAAXAAgCoMBAgAAAAGIAQEAAAABiQFAAAAAAYoBAQAAAAGLAQEAAAABjAEBAAAAAY0BAQAAAAGOAQEAAAABjwEgAAAAAZABAQAAAAEBDwAAZAAgCoMBAgAAAAGIAQEAAAABiQFAAAAAAYoBAQAAAAGLAQEAAAABjAEBAAAAAY0BAQAAAAGOAQEAAAABjwEgAAAAAZABAQAAAAEBDwAAZgAwAQ8AAGYAMAqDAQIA4QEAIYgBAQDgAQAhiQFAANkBACGKAQEA2AEAIYsBAQDYAQAhjAEBAOABACGNAQEA2AEAIY4BAQDYAQAhjwEgAOkBACGQAQEA2AEAIQIAAABcACAPAABpACAKgwECAOEBACGIAQEA4AEAIYkBQADZAQAhigEBANgBACGLAQEA2AEAIYwBAQDgAQAhjQEBANgBACGOAQEA2AEAIY8BIADpAQAhkAEBANgBACECAAAAXwAgDwAAawAgAgAAAF8AIA8AAGsAIAMAAABcACAWAABkACAXAABpACABAAAAXAAgAQAAAF8AIAcGAADkAQAgHAAA5wEAIB0AAOYBACAuAADlAQAgLwAA6AEAIIgBAADaAQAgjAEAANoBACANcgAAuQEAMHMAAHIAEHQAALkBADCDAQIAsgEAIYgBAQCzAQAhiQFAAKgBACGKAQEApwEAIYsBAQCnAQAhjAEBALMBACGNAQEApwEAIY4BAQCnAQAhjwEgALoBACGQAQEApwEAIQMAAABfACABAABxADAbAAByACADAAAAXwAgAQAAYAAwAgAAXAAgAQAAABEAIAEAAAARACADAAAADwAgAQAAEAAwAgAAEQAgAwAAAA8AIAEAABAAMAIAABEAIAMAAAAPACABAAAQADACAAARACAICAAA4wEAIIMBAgAAAAGEAQEAAAABhQEBAAAAAYYBAQAAAAGHAQEAAAABiAEBAAAAAYkBQAAAAAEBDwAAegAgB4MBAgAAAAGEAQEAAAABhQEBAAAAAYYBAQAAAAGHAQEAAAABiAEBAAAAAYkBQAAAAAEBDwAAfAAwAQ8AAHwAMAEAAAAHACAICAAA4gEAIIMBAgDhAQAhhAEBAOABACGFAQEA2AEAIYYBAQDgAQAhhwEBAOABACGIAQEA4AEAIYkBQADZAQAhAgAAABEAIA8AAIABACAHgwECAOEBACGEAQEA4AEAIYUBAQDYAQAhhgEBAOABACGHAQEA4AEAIYgBAQDgAQAhiQFAANkBACECAAAADwAgDwAAggEAIAIAAAAPACAPAACCAQAgAQAAAAcAIAMAAAARACAWAAB6ACAXAACAAQAgAQAAABEAIAEAAAAPACAJBgAA2wEAIBwAAN4BACAdAADdAQAgLgAA3AEAIC8AAN8BACCEAQAA2gEAIIYBAADaAQAghwEAANoBACCIAQAA2gEAIApyAACxAQAwcwAAigEAEHQAALEBADCDAQIAsgEAIYQBAQCzAQAhhQEBAKcBACGGAQEAswEAIYcBAQCzAQAhiAEBALMBACGJAUAAqAEAIQMAAAAPACABAACJAQAwGwAAigEAIAMAAAAPACABAAAQADACAAARACAGcgAArgEAMHMAAJABABB0AACuAQAwdQEAAAABdgEArwEAIXdAALABACEBAAAAjQEAIAEAAACNAQAgBnIAAK4BADBzAACQAQAQdAAArgEAMHUBAK8BACF2AQCvAQAhd0AAsAEAIQADAAAAkAEAIAEAAJEBADACAACNAQAgAwAAAJABACABAACRAQAwAgAAjQEAIAMAAACQAQAgAQAAkQEAMAIAAI0BACADdQEAAAABdgEAAAABd0AAAAABAQ8AAJUBACADdQEAAAABdgEAAAABd0AAAAABAQ8AAJcBADABDwAAlwEAMAN1AQDYAQAhdgEA2AEAIXdAANkBACECAAAAjQEAIA8AAJoBACADdQEA2AEAIXYBANgBACF3QADZAQAhAgAAAJABACAPAACcAQAgAgAAAJABACAPAACcAQAgAwAAAI0BACAWAACVAQAgFwAAmgEAIAEAAACNAQAgAQAAAJABACADBgAA1QEAIBwAANcBACAdAADWAQAgBnIAAKYBADBzAACjAQAQdAAApgEAMHUBAKcBACF2AQCnAQAhd0AAqAEAIQMAAACQAQAgAQAAogEAMBsAAKMBACADAAAAkAEAIAEAAJEBADACAACNAQAgBnIAAKYBADBzAACjAQAQdAAApgEAMHUBAKcBACF2AQCnAQAhd0AAqAEAIQ4GAACqAQAgHAAArQEAIB0AAK0BACB4AQAAAAF5AQAAAAR6AQAAAAR7AQAAAAF8AQAAAAF9AQAAAAF-AQAAAAF_AQCsAQAhgAEBAAAAAYEBAQAAAAGCAQEAAAABCwYAAKoBACAcAACrAQAgHQAAqwEAIHhAAAAAAXlAAAAABHpAAAAABHtAAAAAAXxAAAAAAX1AAAAAAX5AAAAAAX9AAKkBACELBgAAqgEAIBwAAKsBACAdAACrAQAgeEAAAAABeUAAAAAEekAAAAAEe0AAAAABfEAAAAABfUAAAAABfkAAAAABf0AAqQEAIQh4AgAAAAF5AgAAAAR6AgAAAAR7AgAAAAF8AgAAAAF9AgAAAAF-AgAAAAF_AgCqAQAhCHhAAAAAAXlAAAAABHpAAAAABHtAAAAAAXxAAAAAAX1AAAAAAX5AAAAAAX9AAKsBACEOBgAAqgEAIBwAAK0BACAdAACtAQAgeAEAAAABeQEAAAAEegEAAAAEewEAAAABfAEAAAABfQEAAAABfgEAAAABfwEArAEAIYABAQAAAAGBAQEAAAABggEBAAAAAQt4AQAAAAF5AQAAAAR6AQAAAAR7AQAAAAF8AQAAAAF9AQAAAAF-AQAAAAF_AQCtAQAhgAEBAAAAAYEBAQAAAAGCAQEAAAABBnIAAK4BADBzAACQAQAQdAAArgEAMHUBAK8BACF2AQCvAQAhd0AAsAEAIQt4AQAAAAF5AQAAAAR6AQAAAAR7AQAAAAF8AQAAAAF9AQAAAAF-AQAAAAF_AQCtAQAhgAEBAAAAAYEBAQAAAAGCAQEAAAABCHhAAAAAAXlAAAAABHpAAAAABHtAAAAAAXxAAAAAAX1AAAAAAX5AAAAAAX9AAKsBACEKcgAAsQEAMHMAAIoBABB0AACxAQAwgwECALIBACGEAQEAswEAIYUBAQCnAQAhhgEBALMBACGHAQEAswEAIYgBAQCzAQAhiQFAAKgBACENBgAAqgEAIBwAAKoBACAdAACqAQAgLgAAuAEAIC8AAKoBACB4AgAAAAF5AgAAAAR6AgAAAAR7AgAAAAF8AgAAAAF9AgAAAAF-AgAAAAF_AgC3AQAhDgYAALUBACAcAAC2AQAgHQAAtgEAIHgBAAAAAXkBAAAABXoBAAAABXsBAAAAAXwBAAAAAX0BAAAAAX4BAAAAAX8BALQBACGAAQEAAAABgQEBAAAAAYIBAQAAAAEOBgAAtQEAIBwAALYBACAdAAC2AQAgeAEAAAABeQEAAAAFegEAAAAFewEAAAABfAEAAAABfQEAAAABfgEAAAABfwEAtAEAIYABAQAAAAGBAQEAAAABggEBAAAAAQh4AgAAAAF5AgAAAAV6AgAAAAV7AgAAAAF8AgAAAAF9AgAAAAF-AgAAAAF_AgC1AQAhC3gBAAAAAXkBAAAABXoBAAAABXsBAAAAAXwBAAAAAX0BAAAAAX4BAAAAAX8BALYBACGAAQEAAAABgQEBAAAAAYIBAQAAAAENBgAAqgEAIBwAAKoBACAdAACqAQAgLgAAuAEAIC8AAKoBACB4AgAAAAF5AgAAAAR6AgAAAAR7AgAAAAF8AgAAAAF9AgAAAAF-AgAAAAF_AgC3AQAhCHgIAAAAAXkIAAAABHoIAAAABHsIAAAAAXwIAAAAAX0IAAAAAX4IAAAAAX8IALgBACENcgAAuQEAMHMAAHIAEHQAALkBADCDAQIAsgEAIYgBAQCzAQAhiQFAAKgBACGKAQEApwEAIYsBAQCnAQAhjAEBALMBACGNAQEApwEAIY4BAQCnAQAhjwEgALoBACGQAQEApwEAIQUGAACqAQAgHAAAvAEAIB0AALwBACB4IAAAAAF_IAC7AQAhBQYAAKoBACAcAAC8AQAgHQAAvAEAIHggAAAAAX8gALsBACECeCAAAAABfyAAvAEAIQ1yAAC9AQAwcwAAXwAQdAAAvQEAMIMBAgC-AQAhiAEBAL8BACGJAUAAsAEAIYoBAQCvAQAhiwEBAK8BACGMAQEAvwEAIY0BAQCvAQAhjgEBAK8BACGPASAAwAEAIZABAQCvAQAhCHgCAAAAAXkCAAAABHoCAAAABHsCAAAAAXwCAAAAAX0CAAAAAX4CAAAAAX8CAKoBACELeAEAAAABeQEAAAAFegEAAAAFewEAAAABfAEAAAABfQEAAAABfgEAAAABfwEAtgEAIYABAQAAAAGBAQEAAAABggEBAAAAAQJ4IAAAAAF_IAC8AQAhC3IAAMEBADBzAABZABB0AADBAQAwgwECALIBACGJAUAAqAEAIZEBAgDCAQAhkgEBAKcBACGTAQEApwEAIZQBAQCnAQAhlQECALIBACGWAQIAsgEAIQ0GAAC1AQAgHAAAtQEAIB0AALUBACAuAADEAQAgLwAAtQEAIHgCAAAAAXkCAAAABXoCAAAABXsCAAAAAXwCAAAAAX0CAAAAAX4CAAAAAX8CAMMBACENBgAAtQEAIBwAALUBACAdAAC1AQAgLgAAxAEAIC8AALUBACB4AgAAAAF5AgAAAAV6AgAAAAV7AgAAAAF8AgAAAAF9AgAAAAF-AgAAAAF_AgDDAQAhCHgIAAAAAXkIAAAABXoIAAAABXsIAAAAAXwIAAAAAX0IAAAAAX4IAAAAAX8IAMQBACEPcgAAxQEAMHMAAEEAEHQAAMUBADB3QACoAQAhgwECALIBACGJAUAAqAEAIY0BAQCnAQAhjgEBAKcBACGQAQEApwEAIZcBAQCnAQAhmAEBALMBACGZASAAugEAIZoBAgCyAQAhmwEBALMBACGcAUAAqAEAIQxyAADGAQAwcwAAKQAQdAAAxgEAMHdAAKgBACGDAQEApwEAIYkBQACoAQAhigEBAKcBACGdAQEApwEAIZ4BAQCnAQAhnwEBAKcBACGgAQEAswEAIaEBQADHAQAhCwYAALUBACAcAADJAQAgHQAAyQEAIHhAAAAAAXlAAAAABXpAAAAABXtAAAAAAXxAAAAAAX1AAAAAAX5AAAAAAX9AAMgBACELBgAAtQEAIBwAAMkBACAdAADJAQAgeEAAAAABeUAAAAAFekAAAAAFe0AAAAABfEAAAAABfUAAAAABfkAAAAABf0AAyAEAIQh4QAAAAAF5QAAAAAV6QAAAAAV7QAAAAAF8QAAAAAF9QAAAAAF-QAAAAAF_QADJAQAhCwgAAMsBACByAADKAQAwcwAADwAQdAAAygEAMIMBAgC-AQAhhAEBAL8BACGFAQEArwEAIYYBAQC_AQAhhwEBAL8BACGIAQEAvwEAIYkBQACwAQAhEAcAANEBACAJAADSAQAgcgAAzwEAMHMAAAcAEHQAAM8BADB3QACwAQAhgwEBAK8BACGJAUAAsAEAIYoBAQCvAQAhnQEBAK8BACGeAQEArwEAIZ8BAQCvAQAhoAEBAL8BACGhAUAA0AEAIaUBAAAHACCmAQAABwAgDAQAAM4BACByAADMAQAwcwAACQAQdAAAzAEAMIMBAgC-AQAhiQFAALABACGRAQIAzQEAIZIBAQCvAQAhkwEBAK8BACGUAQEArwEAIZUBAgC-AQAhlgECAL4BACEIeAIAAAABeQIAAAAFegIAAAAFewIAAAABfAIAAAABfQIAAAABfgIAAAABfwIAtQEAIRMDAADLAQAgBQAA1AEAIHIAANMBADBzAAADABB0AADTAQAwd0AAsAEAIYMBAgC-AQAhiQFAALABACGNAQEArwEAIY4BAQCvAQAhkAEBAK8BACGXAQEArwEAIZgBAQC_AQAhmQEgAMABACGaAQIAvgEAIZsBAQC_AQAhnAFAALABACGlAQAAAwAgpgEAAAMAIA4HAADRAQAgCQAA0gEAIHIAAM8BADBzAAAHABB0AADPAQAwd0AAsAEAIYMBAQCvAQAhiQFAALABACGKAQEArwEAIZ0BAQCvAQAhngEBAK8BACGfAQEArwEAIaABAQC_AQAhoQFAANABACEIeEAAAAABeUAAAAAFekAAAAAFe0AAAAABfEAAAAABfUAAAAABfkAAAAABf0AAyQEAIQOiAQAAAwAgowEAAAMAIKQBAAADACADogEAAA8AIKMBAAAPACCkAQAADwAgEQMAAMsBACAFAADUAQAgcgAA0wEAMHMAAAMAEHQAANMBADB3QACwAQAhgwECAL4BACGJAUAAsAEAIY0BAQCvAQAhjgEBAK8BACGQAQEArwEAIZcBAQCvAQAhmAEBAL8BACGZASAAwAEAIZoBAgC-AQAhmwEBAL8BACGcAUAAsAEAIQOiAQAACQAgowEAAAkAIKQBAAAJACAAAAABqgEBAAAAAQGqAUAAAAABAAAAAAAAAaoBAQAAAAEFqgECAAAAAbABAgAAAAGxAQIAAAABsgECAAAAAbMBAgAAAAEHFgAAuQIAIBcAALwCACCnAQAAugIAIKgBAAC7AgAgqwEAAAcAIKwBAAAHACCtAQAAAQAgAxYAALkCACCnAQAAugIAIK0BAAABACAAAAAAAAGqASAAAAABAAAAAAAFqgECAAAAAbABAgAAAAGxAQIAAAABsgECAAAAAbMBAgAAAAEHFgAAtAIAIBcAALcCACCnAQAAtQIAIKgBAAC2AgAgqwEAAAMAIKwBAAADACCtAQAABQAgAxYAALQCACCnAQAAtQIAIK0BAAAFACAAAAAAAAcWAACuAgAgFwAAsgIAIKcBAACvAgAgqAEAALECACCrAQAABwAgrAEAAAcAIK0BAAABACALFgAA-QEAMBcAAP4BADCnAQAA-gEAMKgBAAD7AQAwqQEAAPwBACCqAQAA_QEAMKsBAAD9AQAwrAEAAP0BADCtAQAA_QEAMK4BAAD_AQAwrwEAAIACADAHgwECAAAAAYkBQAAAAAGSAQEAAAABkwEBAAAAAZQBAQAAAAGVAQIAAAABlgECAAAAAQIAAAALACAWAACEAgAgAwAAAAsAIBYAAIQCACAXAACDAgAgAQ8AALACADAMBAAAzgEAIHIAAMwBADBzAAAJABB0AADMAQAwgwECAAAAAYkBQACwAQAhkQECAM0BACGSAQEArwEAIZMBAQAAAAGUAQEArwEAIZUBAgC-AQAhlgECAL4BACECAAAACwAgDwAAgwIAIAIAAACBAgAgDwAAggIAIAtyAACAAgAwcwAAgQIAEHQAAIACADCDAQIAvgEAIYkBQACwAQAhkQECAM0BACGSAQEArwEAIZMBAQCvAQAhlAEBAK8BACGVAQIAvgEAIZYBAgC-AQAhC3IAAIACADBzAACBAgAQdAAAgAIAMIMBAgC-AQAhiQFAALABACGRAQIAzQEAIZIBAQCvAQAhkwEBAK8BACGUAQEArwEAIZUBAgC-AQAhlgECAL4BACEHgwECAOEBACGJAUAA2QEAIZIBAQDYAQAhkwEBANgBACGUAQEA2AEAIZUBAgDhAQAhlgECAOEBACEHgwECAOEBACGJAUAA2QEAIZIBAQDYAQAhkwEBANgBACGUAQEA2AEAIZUBAgDhAQAhlgECAOEBACEHgwECAAAAAYkBQAAAAAGSAQEAAAABkwEBAAAAAZQBAQAAAAGVAQIAAAABlgECAAAAAQMWAACuAgAgpwEAAK8CACCtAQAAAQAgBBYAAPkBADCnAQAA-gEAMKkBAAD8AQAgrQEAAP0BADAAAAABqgFAAAAAAQsWAACZAgAwFwAAngIAMKcBAACaAgAwqAEAAJsCADCpAQAAnAIAIKoBAACdAgAwqwEAAJ0CADCsAQAAnQIAMK0BAACdAgAwrgEAAJ8CADCvAQAAoAIAMAsWAACNAgAwFwAAkgIAMKcBAACOAgAwqAEAAI8CADCpAQAAkAIAIKoBAACRAgAwqwEAAJECADCsAQAAkQIAMK0BAACRAgAwrgEAAJMCADCvAQAAlAIAMAaDAQIAAAABhQEBAAAAAYYBAQAAAAGHAQEAAAABiAEBAAAAAYkBQAAAAAECAAAAEQAgFgAAmAIAIAMAAAARACAWAACYAgAgFwAAlwIAIAEPAACtAgAwCwgAAMsBACByAADKAQAwcwAADwAQdAAAygEAMIMBAgAAAAGEAQEAvwEAIYUBAQCvAQAhhgEBAL8BACGHAQEAvwEAIYgBAQC_AQAhiQFAALABACECAAAAEQAgDwAAlwIAIAIAAACVAgAgDwAAlgIAIApyAACUAgAwcwAAlQIAEHQAAJQCADCDAQIAvgEAIYQBAQC_AQAhhQEBAK8BACGGAQEAvwEAIYcBAQC_AQAhiAEBAL8BACGJAUAAsAEAIQpyAACUAgAwcwAAlQIAEHQAAJQCADCDAQIAvgEAIYQBAQC_AQAhhQEBAK8BACGGAQEAvwEAIYcBAQC_AQAhiAEBAL8BACGJAUAAsAEAIQaDAQIA4QEAIYUBAQDYAQAhhgEBAOABACGHAQEA4AEAIYgBAQDgAQAhiQFAANkBACEGgwECAOEBACGFAQEA2AEAIYYBAQDgAQAhhwEBAOABACGIAQEA4AEAIYkBQADZAQAhBoMBAgAAAAGFAQEAAAABhgEBAAAAAYcBAQAAAAGIAQEAAAABiQFAAAAAAQwFAACGAgAgd0AAAAABgwECAAAAAYkBQAAAAAGNAQEAAAABjgEBAAAAAZABAQAAAAGXAQEAAAABmAEBAAAAAZkBIAAAAAGaAQIAAAABnAFAAAAAAQIAAAAFACAWAACkAgAgAwAAAAUAIBYAAKQCACAXAACjAgAgAQ8AAKwCADARAwAAywEAIAUAANQBACByAADTAQAwcwAAAwAQdAAA0wEAMHdAALABACGDAQIAAAABiQFAALABACGNAQEArwEAIY4BAQCvAQAhkAEBAK8BACGXAQEArwEAIZgBAQC_AQAhmQEgAMABACGaAQIAvgEAIZsBAQC_AQAhnAFAALABACECAAAABQAgDwAAowIAIAIAAAChAgAgDwAAogIAIA9yAACgAgAwcwAAoQIAEHQAAKACADB3QACwAQAhgwECAL4BACGJAUAAsAEAIY0BAQCvAQAhjgEBAK8BACGQAQEArwEAIZcBAQCvAQAhmAEBAL8BACGZASAAwAEAIZoBAgC-AQAhmwEBAL8BACGcAUAAsAEAIQ9yAACgAgAwcwAAoQIAEHQAAKACADB3QACwAQAhgwECAL4BACGJAUAAsAEAIY0BAQCvAQAhjgEBAK8BACGQAQEArwEAIZcBAQCvAQAhmAEBAL8BACGZASAAwAEAIZoBAgC-AQAhmwEBAL8BACGcAUAAsAEAIQt3QADZAQAhgwECAOEBACGJAUAA2QEAIY0BAQDYAQAhjgEBANgBACGQAQEA2AEAIZcBAQDYAQAhmAEBAOABACGZASAA6QEAIZoBAgDhAQAhnAFAANkBACEMBQAA-AEAIHdAANkBACGDAQIA4QEAIYkBQADZAQAhjQEBANgBACGOAQEA2AEAIZABAQDYAQAhlwEBANgBACGYAQEA4AEAIZkBIADpAQAhmgECAOEBACGcAUAA2QEAIQwFAACGAgAgd0AAAAABgwECAAAAAYkBQAAAAAGNAQEAAAABjgEBAAAAAZABAQAAAAGXAQEAAAABmAEBAAAAAZkBIAAAAAGaAQIAAAABnAFAAAAAAQQWAACZAgAwpwEAAJoCADCpAQAAnAIAIK0BAACdAgAwBBYAAI0CADCnAQAAjgIAMKkBAACQAgAgrQEAAJECADAAAAQHAACnAgAgCQAAqAIAIKABAADaAQAgoQEAANoBACAEAwAAqQIAIAUAAKsCACCYAQAA2gEAIJsBAADaAQAgAAt3QAAAAAGDAQIAAAABiQFAAAAAAY0BAQAAAAGOAQEAAAABkAEBAAAAAZcBAQAAAAGYAQEAAAABmQEgAAAAAZoBAgAAAAGcAUAAAAABBoMBAgAAAAGFAQEAAAABhgEBAAAAAYcBAQAAAAGIAQEAAAABiQFAAAAAAQoJAACmAgAgd0AAAAABgwEBAAAAAYkBQAAAAAGKAQEAAAABnQEBAAAAAZ4BAQAAAAGfAQEAAAABoAEBAAAAAaEBQAAAAAECAAAAAQAgFgAArgIAIAeDAQIAAAABiQFAAAAAAZIBAQAAAAGTAQEAAAABlAEBAAAAAZUBAgAAAAGWAQIAAAABAwAAAAcAIBYAAK4CACAXAACzAgAgDAAAAAcAIAkAAIwCACAPAACzAgAgd0AA2QEAIYMBAQDYAQAhiQFAANkBACGKAQEA2AEAIZ0BAQDYAQAhngEBANgBACGfAQEA2AEAIaABAQDgAQAhoQFAAIoCACEKCQAAjAIAIHdAANkBACGDAQEA2AEAIYkBQADZAQAhigEBANgBACGdAQEA2AEAIZ4BAQDYAQAhnwEBANgBACGgAQEA4AEAIaEBQACKAgAhDQMAAIUCACB3QAAAAAGDAQIAAAABiQFAAAAAAY0BAQAAAAGOAQEAAAABkAEBAAAAAZcBAQAAAAGYAQEAAAABmQEgAAAAAZoBAgAAAAGbAQEAAAABnAFAAAAAAQIAAAAFACAWAAC0AgAgAwAAAAMAIBYAALQCACAXAAC4AgAgDwAAAAMAIAMAAPcBACAPAAC4AgAgd0AA2QEAIYMBAgDhAQAhiQFAANkBACGNAQEA2AEAIY4BAQDYAQAhkAEBANgBACGXAQEA2AEAIZgBAQDgAQAhmQEgAOkBACGaAQIA4QEAIZsBAQDgAQAhnAFAANkBACENAwAA9wEAIHdAANkBACGDAQIA4QEAIYkBQADZAQAhjQEBANgBACGOAQEA2AEAIZABAQDYAQAhlwEBANgBACGYAQEA4AEAIZkBIADpAQAhmgECAOEBACGbAQEA4AEAIZwBQADZAQAhCgcAAKUCACB3QAAAAAGDAQEAAAABiQFAAAAAAYoBAQAAAAGdAQEAAAABngEBAAAAAZ8BAQAAAAGgAQEAAAABoQFAAAAAAQIAAAABACAWAAC5AgAgAwAAAAcAIBYAALkCACAXAAC9AgAgDAAAAAcAIAcAAIsCACAPAAC9AgAgd0AA2QEAIYMBAQDYAQAhiQFAANkBACGKAQEA2AEAIZ0BAQDYAQAhngEBANgBACGfAQEA2AEAIaABAQDgAQAhoQFAAIoCACEKBwAAiwIAIHdAANkBACGDAQEA2AEAIYkBQADZAQAhigEBANgBACGdAQEA2AEAIZ4BAQDYAQAhnwEBANgBACGgAQEA4AEAIaEBQACKAgAhAwYABgcGAgkSBQMDCAEFDAMGAAQBBA0CAQUOAAEIEwECBxQACRUAAAAAAwYACxwADB0ADQAAAAMGAAscAAwdAA0BAzYBAQM8AQUGABIcABUdABYuABMvABQAAAAAAAUGABIcABUdABYuABMvABQBBE4CAQRUAgUGABscAB4dAB8uABwvAB0AAAAAAAUGABscAB4dAB8uABwvAB0AAAAFBgAlHAAoHQApLgAmLwAnAAAAAAAFBgAlHAAoHQApLgAmLwAnAQh_AQEIhQEBBQYALhwAMR0AMi4ALy8AMAAAAAAABQYALhwAMR0AMi4ALy8AMAAAAAMGADgcADkdADoAAAADBgA4HAA5HQA6CgIBCxYBDBgBDRkBDhoBEBwBER4HEh8IEyEBFCMHFSQJGCUBGSYBGicHHioKHysOICwCIS0CIi4CIy8CJDACJTICJjQHJzUPKDgCKToHKjsQKz0CLD4CLT8HMEIRMUMXMkQDM0UDNEYDNUcDNkgDN0oDOEwHOU0YOlADO1IHPFMZPVUDPlYDP1cHQFoaQVsgQl0hQ14hRGEhRWIhRmMhR2UhSGcHSWgiSmohS2wHTG0jTW4hTm8hT3AHUHMkUXQqUnUFU3YFVHcFVXgFVnkFV3sFWH0HWX4rWoEBBVuDAQdchAEsXYYBBV6HAQVfiAEHYIsBLWGMATNijgE0Y48BNGSSATRlkwE0ZpQBNGeWATRomAEHaZkBNWqbATRrnQEHbJ4BNm2fATRuoAE0b6EBB3CkATdxpQE7" +} + +async function decodeBase64AsWasm(wasmBase64: string): Promise { + const { Buffer } = await import('node:buffer') + const wasmArray = Buffer.from(wasmBase64, 'base64') + return new WebAssembly.Module(wasmArray) +} + +config.compilerWasm = { + getRuntime: async () => await import("@prisma/client/runtime/query_compiler_fast_bg.sqlite.mjs"), + + getQueryCompilerWasmModule: async () => { + const { wasm } = await import("@prisma/client/runtime/query_compiler_fast_bg.sqlite.wasm-base64.mjs") + return await decodeBase64AsWasm(wasm) + }, + + importName: "./query_compiler_fast_bg.js" +} + + + +export type LogOptions = + 'log' extends keyof ClientOptions ? ClientOptions['log'] extends Array ? Prisma.GetEvents : never : never + +export interface PrismaClientConstructor { + /** + * ## Prisma Client + * + * Type-safe database client for TypeScript + * @example + * ``` + * const prisma = new PrismaClient({ + * adapter: new PrismaPg({ connectionString: process.env.DATABASE_URL }) + * }) + * // Fetch zero or more AdminUsers + * const adminUsers = await prisma.adminUser.findMany() + * ``` + * + * Read more in our [docs](https://pris.ly/d/client). + */ + + new < + Options extends Prisma.PrismaClientOptions = Prisma.PrismaClientOptions, + LogOpts extends LogOptions = LogOptions, + OmitOpts extends Prisma.PrismaClientOptions['omit'] = Options extends { omit: infer U } ? U : Prisma.PrismaClientOptions['omit'], + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs + >(options: Prisma.PrismaClientConstructorArgs): PrismaClient +} + +/** + * ## Prisma Client + * + * Type-safe database client for TypeScript + * @example + * ``` + * const prisma = new PrismaClient({ + * adapter: new PrismaPg({ connectionString: process.env.DATABASE_URL }) + * }) + * // Fetch zero or more AdminUsers + * const adminUsers = await prisma.adminUser.findMany() + * ``` + * + * Read more in our [docs](https://pris.ly/d/client). + */ + +export interface PrismaClient< + in LogOpts extends Prisma.LogLevel = never, + in out OmitOpts extends Prisma.PrismaClientOptions['omit'] = Prisma.PrismaClientOptions['omit'], + in out ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs +> { + [K: symbol]: { types: Prisma.TypeMap['other'] } + + $on(eventType: V, callback: (event: V extends 'query' ? Prisma.QueryEvent : Prisma.LogEvent) => void): PrismaClient; + + /** + * Connect with the database + */ + $connect(): runtime.Types.Utils.JsPromise; + + /** + * Disconnect from the database + */ + $disconnect(): runtime.Types.Utils.JsPromise; + +/** + * 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://pris.ly/d/raw-queries). + */ + $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://pris.ly/d/raw-queries). + */ + $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://pris.ly/d/raw-queries). + */ + $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://pris.ly/d/raw-queries). + */ + $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/orm/prisma-client/queries/transactions). + */ + $transaction

[]>(arg: [...P], options?: { maxWait?: number, timeout?: number, isolationLevel?: Prisma.TransactionIsolationLevel }): runtime.Types.Utils.JsPromise> + + $transaction(fn: (prisma: Omit) => runtime.Types.Utils.JsPromise, options?: { maxWait?: number, timeout?: number, isolationLevel?: Prisma.TransactionIsolationLevel }): runtime.Types.Utils.JsPromise + + $extends: runtime.Types.Extensions.ExtendsHook<"extends", Prisma.TypeMapCb, ExtArgs, runtime.Types.Utils.Call, { + extArgs: ExtArgs + }>> + + /** + * `prisma.adminUser`: Exposes CRUD operations for the **AdminUser** model. + * Example usage: + * ```ts + * // Fetch zero or more AdminUsers + * const adminUsers = await prisma.adminUser.findMany() + * ``` + */ + get adminUser(): Prisma.AdminUserDelegate; + + /** + * `prisma.post`: Exposes CRUD operations for the **Post** model. + * Example usage: + * ```ts + * // Fetch zero or more Posts + * const posts = await prisma.post.findMany() + * ``` + */ + get post(): Prisma.PostDelegate; + + /** + * `prisma.attachment`: Exposes CRUD operations for the **Attachment** model. + * Example usage: + * ```ts + * // Fetch zero or more Attachments + * const attachments = await prisma.attachment.findMany() + * ``` + */ + get attachment(): Prisma.AttachmentDelegate; + + /** + * `prisma.inquiry`: Exposes CRUD operations for the **Inquiry** model. + * Example usage: + * ```ts + * // Fetch zero or more Inquiries + * const inquiries = await prisma.inquiry.findMany() + * ``` + */ + get inquiry(): Prisma.InquiryDelegate; + + /** + * `prisma.auditLog`: Exposes CRUD operations for the **AuditLog** model. + * Example usage: + * ```ts + * // Fetch zero or more AuditLogs + * const auditLogs = await prisma.auditLog.findMany() + * ``` + */ + get auditLog(): Prisma.AuditLogDelegate; + + /** + * `prisma.setting`: Exposes CRUD operations for the **Setting** model. + * Example usage: + * ```ts + * // Fetch zero or more Settings + * const settings = await prisma.setting.findMany() + * ``` + */ + get setting(): Prisma.SettingDelegate; +} + +export function getPrismaClientClass(): PrismaClientConstructor { + return runtime.getPrismaClient(config) as unknown as PrismaClientConstructor +} diff --git a/src/generated/prisma/internal/prismaNamespace.ts b/src/generated/prisma/internal/prismaNamespace.ts new file mode 100644 index 0000000..32cb1a1 --- /dev/null +++ b/src/generated/prisma/internal/prismaNamespace.ts @@ -0,0 +1,1265 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * WARNING: This is an internal file that is subject to change! + * + * 🛑 Under no circumstances should you import this file directly! 🛑 + * + * All exports from this file are wrapped under a `Prisma` namespace object in the client.ts file. + * While this enables partial backward compatibility, it is not part of the stable public API. + * + * If you are looking for your Models, Enums, and Input Types, please import them from the respective + * model files in the `model` directory! + */ + +import * as runtime from "@prisma/client/runtime/client" +import type * as Prisma from "../models" +import { type PrismaClient } from "./class" + +export type * from '../models' + +export type DMMF = typeof runtime.DMMF + +export type PrismaPromise = runtime.Types.Public.PrismaPromise + +/** + * Prisma Errors + */ + +export const PrismaClientKnownRequestError = runtime.PrismaClientKnownRequestError +export type PrismaClientKnownRequestError = runtime.PrismaClientKnownRequestError + +export const PrismaClientUnknownRequestError = runtime.PrismaClientUnknownRequestError +export type PrismaClientUnknownRequestError = runtime.PrismaClientUnknownRequestError + +export const PrismaClientRustPanicError = runtime.PrismaClientRustPanicError +export type PrismaClientRustPanicError = runtime.PrismaClientRustPanicError + +export const PrismaClientInitializationError = runtime.PrismaClientInitializationError +export type PrismaClientInitializationError = runtime.PrismaClientInitializationError + +export const PrismaClientValidationError = runtime.PrismaClientValidationError +export type PrismaClientValidationError = runtime.PrismaClientValidationError + +/** + * Re-export of sql-template-tag + */ +export const sql = runtime.sqltag +export const empty = runtime.empty +export const join = runtime.join +export const raw = runtime.raw +export const Sql = runtime.Sql +export type Sql = runtime.Sql + + + +/** + * Decimal.js + */ +export const Decimal = runtime.Decimal +export type Decimal = runtime.Decimal + +export type DecimalJsLike = runtime.DecimalJsLike + +/** +* Extensions +*/ +export type Extension = runtime.Types.Extensions.UserArgs +export const getExtensionContext = runtime.Extensions.getExtensionContext +export type Args = runtime.Types.Public.Args +export type Payload = runtime.Types.Public.Payload +export type Result = runtime.Types.Public.Result +export type Exact = runtime.Types.Public.Exact + +export type PrismaVersion = { + client: string + engine: string +} + +/** + * Prisma Client JS version: 7.10.1 + * Query Engine version: d1b3f377ca835d73fd50954a5e22128b9ebdd6b8 + */ +export const prismaVersion: PrismaVersion = { + client: "7.10.1", + engine: "d1b3f377ca835d73fd50954a5e22128b9ebdd6b8" +} + +/** + * Utility Types + */ + +export type Bytes = runtime.Bytes +export type JsonObject = runtime.JsonObject +export type JsonArray = runtime.JsonArray +export type JsonValue = runtime.JsonValue +export type InputJsonObject = runtime.InputJsonObject +export type InputJsonArray = runtime.InputJsonArray +export type InputJsonValue = runtime.InputJsonValue + + +export const NullTypes = { + DbNull: runtime.NullTypes.DbNull as (new (secret: never) => typeof runtime.DbNull), + JsonNull: runtime.NullTypes.JsonNull as (new (secret: never) => typeof runtime.JsonNull), + AnyNull: runtime.NullTypes.AnyNull as (new (secret: never) => typeof runtime.AnyNull), +} +/** + * 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 = runtime.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 = runtime.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 = runtime.AnyNull + + +type SelectAndInclude = { + select: any + include: any +} + +type SelectAndOmit = { + select: any + omit: any +} + +/** + * 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; + +/** + * 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; +}; + +/** + * Resolved type of the argument passed to the `PrismaClient` constructor. + * + * When called without a narrower options type (the common case), this resolves + * to `PrismaClientOptions` directly, which produces a clear TypeScript error + * message (`not assignable to parameter of type 'PrismaClientOptions'`) when + * the argument is missing or incomplete. When the user supplies a narrower + * options type (e.g. via a literal), it falls back to `Subset` to keep + * filtering out unknown properties. + */ +export type PrismaClientConstructorArgs = + [PrismaClientOptions] extends [Options] ? PrismaClientOptions : Subset; + +/** + * 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 + */ +export type XOR = + T extends object ? + U extends object ? + ((Without & U) | (Without & T)) & object + : 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] + +export type Either< + O extends object, + K extends Key, + strict extends Boolean = 1 +> = O extends unknown ? _Either : never + +export type Union = any + +export 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 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 +export 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 ? P : 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>>; + +export type Boolean = True | False + +export type True = 1 + +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 + +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 + +export 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 +export type MaybeTupleToUnion = T extends any[] ? TupleToUnion : T + +/** + * Like `Pick`, but additionally can also accept an array of keys + */ +export type PickEnumerable | keyof T> = Prisma__Pick> + +/** + * Exclude all keys with underscores + */ +export type ExcludeUnderscoreKeys = T extends `_${string}` ? never : T + + +export type FieldRef = runtime.FieldRef + +type FieldRefInputType = Model extends never ? never : FieldRef + + +export const ModelName = { + AdminUser: 'AdminUser', + Post: 'Post', + Attachment: 'Attachment', + Inquiry: 'Inquiry', + AuditLog: 'AuditLog', + Setting: 'Setting' +} as const + +export type ModelName = (typeof ModelName)[keyof typeof ModelName] + + + +export interface TypeMapCb extends runtime.Types.Utils.Fn<{extArgs: runtime.Types.Extensions.InternalArgs }, runtime.Types.Utils.Record> { + returns: TypeMap +} + +export type TypeMap = { + globalOmitOptions: { + omit: GlobalOmitOptions + } + meta: { + modelProps: "adminUser" | "post" | "attachment" | "inquiry" | "auditLog" | "setting" + txIsolationLevel: TransactionIsolationLevel + } + model: { + AdminUser: { + payload: Prisma.$AdminUserPayload + fields: Prisma.AdminUserFieldRefs + operations: { + findUnique: { + args: Prisma.AdminUserFindUniqueArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.AdminUserFindUniqueOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findFirst: { + args: Prisma.AdminUserFindFirstArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.AdminUserFindFirstOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findMany: { + args: Prisma.AdminUserFindManyArgs + result: runtime.Types.Utils.PayloadToResult[] + } + create: { + args: Prisma.AdminUserCreateArgs + result: runtime.Types.Utils.PayloadToResult + } + createMany: { + args: Prisma.AdminUserCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.AdminUserCreateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + delete: { + args: Prisma.AdminUserDeleteArgs + result: runtime.Types.Utils.PayloadToResult + } + update: { + args: Prisma.AdminUserUpdateArgs + result: runtime.Types.Utils.PayloadToResult + } + deleteMany: { + args: Prisma.AdminUserDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.AdminUserUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.AdminUserUpdateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + upsert: { + args: Prisma.AdminUserUpsertArgs + result: runtime.Types.Utils.PayloadToResult + } + aggregate: { + args: Prisma.AdminUserAggregateArgs + result: runtime.Types.Utils.Optional + } + groupBy: { + args: Prisma.AdminUserGroupByArgs + result: runtime.Types.Utils.Optional[] + } + count: { + args: Prisma.AdminUserCountArgs + result: runtime.Types.Utils.Optional | number + } + } + } + Post: { + payload: Prisma.$PostPayload + fields: Prisma.PostFieldRefs + operations: { + findUnique: { + args: Prisma.PostFindUniqueArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.PostFindUniqueOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findFirst: { + args: Prisma.PostFindFirstArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.PostFindFirstOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findMany: { + args: Prisma.PostFindManyArgs + result: runtime.Types.Utils.PayloadToResult[] + } + create: { + args: Prisma.PostCreateArgs + result: runtime.Types.Utils.PayloadToResult + } + createMany: { + args: Prisma.PostCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.PostCreateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + delete: { + args: Prisma.PostDeleteArgs + result: runtime.Types.Utils.PayloadToResult + } + update: { + args: Prisma.PostUpdateArgs + result: runtime.Types.Utils.PayloadToResult + } + deleteMany: { + args: Prisma.PostDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.PostUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.PostUpdateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + upsert: { + args: Prisma.PostUpsertArgs + result: runtime.Types.Utils.PayloadToResult + } + aggregate: { + args: Prisma.PostAggregateArgs + result: runtime.Types.Utils.Optional + } + groupBy: { + args: Prisma.PostGroupByArgs + result: runtime.Types.Utils.Optional[] + } + count: { + args: Prisma.PostCountArgs + result: runtime.Types.Utils.Optional | number + } + } + } + Attachment: { + payload: Prisma.$AttachmentPayload + fields: Prisma.AttachmentFieldRefs + operations: { + findUnique: { + args: Prisma.AttachmentFindUniqueArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.AttachmentFindUniqueOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findFirst: { + args: Prisma.AttachmentFindFirstArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.AttachmentFindFirstOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findMany: { + args: Prisma.AttachmentFindManyArgs + result: runtime.Types.Utils.PayloadToResult[] + } + create: { + args: Prisma.AttachmentCreateArgs + result: runtime.Types.Utils.PayloadToResult + } + createMany: { + args: Prisma.AttachmentCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.AttachmentCreateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + delete: { + args: Prisma.AttachmentDeleteArgs + result: runtime.Types.Utils.PayloadToResult + } + update: { + args: Prisma.AttachmentUpdateArgs + result: runtime.Types.Utils.PayloadToResult + } + deleteMany: { + args: Prisma.AttachmentDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.AttachmentUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.AttachmentUpdateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + upsert: { + args: Prisma.AttachmentUpsertArgs + result: runtime.Types.Utils.PayloadToResult + } + aggregate: { + args: Prisma.AttachmentAggregateArgs + result: runtime.Types.Utils.Optional + } + groupBy: { + args: Prisma.AttachmentGroupByArgs + result: runtime.Types.Utils.Optional[] + } + count: { + args: Prisma.AttachmentCountArgs + result: runtime.Types.Utils.Optional | number + } + } + } + Inquiry: { + payload: Prisma.$InquiryPayload + fields: Prisma.InquiryFieldRefs + operations: { + findUnique: { + args: Prisma.InquiryFindUniqueArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.InquiryFindUniqueOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findFirst: { + args: Prisma.InquiryFindFirstArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.InquiryFindFirstOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findMany: { + args: Prisma.InquiryFindManyArgs + result: runtime.Types.Utils.PayloadToResult[] + } + create: { + args: Prisma.InquiryCreateArgs + result: runtime.Types.Utils.PayloadToResult + } + createMany: { + args: Prisma.InquiryCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.InquiryCreateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + delete: { + args: Prisma.InquiryDeleteArgs + result: runtime.Types.Utils.PayloadToResult + } + update: { + args: Prisma.InquiryUpdateArgs + result: runtime.Types.Utils.PayloadToResult + } + deleteMany: { + args: Prisma.InquiryDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.InquiryUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.InquiryUpdateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + upsert: { + args: Prisma.InquiryUpsertArgs + result: runtime.Types.Utils.PayloadToResult + } + aggregate: { + args: Prisma.InquiryAggregateArgs + result: runtime.Types.Utils.Optional + } + groupBy: { + args: Prisma.InquiryGroupByArgs + result: runtime.Types.Utils.Optional[] + } + count: { + args: Prisma.InquiryCountArgs + result: runtime.Types.Utils.Optional | number + } + } + } + AuditLog: { + payload: Prisma.$AuditLogPayload + fields: Prisma.AuditLogFieldRefs + operations: { + findUnique: { + args: Prisma.AuditLogFindUniqueArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.AuditLogFindUniqueOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findFirst: { + args: Prisma.AuditLogFindFirstArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.AuditLogFindFirstOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findMany: { + args: Prisma.AuditLogFindManyArgs + result: runtime.Types.Utils.PayloadToResult[] + } + create: { + args: Prisma.AuditLogCreateArgs + result: runtime.Types.Utils.PayloadToResult + } + createMany: { + args: Prisma.AuditLogCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.AuditLogCreateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + delete: { + args: Prisma.AuditLogDeleteArgs + result: runtime.Types.Utils.PayloadToResult + } + update: { + args: Prisma.AuditLogUpdateArgs + result: runtime.Types.Utils.PayloadToResult + } + deleteMany: { + args: Prisma.AuditLogDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.AuditLogUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.AuditLogUpdateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + upsert: { + args: Prisma.AuditLogUpsertArgs + result: runtime.Types.Utils.PayloadToResult + } + aggregate: { + args: Prisma.AuditLogAggregateArgs + result: runtime.Types.Utils.Optional + } + groupBy: { + args: Prisma.AuditLogGroupByArgs + result: runtime.Types.Utils.Optional[] + } + count: { + args: Prisma.AuditLogCountArgs + result: runtime.Types.Utils.Optional | number + } + } + } + Setting: { + payload: Prisma.$SettingPayload + fields: Prisma.SettingFieldRefs + operations: { + findUnique: { + args: Prisma.SettingFindUniqueArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.SettingFindUniqueOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findFirst: { + args: Prisma.SettingFindFirstArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.SettingFindFirstOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findMany: { + args: Prisma.SettingFindManyArgs + result: runtime.Types.Utils.PayloadToResult[] + } + create: { + args: Prisma.SettingCreateArgs + result: runtime.Types.Utils.PayloadToResult + } + createMany: { + args: Prisma.SettingCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.SettingCreateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + delete: { + args: Prisma.SettingDeleteArgs + result: runtime.Types.Utils.PayloadToResult + } + update: { + args: Prisma.SettingUpdateArgs + result: runtime.Types.Utils.PayloadToResult + } + deleteMany: { + args: Prisma.SettingDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.SettingUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.SettingUpdateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + upsert: { + args: Prisma.SettingUpsertArgs + result: runtime.Types.Utils.PayloadToResult + } + aggregate: { + args: Prisma.SettingAggregateArgs + result: runtime.Types.Utils.Optional + } + groupBy: { + args: Prisma.SettingGroupByArgs + result: runtime.Types.Utils.Optional[] + } + count: { + args: Prisma.SettingCountArgs + result: runtime.Types.Utils.Optional | number + } + } + } + } +} & { + other: { + payload: any + operations: { + $executeRaw: { + args: [query: TemplateStringsArray | Sql, ...values: any[]], + result: any + } + $executeRawUnsafe: { + args: [query: string, ...values: any[]], + result: any + } + $queryRaw: { + args: [query: TemplateStringsArray | Sql, ...values: any[]], + result: any + } + $queryRawUnsafe: { + args: [query: string, ...values: any[]], + result: any + } + } + } +} + +/** + * Enums + */ + +export const TransactionIsolationLevel = runtime.makeStrictEnum({ + Serializable: 'Serializable' +} as const) + +export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel] + + +export const AdminUserScalarFieldEnum = { + id: 'id', + loginId: 'loginId', + passwordHash: 'passwordHash', + name: 'name', + role: 'role', + totpSecret: 'totpSecret', + lastLoginAt: 'lastLoginAt', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +} as const + +export type AdminUserScalarFieldEnum = (typeof AdminUserScalarFieldEnum)[keyof typeof AdminUserScalarFieldEnum] + + +export const PostScalarFieldEnum = { + id: 'id', + type: 'type', + category: 'category', + title: 'title', + content: 'content', + isPinned: 'isPinned', + status: 'status', + viewCount: 'viewCount', + authorId: 'authorId', + publishedAt: 'publishedAt', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +} as const + +export type PostScalarFieldEnum = (typeof PostScalarFieldEnum)[keyof typeof PostScalarFieldEnum] + + +export const AttachmentScalarFieldEnum = { + id: 'id', + postId: 'postId', + originalName: 'originalName', + storageKey: 'storageKey', + mimeType: 'mimeType', + size: 'size', + downloadCount: 'downloadCount', + createdAt: 'createdAt' +} as const + +export type AttachmentScalarFieldEnum = (typeof AttachmentScalarFieldEnum)[keyof typeof AttachmentScalarFieldEnum] + + +export const InquiryScalarFieldEnum = { + id: 'id', + name: 'name', + email: 'email', + phone: 'phone', + title: 'title', + content: 'content', + consent: 'consent', + status: 'status', + ip: 'ip', + createdAt: 'createdAt' +} as const + +export type InquiryScalarFieldEnum = (typeof InquiryScalarFieldEnum)[keyof typeof InquiryScalarFieldEnum] + + +export const AuditLogScalarFieldEnum = { + id: 'id', + adminId: 'adminId', + action: 'action', + targetType: 'targetType', + targetId: 'targetId', + ip: 'ip', + createdAt: 'createdAt' +} as const + +export type AuditLogScalarFieldEnum = (typeof AuditLogScalarFieldEnum)[keyof typeof AuditLogScalarFieldEnum] + + +export const SettingScalarFieldEnum = { + key: 'key', + value: 'value', + updatedAt: 'updatedAt' +} as const + +export type SettingScalarFieldEnum = (typeof SettingScalarFieldEnum)[keyof typeof SettingScalarFieldEnum] + + +export const SortOrder = { + asc: 'asc', + desc: 'desc' +} as const + +export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder] + + +export const NullsOrder = { + first: 'first', + last: 'last' +} as const + +export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder] + + + +/** + * Field references + */ + + +/** + * Reference to a field of type 'String' + */ +export type StringFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'String'> + + + +/** + * Reference to a field of type 'DateTime' + */ +export type DateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'DateTime'> + + + +/** + * Reference to a field of type 'Int' + */ +export type IntFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Int'> + + + +/** + * Reference to a field of type 'Boolean' + */ +export type BooleanFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Boolean'> + + + +/** + * Reference to a field of type 'Float' + */ +export type FloatFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Float'> + + +/** + * Batch Payload for updateMany & deleteMany & createMany + */ +export type BatchPayload = { + count: number +} + +export const defineExtension = runtime.Extensions.defineExtension as unknown as runtime.Types.Extensions.ExtendsHook<"define", TypeMapCb, runtime.Types.Extensions.DefaultArgs> +export type DefaultPrismaClient = PrismaClient +export type ErrorFormat = 'pretty' | 'colorless' | 'minimal' +/** + * Options common to all variants of `PrismaClientOptions`, regardless of whether you connect to your database through a driver adapter or through Prisma Accelerate. + */ +export interface PrismaClientBaseOptions { + /** + * @default "colorless" + */ + errorFormat?: ErrorFormat + /** + * @example + * ``` + * // Shorthand for `emit: 'stdout'` + * log: ['query', 'info', 'warn', 'error'] + * + * // Emit as events only + * log: [ + * { emit: 'event', level: 'query' }, + * { emit: 'event', level: 'info' }, + * { emit: 'event', level: 'warn' } + * { emit: 'event', level: 'error' } + * ] + * + * / Emit as events and log to stdout + * og: [ + * { emit: 'stdout', level: 'query' }, + * { emit: 'stdout', level: 'info' }, + * { emit: 'stdout', level: 'warn' } + * { emit: 'stdout', level: 'error' } + * + * ``` + * Read more in our [docs](https://pris.ly/d/logging). + */ + log?: (LogLevel | LogDefinition)[] + /** + * The default values for transactionOptions + * maxWait ?= 2000 + * timeout ?= 5000 + */ + transactionOptions?: { + maxWait?: number + timeout?: number + isolationLevel?: TransactionIsolationLevel + } + /** + * Global configuration for omitting model fields by default. + * + * @example + * ``` + * const prisma = new PrismaClient({ + * omit: { + * user: { + * password: true + * } + * } + * }) + * ``` + */ + omit?: GlobalOmitConfig + /** + * SQL commenter plugins that add metadata to SQL queries as comments. + * Comments follow the sqlcommenter format: https://google.github.io/sqlcommenter/ + * + * @example + * ``` + * const prisma = new PrismaClient({ + * adapter, + * comments: [ + * traceContext(), + * queryInsights(), + * ], + * }) + * ``` + */ + comments?: runtime.SqlCommenterPlugin[] + /** + * Optional maximum size for the query plan cache. If not provided, a default size will be used. + * A value of `0` can be used to disable the cache entirely. A higher cache size can improve + * performance for applications that execute a large number of unique queries, while a smaller + * cache size can reduce memory usage. + * + * @example + * ``` + * const prisma = new PrismaClient({ + * adapter, + * queryPlanCacheMaxSize: 100, + * }) + * ``` + */ + queryPlanCacheMaxSize?: number +} + +/** + * `PrismaClient` options for connecting to your database through Prisma Accelerate instead of a driver adapter. + * + * Learn more: https://pris.ly/d/accelerate + */ +export interface PrismaClientOptionsWithAccelerateUrl extends PrismaClientBaseOptions { + /** + * The Prisma Accelerate connection URL. Use this option to connect to your database through Prisma Accelerate instead of using a driver adapter to connect directly. + * + * Learn more: https://pris.ly/d/accelerate + */ + accelerateUrl: string + adapter?: never +} + +/** + * `PrismaClient` options for connecting to your database through a driver adapter. This is the common case in Prisma 7. + * + * Learn more: https://pris.ly/d/driver-adapters + */ +export interface PrismaClientOptionsWithAdapter extends PrismaClientBaseOptions { + /** + * A driver adapter that PrismaClient uses to connect to your database, such as the ones provided by `@prisma/adapter-pg`, `@prisma/adapter-libsql`, `@prisma/adapter-planetscale`, etc. + * + * A driver adapter is **required** unless you connect to your database through Prisma Accelerate (in which case use `accelerateUrl` instead). + * + * Learn more: https://pris.ly/d/driver-adapters + * + * @example + * ```ts + * import { PrismaPg } from '@prisma/adapter-pg' + * import { PrismaClient } from './generated/prisma/client' + * + * const adapter = new PrismaPg({ connectionString: process.env.DATABASE_URL }) + * const prisma = new PrismaClient({ adapter }) + * ``` + */ + adapter: runtime.SqlDriverAdapterFactory + accelerateUrl?: never +} + +/** + * Options passed to the `PrismaClient` constructor. + * + * A driver adapter (or, alternatively, a Prisma Accelerate URL) is **required**. See {@link PrismaClientOptionsWithAdapter} and {@link PrismaClientOptionsWithAccelerateUrl} for the two variants. All other properties live in {@link PrismaClientBaseOptions} and are optional. + * + * Learn more about driver adapters: https://pris.ly/d/driver-adapters + */ +export type PrismaClientOptions = PrismaClientOptionsWithAccelerateUrl | PrismaClientOptionsWithAdapter +export type GlobalOmitConfig = { + adminUser?: Prisma.AdminUserOmit + post?: Prisma.PostOmit + attachment?: Prisma.AttachmentOmit + inquiry?: Prisma.InquiryOmit + auditLog?: Prisma.AuditLogOmit + setting?: Prisma.SettingOmit +} + +/* Types for Logging */ +export type LogLevel = 'info' | 'query' | 'warn' | 'error' +export type LogDefinition = { + level: LogLevel + emit: 'stdout' | 'event' +} + +export type CheckIsLogLevel = T extends LogLevel ? T : never; + +export type GetLogType = CheckIsLogLevel< + T extends LogDefinition ? T['level'] : T +>; + +export type GetEvents = T extends Array + ? 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' + | 'updateManyAndReturn' + | 'upsert' + | 'delete' + | 'deleteMany' + | 'executeRaw' + | 'queryRaw' + | 'aggregate' + | 'count' + | 'runCommandRaw' + | 'findRaw' + | 'groupBy' + +/** + * `PrismaClient` proxy available in interactive transactions. + */ +export type TransactionClient = Omit + diff --git a/src/generated/prisma/internal/prismaNamespaceBrowser.ts b/src/generated/prisma/internal/prismaNamespaceBrowser.ts new file mode 100644 index 0000000..8147114 --- /dev/null +++ b/src/generated/prisma/internal/prismaNamespaceBrowser.ts @@ -0,0 +1,174 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * WARNING: This is an internal file that is subject to change! + * + * 🛑 Under no circumstances should you import this file directly! 🛑 + * + * All exports from this file are wrapped under a `Prisma` namespace object in the browser.ts file. + * While this enables partial backward compatibility, it is not part of the stable public API. + * + * If you are looking for your Models, Enums, and Input Types, please import them from the respective + * model files in the `model` directory! + */ + +import * as runtime from "@prisma/client/runtime/index-browser" + +export type * from '../models' +export type * from './prismaNamespace' + +export const Decimal = runtime.Decimal + + +export const NullTypes = { + DbNull: runtime.NullTypes.DbNull as (new (secret: never) => typeof runtime.DbNull), + JsonNull: runtime.NullTypes.JsonNull as (new (secret: never) => typeof runtime.JsonNull), + AnyNull: runtime.NullTypes.AnyNull as (new (secret: never) => typeof runtime.AnyNull), +} +/** + * 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 = runtime.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 = runtime.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 = runtime.AnyNull + + +export const ModelName = { + AdminUser: 'AdminUser', + Post: 'Post', + Attachment: 'Attachment', + Inquiry: 'Inquiry', + AuditLog: 'AuditLog', + Setting: 'Setting' +} as const + +export type ModelName = (typeof ModelName)[keyof typeof ModelName] + +/* + * Enums + */ + +export const TransactionIsolationLevel = runtime.makeStrictEnum({ + Serializable: 'Serializable' +} as const) + +export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel] + + +export const AdminUserScalarFieldEnum = { + id: 'id', + loginId: 'loginId', + passwordHash: 'passwordHash', + name: 'name', + role: 'role', + totpSecret: 'totpSecret', + lastLoginAt: 'lastLoginAt', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +} as const + +export type AdminUserScalarFieldEnum = (typeof AdminUserScalarFieldEnum)[keyof typeof AdminUserScalarFieldEnum] + + +export const PostScalarFieldEnum = { + id: 'id', + type: 'type', + category: 'category', + title: 'title', + content: 'content', + isPinned: 'isPinned', + status: 'status', + viewCount: 'viewCount', + authorId: 'authorId', + publishedAt: 'publishedAt', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +} as const + +export type PostScalarFieldEnum = (typeof PostScalarFieldEnum)[keyof typeof PostScalarFieldEnum] + + +export const AttachmentScalarFieldEnum = { + id: 'id', + postId: 'postId', + originalName: 'originalName', + storageKey: 'storageKey', + mimeType: 'mimeType', + size: 'size', + downloadCount: 'downloadCount', + createdAt: 'createdAt' +} as const + +export type AttachmentScalarFieldEnum = (typeof AttachmentScalarFieldEnum)[keyof typeof AttachmentScalarFieldEnum] + + +export const InquiryScalarFieldEnum = { + id: 'id', + name: 'name', + email: 'email', + phone: 'phone', + title: 'title', + content: 'content', + consent: 'consent', + status: 'status', + ip: 'ip', + createdAt: 'createdAt' +} as const + +export type InquiryScalarFieldEnum = (typeof InquiryScalarFieldEnum)[keyof typeof InquiryScalarFieldEnum] + + +export const AuditLogScalarFieldEnum = { + id: 'id', + adminId: 'adminId', + action: 'action', + targetType: 'targetType', + targetId: 'targetId', + ip: 'ip', + createdAt: 'createdAt' +} as const + +export type AuditLogScalarFieldEnum = (typeof AuditLogScalarFieldEnum)[keyof typeof AuditLogScalarFieldEnum] + + +export const SettingScalarFieldEnum = { + key: 'key', + value: 'value', + updatedAt: 'updatedAt' +} as const + +export type SettingScalarFieldEnum = (typeof SettingScalarFieldEnum)[keyof typeof SettingScalarFieldEnum] + + +export const SortOrder = { + asc: 'asc', + desc: 'desc' +} as const + +export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder] + + +export const NullsOrder = { + first: 'first', + last: 'last' +} as const + +export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder] + diff --git a/src/generated/prisma/models.ts b/src/generated/prisma/models.ts new file mode 100644 index 0000000..8bff06e --- /dev/null +++ b/src/generated/prisma/models.ts @@ -0,0 +1,17 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * This is a barrel export file for all models and their related types. + * + * 🟢 You can import this file directly. + */ +export type * from './models/AdminUser' +export type * from './models/Post' +export type * from './models/Attachment' +export type * from './models/Inquiry' +export type * from './models/AuditLog' +export type * from './models/Setting' +export type * from './commonInputTypes' \ No newline at end of file diff --git a/src/generated/prisma/models/AdminUser.ts b/src/generated/prisma/models/AdminUser.ts new file mode 100644 index 0000000..2b662b7 --- /dev/null +++ b/src/generated/prisma/models/AdminUser.ts @@ -0,0 +1,1603 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * This file exports the `AdminUser` model and its related types. + * + * 🟢 You can import this file directly. + */ +import type * as runtime from "@prisma/client/runtime/client" +import type * as $Enums from "../enums" +import type * as Prisma from "../internal/prismaNamespace" + +/** + * Model AdminUser + * + */ +export type AdminUserModel = runtime.Types.Result.DefaultSelection + +export type AggregateAdminUser = { + _count: AdminUserCountAggregateOutputType | null + _min: AdminUserMinAggregateOutputType | null + _max: AdminUserMaxAggregateOutputType | null +} + +export type AdminUserMinAggregateOutputType = { + id: string | null + loginId: string | null + passwordHash: string | null + name: string | null + role: string | null + totpSecret: string | null + lastLoginAt: Date | null + createdAt: Date | null + updatedAt: Date | null +} + +export type AdminUserMaxAggregateOutputType = { + id: string | null + loginId: string | null + passwordHash: string | null + name: string | null + role: string | null + totpSecret: string | null + lastLoginAt: Date | null + createdAt: Date | null + updatedAt: Date | null +} + +export type AdminUserCountAggregateOutputType = { + id: number + loginId: number + passwordHash: number + name: number + role: number + totpSecret: number + lastLoginAt: number + createdAt: number + updatedAt: number + _all: number +} + + +export type AdminUserMinAggregateInputType = { + id?: true + loginId?: true + passwordHash?: true + name?: true + role?: true + totpSecret?: true + lastLoginAt?: true + createdAt?: true + updatedAt?: true +} + +export type AdminUserMaxAggregateInputType = { + id?: true + loginId?: true + passwordHash?: true + name?: true + role?: true + totpSecret?: true + lastLoginAt?: true + createdAt?: true + updatedAt?: true +} + +export type AdminUserCountAggregateInputType = { + id?: true + loginId?: true + passwordHash?: true + name?: true + role?: true + totpSecret?: true + lastLoginAt?: true + createdAt?: true + updatedAt?: true + _all?: true +} + +export type AdminUserAggregateArgs = { + /** + * Filter which AdminUser to aggregate. + */ + where?: Prisma.AdminUserWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of AdminUsers to fetch. + */ + orderBy?: Prisma.AdminUserOrderByWithRelationInput | Prisma.AdminUserOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: Prisma.AdminUserWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` AdminUsers 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` AdminUsers. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned AdminUsers + **/ + _count?: true | AdminUserCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: AdminUserMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: AdminUserMaxAggregateInputType +} + +export type GetAdminUserAggregateType = { + [P in keyof T & keyof AggregateAdminUser]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType +} + + + + +export type AdminUserGroupByArgs = { + where?: Prisma.AdminUserWhereInput + orderBy?: Prisma.AdminUserOrderByWithAggregationInput | Prisma.AdminUserOrderByWithAggregationInput[] + by: Prisma.AdminUserScalarFieldEnum[] | Prisma.AdminUserScalarFieldEnum + having?: Prisma.AdminUserScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: AdminUserCountAggregateInputType | true + _min?: AdminUserMinAggregateInputType + _max?: AdminUserMaxAggregateInputType +} + +export type AdminUserGroupByOutputType = { + id: string + loginId: string + passwordHash: string + name: string + role: string + totpSecret: string | null + lastLoginAt: Date | null + createdAt: Date + updatedAt: Date + _count: AdminUserCountAggregateOutputType | null + _min: AdminUserMinAggregateOutputType | null + _max: AdminUserMaxAggregateOutputType | null +} + +export type GetAdminUserGroupByPayload = Prisma.PrismaPromise< + Array< + Prisma.PickEnumerable & + { + [P in ((keyof T) & (keyof AdminUserGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType + } + > + > + + + +export type AdminUserWhereInput = { + AND?: Prisma.AdminUserWhereInput | Prisma.AdminUserWhereInput[] + OR?: Prisma.AdminUserWhereInput[] + NOT?: Prisma.AdminUserWhereInput | Prisma.AdminUserWhereInput[] + id?: Prisma.StringFilter<"AdminUser"> | string + loginId?: Prisma.StringFilter<"AdminUser"> | string + passwordHash?: Prisma.StringFilter<"AdminUser"> | string + name?: Prisma.StringFilter<"AdminUser"> | string + role?: Prisma.StringFilter<"AdminUser"> | string + totpSecret?: Prisma.StringNullableFilter<"AdminUser"> | string | null + lastLoginAt?: Prisma.DateTimeNullableFilter<"AdminUser"> | Date | string | null + createdAt?: Prisma.DateTimeFilter<"AdminUser"> | Date | string + updatedAt?: Prisma.DateTimeFilter<"AdminUser"> | Date | string + posts?: Prisma.PostListRelationFilter + auditLogs?: Prisma.AuditLogListRelationFilter +} + +export type AdminUserOrderByWithRelationInput = { + id?: Prisma.SortOrder + loginId?: Prisma.SortOrder + passwordHash?: Prisma.SortOrder + name?: Prisma.SortOrder + role?: Prisma.SortOrder + totpSecret?: Prisma.SortOrderInput | Prisma.SortOrder + lastLoginAt?: Prisma.SortOrderInput | Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + posts?: Prisma.PostOrderByRelationAggregateInput + auditLogs?: Prisma.AuditLogOrderByRelationAggregateInput +} + +export type AdminUserWhereUniqueInput = Prisma.AtLeast<{ + id?: string + loginId?: string + AND?: Prisma.AdminUserWhereInput | Prisma.AdminUserWhereInput[] + OR?: Prisma.AdminUserWhereInput[] + NOT?: Prisma.AdminUserWhereInput | Prisma.AdminUserWhereInput[] + passwordHash?: Prisma.StringFilter<"AdminUser"> | string + name?: Prisma.StringFilter<"AdminUser"> | string + role?: Prisma.StringFilter<"AdminUser"> | string + totpSecret?: Prisma.StringNullableFilter<"AdminUser"> | string | null + lastLoginAt?: Prisma.DateTimeNullableFilter<"AdminUser"> | Date | string | null + createdAt?: Prisma.DateTimeFilter<"AdminUser"> | Date | string + updatedAt?: Prisma.DateTimeFilter<"AdminUser"> | Date | string + posts?: Prisma.PostListRelationFilter + auditLogs?: Prisma.AuditLogListRelationFilter +}, "id" | "loginId"> + +export type AdminUserOrderByWithAggregationInput = { + id?: Prisma.SortOrder + loginId?: Prisma.SortOrder + passwordHash?: Prisma.SortOrder + name?: Prisma.SortOrder + role?: Prisma.SortOrder + totpSecret?: Prisma.SortOrderInput | Prisma.SortOrder + lastLoginAt?: Prisma.SortOrderInput | Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + _count?: Prisma.AdminUserCountOrderByAggregateInput + _max?: Prisma.AdminUserMaxOrderByAggregateInput + _min?: Prisma.AdminUserMinOrderByAggregateInput +} + +export type AdminUserScalarWhereWithAggregatesInput = { + AND?: Prisma.AdminUserScalarWhereWithAggregatesInput | Prisma.AdminUserScalarWhereWithAggregatesInput[] + OR?: Prisma.AdminUserScalarWhereWithAggregatesInput[] + NOT?: Prisma.AdminUserScalarWhereWithAggregatesInput | Prisma.AdminUserScalarWhereWithAggregatesInput[] + id?: Prisma.StringWithAggregatesFilter<"AdminUser"> | string + loginId?: Prisma.StringWithAggregatesFilter<"AdminUser"> | string + passwordHash?: Prisma.StringWithAggregatesFilter<"AdminUser"> | string + name?: Prisma.StringWithAggregatesFilter<"AdminUser"> | string + role?: Prisma.StringWithAggregatesFilter<"AdminUser"> | string + totpSecret?: Prisma.StringNullableWithAggregatesFilter<"AdminUser"> | string | null + lastLoginAt?: Prisma.DateTimeNullableWithAggregatesFilter<"AdminUser"> | Date | string | null + createdAt?: Prisma.DateTimeWithAggregatesFilter<"AdminUser"> | Date | string + updatedAt?: Prisma.DateTimeWithAggregatesFilter<"AdminUser"> | Date | string +} + +export type AdminUserCreateInput = { + id?: string + loginId: string + passwordHash: string + name: string + role?: string + totpSecret?: string | null + lastLoginAt?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + posts?: Prisma.PostCreateNestedManyWithoutAuthorInput + auditLogs?: Prisma.AuditLogCreateNestedManyWithoutAdminInput +} + +export type AdminUserUncheckedCreateInput = { + id?: string + loginId: string + passwordHash: string + name: string + role?: string + totpSecret?: string | null + lastLoginAt?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + posts?: Prisma.PostUncheckedCreateNestedManyWithoutAuthorInput + auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutAdminInput +} + +export type AdminUserUpdateInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + loginId?: Prisma.StringFieldUpdateOperationsInput | string + passwordHash?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + role?: Prisma.StringFieldUpdateOperationsInput | string + totpSecret?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + lastLoginAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + posts?: Prisma.PostUpdateManyWithoutAuthorNestedInput + auditLogs?: Prisma.AuditLogUpdateManyWithoutAdminNestedInput +} + +export type AdminUserUncheckedUpdateInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + loginId?: Prisma.StringFieldUpdateOperationsInput | string + passwordHash?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + role?: Prisma.StringFieldUpdateOperationsInput | string + totpSecret?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + lastLoginAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + posts?: Prisma.PostUncheckedUpdateManyWithoutAuthorNestedInput + auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutAdminNestedInput +} + +export type AdminUserCreateManyInput = { + id?: string + loginId: string + passwordHash: string + name: string + role?: string + totpSecret?: string | null + lastLoginAt?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string +} + +export type AdminUserUpdateManyMutationInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + loginId?: Prisma.StringFieldUpdateOperationsInput | string + passwordHash?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + role?: Prisma.StringFieldUpdateOperationsInput | string + totpSecret?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + lastLoginAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type AdminUserUncheckedUpdateManyInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + loginId?: Prisma.StringFieldUpdateOperationsInput | string + passwordHash?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + role?: Prisma.StringFieldUpdateOperationsInput | string + totpSecret?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + lastLoginAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type AdminUserCountOrderByAggregateInput = { + id?: Prisma.SortOrder + loginId?: Prisma.SortOrder + passwordHash?: Prisma.SortOrder + name?: Prisma.SortOrder + role?: Prisma.SortOrder + totpSecret?: Prisma.SortOrder + lastLoginAt?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder +} + +export type AdminUserMaxOrderByAggregateInput = { + id?: Prisma.SortOrder + loginId?: Prisma.SortOrder + passwordHash?: Prisma.SortOrder + name?: Prisma.SortOrder + role?: Prisma.SortOrder + totpSecret?: Prisma.SortOrder + lastLoginAt?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder +} + +export type AdminUserMinOrderByAggregateInput = { + id?: Prisma.SortOrder + loginId?: Prisma.SortOrder + passwordHash?: Prisma.SortOrder + name?: Prisma.SortOrder + role?: Prisma.SortOrder + totpSecret?: Prisma.SortOrder + lastLoginAt?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder +} + +export type AdminUserNullableScalarRelationFilter = { + is?: Prisma.AdminUserWhereInput | null + isNot?: Prisma.AdminUserWhereInput | null +} + +export type StringFieldUpdateOperationsInput = { + set?: string +} + +export type NullableStringFieldUpdateOperationsInput = { + set?: string | null +} + +export type NullableDateTimeFieldUpdateOperationsInput = { + set?: Date | string | null +} + +export type DateTimeFieldUpdateOperationsInput = { + set?: Date | string +} + +export type AdminUserCreateNestedOneWithoutPostsInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.AdminUserCreateOrConnectWithoutPostsInput + connect?: Prisma.AdminUserWhereUniqueInput +} + +export type AdminUserUpdateOneWithoutPostsNestedInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.AdminUserCreateOrConnectWithoutPostsInput + upsert?: Prisma.AdminUserUpsertWithoutPostsInput + disconnect?: Prisma.AdminUserWhereInput | boolean + delete?: Prisma.AdminUserWhereInput | boolean + connect?: Prisma.AdminUserWhereUniqueInput + update?: Prisma.XOR, Prisma.AdminUserUncheckedUpdateWithoutPostsInput> +} + +export type AdminUserCreateNestedOneWithoutAuditLogsInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.AdminUserCreateOrConnectWithoutAuditLogsInput + connect?: Prisma.AdminUserWhereUniqueInput +} + +export type AdminUserUpdateOneWithoutAuditLogsNestedInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.AdminUserCreateOrConnectWithoutAuditLogsInput + upsert?: Prisma.AdminUserUpsertWithoutAuditLogsInput + disconnect?: Prisma.AdminUserWhereInput | boolean + delete?: Prisma.AdminUserWhereInput | boolean + connect?: Prisma.AdminUserWhereUniqueInput + update?: Prisma.XOR, Prisma.AdminUserUncheckedUpdateWithoutAuditLogsInput> +} + +export type AdminUserCreateWithoutPostsInput = { + id?: string + loginId: string + passwordHash: string + name: string + role?: string + totpSecret?: string | null + lastLoginAt?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + auditLogs?: Prisma.AuditLogCreateNestedManyWithoutAdminInput +} + +export type AdminUserUncheckedCreateWithoutPostsInput = { + id?: string + loginId: string + passwordHash: string + name: string + role?: string + totpSecret?: string | null + lastLoginAt?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + auditLogs?: Prisma.AuditLogUncheckedCreateNestedManyWithoutAdminInput +} + +export type AdminUserCreateOrConnectWithoutPostsInput = { + where: Prisma.AdminUserWhereUniqueInput + create: Prisma.XOR +} + +export type AdminUserUpsertWithoutPostsInput = { + update: Prisma.XOR + create: Prisma.XOR + where?: Prisma.AdminUserWhereInput +} + +export type AdminUserUpdateToOneWithWhereWithoutPostsInput = { + where?: Prisma.AdminUserWhereInput + data: Prisma.XOR +} + +export type AdminUserUpdateWithoutPostsInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + loginId?: Prisma.StringFieldUpdateOperationsInput | string + passwordHash?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + role?: Prisma.StringFieldUpdateOperationsInput | string + totpSecret?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + lastLoginAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + auditLogs?: Prisma.AuditLogUpdateManyWithoutAdminNestedInput +} + +export type AdminUserUncheckedUpdateWithoutPostsInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + loginId?: Prisma.StringFieldUpdateOperationsInput | string + passwordHash?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + role?: Prisma.StringFieldUpdateOperationsInput | string + totpSecret?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + lastLoginAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + auditLogs?: Prisma.AuditLogUncheckedUpdateManyWithoutAdminNestedInput +} + +export type AdminUserCreateWithoutAuditLogsInput = { + id?: string + loginId: string + passwordHash: string + name: string + role?: string + totpSecret?: string | null + lastLoginAt?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + posts?: Prisma.PostCreateNestedManyWithoutAuthorInput +} + +export type AdminUserUncheckedCreateWithoutAuditLogsInput = { + id?: string + loginId: string + passwordHash: string + name: string + role?: string + totpSecret?: string | null + lastLoginAt?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + posts?: Prisma.PostUncheckedCreateNestedManyWithoutAuthorInput +} + +export type AdminUserCreateOrConnectWithoutAuditLogsInput = { + where: Prisma.AdminUserWhereUniqueInput + create: Prisma.XOR +} + +export type AdminUserUpsertWithoutAuditLogsInput = { + update: Prisma.XOR + create: Prisma.XOR + where?: Prisma.AdminUserWhereInput +} + +export type AdminUserUpdateToOneWithWhereWithoutAuditLogsInput = { + where?: Prisma.AdminUserWhereInput + data: Prisma.XOR +} + +export type AdminUserUpdateWithoutAuditLogsInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + loginId?: Prisma.StringFieldUpdateOperationsInput | string + passwordHash?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + role?: Prisma.StringFieldUpdateOperationsInput | string + totpSecret?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + lastLoginAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + posts?: Prisma.PostUpdateManyWithoutAuthorNestedInput +} + +export type AdminUserUncheckedUpdateWithoutAuditLogsInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + loginId?: Prisma.StringFieldUpdateOperationsInput | string + passwordHash?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + role?: Prisma.StringFieldUpdateOperationsInput | string + totpSecret?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + lastLoginAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + posts?: Prisma.PostUncheckedUpdateManyWithoutAuthorNestedInput +} + + +/** + * Count Type AdminUserCountOutputType + */ + +export type AdminUserCountOutputType = { + posts: number + auditLogs: number +} + +export type AdminUserCountOutputTypeSelect = { + posts?: boolean | AdminUserCountOutputTypeCountPostsArgs + auditLogs?: boolean | AdminUserCountOutputTypeCountAuditLogsArgs +} + +/** + * AdminUserCountOutputType without action + */ +export type AdminUserCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the AdminUserCountOutputType + */ + select?: Prisma.AdminUserCountOutputTypeSelect | null +} + +/** + * AdminUserCountOutputType without action + */ +export type AdminUserCountOutputTypeCountPostsArgs = { + where?: Prisma.PostWhereInput +} + +/** + * AdminUserCountOutputType without action + */ +export type AdminUserCountOutputTypeCountAuditLogsArgs = { + where?: Prisma.AuditLogWhereInput +} + + +export type AdminUserSelect = runtime.Types.Extensions.GetSelect<{ + id?: boolean + loginId?: boolean + passwordHash?: boolean + name?: boolean + role?: boolean + totpSecret?: boolean + lastLoginAt?: boolean + createdAt?: boolean + updatedAt?: boolean + posts?: boolean | Prisma.AdminUser$postsArgs + auditLogs?: boolean | Prisma.AdminUser$auditLogsArgs + _count?: boolean | Prisma.AdminUserCountOutputTypeDefaultArgs +}, ExtArgs["result"]["adminUser"]> + +export type AdminUserSelectCreateManyAndReturn = runtime.Types.Extensions.GetSelect<{ + id?: boolean + loginId?: boolean + passwordHash?: boolean + name?: boolean + role?: boolean + totpSecret?: boolean + lastLoginAt?: boolean + createdAt?: boolean + updatedAt?: boolean +}, ExtArgs["result"]["adminUser"]> + +export type AdminUserSelectUpdateManyAndReturn = runtime.Types.Extensions.GetSelect<{ + id?: boolean + loginId?: boolean + passwordHash?: boolean + name?: boolean + role?: boolean + totpSecret?: boolean + lastLoginAt?: boolean + createdAt?: boolean + updatedAt?: boolean +}, ExtArgs["result"]["adminUser"]> + +export type AdminUserSelectScalar = { + id?: boolean + loginId?: boolean + passwordHash?: boolean + name?: boolean + role?: boolean + totpSecret?: boolean + lastLoginAt?: boolean + createdAt?: boolean + updatedAt?: boolean +} + +export type AdminUserOmit = runtime.Types.Extensions.GetOmit<"id" | "loginId" | "passwordHash" | "name" | "role" | "totpSecret" | "lastLoginAt" | "createdAt" | "updatedAt", ExtArgs["result"]["adminUser"]> +export type AdminUserInclude = { + posts?: boolean | Prisma.AdminUser$postsArgs + auditLogs?: boolean | Prisma.AdminUser$auditLogsArgs + _count?: boolean | Prisma.AdminUserCountOutputTypeDefaultArgs +} +export type AdminUserIncludeCreateManyAndReturn = {} +export type AdminUserIncludeUpdateManyAndReturn = {} + +export type $AdminUserPayload = { + name: "AdminUser" + objects: { + posts: Prisma.$PostPayload[] + auditLogs: Prisma.$AuditLogPayload[] + } + scalars: runtime.Types.Extensions.GetPayloadResult<{ + id: string + loginId: string + passwordHash: string + name: string + role: string + totpSecret: string | null + lastLoginAt: Date | null + createdAt: Date + updatedAt: Date + }, ExtArgs["result"]["adminUser"]> + composites: {} +} + +export type AdminUserGetPayload = runtime.Types.Result.GetResult + +export type AdminUserCountArgs = + Omit & { + select?: AdminUserCountAggregateInputType | true + } + +export interface AdminUserDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['AdminUser'], meta: { name: 'AdminUser' } } + /** + * Find zero or one AdminUser that matches the filter. + * @param {AdminUserFindUniqueArgs} args - Arguments to find a AdminUser + * @example + * // Get one AdminUser + * const adminUser = await prisma.adminUser.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__AdminUserClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one AdminUser that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {AdminUserFindUniqueOrThrowArgs} args - Arguments to find a AdminUser + * @example + * // Get one AdminUser + * const adminUser = await prisma.adminUser.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__AdminUserClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first AdminUser 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 {AdminUserFindFirstArgs} args - Arguments to find a AdminUser + * @example + * // Get one AdminUser + * const adminUser = await prisma.adminUser.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__AdminUserClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first AdminUser 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 {AdminUserFindFirstOrThrowArgs} args - Arguments to find a AdminUser + * @example + * // Get one AdminUser + * const adminUser = await prisma.adminUser.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__AdminUserClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more AdminUsers 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 {AdminUserFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all AdminUsers + * const adminUsers = await prisma.adminUser.findMany() + * + * // Get first 10 AdminUsers + * const adminUsers = await prisma.adminUser.findMany({ take: 10 }) + * + * // Only select the `id` + * const adminUserWithIdOnly = await prisma.adminUser.findMany({ select: { id: true } }) + * + */ + findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> + + /** + * Create a AdminUser. + * @param {AdminUserCreateArgs} args - Arguments to create a AdminUser. + * @example + * // Create one AdminUser + * const AdminUser = await prisma.adminUser.create({ + * data: { + * // ... data to create a AdminUser + * } + * }) + * + */ + create(args: Prisma.SelectSubset>): Prisma.Prisma__AdminUserClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many AdminUsers. + * @param {AdminUserCreateManyArgs} args - Arguments to create many AdminUsers. + * @example + * // Create many AdminUsers + * const adminUser = await prisma.adminUser.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Create many AdminUsers and returns the data saved in the database. + * @param {AdminUserCreateManyAndReturnArgs} args - Arguments to create many AdminUsers. + * @example + * // Create many AdminUsers + * const adminUser = await prisma.adminUser.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many AdminUsers and only return the `id` + * const adminUserWithIdOnly = await prisma.adminUser.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a AdminUser. + * @param {AdminUserDeleteArgs} args - Arguments to delete one AdminUser. + * @example + * // Delete one AdminUser + * const AdminUser = await prisma.adminUser.delete({ + * where: { + * // ... filter to delete one AdminUser + * } + * }) + * + */ + delete(args: Prisma.SelectSubset>): Prisma.Prisma__AdminUserClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one AdminUser. + * @param {AdminUserUpdateArgs} args - Arguments to update one AdminUser. + * @example + * // Update one AdminUser + * const adminUser = await prisma.adminUser.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: Prisma.SelectSubset>): Prisma.Prisma__AdminUserClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more AdminUsers. + * @param {AdminUserDeleteManyArgs} args - Arguments to filter AdminUsers to delete. + * @example + * // Delete a few AdminUsers + * const { count } = await prisma.adminUser.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more AdminUsers. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AdminUserUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many AdminUsers + * const adminUser = await prisma.adminUser.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more AdminUsers and returns the data updated in the database. + * @param {AdminUserUpdateManyAndReturnArgs} args - Arguments to update many AdminUsers. + * @example + * // Update many AdminUsers + * const adminUser = await prisma.adminUser.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more AdminUsers and only return the `id` + * const adminUserWithIdOnly = await prisma.adminUser.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one AdminUser. + * @param {AdminUserUpsertArgs} args - Arguments to update or create a AdminUser. + * @example + * // Update or create a AdminUser + * const adminUser = await prisma.adminUser.upsert({ + * create: { + * // ... data to create a AdminUser + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the AdminUser we want to update + * } + * }) + */ + upsert(args: Prisma.SelectSubset>): Prisma.Prisma__AdminUserClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of AdminUsers. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AdminUserCountArgs} args - Arguments to filter AdminUsers to count. + * @example + * // Count the number of AdminUsers + * const count = await prisma.adminUser.count({ + * where: { + * // ... the filter for the AdminUsers we want to count + * } + * }) + **/ + count( + args?: Prisma.Subset, + ): Prisma.PrismaPromise< + T extends runtime.Types.Utils.Record<'select', any> + ? T['select'] extends true + ? number + : Prisma.GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a AdminUser. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AdminUserAggregateArgs} 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: Prisma.Subset): Prisma.PrismaPromise> + + /** + * Group by AdminUser. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AdminUserGroupByArgs} 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 AdminUserGroupByArgs, + HasSelectOrTake extends Prisma.Or< + Prisma.Extends<'skip', Prisma.Keys>, + Prisma.Extends<'take', Prisma.Keys> + >, + OrderByArg extends Prisma.True extends HasSelectOrTake + ? { orderBy: AdminUserGroupByArgs['orderBy'] } + : { orderBy?: AdminUserGroupByArgs['orderBy'] }, + OrderFields extends Prisma.ExcludeUnderscoreKeys>>, + ByFields extends Prisma.MaybeTupleToUnion, + ByValid extends Prisma.Has, + HavingFields extends Prisma.GetHavingFields, + HavingValid extends Prisma.Has, + ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, + InputErrors extends ByEmpty extends Prisma.True + ? `Error: "by" must not be empty.` + : HavingValid extends Prisma.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 Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.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 Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.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 Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetAdminUserGroupByPayload : Prisma.PrismaPromise +/** + * Fields of the AdminUser model + */ +readonly fields: AdminUserFieldRefs; +} + +/** + * The delegate class that acts as a "Promise-like" for AdminUser. + * 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__AdminUserClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + posts = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> + auditLogs = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | 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): runtime.Types.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): runtime.Types.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): runtime.Types.Utils.JsPromise +} + + + + +/** + * Fields of the AdminUser model + */ +export interface AdminUserFieldRefs { + readonly id: Prisma.FieldRef<"AdminUser", 'String'> + readonly loginId: Prisma.FieldRef<"AdminUser", 'String'> + readonly passwordHash: Prisma.FieldRef<"AdminUser", 'String'> + readonly name: Prisma.FieldRef<"AdminUser", 'String'> + readonly role: Prisma.FieldRef<"AdminUser", 'String'> + readonly totpSecret: Prisma.FieldRef<"AdminUser", 'String'> + readonly lastLoginAt: Prisma.FieldRef<"AdminUser", 'DateTime'> + readonly createdAt: Prisma.FieldRef<"AdminUser", 'DateTime'> + readonly updatedAt: Prisma.FieldRef<"AdminUser", 'DateTime'> +} + + +// Custom InputTypes +/** + * AdminUser findUnique + */ +export type AdminUserFindUniqueArgs = { + /** + * Select specific fields to fetch from the AdminUser + */ + select?: Prisma.AdminUserSelect | null + /** + * Omit specific fields from the AdminUser + */ + omit?: Prisma.AdminUserOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AdminUserInclude | null + /** + * Filter, which AdminUser to fetch. + */ + where: Prisma.AdminUserWhereUniqueInput +} + +/** + * AdminUser findUniqueOrThrow + */ +export type AdminUserFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the AdminUser + */ + select?: Prisma.AdminUserSelect | null + /** + * Omit specific fields from the AdminUser + */ + omit?: Prisma.AdminUserOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AdminUserInclude | null + /** + * Filter, which AdminUser to fetch. + */ + where: Prisma.AdminUserWhereUniqueInput +} + +/** + * AdminUser findFirst + */ +export type AdminUserFindFirstArgs = { + /** + * Select specific fields to fetch from the AdminUser + */ + select?: Prisma.AdminUserSelect | null + /** + * Omit specific fields from the AdminUser + */ + omit?: Prisma.AdminUserOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AdminUserInclude | null + /** + * Filter, which AdminUser to fetch. + */ + where?: Prisma.AdminUserWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of AdminUsers to fetch. + */ + orderBy?: Prisma.AdminUserOrderByWithRelationInput | Prisma.AdminUserOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for AdminUsers. + */ + cursor?: Prisma.AdminUserWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` AdminUsers 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` AdminUsers. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of AdminUsers. + */ + distinct?: Prisma.AdminUserScalarFieldEnum | Prisma.AdminUserScalarFieldEnum[] +} + +/** + * AdminUser findFirstOrThrow + */ +export type AdminUserFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the AdminUser + */ + select?: Prisma.AdminUserSelect | null + /** + * Omit specific fields from the AdminUser + */ + omit?: Prisma.AdminUserOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AdminUserInclude | null + /** + * Filter, which AdminUser to fetch. + */ + where?: Prisma.AdminUserWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of AdminUsers to fetch. + */ + orderBy?: Prisma.AdminUserOrderByWithRelationInput | Prisma.AdminUserOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for AdminUsers. + */ + cursor?: Prisma.AdminUserWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` AdminUsers 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` AdminUsers. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of AdminUsers. + */ + distinct?: Prisma.AdminUserScalarFieldEnum | Prisma.AdminUserScalarFieldEnum[] +} + +/** + * AdminUser findMany + */ +export type AdminUserFindManyArgs = { + /** + * Select specific fields to fetch from the AdminUser + */ + select?: Prisma.AdminUserSelect | null + /** + * Omit specific fields from the AdminUser + */ + omit?: Prisma.AdminUserOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AdminUserInclude | null + /** + * Filter, which AdminUsers to fetch. + */ + where?: Prisma.AdminUserWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of AdminUsers to fetch. + */ + orderBy?: Prisma.AdminUserOrderByWithRelationInput | Prisma.AdminUserOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing AdminUsers. + */ + cursor?: Prisma.AdminUserWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` AdminUsers 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` AdminUsers. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of AdminUsers. + */ + distinct?: Prisma.AdminUserScalarFieldEnum | Prisma.AdminUserScalarFieldEnum[] +} + +/** + * AdminUser create + */ +export type AdminUserCreateArgs = { + /** + * Select specific fields to fetch from the AdminUser + */ + select?: Prisma.AdminUserSelect | null + /** + * Omit specific fields from the AdminUser + */ + omit?: Prisma.AdminUserOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AdminUserInclude | null + /** + * The data needed to create a AdminUser. + */ + data: Prisma.XOR +} + +/** + * AdminUser createMany + */ +export type AdminUserCreateManyArgs = { + /** + * The data used to create many AdminUsers. + */ + data: Prisma.AdminUserCreateManyInput | Prisma.AdminUserCreateManyInput[] +} + +/** + * AdminUser createManyAndReturn + */ +export type AdminUserCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the AdminUser + */ + select?: Prisma.AdminUserSelectCreateManyAndReturn | null + /** + * Omit specific fields from the AdminUser + */ + omit?: Prisma.AdminUserOmit | null + /** + * The data used to create many AdminUsers. + */ + data: Prisma.AdminUserCreateManyInput | Prisma.AdminUserCreateManyInput[] +} + +/** + * AdminUser update + */ +export type AdminUserUpdateArgs = { + /** + * Select specific fields to fetch from the AdminUser + */ + select?: Prisma.AdminUserSelect | null + /** + * Omit specific fields from the AdminUser + */ + omit?: Prisma.AdminUserOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AdminUserInclude | null + /** + * The data needed to update a AdminUser. + */ + data: Prisma.XOR + /** + * Choose, which AdminUser to update. + */ + where: Prisma.AdminUserWhereUniqueInput +} + +/** + * AdminUser updateMany + */ +export type AdminUserUpdateManyArgs = { + /** + * The data used to update AdminUsers. + */ + data: Prisma.XOR + /** + * Filter which AdminUsers to update + */ + where?: Prisma.AdminUserWhereInput + /** + * Limit how many AdminUsers to update. + */ + limit?: number +} + +/** + * AdminUser updateManyAndReturn + */ +export type AdminUserUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the AdminUser + */ + select?: Prisma.AdminUserSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the AdminUser + */ + omit?: Prisma.AdminUserOmit | null + /** + * The data used to update AdminUsers. + */ + data: Prisma.XOR + /** + * Filter which AdminUsers to update + */ + where?: Prisma.AdminUserWhereInput + /** + * Limit how many AdminUsers to update. + */ + limit?: number +} + +/** + * AdminUser upsert + */ +export type AdminUserUpsertArgs = { + /** + * Select specific fields to fetch from the AdminUser + */ + select?: Prisma.AdminUserSelect | null + /** + * Omit specific fields from the AdminUser + */ + omit?: Prisma.AdminUserOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AdminUserInclude | null + /** + * The filter to search for the AdminUser to update in case it exists. + */ + where: Prisma.AdminUserWhereUniqueInput + /** + * In case the AdminUser found by the `where` argument doesn't exist, create a new AdminUser with this data. + */ + create: Prisma.XOR + /** + * In case the AdminUser was found with the provided `where` argument, update it with this data. + */ + update: Prisma.XOR +} + +/** + * AdminUser delete + */ +export type AdminUserDeleteArgs = { + /** + * Select specific fields to fetch from the AdminUser + */ + select?: Prisma.AdminUserSelect | null + /** + * Omit specific fields from the AdminUser + */ + omit?: Prisma.AdminUserOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AdminUserInclude | null + /** + * Filter which AdminUser to delete. + */ + where: Prisma.AdminUserWhereUniqueInput +} + +/** + * AdminUser deleteMany + */ +export type AdminUserDeleteManyArgs = { + /** + * Filter which AdminUsers to delete + */ + where?: Prisma.AdminUserWhereInput + /** + * Limit how many AdminUsers to delete. + */ + limit?: number +} + +/** + * AdminUser.posts + */ +export type AdminUser$postsArgs = { + /** + * Select specific fields to fetch from the Post + */ + select?: Prisma.PostSelect | null + /** + * Omit specific fields from the Post + */ + omit?: Prisma.PostOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.PostInclude | null + where?: Prisma.PostWhereInput + orderBy?: Prisma.PostOrderByWithRelationInput | Prisma.PostOrderByWithRelationInput[] + cursor?: Prisma.PostWhereUniqueInput + take?: number + skip?: number + distinct?: Prisma.PostScalarFieldEnum | Prisma.PostScalarFieldEnum[] +} + +/** + * AdminUser.auditLogs + */ +export type AdminUser$auditLogsArgs = { + /** + * Select specific fields to fetch from the AuditLog + */ + select?: Prisma.AuditLogSelect | null + /** + * Omit specific fields from the AuditLog + */ + omit?: Prisma.AuditLogOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AuditLogInclude | null + where?: Prisma.AuditLogWhereInput + orderBy?: Prisma.AuditLogOrderByWithRelationInput | Prisma.AuditLogOrderByWithRelationInput[] + cursor?: Prisma.AuditLogWhereUniqueInput + take?: number + skip?: number + distinct?: Prisma.AuditLogScalarFieldEnum | Prisma.AuditLogScalarFieldEnum[] +} + +/** + * AdminUser without action + */ +export type AdminUserDefaultArgs = { + /** + * Select specific fields to fetch from the AdminUser + */ + select?: Prisma.AdminUserSelect | null + /** + * Omit specific fields from the AdminUser + */ + omit?: Prisma.AdminUserOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AdminUserInclude | null +} diff --git a/src/generated/prisma/models/Attachment.ts b/src/generated/prisma/models/Attachment.ts new file mode 100644 index 0000000..add7106 --- /dev/null +++ b/src/generated/prisma/models/Attachment.ts @@ -0,0 +1,1531 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * This file exports the `Attachment` model and its related types. + * + * 🟢 You can import this file directly. + */ +import type * as runtime from "@prisma/client/runtime/client" +import type * as $Enums from "../enums" +import type * as Prisma from "../internal/prismaNamespace" + +/** + * Model Attachment + * + */ +export type AttachmentModel = runtime.Types.Result.DefaultSelection + +export type AggregateAttachment = { + _count: AttachmentCountAggregateOutputType | null + _avg: AttachmentAvgAggregateOutputType | null + _sum: AttachmentSumAggregateOutputType | null + _min: AttachmentMinAggregateOutputType | null + _max: AttachmentMaxAggregateOutputType | null +} + +export type AttachmentAvgAggregateOutputType = { + id: number | null + postId: number | null + size: number | null + downloadCount: number | null +} + +export type AttachmentSumAggregateOutputType = { + id: number | null + postId: number | null + size: number | null + downloadCount: number | null +} + +export type AttachmentMinAggregateOutputType = { + id: number | null + postId: number | null + originalName: string | null + storageKey: string | null + mimeType: string | null + size: number | null + downloadCount: number | null + createdAt: Date | null +} + +export type AttachmentMaxAggregateOutputType = { + id: number | null + postId: number | null + originalName: string | null + storageKey: string | null + mimeType: string | null + size: number | null + downloadCount: number | null + createdAt: Date | null +} + +export type AttachmentCountAggregateOutputType = { + id: number + postId: number + originalName: number + storageKey: number + mimeType: number + size: number + downloadCount: number + createdAt: number + _all: number +} + + +export type AttachmentAvgAggregateInputType = { + id?: true + postId?: true + size?: true + downloadCount?: true +} + +export type AttachmentSumAggregateInputType = { + id?: true + postId?: true + size?: true + downloadCount?: true +} + +export type AttachmentMinAggregateInputType = { + id?: true + postId?: true + originalName?: true + storageKey?: true + mimeType?: true + size?: true + downloadCount?: true + createdAt?: true +} + +export type AttachmentMaxAggregateInputType = { + id?: true + postId?: true + originalName?: true + storageKey?: true + mimeType?: true + size?: true + downloadCount?: true + createdAt?: true +} + +export type AttachmentCountAggregateInputType = { + id?: true + postId?: true + originalName?: true + storageKey?: true + mimeType?: true + size?: true + downloadCount?: true + createdAt?: true + _all?: true +} + +export type AttachmentAggregateArgs = { + /** + * Filter which Attachment to aggregate. + */ + where?: Prisma.AttachmentWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Attachments to fetch. + */ + orderBy?: Prisma.AttachmentOrderByWithRelationInput | Prisma.AttachmentOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: Prisma.AttachmentWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Attachments 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` Attachments. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Attachments + **/ + _count?: true | AttachmentCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: AttachmentAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: AttachmentSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: AttachmentMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: AttachmentMaxAggregateInputType +} + +export type GetAttachmentAggregateType = { + [P in keyof T & keyof AggregateAttachment]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType +} + + + + +export type AttachmentGroupByArgs = { + where?: Prisma.AttachmentWhereInput + orderBy?: Prisma.AttachmentOrderByWithAggregationInput | Prisma.AttachmentOrderByWithAggregationInput[] + by: Prisma.AttachmentScalarFieldEnum[] | Prisma.AttachmentScalarFieldEnum + having?: Prisma.AttachmentScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: AttachmentCountAggregateInputType | true + _avg?: AttachmentAvgAggregateInputType + _sum?: AttachmentSumAggregateInputType + _min?: AttachmentMinAggregateInputType + _max?: AttachmentMaxAggregateInputType +} + +export type AttachmentGroupByOutputType = { + id: number + postId: number | null + originalName: string + storageKey: string + mimeType: string + size: number + downloadCount: number + createdAt: Date + _count: AttachmentCountAggregateOutputType | null + _avg: AttachmentAvgAggregateOutputType | null + _sum: AttachmentSumAggregateOutputType | null + _min: AttachmentMinAggregateOutputType | null + _max: AttachmentMaxAggregateOutputType | null +} + +export type GetAttachmentGroupByPayload = Prisma.PrismaPromise< + Array< + Prisma.PickEnumerable & + { + [P in ((keyof T) & (keyof AttachmentGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType + } + > + > + + + +export type AttachmentWhereInput = { + AND?: Prisma.AttachmentWhereInput | Prisma.AttachmentWhereInput[] + OR?: Prisma.AttachmentWhereInput[] + NOT?: Prisma.AttachmentWhereInput | Prisma.AttachmentWhereInput[] + id?: Prisma.IntFilter<"Attachment"> | number + postId?: Prisma.IntNullableFilter<"Attachment"> | number | null + originalName?: Prisma.StringFilter<"Attachment"> | string + storageKey?: Prisma.StringFilter<"Attachment"> | string + mimeType?: Prisma.StringFilter<"Attachment"> | string + size?: Prisma.IntFilter<"Attachment"> | number + downloadCount?: Prisma.IntFilter<"Attachment"> | number + createdAt?: Prisma.DateTimeFilter<"Attachment"> | Date | string + post?: Prisma.XOR | null +} + +export type AttachmentOrderByWithRelationInput = { + id?: Prisma.SortOrder + postId?: Prisma.SortOrderInput | Prisma.SortOrder + originalName?: Prisma.SortOrder + storageKey?: Prisma.SortOrder + mimeType?: Prisma.SortOrder + size?: Prisma.SortOrder + downloadCount?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + post?: Prisma.PostOrderByWithRelationInput +} + +export type AttachmentWhereUniqueInput = Prisma.AtLeast<{ + id?: number + storageKey?: string + AND?: Prisma.AttachmentWhereInput | Prisma.AttachmentWhereInput[] + OR?: Prisma.AttachmentWhereInput[] + NOT?: Prisma.AttachmentWhereInput | Prisma.AttachmentWhereInput[] + postId?: Prisma.IntNullableFilter<"Attachment"> | number | null + originalName?: Prisma.StringFilter<"Attachment"> | string + mimeType?: Prisma.StringFilter<"Attachment"> | string + size?: Prisma.IntFilter<"Attachment"> | number + downloadCount?: Prisma.IntFilter<"Attachment"> | number + createdAt?: Prisma.DateTimeFilter<"Attachment"> | Date | string + post?: Prisma.XOR | null +}, "id" | "storageKey"> + +export type AttachmentOrderByWithAggregationInput = { + id?: Prisma.SortOrder + postId?: Prisma.SortOrderInput | Prisma.SortOrder + originalName?: Prisma.SortOrder + storageKey?: Prisma.SortOrder + mimeType?: Prisma.SortOrder + size?: Prisma.SortOrder + downloadCount?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + _count?: Prisma.AttachmentCountOrderByAggregateInput + _avg?: Prisma.AttachmentAvgOrderByAggregateInput + _max?: Prisma.AttachmentMaxOrderByAggregateInput + _min?: Prisma.AttachmentMinOrderByAggregateInput + _sum?: Prisma.AttachmentSumOrderByAggregateInput +} + +export type AttachmentScalarWhereWithAggregatesInput = { + AND?: Prisma.AttachmentScalarWhereWithAggregatesInput | Prisma.AttachmentScalarWhereWithAggregatesInput[] + OR?: Prisma.AttachmentScalarWhereWithAggregatesInput[] + NOT?: Prisma.AttachmentScalarWhereWithAggregatesInput | Prisma.AttachmentScalarWhereWithAggregatesInput[] + id?: Prisma.IntWithAggregatesFilter<"Attachment"> | number + postId?: Prisma.IntNullableWithAggregatesFilter<"Attachment"> | number | null + originalName?: Prisma.StringWithAggregatesFilter<"Attachment"> | string + storageKey?: Prisma.StringWithAggregatesFilter<"Attachment"> | string + mimeType?: Prisma.StringWithAggregatesFilter<"Attachment"> | string + size?: Prisma.IntWithAggregatesFilter<"Attachment"> | number + downloadCount?: Prisma.IntWithAggregatesFilter<"Attachment"> | number + createdAt?: Prisma.DateTimeWithAggregatesFilter<"Attachment"> | Date | string +} + +export type AttachmentCreateInput = { + originalName: string + storageKey: string + mimeType: string + size: number + downloadCount?: number + createdAt?: Date | string + post?: Prisma.PostCreateNestedOneWithoutAttachmentsInput +} + +export type AttachmentUncheckedCreateInput = { + id?: number + postId?: number | null + originalName: string + storageKey: string + mimeType: string + size: number + downloadCount?: number + createdAt?: Date | string +} + +export type AttachmentUpdateInput = { + originalName?: Prisma.StringFieldUpdateOperationsInput | string + storageKey?: Prisma.StringFieldUpdateOperationsInput | string + mimeType?: Prisma.StringFieldUpdateOperationsInput | string + size?: Prisma.IntFieldUpdateOperationsInput | number + downloadCount?: Prisma.IntFieldUpdateOperationsInput | number + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + post?: Prisma.PostUpdateOneWithoutAttachmentsNestedInput +} + +export type AttachmentUncheckedUpdateInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + postId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + originalName?: Prisma.StringFieldUpdateOperationsInput | string + storageKey?: Prisma.StringFieldUpdateOperationsInput | string + mimeType?: Prisma.StringFieldUpdateOperationsInput | string + size?: Prisma.IntFieldUpdateOperationsInput | number + downloadCount?: Prisma.IntFieldUpdateOperationsInput | number + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type AttachmentCreateManyInput = { + id?: number + postId?: number | null + originalName: string + storageKey: string + mimeType: string + size: number + downloadCount?: number + createdAt?: Date | string +} + +export type AttachmentUpdateManyMutationInput = { + originalName?: Prisma.StringFieldUpdateOperationsInput | string + storageKey?: Prisma.StringFieldUpdateOperationsInput | string + mimeType?: Prisma.StringFieldUpdateOperationsInput | string + size?: Prisma.IntFieldUpdateOperationsInput | number + downloadCount?: Prisma.IntFieldUpdateOperationsInput | number + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type AttachmentUncheckedUpdateManyInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + postId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + originalName?: Prisma.StringFieldUpdateOperationsInput | string + storageKey?: Prisma.StringFieldUpdateOperationsInput | string + mimeType?: Prisma.StringFieldUpdateOperationsInput | string + size?: Prisma.IntFieldUpdateOperationsInput | number + downloadCount?: Prisma.IntFieldUpdateOperationsInput | number + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type AttachmentListRelationFilter = { + every?: Prisma.AttachmentWhereInput + some?: Prisma.AttachmentWhereInput + none?: Prisma.AttachmentWhereInput +} + +export type AttachmentOrderByRelationAggregateInput = { + _count?: Prisma.SortOrder +} + +export type AttachmentCountOrderByAggregateInput = { + id?: Prisma.SortOrder + postId?: Prisma.SortOrder + originalName?: Prisma.SortOrder + storageKey?: Prisma.SortOrder + mimeType?: Prisma.SortOrder + size?: Prisma.SortOrder + downloadCount?: Prisma.SortOrder + createdAt?: Prisma.SortOrder +} + +export type AttachmentAvgOrderByAggregateInput = { + id?: Prisma.SortOrder + postId?: Prisma.SortOrder + size?: Prisma.SortOrder + downloadCount?: Prisma.SortOrder +} + +export type AttachmentMaxOrderByAggregateInput = { + id?: Prisma.SortOrder + postId?: Prisma.SortOrder + originalName?: Prisma.SortOrder + storageKey?: Prisma.SortOrder + mimeType?: Prisma.SortOrder + size?: Prisma.SortOrder + downloadCount?: Prisma.SortOrder + createdAt?: Prisma.SortOrder +} + +export type AttachmentMinOrderByAggregateInput = { + id?: Prisma.SortOrder + postId?: Prisma.SortOrder + originalName?: Prisma.SortOrder + storageKey?: Prisma.SortOrder + mimeType?: Prisma.SortOrder + size?: Prisma.SortOrder + downloadCount?: Prisma.SortOrder + createdAt?: Prisma.SortOrder +} + +export type AttachmentSumOrderByAggregateInput = { + id?: Prisma.SortOrder + postId?: Prisma.SortOrder + size?: Prisma.SortOrder + downloadCount?: Prisma.SortOrder +} + +export type AttachmentCreateNestedManyWithoutPostInput = { + create?: Prisma.XOR | Prisma.AttachmentCreateWithoutPostInput[] | Prisma.AttachmentUncheckedCreateWithoutPostInput[] + connectOrCreate?: Prisma.AttachmentCreateOrConnectWithoutPostInput | Prisma.AttachmentCreateOrConnectWithoutPostInput[] + createMany?: Prisma.AttachmentCreateManyPostInputEnvelope + connect?: Prisma.AttachmentWhereUniqueInput | Prisma.AttachmentWhereUniqueInput[] +} + +export type AttachmentUncheckedCreateNestedManyWithoutPostInput = { + create?: Prisma.XOR | Prisma.AttachmentCreateWithoutPostInput[] | Prisma.AttachmentUncheckedCreateWithoutPostInput[] + connectOrCreate?: Prisma.AttachmentCreateOrConnectWithoutPostInput | Prisma.AttachmentCreateOrConnectWithoutPostInput[] + createMany?: Prisma.AttachmentCreateManyPostInputEnvelope + connect?: Prisma.AttachmentWhereUniqueInput | Prisma.AttachmentWhereUniqueInput[] +} + +export type AttachmentUpdateManyWithoutPostNestedInput = { + create?: Prisma.XOR | Prisma.AttachmentCreateWithoutPostInput[] | Prisma.AttachmentUncheckedCreateWithoutPostInput[] + connectOrCreate?: Prisma.AttachmentCreateOrConnectWithoutPostInput | Prisma.AttachmentCreateOrConnectWithoutPostInput[] + upsert?: Prisma.AttachmentUpsertWithWhereUniqueWithoutPostInput | Prisma.AttachmentUpsertWithWhereUniqueWithoutPostInput[] + createMany?: Prisma.AttachmentCreateManyPostInputEnvelope + set?: Prisma.AttachmentWhereUniqueInput | Prisma.AttachmentWhereUniqueInput[] + disconnect?: Prisma.AttachmentWhereUniqueInput | Prisma.AttachmentWhereUniqueInput[] + delete?: Prisma.AttachmentWhereUniqueInput | Prisma.AttachmentWhereUniqueInput[] + connect?: Prisma.AttachmentWhereUniqueInput | Prisma.AttachmentWhereUniqueInput[] + update?: Prisma.AttachmentUpdateWithWhereUniqueWithoutPostInput | Prisma.AttachmentUpdateWithWhereUniqueWithoutPostInput[] + updateMany?: Prisma.AttachmentUpdateManyWithWhereWithoutPostInput | Prisma.AttachmentUpdateManyWithWhereWithoutPostInput[] + deleteMany?: Prisma.AttachmentScalarWhereInput | Prisma.AttachmentScalarWhereInput[] +} + +export type AttachmentUncheckedUpdateManyWithoutPostNestedInput = { + create?: Prisma.XOR | Prisma.AttachmentCreateWithoutPostInput[] | Prisma.AttachmentUncheckedCreateWithoutPostInput[] + connectOrCreate?: Prisma.AttachmentCreateOrConnectWithoutPostInput | Prisma.AttachmentCreateOrConnectWithoutPostInput[] + upsert?: Prisma.AttachmentUpsertWithWhereUniqueWithoutPostInput | Prisma.AttachmentUpsertWithWhereUniqueWithoutPostInput[] + createMany?: Prisma.AttachmentCreateManyPostInputEnvelope + set?: Prisma.AttachmentWhereUniqueInput | Prisma.AttachmentWhereUniqueInput[] + disconnect?: Prisma.AttachmentWhereUniqueInput | Prisma.AttachmentWhereUniqueInput[] + delete?: Prisma.AttachmentWhereUniqueInput | Prisma.AttachmentWhereUniqueInput[] + connect?: Prisma.AttachmentWhereUniqueInput | Prisma.AttachmentWhereUniqueInput[] + update?: Prisma.AttachmentUpdateWithWhereUniqueWithoutPostInput | Prisma.AttachmentUpdateWithWhereUniqueWithoutPostInput[] + updateMany?: Prisma.AttachmentUpdateManyWithWhereWithoutPostInput | Prisma.AttachmentUpdateManyWithWhereWithoutPostInput[] + deleteMany?: Prisma.AttachmentScalarWhereInput | Prisma.AttachmentScalarWhereInput[] +} + +export type NullableIntFieldUpdateOperationsInput = { + set?: number | null + increment?: number + decrement?: number + multiply?: number + divide?: number +} + +export type AttachmentCreateWithoutPostInput = { + originalName: string + storageKey: string + mimeType: string + size: number + downloadCount?: number + createdAt?: Date | string +} + +export type AttachmentUncheckedCreateWithoutPostInput = { + id?: number + originalName: string + storageKey: string + mimeType: string + size: number + downloadCount?: number + createdAt?: Date | string +} + +export type AttachmentCreateOrConnectWithoutPostInput = { + where: Prisma.AttachmentWhereUniqueInput + create: Prisma.XOR +} + +export type AttachmentCreateManyPostInputEnvelope = { + data: Prisma.AttachmentCreateManyPostInput | Prisma.AttachmentCreateManyPostInput[] +} + +export type AttachmentUpsertWithWhereUniqueWithoutPostInput = { + where: Prisma.AttachmentWhereUniqueInput + update: Prisma.XOR + create: Prisma.XOR +} + +export type AttachmentUpdateWithWhereUniqueWithoutPostInput = { + where: Prisma.AttachmentWhereUniqueInput + data: Prisma.XOR +} + +export type AttachmentUpdateManyWithWhereWithoutPostInput = { + where: Prisma.AttachmentScalarWhereInput + data: Prisma.XOR +} + +export type AttachmentScalarWhereInput = { + AND?: Prisma.AttachmentScalarWhereInput | Prisma.AttachmentScalarWhereInput[] + OR?: Prisma.AttachmentScalarWhereInput[] + NOT?: Prisma.AttachmentScalarWhereInput | Prisma.AttachmentScalarWhereInput[] + id?: Prisma.IntFilter<"Attachment"> | number + postId?: Prisma.IntNullableFilter<"Attachment"> | number | null + originalName?: Prisma.StringFilter<"Attachment"> | string + storageKey?: Prisma.StringFilter<"Attachment"> | string + mimeType?: Prisma.StringFilter<"Attachment"> | string + size?: Prisma.IntFilter<"Attachment"> | number + downloadCount?: Prisma.IntFilter<"Attachment"> | number + createdAt?: Prisma.DateTimeFilter<"Attachment"> | Date | string +} + +export type AttachmentCreateManyPostInput = { + id?: number + originalName: string + storageKey: string + mimeType: string + size: number + downloadCount?: number + createdAt?: Date | string +} + +export type AttachmentUpdateWithoutPostInput = { + originalName?: Prisma.StringFieldUpdateOperationsInput | string + storageKey?: Prisma.StringFieldUpdateOperationsInput | string + mimeType?: Prisma.StringFieldUpdateOperationsInput | string + size?: Prisma.IntFieldUpdateOperationsInput | number + downloadCount?: Prisma.IntFieldUpdateOperationsInput | number + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type AttachmentUncheckedUpdateWithoutPostInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + originalName?: Prisma.StringFieldUpdateOperationsInput | string + storageKey?: Prisma.StringFieldUpdateOperationsInput | string + mimeType?: Prisma.StringFieldUpdateOperationsInput | string + size?: Prisma.IntFieldUpdateOperationsInput | number + downloadCount?: Prisma.IntFieldUpdateOperationsInput | number + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type AttachmentUncheckedUpdateManyWithoutPostInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + originalName?: Prisma.StringFieldUpdateOperationsInput | string + storageKey?: Prisma.StringFieldUpdateOperationsInput | string + mimeType?: Prisma.StringFieldUpdateOperationsInput | string + size?: Prisma.IntFieldUpdateOperationsInput | number + downloadCount?: Prisma.IntFieldUpdateOperationsInput | number + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + + + +export type AttachmentSelect = runtime.Types.Extensions.GetSelect<{ + id?: boolean + postId?: boolean + originalName?: boolean + storageKey?: boolean + mimeType?: boolean + size?: boolean + downloadCount?: boolean + createdAt?: boolean + post?: boolean | Prisma.Attachment$postArgs +}, ExtArgs["result"]["attachment"]> + +export type AttachmentSelectCreateManyAndReturn = runtime.Types.Extensions.GetSelect<{ + id?: boolean + postId?: boolean + originalName?: boolean + storageKey?: boolean + mimeType?: boolean + size?: boolean + downloadCount?: boolean + createdAt?: boolean + post?: boolean | Prisma.Attachment$postArgs +}, ExtArgs["result"]["attachment"]> + +export type AttachmentSelectUpdateManyAndReturn = runtime.Types.Extensions.GetSelect<{ + id?: boolean + postId?: boolean + originalName?: boolean + storageKey?: boolean + mimeType?: boolean + size?: boolean + downloadCount?: boolean + createdAt?: boolean + post?: boolean | Prisma.Attachment$postArgs +}, ExtArgs["result"]["attachment"]> + +export type AttachmentSelectScalar = { + id?: boolean + postId?: boolean + originalName?: boolean + storageKey?: boolean + mimeType?: boolean + size?: boolean + downloadCount?: boolean + createdAt?: boolean +} + +export type AttachmentOmit = runtime.Types.Extensions.GetOmit<"id" | "postId" | "originalName" | "storageKey" | "mimeType" | "size" | "downloadCount" | "createdAt", ExtArgs["result"]["attachment"]> +export type AttachmentInclude = { + post?: boolean | Prisma.Attachment$postArgs +} +export type AttachmentIncludeCreateManyAndReturn = { + post?: boolean | Prisma.Attachment$postArgs +} +export type AttachmentIncludeUpdateManyAndReturn = { + post?: boolean | Prisma.Attachment$postArgs +} + +export type $AttachmentPayload = { + name: "Attachment" + objects: { + post: Prisma.$PostPayload | null + } + scalars: runtime.Types.Extensions.GetPayloadResult<{ + id: number + postId: number | null + originalName: string + storageKey: string + mimeType: string + size: number + downloadCount: number + createdAt: Date + }, ExtArgs["result"]["attachment"]> + composites: {} +} + +export type AttachmentGetPayload = runtime.Types.Result.GetResult + +export type AttachmentCountArgs = + Omit & { + select?: AttachmentCountAggregateInputType | true + } + +export interface AttachmentDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Attachment'], meta: { name: 'Attachment' } } + /** + * Find zero or one Attachment that matches the filter. + * @param {AttachmentFindUniqueArgs} args - Arguments to find a Attachment + * @example + * // Get one Attachment + * const attachment = await prisma.attachment.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__AttachmentClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one Attachment that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {AttachmentFindUniqueOrThrowArgs} args - Arguments to find a Attachment + * @example + * // Get one Attachment + * const attachment = await prisma.attachment.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__AttachmentClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Attachment 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 {AttachmentFindFirstArgs} args - Arguments to find a Attachment + * @example + * // Get one Attachment + * const attachment = await prisma.attachment.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__AttachmentClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Attachment 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 {AttachmentFindFirstOrThrowArgs} args - Arguments to find a Attachment + * @example + * // Get one Attachment + * const attachment = await prisma.attachment.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__AttachmentClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more Attachments 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 {AttachmentFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Attachments + * const attachments = await prisma.attachment.findMany() + * + * // Get first 10 Attachments + * const attachments = await prisma.attachment.findMany({ take: 10 }) + * + * // Only select the `id` + * const attachmentWithIdOnly = await prisma.attachment.findMany({ select: { id: true } }) + * + */ + findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> + + /** + * Create a Attachment. + * @param {AttachmentCreateArgs} args - Arguments to create a Attachment. + * @example + * // Create one Attachment + * const Attachment = await prisma.attachment.create({ + * data: { + * // ... data to create a Attachment + * } + * }) + * + */ + create(args: Prisma.SelectSubset>): Prisma.Prisma__AttachmentClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many Attachments. + * @param {AttachmentCreateManyArgs} args - Arguments to create many Attachments. + * @example + * // Create many Attachments + * const attachment = await prisma.attachment.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Attachments and returns the data saved in the database. + * @param {AttachmentCreateManyAndReturnArgs} args - Arguments to create many Attachments. + * @example + * // Create many Attachments + * const attachment = await prisma.attachment.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Attachments and only return the `id` + * const attachmentWithIdOnly = await prisma.attachment.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a Attachment. + * @param {AttachmentDeleteArgs} args - Arguments to delete one Attachment. + * @example + * // Delete one Attachment + * const Attachment = await prisma.attachment.delete({ + * where: { + * // ... filter to delete one Attachment + * } + * }) + * + */ + delete(args: Prisma.SelectSubset>): Prisma.Prisma__AttachmentClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one Attachment. + * @param {AttachmentUpdateArgs} args - Arguments to update one Attachment. + * @example + * // Update one Attachment + * const attachment = await prisma.attachment.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: Prisma.SelectSubset>): Prisma.Prisma__AttachmentClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more Attachments. + * @param {AttachmentDeleteManyArgs} args - Arguments to filter Attachments to delete. + * @example + * // Delete a few Attachments + * const { count } = await prisma.attachment.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Attachments. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AttachmentUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Attachments + * const attachment = await prisma.attachment.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Attachments and returns the data updated in the database. + * @param {AttachmentUpdateManyAndReturnArgs} args - Arguments to update many Attachments. + * @example + * // Update many Attachments + * const attachment = await prisma.attachment.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more Attachments and only return the `id` + * const attachmentWithIdOnly = await prisma.attachment.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one Attachment. + * @param {AttachmentUpsertArgs} args - Arguments to update or create a Attachment. + * @example + * // Update or create a Attachment + * const attachment = await prisma.attachment.upsert({ + * create: { + * // ... data to create a Attachment + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Attachment we want to update + * } + * }) + */ + upsert(args: Prisma.SelectSubset>): Prisma.Prisma__AttachmentClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of Attachments. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AttachmentCountArgs} args - Arguments to filter Attachments to count. + * @example + * // Count the number of Attachments + * const count = await prisma.attachment.count({ + * where: { + * // ... the filter for the Attachments we want to count + * } + * }) + **/ + count( + args?: Prisma.Subset, + ): Prisma.PrismaPromise< + T extends runtime.Types.Utils.Record<'select', any> + ? T['select'] extends true + ? number + : Prisma.GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a Attachment. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AttachmentAggregateArgs} 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: Prisma.Subset): Prisma.PrismaPromise> + + /** + * Group by Attachment. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AttachmentGroupByArgs} 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 AttachmentGroupByArgs, + HasSelectOrTake extends Prisma.Or< + Prisma.Extends<'skip', Prisma.Keys>, + Prisma.Extends<'take', Prisma.Keys> + >, + OrderByArg extends Prisma.True extends HasSelectOrTake + ? { orderBy: AttachmentGroupByArgs['orderBy'] } + : { orderBy?: AttachmentGroupByArgs['orderBy'] }, + OrderFields extends Prisma.ExcludeUnderscoreKeys>>, + ByFields extends Prisma.MaybeTupleToUnion, + ByValid extends Prisma.Has, + HavingFields extends Prisma.GetHavingFields, + HavingValid extends Prisma.Has, + ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, + InputErrors extends ByEmpty extends Prisma.True + ? `Error: "by" must not be empty.` + : HavingValid extends Prisma.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 Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.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 Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.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 Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetAttachmentGroupByPayload : Prisma.PrismaPromise +/** + * Fields of the Attachment model + */ +readonly fields: AttachmentFieldRefs; +} + +/** + * The delegate class that acts as a "Promise-like" for Attachment. + * 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__AttachmentClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + post = {}>(args?: Prisma.Subset>): Prisma.Prisma__PostClient, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + /** + * 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): runtime.Types.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): runtime.Types.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): runtime.Types.Utils.JsPromise +} + + + + +/** + * Fields of the Attachment model + */ +export interface AttachmentFieldRefs { + readonly id: Prisma.FieldRef<"Attachment", 'Int'> + readonly postId: Prisma.FieldRef<"Attachment", 'Int'> + readonly originalName: Prisma.FieldRef<"Attachment", 'String'> + readonly storageKey: Prisma.FieldRef<"Attachment", 'String'> + readonly mimeType: Prisma.FieldRef<"Attachment", 'String'> + readonly size: Prisma.FieldRef<"Attachment", 'Int'> + readonly downloadCount: Prisma.FieldRef<"Attachment", 'Int'> + readonly createdAt: Prisma.FieldRef<"Attachment", 'DateTime'> +} + + +// Custom InputTypes +/** + * Attachment findUnique + */ +export type AttachmentFindUniqueArgs = { + /** + * Select specific fields to fetch from the Attachment + */ + select?: Prisma.AttachmentSelect | null + /** + * Omit specific fields from the Attachment + */ + omit?: Prisma.AttachmentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AttachmentInclude | null + /** + * Filter, which Attachment to fetch. + */ + where: Prisma.AttachmentWhereUniqueInput +} + +/** + * Attachment findUniqueOrThrow + */ +export type AttachmentFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the Attachment + */ + select?: Prisma.AttachmentSelect | null + /** + * Omit specific fields from the Attachment + */ + omit?: Prisma.AttachmentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AttachmentInclude | null + /** + * Filter, which Attachment to fetch. + */ + where: Prisma.AttachmentWhereUniqueInput +} + +/** + * Attachment findFirst + */ +export type AttachmentFindFirstArgs = { + /** + * Select specific fields to fetch from the Attachment + */ + select?: Prisma.AttachmentSelect | null + /** + * Omit specific fields from the Attachment + */ + omit?: Prisma.AttachmentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AttachmentInclude | null + /** + * Filter, which Attachment to fetch. + */ + where?: Prisma.AttachmentWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Attachments to fetch. + */ + orderBy?: Prisma.AttachmentOrderByWithRelationInput | Prisma.AttachmentOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Attachments. + */ + cursor?: Prisma.AttachmentWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Attachments 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` Attachments. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Attachments. + */ + distinct?: Prisma.AttachmentScalarFieldEnum | Prisma.AttachmentScalarFieldEnum[] +} + +/** + * Attachment findFirstOrThrow + */ +export type AttachmentFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the Attachment + */ + select?: Prisma.AttachmentSelect | null + /** + * Omit specific fields from the Attachment + */ + omit?: Prisma.AttachmentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AttachmentInclude | null + /** + * Filter, which Attachment to fetch. + */ + where?: Prisma.AttachmentWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Attachments to fetch. + */ + orderBy?: Prisma.AttachmentOrderByWithRelationInput | Prisma.AttachmentOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Attachments. + */ + cursor?: Prisma.AttachmentWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Attachments 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` Attachments. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Attachments. + */ + distinct?: Prisma.AttachmentScalarFieldEnum | Prisma.AttachmentScalarFieldEnum[] +} + +/** + * Attachment findMany + */ +export type AttachmentFindManyArgs = { + /** + * Select specific fields to fetch from the Attachment + */ + select?: Prisma.AttachmentSelect | null + /** + * Omit specific fields from the Attachment + */ + omit?: Prisma.AttachmentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AttachmentInclude | null + /** + * Filter, which Attachments to fetch. + */ + where?: Prisma.AttachmentWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Attachments to fetch. + */ + orderBy?: Prisma.AttachmentOrderByWithRelationInput | Prisma.AttachmentOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Attachments. + */ + cursor?: Prisma.AttachmentWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Attachments 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` Attachments. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Attachments. + */ + distinct?: Prisma.AttachmentScalarFieldEnum | Prisma.AttachmentScalarFieldEnum[] +} + +/** + * Attachment create + */ +export type AttachmentCreateArgs = { + /** + * Select specific fields to fetch from the Attachment + */ + select?: Prisma.AttachmentSelect | null + /** + * Omit specific fields from the Attachment + */ + omit?: Prisma.AttachmentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AttachmentInclude | null + /** + * The data needed to create a Attachment. + */ + data: Prisma.XOR +} + +/** + * Attachment createMany + */ +export type AttachmentCreateManyArgs = { + /** + * The data used to create many Attachments. + */ + data: Prisma.AttachmentCreateManyInput | Prisma.AttachmentCreateManyInput[] +} + +/** + * Attachment createManyAndReturn + */ +export type AttachmentCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Attachment + */ + select?: Prisma.AttachmentSelectCreateManyAndReturn | null + /** + * Omit specific fields from the Attachment + */ + omit?: Prisma.AttachmentOmit | null + /** + * The data used to create many Attachments. + */ + data: Prisma.AttachmentCreateManyInput | Prisma.AttachmentCreateManyInput[] + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AttachmentIncludeCreateManyAndReturn | null +} + +/** + * Attachment update + */ +export type AttachmentUpdateArgs = { + /** + * Select specific fields to fetch from the Attachment + */ + select?: Prisma.AttachmentSelect | null + /** + * Omit specific fields from the Attachment + */ + omit?: Prisma.AttachmentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AttachmentInclude | null + /** + * The data needed to update a Attachment. + */ + data: Prisma.XOR + /** + * Choose, which Attachment to update. + */ + where: Prisma.AttachmentWhereUniqueInput +} + +/** + * Attachment updateMany + */ +export type AttachmentUpdateManyArgs = { + /** + * The data used to update Attachments. + */ + data: Prisma.XOR + /** + * Filter which Attachments to update + */ + where?: Prisma.AttachmentWhereInput + /** + * Limit how many Attachments to update. + */ + limit?: number +} + +/** + * Attachment updateManyAndReturn + */ +export type AttachmentUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Attachment + */ + select?: Prisma.AttachmentSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the Attachment + */ + omit?: Prisma.AttachmentOmit | null + /** + * The data used to update Attachments. + */ + data: Prisma.XOR + /** + * Filter which Attachments to update + */ + where?: Prisma.AttachmentWhereInput + /** + * Limit how many Attachments to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AttachmentIncludeUpdateManyAndReturn | null +} + +/** + * Attachment upsert + */ +export type AttachmentUpsertArgs = { + /** + * Select specific fields to fetch from the Attachment + */ + select?: Prisma.AttachmentSelect | null + /** + * Omit specific fields from the Attachment + */ + omit?: Prisma.AttachmentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AttachmentInclude | null + /** + * The filter to search for the Attachment to update in case it exists. + */ + where: Prisma.AttachmentWhereUniqueInput + /** + * In case the Attachment found by the `where` argument doesn't exist, create a new Attachment with this data. + */ + create: Prisma.XOR + /** + * In case the Attachment was found with the provided `where` argument, update it with this data. + */ + update: Prisma.XOR +} + +/** + * Attachment delete + */ +export type AttachmentDeleteArgs = { + /** + * Select specific fields to fetch from the Attachment + */ + select?: Prisma.AttachmentSelect | null + /** + * Omit specific fields from the Attachment + */ + omit?: Prisma.AttachmentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AttachmentInclude | null + /** + * Filter which Attachment to delete. + */ + where: Prisma.AttachmentWhereUniqueInput +} + +/** + * Attachment deleteMany + */ +export type AttachmentDeleteManyArgs = { + /** + * Filter which Attachments to delete + */ + where?: Prisma.AttachmentWhereInput + /** + * Limit how many Attachments to delete. + */ + limit?: number +} + +/** + * Attachment.post + */ +export type Attachment$postArgs = { + /** + * Select specific fields to fetch from the Post + */ + select?: Prisma.PostSelect | null + /** + * Omit specific fields from the Post + */ + omit?: Prisma.PostOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.PostInclude | null + where?: Prisma.PostWhereInput +} + +/** + * Attachment without action + */ +export type AttachmentDefaultArgs = { + /** + * Select specific fields to fetch from the Attachment + */ + select?: Prisma.AttachmentSelect | null + /** + * Omit specific fields from the Attachment + */ + omit?: Prisma.AttachmentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AttachmentInclude | null +} diff --git a/src/generated/prisma/models/AuditLog.ts b/src/generated/prisma/models/AuditLog.ts new file mode 100644 index 0000000..0d9ad52 --- /dev/null +++ b/src/generated/prisma/models/AuditLog.ts @@ -0,0 +1,1470 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * This file exports the `AuditLog` model and its related types. + * + * 🟢 You can import this file directly. + */ +import type * as runtime from "@prisma/client/runtime/client" +import type * as $Enums from "../enums" +import type * as Prisma from "../internal/prismaNamespace" + +/** + * Model AuditLog + * + */ +export type AuditLogModel = runtime.Types.Result.DefaultSelection + +export type AggregateAuditLog = { + _count: AuditLogCountAggregateOutputType | null + _avg: AuditLogAvgAggregateOutputType | null + _sum: AuditLogSumAggregateOutputType | null + _min: AuditLogMinAggregateOutputType | null + _max: AuditLogMaxAggregateOutputType | null +} + +export type AuditLogAvgAggregateOutputType = { + id: number | null +} + +export type AuditLogSumAggregateOutputType = { + id: number | null +} + +export type AuditLogMinAggregateOutputType = { + id: number | null + adminId: string | null + action: string | null + targetType: string | null + targetId: string | null + ip: string | null + createdAt: Date | null +} + +export type AuditLogMaxAggregateOutputType = { + id: number | null + adminId: string | null + action: string | null + targetType: string | null + targetId: string | null + ip: string | null + createdAt: Date | null +} + +export type AuditLogCountAggregateOutputType = { + id: number + adminId: number + action: number + targetType: number + targetId: number + ip: number + createdAt: number + _all: number +} + + +export type AuditLogAvgAggregateInputType = { + id?: true +} + +export type AuditLogSumAggregateInputType = { + id?: true +} + +export type AuditLogMinAggregateInputType = { + id?: true + adminId?: true + action?: true + targetType?: true + targetId?: true + ip?: true + createdAt?: true +} + +export type AuditLogMaxAggregateInputType = { + id?: true + adminId?: true + action?: true + targetType?: true + targetId?: true + ip?: true + createdAt?: true +} + +export type AuditLogCountAggregateInputType = { + id?: true + adminId?: true + action?: true + targetType?: true + targetId?: true + ip?: true + createdAt?: true + _all?: true +} + +export type AuditLogAggregateArgs = { + /** + * Filter which AuditLog to aggregate. + */ + where?: Prisma.AuditLogWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of AuditLogs to fetch. + */ + orderBy?: Prisma.AuditLogOrderByWithRelationInput | Prisma.AuditLogOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: Prisma.AuditLogWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` AuditLogs 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` AuditLogs. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned AuditLogs + **/ + _count?: true | AuditLogCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: AuditLogAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: AuditLogSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: AuditLogMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: AuditLogMaxAggregateInputType +} + +export type GetAuditLogAggregateType = { + [P in keyof T & keyof AggregateAuditLog]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType +} + + + + +export type AuditLogGroupByArgs = { + where?: Prisma.AuditLogWhereInput + orderBy?: Prisma.AuditLogOrderByWithAggregationInput | Prisma.AuditLogOrderByWithAggregationInput[] + by: Prisma.AuditLogScalarFieldEnum[] | Prisma.AuditLogScalarFieldEnum + having?: Prisma.AuditLogScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: AuditLogCountAggregateInputType | true + _avg?: AuditLogAvgAggregateInputType + _sum?: AuditLogSumAggregateInputType + _min?: AuditLogMinAggregateInputType + _max?: AuditLogMaxAggregateInputType +} + +export type AuditLogGroupByOutputType = { + id: number + adminId: string | null + action: string + targetType: string | null + targetId: string | null + ip: string | null + createdAt: Date + _count: AuditLogCountAggregateOutputType | null + _avg: AuditLogAvgAggregateOutputType | null + _sum: AuditLogSumAggregateOutputType | null + _min: AuditLogMinAggregateOutputType | null + _max: AuditLogMaxAggregateOutputType | null +} + +export type GetAuditLogGroupByPayload = Prisma.PrismaPromise< + Array< + Prisma.PickEnumerable & + { + [P in ((keyof T) & (keyof AuditLogGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType + } + > + > + + + +export type AuditLogWhereInput = { + AND?: Prisma.AuditLogWhereInput | Prisma.AuditLogWhereInput[] + OR?: Prisma.AuditLogWhereInput[] + NOT?: Prisma.AuditLogWhereInput | Prisma.AuditLogWhereInput[] + id?: Prisma.IntFilter<"AuditLog"> | number + adminId?: Prisma.StringNullableFilter<"AuditLog"> | string | null + action?: Prisma.StringFilter<"AuditLog"> | string + targetType?: Prisma.StringNullableFilter<"AuditLog"> | string | null + targetId?: Prisma.StringNullableFilter<"AuditLog"> | string | null + ip?: Prisma.StringNullableFilter<"AuditLog"> | string | null + createdAt?: Prisma.DateTimeFilter<"AuditLog"> | Date | string + admin?: Prisma.XOR | null +} + +export type AuditLogOrderByWithRelationInput = { + id?: Prisma.SortOrder + adminId?: Prisma.SortOrderInput | Prisma.SortOrder + action?: Prisma.SortOrder + targetType?: Prisma.SortOrderInput | Prisma.SortOrder + targetId?: Prisma.SortOrderInput | Prisma.SortOrder + ip?: Prisma.SortOrderInput | Prisma.SortOrder + createdAt?: Prisma.SortOrder + admin?: Prisma.AdminUserOrderByWithRelationInput +} + +export type AuditLogWhereUniqueInput = Prisma.AtLeast<{ + id?: number + AND?: Prisma.AuditLogWhereInput | Prisma.AuditLogWhereInput[] + OR?: Prisma.AuditLogWhereInput[] + NOT?: Prisma.AuditLogWhereInput | Prisma.AuditLogWhereInput[] + adminId?: Prisma.StringNullableFilter<"AuditLog"> | string | null + action?: Prisma.StringFilter<"AuditLog"> | string + targetType?: Prisma.StringNullableFilter<"AuditLog"> | string | null + targetId?: Prisma.StringNullableFilter<"AuditLog"> | string | null + ip?: Prisma.StringNullableFilter<"AuditLog"> | string | null + createdAt?: Prisma.DateTimeFilter<"AuditLog"> | Date | string + admin?: Prisma.XOR | null +}, "id"> + +export type AuditLogOrderByWithAggregationInput = { + id?: Prisma.SortOrder + adminId?: Prisma.SortOrderInput | Prisma.SortOrder + action?: Prisma.SortOrder + targetType?: Prisma.SortOrderInput | Prisma.SortOrder + targetId?: Prisma.SortOrderInput | Prisma.SortOrder + ip?: Prisma.SortOrderInput | Prisma.SortOrder + createdAt?: Prisma.SortOrder + _count?: Prisma.AuditLogCountOrderByAggregateInput + _avg?: Prisma.AuditLogAvgOrderByAggregateInput + _max?: Prisma.AuditLogMaxOrderByAggregateInput + _min?: Prisma.AuditLogMinOrderByAggregateInput + _sum?: Prisma.AuditLogSumOrderByAggregateInput +} + +export type AuditLogScalarWhereWithAggregatesInput = { + AND?: Prisma.AuditLogScalarWhereWithAggregatesInput | Prisma.AuditLogScalarWhereWithAggregatesInput[] + OR?: Prisma.AuditLogScalarWhereWithAggregatesInput[] + NOT?: Prisma.AuditLogScalarWhereWithAggregatesInput | Prisma.AuditLogScalarWhereWithAggregatesInput[] + id?: Prisma.IntWithAggregatesFilter<"AuditLog"> | number + adminId?: Prisma.StringNullableWithAggregatesFilter<"AuditLog"> | string | null + action?: Prisma.StringWithAggregatesFilter<"AuditLog"> | string + targetType?: Prisma.StringNullableWithAggregatesFilter<"AuditLog"> | string | null + targetId?: Prisma.StringNullableWithAggregatesFilter<"AuditLog"> | string | null + ip?: Prisma.StringNullableWithAggregatesFilter<"AuditLog"> | string | null + createdAt?: Prisma.DateTimeWithAggregatesFilter<"AuditLog"> | Date | string +} + +export type AuditLogCreateInput = { + action: string + targetType?: string | null + targetId?: string | null + ip?: string | null + createdAt?: Date | string + admin?: Prisma.AdminUserCreateNestedOneWithoutAuditLogsInput +} + +export type AuditLogUncheckedCreateInput = { + id?: number + adminId?: string | null + action: string + targetType?: string | null + targetId?: string | null + ip?: string | null + createdAt?: Date | string +} + +export type AuditLogUpdateInput = { + action?: Prisma.StringFieldUpdateOperationsInput | string + targetType?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + targetId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + ip?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + admin?: Prisma.AdminUserUpdateOneWithoutAuditLogsNestedInput +} + +export type AuditLogUncheckedUpdateInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + adminId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + action?: Prisma.StringFieldUpdateOperationsInput | string + targetType?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + targetId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + ip?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type AuditLogCreateManyInput = { + id?: number + adminId?: string | null + action: string + targetType?: string | null + targetId?: string | null + ip?: string | null + createdAt?: Date | string +} + +export type AuditLogUpdateManyMutationInput = { + action?: Prisma.StringFieldUpdateOperationsInput | string + targetType?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + targetId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + ip?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type AuditLogUncheckedUpdateManyInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + adminId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + action?: Prisma.StringFieldUpdateOperationsInput | string + targetType?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + targetId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + ip?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type AuditLogListRelationFilter = { + every?: Prisma.AuditLogWhereInput + some?: Prisma.AuditLogWhereInput + none?: Prisma.AuditLogWhereInput +} + +export type AuditLogOrderByRelationAggregateInput = { + _count?: Prisma.SortOrder +} + +export type AuditLogCountOrderByAggregateInput = { + id?: Prisma.SortOrder + adminId?: Prisma.SortOrder + action?: Prisma.SortOrder + targetType?: Prisma.SortOrder + targetId?: Prisma.SortOrder + ip?: Prisma.SortOrder + createdAt?: Prisma.SortOrder +} + +export type AuditLogAvgOrderByAggregateInput = { + id?: Prisma.SortOrder +} + +export type AuditLogMaxOrderByAggregateInput = { + id?: Prisma.SortOrder + adminId?: Prisma.SortOrder + action?: Prisma.SortOrder + targetType?: Prisma.SortOrder + targetId?: Prisma.SortOrder + ip?: Prisma.SortOrder + createdAt?: Prisma.SortOrder +} + +export type AuditLogMinOrderByAggregateInput = { + id?: Prisma.SortOrder + adminId?: Prisma.SortOrder + action?: Prisma.SortOrder + targetType?: Prisma.SortOrder + targetId?: Prisma.SortOrder + ip?: Prisma.SortOrder + createdAt?: Prisma.SortOrder +} + +export type AuditLogSumOrderByAggregateInput = { + id?: Prisma.SortOrder +} + +export type AuditLogCreateNestedManyWithoutAdminInput = { + create?: Prisma.XOR | Prisma.AuditLogCreateWithoutAdminInput[] | Prisma.AuditLogUncheckedCreateWithoutAdminInput[] + connectOrCreate?: Prisma.AuditLogCreateOrConnectWithoutAdminInput | Prisma.AuditLogCreateOrConnectWithoutAdminInput[] + createMany?: Prisma.AuditLogCreateManyAdminInputEnvelope + connect?: Prisma.AuditLogWhereUniqueInput | Prisma.AuditLogWhereUniqueInput[] +} + +export type AuditLogUncheckedCreateNestedManyWithoutAdminInput = { + create?: Prisma.XOR | Prisma.AuditLogCreateWithoutAdminInput[] | Prisma.AuditLogUncheckedCreateWithoutAdminInput[] + connectOrCreate?: Prisma.AuditLogCreateOrConnectWithoutAdminInput | Prisma.AuditLogCreateOrConnectWithoutAdminInput[] + createMany?: Prisma.AuditLogCreateManyAdminInputEnvelope + connect?: Prisma.AuditLogWhereUniqueInput | Prisma.AuditLogWhereUniqueInput[] +} + +export type AuditLogUpdateManyWithoutAdminNestedInput = { + create?: Prisma.XOR | Prisma.AuditLogCreateWithoutAdminInput[] | Prisma.AuditLogUncheckedCreateWithoutAdminInput[] + connectOrCreate?: Prisma.AuditLogCreateOrConnectWithoutAdminInput | Prisma.AuditLogCreateOrConnectWithoutAdminInput[] + upsert?: Prisma.AuditLogUpsertWithWhereUniqueWithoutAdminInput | Prisma.AuditLogUpsertWithWhereUniqueWithoutAdminInput[] + createMany?: Prisma.AuditLogCreateManyAdminInputEnvelope + set?: Prisma.AuditLogWhereUniqueInput | Prisma.AuditLogWhereUniqueInput[] + disconnect?: Prisma.AuditLogWhereUniqueInput | Prisma.AuditLogWhereUniqueInput[] + delete?: Prisma.AuditLogWhereUniqueInput | Prisma.AuditLogWhereUniqueInput[] + connect?: Prisma.AuditLogWhereUniqueInput | Prisma.AuditLogWhereUniqueInput[] + update?: Prisma.AuditLogUpdateWithWhereUniqueWithoutAdminInput | Prisma.AuditLogUpdateWithWhereUniqueWithoutAdminInput[] + updateMany?: Prisma.AuditLogUpdateManyWithWhereWithoutAdminInput | Prisma.AuditLogUpdateManyWithWhereWithoutAdminInput[] + deleteMany?: Prisma.AuditLogScalarWhereInput | Prisma.AuditLogScalarWhereInput[] +} + +export type AuditLogUncheckedUpdateManyWithoutAdminNestedInput = { + create?: Prisma.XOR | Prisma.AuditLogCreateWithoutAdminInput[] | Prisma.AuditLogUncheckedCreateWithoutAdminInput[] + connectOrCreate?: Prisma.AuditLogCreateOrConnectWithoutAdminInput | Prisma.AuditLogCreateOrConnectWithoutAdminInput[] + upsert?: Prisma.AuditLogUpsertWithWhereUniqueWithoutAdminInput | Prisma.AuditLogUpsertWithWhereUniqueWithoutAdminInput[] + createMany?: Prisma.AuditLogCreateManyAdminInputEnvelope + set?: Prisma.AuditLogWhereUniqueInput | Prisma.AuditLogWhereUniqueInput[] + disconnect?: Prisma.AuditLogWhereUniqueInput | Prisma.AuditLogWhereUniqueInput[] + delete?: Prisma.AuditLogWhereUniqueInput | Prisma.AuditLogWhereUniqueInput[] + connect?: Prisma.AuditLogWhereUniqueInput | Prisma.AuditLogWhereUniqueInput[] + update?: Prisma.AuditLogUpdateWithWhereUniqueWithoutAdminInput | Prisma.AuditLogUpdateWithWhereUniqueWithoutAdminInput[] + updateMany?: Prisma.AuditLogUpdateManyWithWhereWithoutAdminInput | Prisma.AuditLogUpdateManyWithWhereWithoutAdminInput[] + deleteMany?: Prisma.AuditLogScalarWhereInput | Prisma.AuditLogScalarWhereInput[] +} + +export type AuditLogCreateWithoutAdminInput = { + action: string + targetType?: string | null + targetId?: string | null + ip?: string | null + createdAt?: Date | string +} + +export type AuditLogUncheckedCreateWithoutAdminInput = { + id?: number + action: string + targetType?: string | null + targetId?: string | null + ip?: string | null + createdAt?: Date | string +} + +export type AuditLogCreateOrConnectWithoutAdminInput = { + where: Prisma.AuditLogWhereUniqueInput + create: Prisma.XOR +} + +export type AuditLogCreateManyAdminInputEnvelope = { + data: Prisma.AuditLogCreateManyAdminInput | Prisma.AuditLogCreateManyAdminInput[] +} + +export type AuditLogUpsertWithWhereUniqueWithoutAdminInput = { + where: Prisma.AuditLogWhereUniqueInput + update: Prisma.XOR + create: Prisma.XOR +} + +export type AuditLogUpdateWithWhereUniqueWithoutAdminInput = { + where: Prisma.AuditLogWhereUniqueInput + data: Prisma.XOR +} + +export type AuditLogUpdateManyWithWhereWithoutAdminInput = { + where: Prisma.AuditLogScalarWhereInput + data: Prisma.XOR +} + +export type AuditLogScalarWhereInput = { + AND?: Prisma.AuditLogScalarWhereInput | Prisma.AuditLogScalarWhereInput[] + OR?: Prisma.AuditLogScalarWhereInput[] + NOT?: Prisma.AuditLogScalarWhereInput | Prisma.AuditLogScalarWhereInput[] + id?: Prisma.IntFilter<"AuditLog"> | number + adminId?: Prisma.StringNullableFilter<"AuditLog"> | string | null + action?: Prisma.StringFilter<"AuditLog"> | string + targetType?: Prisma.StringNullableFilter<"AuditLog"> | string | null + targetId?: Prisma.StringNullableFilter<"AuditLog"> | string | null + ip?: Prisma.StringNullableFilter<"AuditLog"> | string | null + createdAt?: Prisma.DateTimeFilter<"AuditLog"> | Date | string +} + +export type AuditLogCreateManyAdminInput = { + id?: number + action: string + targetType?: string | null + targetId?: string | null + ip?: string | null + createdAt?: Date | string +} + +export type AuditLogUpdateWithoutAdminInput = { + action?: Prisma.StringFieldUpdateOperationsInput | string + targetType?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + targetId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + ip?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type AuditLogUncheckedUpdateWithoutAdminInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + action?: Prisma.StringFieldUpdateOperationsInput | string + targetType?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + targetId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + ip?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type AuditLogUncheckedUpdateManyWithoutAdminInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + action?: Prisma.StringFieldUpdateOperationsInput | string + targetType?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + targetId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + ip?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + + + +export type AuditLogSelect = runtime.Types.Extensions.GetSelect<{ + id?: boolean + adminId?: boolean + action?: boolean + targetType?: boolean + targetId?: boolean + ip?: boolean + createdAt?: boolean + admin?: boolean | Prisma.AuditLog$adminArgs +}, ExtArgs["result"]["auditLog"]> + +export type AuditLogSelectCreateManyAndReturn = runtime.Types.Extensions.GetSelect<{ + id?: boolean + adminId?: boolean + action?: boolean + targetType?: boolean + targetId?: boolean + ip?: boolean + createdAt?: boolean + admin?: boolean | Prisma.AuditLog$adminArgs +}, ExtArgs["result"]["auditLog"]> + +export type AuditLogSelectUpdateManyAndReturn = runtime.Types.Extensions.GetSelect<{ + id?: boolean + adminId?: boolean + action?: boolean + targetType?: boolean + targetId?: boolean + ip?: boolean + createdAt?: boolean + admin?: boolean | Prisma.AuditLog$adminArgs +}, ExtArgs["result"]["auditLog"]> + +export type AuditLogSelectScalar = { + id?: boolean + adminId?: boolean + action?: boolean + targetType?: boolean + targetId?: boolean + ip?: boolean + createdAt?: boolean +} + +export type AuditLogOmit = runtime.Types.Extensions.GetOmit<"id" | "adminId" | "action" | "targetType" | "targetId" | "ip" | "createdAt", ExtArgs["result"]["auditLog"]> +export type AuditLogInclude = { + admin?: boolean | Prisma.AuditLog$adminArgs +} +export type AuditLogIncludeCreateManyAndReturn = { + admin?: boolean | Prisma.AuditLog$adminArgs +} +export type AuditLogIncludeUpdateManyAndReturn = { + admin?: boolean | Prisma.AuditLog$adminArgs +} + +export type $AuditLogPayload = { + name: "AuditLog" + objects: { + admin: Prisma.$AdminUserPayload | null + } + scalars: runtime.Types.Extensions.GetPayloadResult<{ + id: number + adminId: string | null + action: string + targetType: string | null + targetId: string | null + ip: string | null + createdAt: Date + }, ExtArgs["result"]["auditLog"]> + composites: {} +} + +export type AuditLogGetPayload = runtime.Types.Result.GetResult + +export type AuditLogCountArgs = + Omit & { + select?: AuditLogCountAggregateInputType | true + } + +export interface AuditLogDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['AuditLog'], meta: { name: 'AuditLog' } } + /** + * Find zero or one AuditLog that matches the filter. + * @param {AuditLogFindUniqueArgs} args - Arguments to find a AuditLog + * @example + * // Get one AuditLog + * const auditLog = await prisma.auditLog.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__AuditLogClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one AuditLog that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {AuditLogFindUniqueOrThrowArgs} args - Arguments to find a AuditLog + * @example + * // Get one AuditLog + * const auditLog = await prisma.auditLog.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__AuditLogClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first AuditLog 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 {AuditLogFindFirstArgs} args - Arguments to find a AuditLog + * @example + * // Get one AuditLog + * const auditLog = await prisma.auditLog.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__AuditLogClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first AuditLog 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 {AuditLogFindFirstOrThrowArgs} args - Arguments to find a AuditLog + * @example + * // Get one AuditLog + * const auditLog = await prisma.auditLog.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__AuditLogClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more AuditLogs 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 {AuditLogFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all AuditLogs + * const auditLogs = await prisma.auditLog.findMany() + * + * // Get first 10 AuditLogs + * const auditLogs = await prisma.auditLog.findMany({ take: 10 }) + * + * // Only select the `id` + * const auditLogWithIdOnly = await prisma.auditLog.findMany({ select: { id: true } }) + * + */ + findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> + + /** + * Create a AuditLog. + * @param {AuditLogCreateArgs} args - Arguments to create a AuditLog. + * @example + * // Create one AuditLog + * const AuditLog = await prisma.auditLog.create({ + * data: { + * // ... data to create a AuditLog + * } + * }) + * + */ + create(args: Prisma.SelectSubset>): Prisma.Prisma__AuditLogClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many AuditLogs. + * @param {AuditLogCreateManyArgs} args - Arguments to create many AuditLogs. + * @example + * // Create many AuditLogs + * const auditLog = await prisma.auditLog.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Create many AuditLogs and returns the data saved in the database. + * @param {AuditLogCreateManyAndReturnArgs} args - Arguments to create many AuditLogs. + * @example + * // Create many AuditLogs + * const auditLog = await prisma.auditLog.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many AuditLogs and only return the `id` + * const auditLogWithIdOnly = await prisma.auditLog.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a AuditLog. + * @param {AuditLogDeleteArgs} args - Arguments to delete one AuditLog. + * @example + * // Delete one AuditLog + * const AuditLog = await prisma.auditLog.delete({ + * where: { + * // ... filter to delete one AuditLog + * } + * }) + * + */ + delete(args: Prisma.SelectSubset>): Prisma.Prisma__AuditLogClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one AuditLog. + * @param {AuditLogUpdateArgs} args - Arguments to update one AuditLog. + * @example + * // Update one AuditLog + * const auditLog = await prisma.auditLog.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: Prisma.SelectSubset>): Prisma.Prisma__AuditLogClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more AuditLogs. + * @param {AuditLogDeleteManyArgs} args - Arguments to filter AuditLogs to delete. + * @example + * // Delete a few AuditLogs + * const { count } = await prisma.auditLog.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more AuditLogs. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AuditLogUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many AuditLogs + * const auditLog = await prisma.auditLog.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more AuditLogs and returns the data updated in the database. + * @param {AuditLogUpdateManyAndReturnArgs} args - Arguments to update many AuditLogs. + * @example + * // Update many AuditLogs + * const auditLog = await prisma.auditLog.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more AuditLogs and only return the `id` + * const auditLogWithIdOnly = await prisma.auditLog.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one AuditLog. + * @param {AuditLogUpsertArgs} args - Arguments to update or create a AuditLog. + * @example + * // Update or create a AuditLog + * const auditLog = await prisma.auditLog.upsert({ + * create: { + * // ... data to create a AuditLog + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the AuditLog we want to update + * } + * }) + */ + upsert(args: Prisma.SelectSubset>): Prisma.Prisma__AuditLogClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of AuditLogs. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AuditLogCountArgs} args - Arguments to filter AuditLogs to count. + * @example + * // Count the number of AuditLogs + * const count = await prisma.auditLog.count({ + * where: { + * // ... the filter for the AuditLogs we want to count + * } + * }) + **/ + count( + args?: Prisma.Subset, + ): Prisma.PrismaPromise< + T extends runtime.Types.Utils.Record<'select', any> + ? T['select'] extends true + ? number + : Prisma.GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a AuditLog. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AuditLogAggregateArgs} 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: Prisma.Subset): Prisma.PrismaPromise> + + /** + * Group by AuditLog. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AuditLogGroupByArgs} 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 AuditLogGroupByArgs, + HasSelectOrTake extends Prisma.Or< + Prisma.Extends<'skip', Prisma.Keys>, + Prisma.Extends<'take', Prisma.Keys> + >, + OrderByArg extends Prisma.True extends HasSelectOrTake + ? { orderBy: AuditLogGroupByArgs['orderBy'] } + : { orderBy?: AuditLogGroupByArgs['orderBy'] }, + OrderFields extends Prisma.ExcludeUnderscoreKeys>>, + ByFields extends Prisma.MaybeTupleToUnion, + ByValid extends Prisma.Has, + HavingFields extends Prisma.GetHavingFields, + HavingValid extends Prisma.Has, + ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, + InputErrors extends ByEmpty extends Prisma.True + ? `Error: "by" must not be empty.` + : HavingValid extends Prisma.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 Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.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 Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.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 Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetAuditLogGroupByPayload : Prisma.PrismaPromise +/** + * Fields of the AuditLog model + */ +readonly fields: AuditLogFieldRefs; +} + +/** + * The delegate class that acts as a "Promise-like" for AuditLog. + * 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__AuditLogClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + admin = {}>(args?: Prisma.Subset>): Prisma.Prisma__AdminUserClient, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + /** + * 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): runtime.Types.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): runtime.Types.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): runtime.Types.Utils.JsPromise +} + + + + +/** + * Fields of the AuditLog model + */ +export interface AuditLogFieldRefs { + readonly id: Prisma.FieldRef<"AuditLog", 'Int'> + readonly adminId: Prisma.FieldRef<"AuditLog", 'String'> + readonly action: Prisma.FieldRef<"AuditLog", 'String'> + readonly targetType: Prisma.FieldRef<"AuditLog", 'String'> + readonly targetId: Prisma.FieldRef<"AuditLog", 'String'> + readonly ip: Prisma.FieldRef<"AuditLog", 'String'> + readonly createdAt: Prisma.FieldRef<"AuditLog", 'DateTime'> +} + + +// Custom InputTypes +/** + * AuditLog findUnique + */ +export type AuditLogFindUniqueArgs = { + /** + * Select specific fields to fetch from the AuditLog + */ + select?: Prisma.AuditLogSelect | null + /** + * Omit specific fields from the AuditLog + */ + omit?: Prisma.AuditLogOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AuditLogInclude | null + /** + * Filter, which AuditLog to fetch. + */ + where: Prisma.AuditLogWhereUniqueInput +} + +/** + * AuditLog findUniqueOrThrow + */ +export type AuditLogFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the AuditLog + */ + select?: Prisma.AuditLogSelect | null + /** + * Omit specific fields from the AuditLog + */ + omit?: Prisma.AuditLogOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AuditLogInclude | null + /** + * Filter, which AuditLog to fetch. + */ + where: Prisma.AuditLogWhereUniqueInput +} + +/** + * AuditLog findFirst + */ +export type AuditLogFindFirstArgs = { + /** + * Select specific fields to fetch from the AuditLog + */ + select?: Prisma.AuditLogSelect | null + /** + * Omit specific fields from the AuditLog + */ + omit?: Prisma.AuditLogOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AuditLogInclude | null + /** + * Filter, which AuditLog to fetch. + */ + where?: Prisma.AuditLogWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of AuditLogs to fetch. + */ + orderBy?: Prisma.AuditLogOrderByWithRelationInput | Prisma.AuditLogOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for AuditLogs. + */ + cursor?: Prisma.AuditLogWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` AuditLogs 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` AuditLogs. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of AuditLogs. + */ + distinct?: Prisma.AuditLogScalarFieldEnum | Prisma.AuditLogScalarFieldEnum[] +} + +/** + * AuditLog findFirstOrThrow + */ +export type AuditLogFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the AuditLog + */ + select?: Prisma.AuditLogSelect | null + /** + * Omit specific fields from the AuditLog + */ + omit?: Prisma.AuditLogOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AuditLogInclude | null + /** + * Filter, which AuditLog to fetch. + */ + where?: Prisma.AuditLogWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of AuditLogs to fetch. + */ + orderBy?: Prisma.AuditLogOrderByWithRelationInput | Prisma.AuditLogOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for AuditLogs. + */ + cursor?: Prisma.AuditLogWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` AuditLogs 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` AuditLogs. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of AuditLogs. + */ + distinct?: Prisma.AuditLogScalarFieldEnum | Prisma.AuditLogScalarFieldEnum[] +} + +/** + * AuditLog findMany + */ +export type AuditLogFindManyArgs = { + /** + * Select specific fields to fetch from the AuditLog + */ + select?: Prisma.AuditLogSelect | null + /** + * Omit specific fields from the AuditLog + */ + omit?: Prisma.AuditLogOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AuditLogInclude | null + /** + * Filter, which AuditLogs to fetch. + */ + where?: Prisma.AuditLogWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of AuditLogs to fetch. + */ + orderBy?: Prisma.AuditLogOrderByWithRelationInput | Prisma.AuditLogOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing AuditLogs. + */ + cursor?: Prisma.AuditLogWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` AuditLogs 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` AuditLogs. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of AuditLogs. + */ + distinct?: Prisma.AuditLogScalarFieldEnum | Prisma.AuditLogScalarFieldEnum[] +} + +/** + * AuditLog create + */ +export type AuditLogCreateArgs = { + /** + * Select specific fields to fetch from the AuditLog + */ + select?: Prisma.AuditLogSelect | null + /** + * Omit specific fields from the AuditLog + */ + omit?: Prisma.AuditLogOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AuditLogInclude | null + /** + * The data needed to create a AuditLog. + */ + data: Prisma.XOR +} + +/** + * AuditLog createMany + */ +export type AuditLogCreateManyArgs = { + /** + * The data used to create many AuditLogs. + */ + data: Prisma.AuditLogCreateManyInput | Prisma.AuditLogCreateManyInput[] +} + +/** + * AuditLog createManyAndReturn + */ +export type AuditLogCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the AuditLog + */ + select?: Prisma.AuditLogSelectCreateManyAndReturn | null + /** + * Omit specific fields from the AuditLog + */ + omit?: Prisma.AuditLogOmit | null + /** + * The data used to create many AuditLogs. + */ + data: Prisma.AuditLogCreateManyInput | Prisma.AuditLogCreateManyInput[] + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AuditLogIncludeCreateManyAndReturn | null +} + +/** + * AuditLog update + */ +export type AuditLogUpdateArgs = { + /** + * Select specific fields to fetch from the AuditLog + */ + select?: Prisma.AuditLogSelect | null + /** + * Omit specific fields from the AuditLog + */ + omit?: Prisma.AuditLogOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AuditLogInclude | null + /** + * The data needed to update a AuditLog. + */ + data: Prisma.XOR + /** + * Choose, which AuditLog to update. + */ + where: Prisma.AuditLogWhereUniqueInput +} + +/** + * AuditLog updateMany + */ +export type AuditLogUpdateManyArgs = { + /** + * The data used to update AuditLogs. + */ + data: Prisma.XOR + /** + * Filter which AuditLogs to update + */ + where?: Prisma.AuditLogWhereInput + /** + * Limit how many AuditLogs to update. + */ + limit?: number +} + +/** + * AuditLog updateManyAndReturn + */ +export type AuditLogUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the AuditLog + */ + select?: Prisma.AuditLogSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the AuditLog + */ + omit?: Prisma.AuditLogOmit | null + /** + * The data used to update AuditLogs. + */ + data: Prisma.XOR + /** + * Filter which AuditLogs to update + */ + where?: Prisma.AuditLogWhereInput + /** + * Limit how many AuditLogs to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AuditLogIncludeUpdateManyAndReturn | null +} + +/** + * AuditLog upsert + */ +export type AuditLogUpsertArgs = { + /** + * Select specific fields to fetch from the AuditLog + */ + select?: Prisma.AuditLogSelect | null + /** + * Omit specific fields from the AuditLog + */ + omit?: Prisma.AuditLogOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AuditLogInclude | null + /** + * The filter to search for the AuditLog to update in case it exists. + */ + where: Prisma.AuditLogWhereUniqueInput + /** + * In case the AuditLog found by the `where` argument doesn't exist, create a new AuditLog with this data. + */ + create: Prisma.XOR + /** + * In case the AuditLog was found with the provided `where` argument, update it with this data. + */ + update: Prisma.XOR +} + +/** + * AuditLog delete + */ +export type AuditLogDeleteArgs = { + /** + * Select specific fields to fetch from the AuditLog + */ + select?: Prisma.AuditLogSelect | null + /** + * Omit specific fields from the AuditLog + */ + omit?: Prisma.AuditLogOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AuditLogInclude | null + /** + * Filter which AuditLog to delete. + */ + where: Prisma.AuditLogWhereUniqueInput +} + +/** + * AuditLog deleteMany + */ +export type AuditLogDeleteManyArgs = { + /** + * Filter which AuditLogs to delete + */ + where?: Prisma.AuditLogWhereInput + /** + * Limit how many AuditLogs to delete. + */ + limit?: number +} + +/** + * AuditLog.admin + */ +export type AuditLog$adminArgs = { + /** + * Select specific fields to fetch from the AdminUser + */ + select?: Prisma.AdminUserSelect | null + /** + * Omit specific fields from the AdminUser + */ + omit?: Prisma.AdminUserOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AdminUserInclude | null + where?: Prisma.AdminUserWhereInput +} + +/** + * AuditLog without action + */ +export type AuditLogDefaultArgs = { + /** + * Select specific fields to fetch from the AuditLog + */ + select?: Prisma.AuditLogSelect | null + /** + * Omit specific fields from the AuditLog + */ + omit?: Prisma.AuditLogOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AuditLogInclude | null +} diff --git a/src/generated/prisma/models/Inquiry.ts b/src/generated/prisma/models/Inquiry.ts new file mode 100644 index 0000000..f82ec25 --- /dev/null +++ b/src/generated/prisma/models/Inquiry.ts @@ -0,0 +1,1328 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * This file exports the `Inquiry` model and its related types. + * + * 🟢 You can import this file directly. + */ +import type * as runtime from "@prisma/client/runtime/client" +import type * as $Enums from "../enums" +import type * as Prisma from "../internal/prismaNamespace" + +/** + * Model Inquiry + * + */ +export type InquiryModel = runtime.Types.Result.DefaultSelection + +export type AggregateInquiry = { + _count: InquiryCountAggregateOutputType | null + _avg: InquiryAvgAggregateOutputType | null + _sum: InquirySumAggregateOutputType | null + _min: InquiryMinAggregateOutputType | null + _max: InquiryMaxAggregateOutputType | null +} + +export type InquiryAvgAggregateOutputType = { + id: number | null +} + +export type InquirySumAggregateOutputType = { + id: number | null +} + +export type InquiryMinAggregateOutputType = { + id: number | null + name: string | null + email: string | null + phone: string | null + title: string | null + content: string | null + consent: boolean | null + status: string | null + ip: string | null + createdAt: Date | null +} + +export type InquiryMaxAggregateOutputType = { + id: number | null + name: string | null + email: string | null + phone: string | null + title: string | null + content: string | null + consent: boolean | null + status: string | null + ip: string | null + createdAt: Date | null +} + +export type InquiryCountAggregateOutputType = { + id: number + name: number + email: number + phone: number + title: number + content: number + consent: number + status: number + ip: number + createdAt: number + _all: number +} + + +export type InquiryAvgAggregateInputType = { + id?: true +} + +export type InquirySumAggregateInputType = { + id?: true +} + +export type InquiryMinAggregateInputType = { + id?: true + name?: true + email?: true + phone?: true + title?: true + content?: true + consent?: true + status?: true + ip?: true + createdAt?: true +} + +export type InquiryMaxAggregateInputType = { + id?: true + name?: true + email?: true + phone?: true + title?: true + content?: true + consent?: true + status?: true + ip?: true + createdAt?: true +} + +export type InquiryCountAggregateInputType = { + id?: true + name?: true + email?: true + phone?: true + title?: true + content?: true + consent?: true + status?: true + ip?: true + createdAt?: true + _all?: true +} + +export type InquiryAggregateArgs = { + /** + * Filter which Inquiry to aggregate. + */ + where?: Prisma.InquiryWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Inquiries to fetch. + */ + orderBy?: Prisma.InquiryOrderByWithRelationInput | Prisma.InquiryOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: Prisma.InquiryWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Inquiries 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` Inquiries. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Inquiries + **/ + _count?: true | InquiryCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: InquiryAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: InquirySumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: InquiryMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: InquiryMaxAggregateInputType +} + +export type GetInquiryAggregateType = { + [P in keyof T & keyof AggregateInquiry]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType +} + + + + +export type InquiryGroupByArgs = { + where?: Prisma.InquiryWhereInput + orderBy?: Prisma.InquiryOrderByWithAggregationInput | Prisma.InquiryOrderByWithAggregationInput[] + by: Prisma.InquiryScalarFieldEnum[] | Prisma.InquiryScalarFieldEnum + having?: Prisma.InquiryScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: InquiryCountAggregateInputType | true + _avg?: InquiryAvgAggregateInputType + _sum?: InquirySumAggregateInputType + _min?: InquiryMinAggregateInputType + _max?: InquiryMaxAggregateInputType +} + +export type InquiryGroupByOutputType = { + id: number + name: string + email: string + phone: string | null + title: string + content: string + consent: boolean + status: string + ip: string | null + createdAt: Date + _count: InquiryCountAggregateOutputType | null + _avg: InquiryAvgAggregateOutputType | null + _sum: InquirySumAggregateOutputType | null + _min: InquiryMinAggregateOutputType | null + _max: InquiryMaxAggregateOutputType | null +} + +export type GetInquiryGroupByPayload = Prisma.PrismaPromise< + Array< + Prisma.PickEnumerable & + { + [P in ((keyof T) & (keyof InquiryGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType + } + > + > + + + +export type InquiryWhereInput = { + AND?: Prisma.InquiryWhereInput | Prisma.InquiryWhereInput[] + OR?: Prisma.InquiryWhereInput[] + NOT?: Prisma.InquiryWhereInput | Prisma.InquiryWhereInput[] + id?: Prisma.IntFilter<"Inquiry"> | number + name?: Prisma.StringFilter<"Inquiry"> | string + email?: Prisma.StringFilter<"Inquiry"> | string + phone?: Prisma.StringNullableFilter<"Inquiry"> | string | null + title?: Prisma.StringFilter<"Inquiry"> | string + content?: Prisma.StringFilter<"Inquiry"> | string + consent?: Prisma.BoolFilter<"Inquiry"> | boolean + status?: Prisma.StringFilter<"Inquiry"> | string + ip?: Prisma.StringNullableFilter<"Inquiry"> | string | null + createdAt?: Prisma.DateTimeFilter<"Inquiry"> | Date | string +} + +export type InquiryOrderByWithRelationInput = { + id?: Prisma.SortOrder + name?: Prisma.SortOrder + email?: Prisma.SortOrder + phone?: Prisma.SortOrderInput | Prisma.SortOrder + title?: Prisma.SortOrder + content?: Prisma.SortOrder + consent?: Prisma.SortOrder + status?: Prisma.SortOrder + ip?: Prisma.SortOrderInput | Prisma.SortOrder + createdAt?: Prisma.SortOrder +} + +export type InquiryWhereUniqueInput = Prisma.AtLeast<{ + id?: number + AND?: Prisma.InquiryWhereInput | Prisma.InquiryWhereInput[] + OR?: Prisma.InquiryWhereInput[] + NOT?: Prisma.InquiryWhereInput | Prisma.InquiryWhereInput[] + name?: Prisma.StringFilter<"Inquiry"> | string + email?: Prisma.StringFilter<"Inquiry"> | string + phone?: Prisma.StringNullableFilter<"Inquiry"> | string | null + title?: Prisma.StringFilter<"Inquiry"> | string + content?: Prisma.StringFilter<"Inquiry"> | string + consent?: Prisma.BoolFilter<"Inquiry"> | boolean + status?: Prisma.StringFilter<"Inquiry"> | string + ip?: Prisma.StringNullableFilter<"Inquiry"> | string | null + createdAt?: Prisma.DateTimeFilter<"Inquiry"> | Date | string +}, "id"> + +export type InquiryOrderByWithAggregationInput = { + id?: Prisma.SortOrder + name?: Prisma.SortOrder + email?: Prisma.SortOrder + phone?: Prisma.SortOrderInput | Prisma.SortOrder + title?: Prisma.SortOrder + content?: Prisma.SortOrder + consent?: Prisma.SortOrder + status?: Prisma.SortOrder + ip?: Prisma.SortOrderInput | Prisma.SortOrder + createdAt?: Prisma.SortOrder + _count?: Prisma.InquiryCountOrderByAggregateInput + _avg?: Prisma.InquiryAvgOrderByAggregateInput + _max?: Prisma.InquiryMaxOrderByAggregateInput + _min?: Prisma.InquiryMinOrderByAggregateInput + _sum?: Prisma.InquirySumOrderByAggregateInput +} + +export type InquiryScalarWhereWithAggregatesInput = { + AND?: Prisma.InquiryScalarWhereWithAggregatesInput | Prisma.InquiryScalarWhereWithAggregatesInput[] + OR?: Prisma.InquiryScalarWhereWithAggregatesInput[] + NOT?: Prisma.InquiryScalarWhereWithAggregatesInput | Prisma.InquiryScalarWhereWithAggregatesInput[] + id?: Prisma.IntWithAggregatesFilter<"Inquiry"> | number + name?: Prisma.StringWithAggregatesFilter<"Inquiry"> | string + email?: Prisma.StringWithAggregatesFilter<"Inquiry"> | string + phone?: Prisma.StringNullableWithAggregatesFilter<"Inquiry"> | string | null + title?: Prisma.StringWithAggregatesFilter<"Inquiry"> | string + content?: Prisma.StringWithAggregatesFilter<"Inquiry"> | string + consent?: Prisma.BoolWithAggregatesFilter<"Inquiry"> | boolean + status?: Prisma.StringWithAggregatesFilter<"Inquiry"> | string + ip?: Prisma.StringNullableWithAggregatesFilter<"Inquiry"> | string | null + createdAt?: Prisma.DateTimeWithAggregatesFilter<"Inquiry"> | Date | string +} + +export type InquiryCreateInput = { + name: string + email: string + phone?: string | null + title: string + content: string + consent?: boolean + status?: string + ip?: string | null + createdAt?: Date | string +} + +export type InquiryUncheckedCreateInput = { + id?: number + name: string + email: string + phone?: string | null + title: string + content: string + consent?: boolean + status?: string + ip?: string | null + createdAt?: Date | string +} + +export type InquiryUpdateInput = { + name?: Prisma.StringFieldUpdateOperationsInput | string + email?: Prisma.StringFieldUpdateOperationsInput | string + phone?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + title?: Prisma.StringFieldUpdateOperationsInput | string + content?: Prisma.StringFieldUpdateOperationsInput | string + consent?: Prisma.BoolFieldUpdateOperationsInput | boolean + status?: Prisma.StringFieldUpdateOperationsInput | string + ip?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type InquiryUncheckedUpdateInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + name?: Prisma.StringFieldUpdateOperationsInput | string + email?: Prisma.StringFieldUpdateOperationsInput | string + phone?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + title?: Prisma.StringFieldUpdateOperationsInput | string + content?: Prisma.StringFieldUpdateOperationsInput | string + consent?: Prisma.BoolFieldUpdateOperationsInput | boolean + status?: Prisma.StringFieldUpdateOperationsInput | string + ip?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type InquiryCreateManyInput = { + id?: number + name: string + email: string + phone?: string | null + title: string + content: string + consent?: boolean + status?: string + ip?: string | null + createdAt?: Date | string +} + +export type InquiryUpdateManyMutationInput = { + name?: Prisma.StringFieldUpdateOperationsInput | string + email?: Prisma.StringFieldUpdateOperationsInput | string + phone?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + title?: Prisma.StringFieldUpdateOperationsInput | string + content?: Prisma.StringFieldUpdateOperationsInput | string + consent?: Prisma.BoolFieldUpdateOperationsInput | boolean + status?: Prisma.StringFieldUpdateOperationsInput | string + ip?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type InquiryUncheckedUpdateManyInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + name?: Prisma.StringFieldUpdateOperationsInput | string + email?: Prisma.StringFieldUpdateOperationsInput | string + phone?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + title?: Prisma.StringFieldUpdateOperationsInput | string + content?: Prisma.StringFieldUpdateOperationsInput | string + consent?: Prisma.BoolFieldUpdateOperationsInput | boolean + status?: Prisma.StringFieldUpdateOperationsInput | string + ip?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type InquiryCountOrderByAggregateInput = { + id?: Prisma.SortOrder + name?: Prisma.SortOrder + email?: Prisma.SortOrder + phone?: Prisma.SortOrder + title?: Prisma.SortOrder + content?: Prisma.SortOrder + consent?: Prisma.SortOrder + status?: Prisma.SortOrder + ip?: Prisma.SortOrder + createdAt?: Prisma.SortOrder +} + +export type InquiryAvgOrderByAggregateInput = { + id?: Prisma.SortOrder +} + +export type InquiryMaxOrderByAggregateInput = { + id?: Prisma.SortOrder + name?: Prisma.SortOrder + email?: Prisma.SortOrder + phone?: Prisma.SortOrder + title?: Prisma.SortOrder + content?: Prisma.SortOrder + consent?: Prisma.SortOrder + status?: Prisma.SortOrder + ip?: Prisma.SortOrder + createdAt?: Prisma.SortOrder +} + +export type InquiryMinOrderByAggregateInput = { + id?: Prisma.SortOrder + name?: Prisma.SortOrder + email?: Prisma.SortOrder + phone?: Prisma.SortOrder + title?: Prisma.SortOrder + content?: Prisma.SortOrder + consent?: Prisma.SortOrder + status?: Prisma.SortOrder + ip?: Prisma.SortOrder + createdAt?: Prisma.SortOrder +} + +export type InquirySumOrderByAggregateInput = { + id?: Prisma.SortOrder +} + + + +export type InquirySelect = runtime.Types.Extensions.GetSelect<{ + id?: boolean + name?: boolean + email?: boolean + phone?: boolean + title?: boolean + content?: boolean + consent?: boolean + status?: boolean + ip?: boolean + createdAt?: boolean +}, ExtArgs["result"]["inquiry"]> + +export type InquirySelectCreateManyAndReturn = runtime.Types.Extensions.GetSelect<{ + id?: boolean + name?: boolean + email?: boolean + phone?: boolean + title?: boolean + content?: boolean + consent?: boolean + status?: boolean + ip?: boolean + createdAt?: boolean +}, ExtArgs["result"]["inquiry"]> + +export type InquirySelectUpdateManyAndReturn = runtime.Types.Extensions.GetSelect<{ + id?: boolean + name?: boolean + email?: boolean + phone?: boolean + title?: boolean + content?: boolean + consent?: boolean + status?: boolean + ip?: boolean + createdAt?: boolean +}, ExtArgs["result"]["inquiry"]> + +export type InquirySelectScalar = { + id?: boolean + name?: boolean + email?: boolean + phone?: boolean + title?: boolean + content?: boolean + consent?: boolean + status?: boolean + ip?: boolean + createdAt?: boolean +} + +export type InquiryOmit = runtime.Types.Extensions.GetOmit<"id" | "name" | "email" | "phone" | "title" | "content" | "consent" | "status" | "ip" | "createdAt", ExtArgs["result"]["inquiry"]> + +export type $InquiryPayload = { + name: "Inquiry" + objects: {} + scalars: runtime.Types.Extensions.GetPayloadResult<{ + id: number + name: string + email: string + phone: string | null + title: string + content: string + consent: boolean + status: string + ip: string | null + createdAt: Date + }, ExtArgs["result"]["inquiry"]> + composites: {} +} + +export type InquiryGetPayload = runtime.Types.Result.GetResult + +export type InquiryCountArgs = + Omit & { + select?: InquiryCountAggregateInputType | true + } + +export interface InquiryDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Inquiry'], meta: { name: 'Inquiry' } } + /** + * Find zero or one Inquiry that matches the filter. + * @param {InquiryFindUniqueArgs} args - Arguments to find a Inquiry + * @example + * // Get one Inquiry + * const inquiry = await prisma.inquiry.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__InquiryClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one Inquiry that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {InquiryFindUniqueOrThrowArgs} args - Arguments to find a Inquiry + * @example + * // Get one Inquiry + * const inquiry = await prisma.inquiry.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__InquiryClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Inquiry 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 {InquiryFindFirstArgs} args - Arguments to find a Inquiry + * @example + * // Get one Inquiry + * const inquiry = await prisma.inquiry.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__InquiryClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Inquiry 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 {InquiryFindFirstOrThrowArgs} args - Arguments to find a Inquiry + * @example + * // Get one Inquiry + * const inquiry = await prisma.inquiry.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__InquiryClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more Inquiries 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 {InquiryFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Inquiries + * const inquiries = await prisma.inquiry.findMany() + * + * // Get first 10 Inquiries + * const inquiries = await prisma.inquiry.findMany({ take: 10 }) + * + * // Only select the `id` + * const inquiryWithIdOnly = await prisma.inquiry.findMany({ select: { id: true } }) + * + */ + findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> + + /** + * Create a Inquiry. + * @param {InquiryCreateArgs} args - Arguments to create a Inquiry. + * @example + * // Create one Inquiry + * const Inquiry = await prisma.inquiry.create({ + * data: { + * // ... data to create a Inquiry + * } + * }) + * + */ + create(args: Prisma.SelectSubset>): Prisma.Prisma__InquiryClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many Inquiries. + * @param {InquiryCreateManyArgs} args - Arguments to create many Inquiries. + * @example + * // Create many Inquiries + * const inquiry = await prisma.inquiry.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Inquiries and returns the data saved in the database. + * @param {InquiryCreateManyAndReturnArgs} args - Arguments to create many Inquiries. + * @example + * // Create many Inquiries + * const inquiry = await prisma.inquiry.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Inquiries and only return the `id` + * const inquiryWithIdOnly = await prisma.inquiry.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a Inquiry. + * @param {InquiryDeleteArgs} args - Arguments to delete one Inquiry. + * @example + * // Delete one Inquiry + * const Inquiry = await prisma.inquiry.delete({ + * where: { + * // ... filter to delete one Inquiry + * } + * }) + * + */ + delete(args: Prisma.SelectSubset>): Prisma.Prisma__InquiryClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one Inquiry. + * @param {InquiryUpdateArgs} args - Arguments to update one Inquiry. + * @example + * // Update one Inquiry + * const inquiry = await prisma.inquiry.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: Prisma.SelectSubset>): Prisma.Prisma__InquiryClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more Inquiries. + * @param {InquiryDeleteManyArgs} args - Arguments to filter Inquiries to delete. + * @example + * // Delete a few Inquiries + * const { count } = await prisma.inquiry.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Inquiries. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {InquiryUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Inquiries + * const inquiry = await prisma.inquiry.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Inquiries and returns the data updated in the database. + * @param {InquiryUpdateManyAndReturnArgs} args - Arguments to update many Inquiries. + * @example + * // Update many Inquiries + * const inquiry = await prisma.inquiry.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more Inquiries and only return the `id` + * const inquiryWithIdOnly = await prisma.inquiry.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one Inquiry. + * @param {InquiryUpsertArgs} args - Arguments to update or create a Inquiry. + * @example + * // Update or create a Inquiry + * const inquiry = await prisma.inquiry.upsert({ + * create: { + * // ... data to create a Inquiry + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Inquiry we want to update + * } + * }) + */ + upsert(args: Prisma.SelectSubset>): Prisma.Prisma__InquiryClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of Inquiries. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {InquiryCountArgs} args - Arguments to filter Inquiries to count. + * @example + * // Count the number of Inquiries + * const count = await prisma.inquiry.count({ + * where: { + * // ... the filter for the Inquiries we want to count + * } + * }) + **/ + count( + args?: Prisma.Subset, + ): Prisma.PrismaPromise< + T extends runtime.Types.Utils.Record<'select', any> + ? T['select'] extends true + ? number + : Prisma.GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a Inquiry. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {InquiryAggregateArgs} 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: Prisma.Subset): Prisma.PrismaPromise> + + /** + * Group by Inquiry. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {InquiryGroupByArgs} 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 InquiryGroupByArgs, + HasSelectOrTake extends Prisma.Or< + Prisma.Extends<'skip', Prisma.Keys>, + Prisma.Extends<'take', Prisma.Keys> + >, + OrderByArg extends Prisma.True extends HasSelectOrTake + ? { orderBy: InquiryGroupByArgs['orderBy'] } + : { orderBy?: InquiryGroupByArgs['orderBy'] }, + OrderFields extends Prisma.ExcludeUnderscoreKeys>>, + ByFields extends Prisma.MaybeTupleToUnion, + ByValid extends Prisma.Has, + HavingFields extends Prisma.GetHavingFields, + HavingValid extends Prisma.Has, + ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, + InputErrors extends ByEmpty extends Prisma.True + ? `Error: "by" must not be empty.` + : HavingValid extends Prisma.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 Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.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 Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.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 Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetInquiryGroupByPayload : Prisma.PrismaPromise +/** + * Fields of the Inquiry model + */ +readonly fields: InquiryFieldRefs; +} + +/** + * The delegate class that acts as a "Promise-like" for Inquiry. + * 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__InquiryClient 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): runtime.Types.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): runtime.Types.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): runtime.Types.Utils.JsPromise +} + + + + +/** + * Fields of the Inquiry model + */ +export interface InquiryFieldRefs { + readonly id: Prisma.FieldRef<"Inquiry", 'Int'> + readonly name: Prisma.FieldRef<"Inquiry", 'String'> + readonly email: Prisma.FieldRef<"Inquiry", 'String'> + readonly phone: Prisma.FieldRef<"Inquiry", 'String'> + readonly title: Prisma.FieldRef<"Inquiry", 'String'> + readonly content: Prisma.FieldRef<"Inquiry", 'String'> + readonly consent: Prisma.FieldRef<"Inquiry", 'Boolean'> + readonly status: Prisma.FieldRef<"Inquiry", 'String'> + readonly ip: Prisma.FieldRef<"Inquiry", 'String'> + readonly createdAt: Prisma.FieldRef<"Inquiry", 'DateTime'> +} + + +// Custom InputTypes +/** + * Inquiry findUnique + */ +export type InquiryFindUniqueArgs = { + /** + * Select specific fields to fetch from the Inquiry + */ + select?: Prisma.InquirySelect | null + /** + * Omit specific fields from the Inquiry + */ + omit?: Prisma.InquiryOmit | null + /** + * Filter, which Inquiry to fetch. + */ + where: Prisma.InquiryWhereUniqueInput +} + +/** + * Inquiry findUniqueOrThrow + */ +export type InquiryFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the Inquiry + */ + select?: Prisma.InquirySelect | null + /** + * Omit specific fields from the Inquiry + */ + omit?: Prisma.InquiryOmit | null + /** + * Filter, which Inquiry to fetch. + */ + where: Prisma.InquiryWhereUniqueInput +} + +/** + * Inquiry findFirst + */ +export type InquiryFindFirstArgs = { + /** + * Select specific fields to fetch from the Inquiry + */ + select?: Prisma.InquirySelect | null + /** + * Omit specific fields from the Inquiry + */ + omit?: Prisma.InquiryOmit | null + /** + * Filter, which Inquiry to fetch. + */ + where?: Prisma.InquiryWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Inquiries to fetch. + */ + orderBy?: Prisma.InquiryOrderByWithRelationInput | Prisma.InquiryOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Inquiries. + */ + cursor?: Prisma.InquiryWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Inquiries 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` Inquiries. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Inquiries. + */ + distinct?: Prisma.InquiryScalarFieldEnum | Prisma.InquiryScalarFieldEnum[] +} + +/** + * Inquiry findFirstOrThrow + */ +export type InquiryFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the Inquiry + */ + select?: Prisma.InquirySelect | null + /** + * Omit specific fields from the Inquiry + */ + omit?: Prisma.InquiryOmit | null + /** + * Filter, which Inquiry to fetch. + */ + where?: Prisma.InquiryWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Inquiries to fetch. + */ + orderBy?: Prisma.InquiryOrderByWithRelationInput | Prisma.InquiryOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Inquiries. + */ + cursor?: Prisma.InquiryWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Inquiries 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` Inquiries. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Inquiries. + */ + distinct?: Prisma.InquiryScalarFieldEnum | Prisma.InquiryScalarFieldEnum[] +} + +/** + * Inquiry findMany + */ +export type InquiryFindManyArgs = { + /** + * Select specific fields to fetch from the Inquiry + */ + select?: Prisma.InquirySelect | null + /** + * Omit specific fields from the Inquiry + */ + omit?: Prisma.InquiryOmit | null + /** + * Filter, which Inquiries to fetch. + */ + where?: Prisma.InquiryWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Inquiries to fetch. + */ + orderBy?: Prisma.InquiryOrderByWithRelationInput | Prisma.InquiryOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Inquiries. + */ + cursor?: Prisma.InquiryWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Inquiries 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` Inquiries. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Inquiries. + */ + distinct?: Prisma.InquiryScalarFieldEnum | Prisma.InquiryScalarFieldEnum[] +} + +/** + * Inquiry create + */ +export type InquiryCreateArgs = { + /** + * Select specific fields to fetch from the Inquiry + */ + select?: Prisma.InquirySelect | null + /** + * Omit specific fields from the Inquiry + */ + omit?: Prisma.InquiryOmit | null + /** + * The data needed to create a Inquiry. + */ + data: Prisma.XOR +} + +/** + * Inquiry createMany + */ +export type InquiryCreateManyArgs = { + /** + * The data used to create many Inquiries. + */ + data: Prisma.InquiryCreateManyInput | Prisma.InquiryCreateManyInput[] +} + +/** + * Inquiry createManyAndReturn + */ +export type InquiryCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Inquiry + */ + select?: Prisma.InquirySelectCreateManyAndReturn | null + /** + * Omit specific fields from the Inquiry + */ + omit?: Prisma.InquiryOmit | null + /** + * The data used to create many Inquiries. + */ + data: Prisma.InquiryCreateManyInput | Prisma.InquiryCreateManyInput[] +} + +/** + * Inquiry update + */ +export type InquiryUpdateArgs = { + /** + * Select specific fields to fetch from the Inquiry + */ + select?: Prisma.InquirySelect | null + /** + * Omit specific fields from the Inquiry + */ + omit?: Prisma.InquiryOmit | null + /** + * The data needed to update a Inquiry. + */ + data: Prisma.XOR + /** + * Choose, which Inquiry to update. + */ + where: Prisma.InquiryWhereUniqueInput +} + +/** + * Inquiry updateMany + */ +export type InquiryUpdateManyArgs = { + /** + * The data used to update Inquiries. + */ + data: Prisma.XOR + /** + * Filter which Inquiries to update + */ + where?: Prisma.InquiryWhereInput + /** + * Limit how many Inquiries to update. + */ + limit?: number +} + +/** + * Inquiry updateManyAndReturn + */ +export type InquiryUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Inquiry + */ + select?: Prisma.InquirySelectUpdateManyAndReturn | null + /** + * Omit specific fields from the Inquiry + */ + omit?: Prisma.InquiryOmit | null + /** + * The data used to update Inquiries. + */ + data: Prisma.XOR + /** + * Filter which Inquiries to update + */ + where?: Prisma.InquiryWhereInput + /** + * Limit how many Inquiries to update. + */ + limit?: number +} + +/** + * Inquiry upsert + */ +export type InquiryUpsertArgs = { + /** + * Select specific fields to fetch from the Inquiry + */ + select?: Prisma.InquirySelect | null + /** + * Omit specific fields from the Inquiry + */ + omit?: Prisma.InquiryOmit | null + /** + * The filter to search for the Inquiry to update in case it exists. + */ + where: Prisma.InquiryWhereUniqueInput + /** + * In case the Inquiry found by the `where` argument doesn't exist, create a new Inquiry with this data. + */ + create: Prisma.XOR + /** + * In case the Inquiry was found with the provided `where` argument, update it with this data. + */ + update: Prisma.XOR +} + +/** + * Inquiry delete + */ +export type InquiryDeleteArgs = { + /** + * Select specific fields to fetch from the Inquiry + */ + select?: Prisma.InquirySelect | null + /** + * Omit specific fields from the Inquiry + */ + omit?: Prisma.InquiryOmit | null + /** + * Filter which Inquiry to delete. + */ + where: Prisma.InquiryWhereUniqueInput +} + +/** + * Inquiry deleteMany + */ +export type InquiryDeleteManyArgs = { + /** + * Filter which Inquiries to delete + */ + where?: Prisma.InquiryWhereInput + /** + * Limit how many Inquiries to delete. + */ + limit?: number +} + +/** + * Inquiry without action + */ +export type InquiryDefaultArgs = { + /** + * Select specific fields to fetch from the Inquiry + */ + select?: Prisma.InquirySelect | null + /** + * Omit specific fields from the Inquiry + */ + omit?: Prisma.InquiryOmit | null +} diff --git a/src/generated/prisma/models/Post.ts b/src/generated/prisma/models/Post.ts new file mode 100644 index 0000000..a7254b4 --- /dev/null +++ b/src/generated/prisma/models/Post.ts @@ -0,0 +1,1828 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * This file exports the `Post` model and its related types. + * + * 🟢 You can import this file directly. + */ +import type * as runtime from "@prisma/client/runtime/client" +import type * as $Enums from "../enums" +import type * as Prisma from "../internal/prismaNamespace" + +/** + * Model Post + * + */ +export type PostModel = runtime.Types.Result.DefaultSelection + +export type AggregatePost = { + _count: PostCountAggregateOutputType | null + _avg: PostAvgAggregateOutputType | null + _sum: PostSumAggregateOutputType | null + _min: PostMinAggregateOutputType | null + _max: PostMaxAggregateOutputType | null +} + +export type PostAvgAggregateOutputType = { + id: number | null + viewCount: number | null +} + +export type PostSumAggregateOutputType = { + id: number | null + viewCount: number | null +} + +export type PostMinAggregateOutputType = { + id: number | null + type: string | null + category: string | null + title: string | null + content: string | null + isPinned: boolean | null + status: string | null + viewCount: number | null + authorId: string | null + publishedAt: Date | null + createdAt: Date | null + updatedAt: Date | null +} + +export type PostMaxAggregateOutputType = { + id: number | null + type: string | null + category: string | null + title: string | null + content: string | null + isPinned: boolean | null + status: string | null + viewCount: number | null + authorId: string | null + publishedAt: Date | null + createdAt: Date | null + updatedAt: Date | null +} + +export type PostCountAggregateOutputType = { + id: number + type: number + category: number + title: number + content: number + isPinned: number + status: number + viewCount: number + authorId: number + publishedAt: number + createdAt: number + updatedAt: number + _all: number +} + + +export type PostAvgAggregateInputType = { + id?: true + viewCount?: true +} + +export type PostSumAggregateInputType = { + id?: true + viewCount?: true +} + +export type PostMinAggregateInputType = { + id?: true + type?: true + category?: true + title?: true + content?: true + isPinned?: true + status?: true + viewCount?: true + authorId?: true + publishedAt?: true + createdAt?: true + updatedAt?: true +} + +export type PostMaxAggregateInputType = { + id?: true + type?: true + category?: true + title?: true + content?: true + isPinned?: true + status?: true + viewCount?: true + authorId?: true + publishedAt?: true + createdAt?: true + updatedAt?: true +} + +export type PostCountAggregateInputType = { + id?: true + type?: true + category?: true + title?: true + content?: true + isPinned?: true + status?: true + viewCount?: true + authorId?: true + publishedAt?: true + createdAt?: true + updatedAt?: true + _all?: true +} + +export type PostAggregateArgs = { + /** + * Filter which Post to aggregate. + */ + where?: Prisma.PostWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Posts to fetch. + */ + orderBy?: Prisma.PostOrderByWithRelationInput | Prisma.PostOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: Prisma.PostWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Posts 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` Posts. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Posts + **/ + _count?: true | PostCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: PostAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: PostSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: PostMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: PostMaxAggregateInputType +} + +export type GetPostAggregateType = { + [P in keyof T & keyof AggregatePost]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType +} + + + + +export type PostGroupByArgs = { + where?: Prisma.PostWhereInput + orderBy?: Prisma.PostOrderByWithAggregationInput | Prisma.PostOrderByWithAggregationInput[] + by: Prisma.PostScalarFieldEnum[] | Prisma.PostScalarFieldEnum + having?: Prisma.PostScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: PostCountAggregateInputType | true + _avg?: PostAvgAggregateInputType + _sum?: PostSumAggregateInputType + _min?: PostMinAggregateInputType + _max?: PostMaxAggregateInputType +} + +export type PostGroupByOutputType = { + id: number + type: string + category: string | null + title: string + content: string + isPinned: boolean + status: string + viewCount: number + authorId: string | null + publishedAt: Date + createdAt: Date + updatedAt: Date + _count: PostCountAggregateOutputType | null + _avg: PostAvgAggregateOutputType | null + _sum: PostSumAggregateOutputType | null + _min: PostMinAggregateOutputType | null + _max: PostMaxAggregateOutputType | null +} + +export type GetPostGroupByPayload = Prisma.PrismaPromise< + Array< + Prisma.PickEnumerable & + { + [P in ((keyof T) & (keyof PostGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType + } + > + > + + + +export type PostWhereInput = { + AND?: Prisma.PostWhereInput | Prisma.PostWhereInput[] + OR?: Prisma.PostWhereInput[] + NOT?: Prisma.PostWhereInput | Prisma.PostWhereInput[] + id?: Prisma.IntFilter<"Post"> | number + type?: Prisma.StringFilter<"Post"> | string + category?: Prisma.StringNullableFilter<"Post"> | string | null + title?: Prisma.StringFilter<"Post"> | string + content?: Prisma.StringFilter<"Post"> | string + isPinned?: Prisma.BoolFilter<"Post"> | boolean + status?: Prisma.StringFilter<"Post"> | string + viewCount?: Prisma.IntFilter<"Post"> | number + authorId?: Prisma.StringNullableFilter<"Post"> | string | null + publishedAt?: Prisma.DateTimeFilter<"Post"> | Date | string + createdAt?: Prisma.DateTimeFilter<"Post"> | Date | string + updatedAt?: Prisma.DateTimeFilter<"Post"> | Date | string + author?: Prisma.XOR | null + attachments?: Prisma.AttachmentListRelationFilter +} + +export type PostOrderByWithRelationInput = { + id?: Prisma.SortOrder + type?: Prisma.SortOrder + category?: Prisma.SortOrderInput | Prisma.SortOrder + title?: Prisma.SortOrder + content?: Prisma.SortOrder + isPinned?: Prisma.SortOrder + status?: Prisma.SortOrder + viewCount?: Prisma.SortOrder + authorId?: Prisma.SortOrderInput | Prisma.SortOrder + publishedAt?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + author?: Prisma.AdminUserOrderByWithRelationInput + attachments?: Prisma.AttachmentOrderByRelationAggregateInput +} + +export type PostWhereUniqueInput = Prisma.AtLeast<{ + id?: number + AND?: Prisma.PostWhereInput | Prisma.PostWhereInput[] + OR?: Prisma.PostWhereInput[] + NOT?: Prisma.PostWhereInput | Prisma.PostWhereInput[] + type?: Prisma.StringFilter<"Post"> | string + category?: Prisma.StringNullableFilter<"Post"> | string | null + title?: Prisma.StringFilter<"Post"> | string + content?: Prisma.StringFilter<"Post"> | string + isPinned?: Prisma.BoolFilter<"Post"> | boolean + status?: Prisma.StringFilter<"Post"> | string + viewCount?: Prisma.IntFilter<"Post"> | number + authorId?: Prisma.StringNullableFilter<"Post"> | string | null + publishedAt?: Prisma.DateTimeFilter<"Post"> | Date | string + createdAt?: Prisma.DateTimeFilter<"Post"> | Date | string + updatedAt?: Prisma.DateTimeFilter<"Post"> | Date | string + author?: Prisma.XOR | null + attachments?: Prisma.AttachmentListRelationFilter +}, "id"> + +export type PostOrderByWithAggregationInput = { + id?: Prisma.SortOrder + type?: Prisma.SortOrder + category?: Prisma.SortOrderInput | Prisma.SortOrder + title?: Prisma.SortOrder + content?: Prisma.SortOrder + isPinned?: Prisma.SortOrder + status?: Prisma.SortOrder + viewCount?: Prisma.SortOrder + authorId?: Prisma.SortOrderInput | Prisma.SortOrder + publishedAt?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + _count?: Prisma.PostCountOrderByAggregateInput + _avg?: Prisma.PostAvgOrderByAggregateInput + _max?: Prisma.PostMaxOrderByAggregateInput + _min?: Prisma.PostMinOrderByAggregateInput + _sum?: Prisma.PostSumOrderByAggregateInput +} + +export type PostScalarWhereWithAggregatesInput = { + AND?: Prisma.PostScalarWhereWithAggregatesInput | Prisma.PostScalarWhereWithAggregatesInput[] + OR?: Prisma.PostScalarWhereWithAggregatesInput[] + NOT?: Prisma.PostScalarWhereWithAggregatesInput | Prisma.PostScalarWhereWithAggregatesInput[] + id?: Prisma.IntWithAggregatesFilter<"Post"> | number + type?: Prisma.StringWithAggregatesFilter<"Post"> | string + category?: Prisma.StringNullableWithAggregatesFilter<"Post"> | string | null + title?: Prisma.StringWithAggregatesFilter<"Post"> | string + content?: Prisma.StringWithAggregatesFilter<"Post"> | string + isPinned?: Prisma.BoolWithAggregatesFilter<"Post"> | boolean + status?: Prisma.StringWithAggregatesFilter<"Post"> | string + viewCount?: Prisma.IntWithAggregatesFilter<"Post"> | number + authorId?: Prisma.StringNullableWithAggregatesFilter<"Post"> | string | null + publishedAt?: Prisma.DateTimeWithAggregatesFilter<"Post"> | Date | string + createdAt?: Prisma.DateTimeWithAggregatesFilter<"Post"> | Date | string + updatedAt?: Prisma.DateTimeWithAggregatesFilter<"Post"> | Date | string +} + +export type PostCreateInput = { + type: string + category?: string | null + title: string + content: string + isPinned?: boolean + status?: string + viewCount?: number + publishedAt?: Date | string + createdAt?: Date | string + updatedAt?: Date | string + author?: Prisma.AdminUserCreateNestedOneWithoutPostsInput + attachments?: Prisma.AttachmentCreateNestedManyWithoutPostInput +} + +export type PostUncheckedCreateInput = { + id?: number + type: string + category?: string | null + title: string + content: string + isPinned?: boolean + status?: string + viewCount?: number + authorId?: string | null + publishedAt?: Date | string + createdAt?: Date | string + updatedAt?: Date | string + attachments?: Prisma.AttachmentUncheckedCreateNestedManyWithoutPostInput +} + +export type PostUpdateInput = { + type?: Prisma.StringFieldUpdateOperationsInput | string + category?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + title?: Prisma.StringFieldUpdateOperationsInput | string + content?: Prisma.StringFieldUpdateOperationsInput | string + isPinned?: Prisma.BoolFieldUpdateOperationsInput | boolean + status?: Prisma.StringFieldUpdateOperationsInput | string + viewCount?: Prisma.IntFieldUpdateOperationsInput | number + publishedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + author?: Prisma.AdminUserUpdateOneWithoutPostsNestedInput + attachments?: Prisma.AttachmentUpdateManyWithoutPostNestedInput +} + +export type PostUncheckedUpdateInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + type?: Prisma.StringFieldUpdateOperationsInput | string + category?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + title?: Prisma.StringFieldUpdateOperationsInput | string + content?: Prisma.StringFieldUpdateOperationsInput | string + isPinned?: Prisma.BoolFieldUpdateOperationsInput | boolean + status?: Prisma.StringFieldUpdateOperationsInput | string + viewCount?: Prisma.IntFieldUpdateOperationsInput | number + authorId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + publishedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + attachments?: Prisma.AttachmentUncheckedUpdateManyWithoutPostNestedInput +} + +export type PostCreateManyInput = { + id?: number + type: string + category?: string | null + title: string + content: string + isPinned?: boolean + status?: string + viewCount?: number + authorId?: string | null + publishedAt?: Date | string + createdAt?: Date | string + updatedAt?: Date | string +} + +export type PostUpdateManyMutationInput = { + type?: Prisma.StringFieldUpdateOperationsInput | string + category?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + title?: Prisma.StringFieldUpdateOperationsInput | string + content?: Prisma.StringFieldUpdateOperationsInput | string + isPinned?: Prisma.BoolFieldUpdateOperationsInput | boolean + status?: Prisma.StringFieldUpdateOperationsInput | string + viewCount?: Prisma.IntFieldUpdateOperationsInput | number + publishedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type PostUncheckedUpdateManyInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + type?: Prisma.StringFieldUpdateOperationsInput | string + category?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + title?: Prisma.StringFieldUpdateOperationsInput | string + content?: Prisma.StringFieldUpdateOperationsInput | string + isPinned?: Prisma.BoolFieldUpdateOperationsInput | boolean + status?: Prisma.StringFieldUpdateOperationsInput | string + viewCount?: Prisma.IntFieldUpdateOperationsInput | number + authorId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + publishedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type PostListRelationFilter = { + every?: Prisma.PostWhereInput + some?: Prisma.PostWhereInput + none?: Prisma.PostWhereInput +} + +export type PostOrderByRelationAggregateInput = { + _count?: Prisma.SortOrder +} + +export type PostCountOrderByAggregateInput = { + id?: Prisma.SortOrder + type?: Prisma.SortOrder + category?: Prisma.SortOrder + title?: Prisma.SortOrder + content?: Prisma.SortOrder + isPinned?: Prisma.SortOrder + status?: Prisma.SortOrder + viewCount?: Prisma.SortOrder + authorId?: Prisma.SortOrder + publishedAt?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder +} + +export type PostAvgOrderByAggregateInput = { + id?: Prisma.SortOrder + viewCount?: Prisma.SortOrder +} + +export type PostMaxOrderByAggregateInput = { + id?: Prisma.SortOrder + type?: Prisma.SortOrder + category?: Prisma.SortOrder + title?: Prisma.SortOrder + content?: Prisma.SortOrder + isPinned?: Prisma.SortOrder + status?: Prisma.SortOrder + viewCount?: Prisma.SortOrder + authorId?: Prisma.SortOrder + publishedAt?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder +} + +export type PostMinOrderByAggregateInput = { + id?: Prisma.SortOrder + type?: Prisma.SortOrder + category?: Prisma.SortOrder + title?: Prisma.SortOrder + content?: Prisma.SortOrder + isPinned?: Prisma.SortOrder + status?: Prisma.SortOrder + viewCount?: Prisma.SortOrder + authorId?: Prisma.SortOrder + publishedAt?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder +} + +export type PostSumOrderByAggregateInput = { + id?: Prisma.SortOrder + viewCount?: Prisma.SortOrder +} + +export type PostNullableScalarRelationFilter = { + is?: Prisma.PostWhereInput | null + isNot?: Prisma.PostWhereInput | null +} + +export type PostCreateNestedManyWithoutAuthorInput = { + create?: Prisma.XOR | Prisma.PostCreateWithoutAuthorInput[] | Prisma.PostUncheckedCreateWithoutAuthorInput[] + connectOrCreate?: Prisma.PostCreateOrConnectWithoutAuthorInput | Prisma.PostCreateOrConnectWithoutAuthorInput[] + createMany?: Prisma.PostCreateManyAuthorInputEnvelope + connect?: Prisma.PostWhereUniqueInput | Prisma.PostWhereUniqueInput[] +} + +export type PostUncheckedCreateNestedManyWithoutAuthorInput = { + create?: Prisma.XOR | Prisma.PostCreateWithoutAuthorInput[] | Prisma.PostUncheckedCreateWithoutAuthorInput[] + connectOrCreate?: Prisma.PostCreateOrConnectWithoutAuthorInput | Prisma.PostCreateOrConnectWithoutAuthorInput[] + createMany?: Prisma.PostCreateManyAuthorInputEnvelope + connect?: Prisma.PostWhereUniqueInput | Prisma.PostWhereUniqueInput[] +} + +export type PostUpdateManyWithoutAuthorNestedInput = { + create?: Prisma.XOR | Prisma.PostCreateWithoutAuthorInput[] | Prisma.PostUncheckedCreateWithoutAuthorInput[] + connectOrCreate?: Prisma.PostCreateOrConnectWithoutAuthorInput | Prisma.PostCreateOrConnectWithoutAuthorInput[] + upsert?: Prisma.PostUpsertWithWhereUniqueWithoutAuthorInput | Prisma.PostUpsertWithWhereUniqueWithoutAuthorInput[] + createMany?: Prisma.PostCreateManyAuthorInputEnvelope + set?: Prisma.PostWhereUniqueInput | Prisma.PostWhereUniqueInput[] + disconnect?: Prisma.PostWhereUniqueInput | Prisma.PostWhereUniqueInput[] + delete?: Prisma.PostWhereUniqueInput | Prisma.PostWhereUniqueInput[] + connect?: Prisma.PostWhereUniqueInput | Prisma.PostWhereUniqueInput[] + update?: Prisma.PostUpdateWithWhereUniqueWithoutAuthorInput | Prisma.PostUpdateWithWhereUniqueWithoutAuthorInput[] + updateMany?: Prisma.PostUpdateManyWithWhereWithoutAuthorInput | Prisma.PostUpdateManyWithWhereWithoutAuthorInput[] + deleteMany?: Prisma.PostScalarWhereInput | Prisma.PostScalarWhereInput[] +} + +export type PostUncheckedUpdateManyWithoutAuthorNestedInput = { + create?: Prisma.XOR | Prisma.PostCreateWithoutAuthorInput[] | Prisma.PostUncheckedCreateWithoutAuthorInput[] + connectOrCreate?: Prisma.PostCreateOrConnectWithoutAuthorInput | Prisma.PostCreateOrConnectWithoutAuthorInput[] + upsert?: Prisma.PostUpsertWithWhereUniqueWithoutAuthorInput | Prisma.PostUpsertWithWhereUniqueWithoutAuthorInput[] + createMany?: Prisma.PostCreateManyAuthorInputEnvelope + set?: Prisma.PostWhereUniqueInput | Prisma.PostWhereUniqueInput[] + disconnect?: Prisma.PostWhereUniqueInput | Prisma.PostWhereUniqueInput[] + delete?: Prisma.PostWhereUniqueInput | Prisma.PostWhereUniqueInput[] + connect?: Prisma.PostWhereUniqueInput | Prisma.PostWhereUniqueInput[] + update?: Prisma.PostUpdateWithWhereUniqueWithoutAuthorInput | Prisma.PostUpdateWithWhereUniqueWithoutAuthorInput[] + updateMany?: Prisma.PostUpdateManyWithWhereWithoutAuthorInput | Prisma.PostUpdateManyWithWhereWithoutAuthorInput[] + deleteMany?: Prisma.PostScalarWhereInput | Prisma.PostScalarWhereInput[] +} + +export type BoolFieldUpdateOperationsInput = { + set?: boolean +} + +export type IntFieldUpdateOperationsInput = { + set?: number + increment?: number + decrement?: number + multiply?: number + divide?: number +} + +export type PostCreateNestedOneWithoutAttachmentsInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.PostCreateOrConnectWithoutAttachmentsInput + connect?: Prisma.PostWhereUniqueInput +} + +export type PostUpdateOneWithoutAttachmentsNestedInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.PostCreateOrConnectWithoutAttachmentsInput + upsert?: Prisma.PostUpsertWithoutAttachmentsInput + disconnect?: Prisma.PostWhereInput | boolean + delete?: Prisma.PostWhereInput | boolean + connect?: Prisma.PostWhereUniqueInput + update?: Prisma.XOR, Prisma.PostUncheckedUpdateWithoutAttachmentsInput> +} + +export type PostCreateWithoutAuthorInput = { + type: string + category?: string | null + title: string + content: string + isPinned?: boolean + status?: string + viewCount?: number + publishedAt?: Date | string + createdAt?: Date | string + updatedAt?: Date | string + attachments?: Prisma.AttachmentCreateNestedManyWithoutPostInput +} + +export type PostUncheckedCreateWithoutAuthorInput = { + id?: number + type: string + category?: string | null + title: string + content: string + isPinned?: boolean + status?: string + viewCount?: number + publishedAt?: Date | string + createdAt?: Date | string + updatedAt?: Date | string + attachments?: Prisma.AttachmentUncheckedCreateNestedManyWithoutPostInput +} + +export type PostCreateOrConnectWithoutAuthorInput = { + where: Prisma.PostWhereUniqueInput + create: Prisma.XOR +} + +export type PostCreateManyAuthorInputEnvelope = { + data: Prisma.PostCreateManyAuthorInput | Prisma.PostCreateManyAuthorInput[] +} + +export type PostUpsertWithWhereUniqueWithoutAuthorInput = { + where: Prisma.PostWhereUniqueInput + update: Prisma.XOR + create: Prisma.XOR +} + +export type PostUpdateWithWhereUniqueWithoutAuthorInput = { + where: Prisma.PostWhereUniqueInput + data: Prisma.XOR +} + +export type PostUpdateManyWithWhereWithoutAuthorInput = { + where: Prisma.PostScalarWhereInput + data: Prisma.XOR +} + +export type PostScalarWhereInput = { + AND?: Prisma.PostScalarWhereInput | Prisma.PostScalarWhereInput[] + OR?: Prisma.PostScalarWhereInput[] + NOT?: Prisma.PostScalarWhereInput | Prisma.PostScalarWhereInput[] + id?: Prisma.IntFilter<"Post"> | number + type?: Prisma.StringFilter<"Post"> | string + category?: Prisma.StringNullableFilter<"Post"> | string | null + title?: Prisma.StringFilter<"Post"> | string + content?: Prisma.StringFilter<"Post"> | string + isPinned?: Prisma.BoolFilter<"Post"> | boolean + status?: Prisma.StringFilter<"Post"> | string + viewCount?: Prisma.IntFilter<"Post"> | number + authorId?: Prisma.StringNullableFilter<"Post"> | string | null + publishedAt?: Prisma.DateTimeFilter<"Post"> | Date | string + createdAt?: Prisma.DateTimeFilter<"Post"> | Date | string + updatedAt?: Prisma.DateTimeFilter<"Post"> | Date | string +} + +export type PostCreateWithoutAttachmentsInput = { + type: string + category?: string | null + title: string + content: string + isPinned?: boolean + status?: string + viewCount?: number + publishedAt?: Date | string + createdAt?: Date | string + updatedAt?: Date | string + author?: Prisma.AdminUserCreateNestedOneWithoutPostsInput +} + +export type PostUncheckedCreateWithoutAttachmentsInput = { + id?: number + type: string + category?: string | null + title: string + content: string + isPinned?: boolean + status?: string + viewCount?: number + authorId?: string | null + publishedAt?: Date | string + createdAt?: Date | string + updatedAt?: Date | string +} + +export type PostCreateOrConnectWithoutAttachmentsInput = { + where: Prisma.PostWhereUniqueInput + create: Prisma.XOR +} + +export type PostUpsertWithoutAttachmentsInput = { + update: Prisma.XOR + create: Prisma.XOR + where?: Prisma.PostWhereInput +} + +export type PostUpdateToOneWithWhereWithoutAttachmentsInput = { + where?: Prisma.PostWhereInput + data: Prisma.XOR +} + +export type PostUpdateWithoutAttachmentsInput = { + type?: Prisma.StringFieldUpdateOperationsInput | string + category?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + title?: Prisma.StringFieldUpdateOperationsInput | string + content?: Prisma.StringFieldUpdateOperationsInput | string + isPinned?: Prisma.BoolFieldUpdateOperationsInput | boolean + status?: Prisma.StringFieldUpdateOperationsInput | string + viewCount?: Prisma.IntFieldUpdateOperationsInput | number + publishedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + author?: Prisma.AdminUserUpdateOneWithoutPostsNestedInput +} + +export type PostUncheckedUpdateWithoutAttachmentsInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + type?: Prisma.StringFieldUpdateOperationsInput | string + category?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + title?: Prisma.StringFieldUpdateOperationsInput | string + content?: Prisma.StringFieldUpdateOperationsInput | string + isPinned?: Prisma.BoolFieldUpdateOperationsInput | boolean + status?: Prisma.StringFieldUpdateOperationsInput | string + viewCount?: Prisma.IntFieldUpdateOperationsInput | number + authorId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + publishedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type PostCreateManyAuthorInput = { + id?: number + type: string + category?: string | null + title: string + content: string + isPinned?: boolean + status?: string + viewCount?: number + publishedAt?: Date | string + createdAt?: Date | string + updatedAt?: Date | string +} + +export type PostUpdateWithoutAuthorInput = { + type?: Prisma.StringFieldUpdateOperationsInput | string + category?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + title?: Prisma.StringFieldUpdateOperationsInput | string + content?: Prisma.StringFieldUpdateOperationsInput | string + isPinned?: Prisma.BoolFieldUpdateOperationsInput | boolean + status?: Prisma.StringFieldUpdateOperationsInput | string + viewCount?: Prisma.IntFieldUpdateOperationsInput | number + publishedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + attachments?: Prisma.AttachmentUpdateManyWithoutPostNestedInput +} + +export type PostUncheckedUpdateWithoutAuthorInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + type?: Prisma.StringFieldUpdateOperationsInput | string + category?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + title?: Prisma.StringFieldUpdateOperationsInput | string + content?: Prisma.StringFieldUpdateOperationsInput | string + isPinned?: Prisma.BoolFieldUpdateOperationsInput | boolean + status?: Prisma.StringFieldUpdateOperationsInput | string + viewCount?: Prisma.IntFieldUpdateOperationsInput | number + publishedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + attachments?: Prisma.AttachmentUncheckedUpdateManyWithoutPostNestedInput +} + +export type PostUncheckedUpdateManyWithoutAuthorInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + type?: Prisma.StringFieldUpdateOperationsInput | string + category?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + title?: Prisma.StringFieldUpdateOperationsInput | string + content?: Prisma.StringFieldUpdateOperationsInput | string + isPinned?: Prisma.BoolFieldUpdateOperationsInput | boolean + status?: Prisma.StringFieldUpdateOperationsInput | string + viewCount?: Prisma.IntFieldUpdateOperationsInput | number + publishedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + + +/** + * Count Type PostCountOutputType + */ + +export type PostCountOutputType = { + attachments: number +} + +export type PostCountOutputTypeSelect = { + attachments?: boolean | PostCountOutputTypeCountAttachmentsArgs +} + +/** + * PostCountOutputType without action + */ +export type PostCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the PostCountOutputType + */ + select?: Prisma.PostCountOutputTypeSelect | null +} + +/** + * PostCountOutputType without action + */ +export type PostCountOutputTypeCountAttachmentsArgs = { + where?: Prisma.AttachmentWhereInput +} + + +export type PostSelect = runtime.Types.Extensions.GetSelect<{ + id?: boolean + type?: boolean + category?: boolean + title?: boolean + content?: boolean + isPinned?: boolean + status?: boolean + viewCount?: boolean + authorId?: boolean + publishedAt?: boolean + createdAt?: boolean + updatedAt?: boolean + author?: boolean | Prisma.Post$authorArgs + attachments?: boolean | Prisma.Post$attachmentsArgs + _count?: boolean | Prisma.PostCountOutputTypeDefaultArgs +}, ExtArgs["result"]["post"]> + +export type PostSelectCreateManyAndReturn = runtime.Types.Extensions.GetSelect<{ + id?: boolean + type?: boolean + category?: boolean + title?: boolean + content?: boolean + isPinned?: boolean + status?: boolean + viewCount?: boolean + authorId?: boolean + publishedAt?: boolean + createdAt?: boolean + updatedAt?: boolean + author?: boolean | Prisma.Post$authorArgs +}, ExtArgs["result"]["post"]> + +export type PostSelectUpdateManyAndReturn = runtime.Types.Extensions.GetSelect<{ + id?: boolean + type?: boolean + category?: boolean + title?: boolean + content?: boolean + isPinned?: boolean + status?: boolean + viewCount?: boolean + authorId?: boolean + publishedAt?: boolean + createdAt?: boolean + updatedAt?: boolean + author?: boolean | Prisma.Post$authorArgs +}, ExtArgs["result"]["post"]> + +export type PostSelectScalar = { + id?: boolean + type?: boolean + category?: boolean + title?: boolean + content?: boolean + isPinned?: boolean + status?: boolean + viewCount?: boolean + authorId?: boolean + publishedAt?: boolean + createdAt?: boolean + updatedAt?: boolean +} + +export type PostOmit = runtime.Types.Extensions.GetOmit<"id" | "type" | "category" | "title" | "content" | "isPinned" | "status" | "viewCount" | "authorId" | "publishedAt" | "createdAt" | "updatedAt", ExtArgs["result"]["post"]> +export type PostInclude = { + author?: boolean | Prisma.Post$authorArgs + attachments?: boolean | Prisma.Post$attachmentsArgs + _count?: boolean | Prisma.PostCountOutputTypeDefaultArgs +} +export type PostIncludeCreateManyAndReturn = { + author?: boolean | Prisma.Post$authorArgs +} +export type PostIncludeUpdateManyAndReturn = { + author?: boolean | Prisma.Post$authorArgs +} + +export type $PostPayload = { + name: "Post" + objects: { + author: Prisma.$AdminUserPayload | null + attachments: Prisma.$AttachmentPayload[] + } + scalars: runtime.Types.Extensions.GetPayloadResult<{ + id: number + type: string + category: string | null + title: string + content: string + isPinned: boolean + status: string + viewCount: number + authorId: string | null + publishedAt: Date + createdAt: Date + updatedAt: Date + }, ExtArgs["result"]["post"]> + composites: {} +} + +export type PostGetPayload = runtime.Types.Result.GetResult + +export type PostCountArgs = + Omit & { + select?: PostCountAggregateInputType | true + } + +export interface PostDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Post'], meta: { name: 'Post' } } + /** + * Find zero or one Post that matches the filter. + * @param {PostFindUniqueArgs} args - Arguments to find a Post + * @example + * // Get one Post + * const post = await prisma.post.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__PostClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one Post that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {PostFindUniqueOrThrowArgs} args - Arguments to find a Post + * @example + * // Get one Post + * const post = await prisma.post.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__PostClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Post 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 {PostFindFirstArgs} args - Arguments to find a Post + * @example + * // Get one Post + * const post = await prisma.post.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__PostClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Post 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 {PostFindFirstOrThrowArgs} args - Arguments to find a Post + * @example + * // Get one Post + * const post = await prisma.post.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__PostClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more Posts 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 {PostFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Posts + * const posts = await prisma.post.findMany() + * + * // Get first 10 Posts + * const posts = await prisma.post.findMany({ take: 10 }) + * + * // Only select the `id` + * const postWithIdOnly = await prisma.post.findMany({ select: { id: true } }) + * + */ + findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> + + /** + * Create a Post. + * @param {PostCreateArgs} args - Arguments to create a Post. + * @example + * // Create one Post + * const Post = await prisma.post.create({ + * data: { + * // ... data to create a Post + * } + * }) + * + */ + create(args: Prisma.SelectSubset>): Prisma.Prisma__PostClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many Posts. + * @param {PostCreateManyArgs} args - Arguments to create many Posts. + * @example + * // Create many Posts + * const post = await prisma.post.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Posts and returns the data saved in the database. + * @param {PostCreateManyAndReturnArgs} args - Arguments to create many Posts. + * @example + * // Create many Posts + * const post = await prisma.post.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Posts and only return the `id` + * const postWithIdOnly = await prisma.post.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a Post. + * @param {PostDeleteArgs} args - Arguments to delete one Post. + * @example + * // Delete one Post + * const Post = await prisma.post.delete({ + * where: { + * // ... filter to delete one Post + * } + * }) + * + */ + delete(args: Prisma.SelectSubset>): Prisma.Prisma__PostClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one Post. + * @param {PostUpdateArgs} args - Arguments to update one Post. + * @example + * // Update one Post + * const post = await prisma.post.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: Prisma.SelectSubset>): Prisma.Prisma__PostClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more Posts. + * @param {PostDeleteManyArgs} args - Arguments to filter Posts to delete. + * @example + * // Delete a few Posts + * const { count } = await prisma.post.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Posts. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PostUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Posts + * const post = await prisma.post.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Posts and returns the data updated in the database. + * @param {PostUpdateManyAndReturnArgs} args - Arguments to update many Posts. + * @example + * // Update many Posts + * const post = await prisma.post.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more Posts and only return the `id` + * const postWithIdOnly = await prisma.post.updateManyAndReturn({ + * select: { id: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one Post. + * @param {PostUpsertArgs} args - Arguments to update or create a Post. + * @example + * // Update or create a Post + * const post = await prisma.post.upsert({ + * create: { + * // ... data to create a Post + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Post we want to update + * } + * }) + */ + upsert(args: Prisma.SelectSubset>): Prisma.Prisma__PostClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of Posts. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PostCountArgs} args - Arguments to filter Posts to count. + * @example + * // Count the number of Posts + * const count = await prisma.post.count({ + * where: { + * // ... the filter for the Posts we want to count + * } + * }) + **/ + count( + args?: Prisma.Subset, + ): Prisma.PrismaPromise< + T extends runtime.Types.Utils.Record<'select', any> + ? T['select'] extends true + ? number + : Prisma.GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a Post. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PostAggregateArgs} 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: Prisma.Subset): Prisma.PrismaPromise> + + /** + * Group by Post. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {PostGroupByArgs} 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 PostGroupByArgs, + HasSelectOrTake extends Prisma.Or< + Prisma.Extends<'skip', Prisma.Keys>, + Prisma.Extends<'take', Prisma.Keys> + >, + OrderByArg extends Prisma.True extends HasSelectOrTake + ? { orderBy: PostGroupByArgs['orderBy'] } + : { orderBy?: PostGroupByArgs['orderBy'] }, + OrderFields extends Prisma.ExcludeUnderscoreKeys>>, + ByFields extends Prisma.MaybeTupleToUnion, + ByValid extends Prisma.Has, + HavingFields extends Prisma.GetHavingFields, + HavingValid extends Prisma.Has, + ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, + InputErrors extends ByEmpty extends Prisma.True + ? `Error: "by" must not be empty.` + : HavingValid extends Prisma.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 Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.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 Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.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 Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetPostGroupByPayload : Prisma.PrismaPromise +/** + * Fields of the Post model + */ +readonly fields: PostFieldRefs; +} + +/** + * The delegate class that acts as a "Promise-like" for Post. + * 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__PostClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + author = {}>(args?: Prisma.Subset>): Prisma.Prisma__AdminUserClient, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + attachments = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | 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): runtime.Types.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): runtime.Types.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): runtime.Types.Utils.JsPromise +} + + + + +/** + * Fields of the Post model + */ +export interface PostFieldRefs { + readonly id: Prisma.FieldRef<"Post", 'Int'> + readonly type: Prisma.FieldRef<"Post", 'String'> + readonly category: Prisma.FieldRef<"Post", 'String'> + readonly title: Prisma.FieldRef<"Post", 'String'> + readonly content: Prisma.FieldRef<"Post", 'String'> + readonly isPinned: Prisma.FieldRef<"Post", 'Boolean'> + readonly status: Prisma.FieldRef<"Post", 'String'> + readonly viewCount: Prisma.FieldRef<"Post", 'Int'> + readonly authorId: Prisma.FieldRef<"Post", 'String'> + readonly publishedAt: Prisma.FieldRef<"Post", 'DateTime'> + readonly createdAt: Prisma.FieldRef<"Post", 'DateTime'> + readonly updatedAt: Prisma.FieldRef<"Post", 'DateTime'> +} + + +// Custom InputTypes +/** + * Post findUnique + */ +export type PostFindUniqueArgs = { + /** + * Select specific fields to fetch from the Post + */ + select?: Prisma.PostSelect | null + /** + * Omit specific fields from the Post + */ + omit?: Prisma.PostOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.PostInclude | null + /** + * Filter, which Post to fetch. + */ + where: Prisma.PostWhereUniqueInput +} + +/** + * Post findUniqueOrThrow + */ +export type PostFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the Post + */ + select?: Prisma.PostSelect | null + /** + * Omit specific fields from the Post + */ + omit?: Prisma.PostOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.PostInclude | null + /** + * Filter, which Post to fetch. + */ + where: Prisma.PostWhereUniqueInput +} + +/** + * Post findFirst + */ +export type PostFindFirstArgs = { + /** + * Select specific fields to fetch from the Post + */ + select?: Prisma.PostSelect | null + /** + * Omit specific fields from the Post + */ + omit?: Prisma.PostOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.PostInclude | null + /** + * Filter, which Post to fetch. + */ + where?: Prisma.PostWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Posts to fetch. + */ + orderBy?: Prisma.PostOrderByWithRelationInput | Prisma.PostOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Posts. + */ + cursor?: Prisma.PostWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Posts 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` Posts. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Posts. + */ + distinct?: Prisma.PostScalarFieldEnum | Prisma.PostScalarFieldEnum[] +} + +/** + * Post findFirstOrThrow + */ +export type PostFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the Post + */ + select?: Prisma.PostSelect | null + /** + * Omit specific fields from the Post + */ + omit?: Prisma.PostOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.PostInclude | null + /** + * Filter, which Post to fetch. + */ + where?: Prisma.PostWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Posts to fetch. + */ + orderBy?: Prisma.PostOrderByWithRelationInput | Prisma.PostOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Posts. + */ + cursor?: Prisma.PostWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Posts 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` Posts. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Posts. + */ + distinct?: Prisma.PostScalarFieldEnum | Prisma.PostScalarFieldEnum[] +} + +/** + * Post findMany + */ +export type PostFindManyArgs = { + /** + * Select specific fields to fetch from the Post + */ + select?: Prisma.PostSelect | null + /** + * Omit specific fields from the Post + */ + omit?: Prisma.PostOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.PostInclude | null + /** + * Filter, which Posts to fetch. + */ + where?: Prisma.PostWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Posts to fetch. + */ + orderBy?: Prisma.PostOrderByWithRelationInput | Prisma.PostOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Posts. + */ + cursor?: Prisma.PostWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Posts 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` Posts. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Posts. + */ + distinct?: Prisma.PostScalarFieldEnum | Prisma.PostScalarFieldEnum[] +} + +/** + * Post create + */ +export type PostCreateArgs = { + /** + * Select specific fields to fetch from the Post + */ + select?: Prisma.PostSelect | null + /** + * Omit specific fields from the Post + */ + omit?: Prisma.PostOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.PostInclude | null + /** + * The data needed to create a Post. + */ + data: Prisma.XOR +} + +/** + * Post createMany + */ +export type PostCreateManyArgs = { + /** + * The data used to create many Posts. + */ + data: Prisma.PostCreateManyInput | Prisma.PostCreateManyInput[] +} + +/** + * Post createManyAndReturn + */ +export type PostCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Post + */ + select?: Prisma.PostSelectCreateManyAndReturn | null + /** + * Omit specific fields from the Post + */ + omit?: Prisma.PostOmit | null + /** + * The data used to create many Posts. + */ + data: Prisma.PostCreateManyInput | Prisma.PostCreateManyInput[] + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.PostIncludeCreateManyAndReturn | null +} + +/** + * Post update + */ +export type PostUpdateArgs = { + /** + * Select specific fields to fetch from the Post + */ + select?: Prisma.PostSelect | null + /** + * Omit specific fields from the Post + */ + omit?: Prisma.PostOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.PostInclude | null + /** + * The data needed to update a Post. + */ + data: Prisma.XOR + /** + * Choose, which Post to update. + */ + where: Prisma.PostWhereUniqueInput +} + +/** + * Post updateMany + */ +export type PostUpdateManyArgs = { + /** + * The data used to update Posts. + */ + data: Prisma.XOR + /** + * Filter which Posts to update + */ + where?: Prisma.PostWhereInput + /** + * Limit how many Posts to update. + */ + limit?: number +} + +/** + * Post updateManyAndReturn + */ +export type PostUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Post + */ + select?: Prisma.PostSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the Post + */ + omit?: Prisma.PostOmit | null + /** + * The data used to update Posts. + */ + data: Prisma.XOR + /** + * Filter which Posts to update + */ + where?: Prisma.PostWhereInput + /** + * Limit how many Posts to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.PostIncludeUpdateManyAndReturn | null +} + +/** + * Post upsert + */ +export type PostUpsertArgs = { + /** + * Select specific fields to fetch from the Post + */ + select?: Prisma.PostSelect | null + /** + * Omit specific fields from the Post + */ + omit?: Prisma.PostOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.PostInclude | null + /** + * The filter to search for the Post to update in case it exists. + */ + where: Prisma.PostWhereUniqueInput + /** + * In case the Post found by the `where` argument doesn't exist, create a new Post with this data. + */ + create: Prisma.XOR + /** + * In case the Post was found with the provided `where` argument, update it with this data. + */ + update: Prisma.XOR +} + +/** + * Post delete + */ +export type PostDeleteArgs = { + /** + * Select specific fields to fetch from the Post + */ + select?: Prisma.PostSelect | null + /** + * Omit specific fields from the Post + */ + omit?: Prisma.PostOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.PostInclude | null + /** + * Filter which Post to delete. + */ + where: Prisma.PostWhereUniqueInput +} + +/** + * Post deleteMany + */ +export type PostDeleteManyArgs = { + /** + * Filter which Posts to delete + */ + where?: Prisma.PostWhereInput + /** + * Limit how many Posts to delete. + */ + limit?: number +} + +/** + * Post.author + */ +export type Post$authorArgs = { + /** + * Select specific fields to fetch from the AdminUser + */ + select?: Prisma.AdminUserSelect | null + /** + * Omit specific fields from the AdminUser + */ + omit?: Prisma.AdminUserOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AdminUserInclude | null + where?: Prisma.AdminUserWhereInput +} + +/** + * Post.attachments + */ +export type Post$attachmentsArgs = { + /** + * Select specific fields to fetch from the Attachment + */ + select?: Prisma.AttachmentSelect | null + /** + * Omit specific fields from the Attachment + */ + omit?: Prisma.AttachmentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AttachmentInclude | null + where?: Prisma.AttachmentWhereInput + orderBy?: Prisma.AttachmentOrderByWithRelationInput | Prisma.AttachmentOrderByWithRelationInput[] + cursor?: Prisma.AttachmentWhereUniqueInput + take?: number + skip?: number + distinct?: Prisma.AttachmentScalarFieldEnum | Prisma.AttachmentScalarFieldEnum[] +} + +/** + * Post without action + */ +export type PostDefaultArgs = { + /** + * Select specific fields to fetch from the Post + */ + select?: Prisma.PostSelect | null + /** + * Omit specific fields from the Post + */ + omit?: Prisma.PostOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.PostInclude | null +} diff --git a/src/generated/prisma/models/Setting.ts b/src/generated/prisma/models/Setting.ts new file mode 100644 index 0000000..d4676f7 --- /dev/null +++ b/src/generated/prisma/models/Setting.ts @@ -0,0 +1,1091 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * This file exports the `Setting` model and its related types. + * + * 🟢 You can import this file directly. + */ +import type * as runtime from "@prisma/client/runtime/client" +import type * as $Enums from "../enums" +import type * as Prisma from "../internal/prismaNamespace" + +/** + * Model Setting + * + */ +export type SettingModel = runtime.Types.Result.DefaultSelection + +export type AggregateSetting = { + _count: SettingCountAggregateOutputType | null + _min: SettingMinAggregateOutputType | null + _max: SettingMaxAggregateOutputType | null +} + +export type SettingMinAggregateOutputType = { + key: string | null + value: string | null + updatedAt: Date | null +} + +export type SettingMaxAggregateOutputType = { + key: string | null + value: string | null + updatedAt: Date | null +} + +export type SettingCountAggregateOutputType = { + key: number + value: number + updatedAt: number + _all: number +} + + +export type SettingMinAggregateInputType = { + key?: true + value?: true + updatedAt?: true +} + +export type SettingMaxAggregateInputType = { + key?: true + value?: true + updatedAt?: true +} + +export type SettingCountAggregateInputType = { + key?: true + value?: true + updatedAt?: true + _all?: true +} + +export type SettingAggregateArgs = { + /** + * Filter which Setting to aggregate. + */ + where?: Prisma.SettingWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Settings to fetch. + */ + orderBy?: Prisma.SettingOrderByWithRelationInput | Prisma.SettingOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: Prisma.SettingWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Settings 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` Settings. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Settings + **/ + _count?: true | SettingCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: SettingMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: SettingMaxAggregateInputType +} + +export type GetSettingAggregateType = { + [P in keyof T & keyof AggregateSetting]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType +} + + + + +export type SettingGroupByArgs = { + where?: Prisma.SettingWhereInput + orderBy?: Prisma.SettingOrderByWithAggregationInput | Prisma.SettingOrderByWithAggregationInput[] + by: Prisma.SettingScalarFieldEnum[] | Prisma.SettingScalarFieldEnum + having?: Prisma.SettingScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: SettingCountAggregateInputType | true + _min?: SettingMinAggregateInputType + _max?: SettingMaxAggregateInputType +} + +export type SettingGroupByOutputType = { + key: string + value: string + updatedAt: Date + _count: SettingCountAggregateOutputType | null + _min: SettingMinAggregateOutputType | null + _max: SettingMaxAggregateOutputType | null +} + +export type GetSettingGroupByPayload = Prisma.PrismaPromise< + Array< + Prisma.PickEnumerable & + { + [P in ((keyof T) & (keyof SettingGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType + } + > + > + + + +export type SettingWhereInput = { + AND?: Prisma.SettingWhereInput | Prisma.SettingWhereInput[] + OR?: Prisma.SettingWhereInput[] + NOT?: Prisma.SettingWhereInput | Prisma.SettingWhereInput[] + key?: Prisma.StringFilter<"Setting"> | string + value?: Prisma.StringFilter<"Setting"> | string + updatedAt?: Prisma.DateTimeFilter<"Setting"> | Date | string +} + +export type SettingOrderByWithRelationInput = { + key?: Prisma.SortOrder + value?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder +} + +export type SettingWhereUniqueInput = Prisma.AtLeast<{ + key?: string + AND?: Prisma.SettingWhereInput | Prisma.SettingWhereInput[] + OR?: Prisma.SettingWhereInput[] + NOT?: Prisma.SettingWhereInput | Prisma.SettingWhereInput[] + value?: Prisma.StringFilter<"Setting"> | string + updatedAt?: Prisma.DateTimeFilter<"Setting"> | Date | string +}, "key"> + +export type SettingOrderByWithAggregationInput = { + key?: Prisma.SortOrder + value?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + _count?: Prisma.SettingCountOrderByAggregateInput + _max?: Prisma.SettingMaxOrderByAggregateInput + _min?: Prisma.SettingMinOrderByAggregateInput +} + +export type SettingScalarWhereWithAggregatesInput = { + AND?: Prisma.SettingScalarWhereWithAggregatesInput | Prisma.SettingScalarWhereWithAggregatesInput[] + OR?: Prisma.SettingScalarWhereWithAggregatesInput[] + NOT?: Prisma.SettingScalarWhereWithAggregatesInput | Prisma.SettingScalarWhereWithAggregatesInput[] + key?: Prisma.StringWithAggregatesFilter<"Setting"> | string + value?: Prisma.StringWithAggregatesFilter<"Setting"> | string + updatedAt?: Prisma.DateTimeWithAggregatesFilter<"Setting"> | Date | string +} + +export type SettingCreateInput = { + key: string + value: string + updatedAt?: Date | string +} + +export type SettingUncheckedCreateInput = { + key: string + value: string + updatedAt?: Date | string +} + +export type SettingUpdateInput = { + key?: Prisma.StringFieldUpdateOperationsInput | string + value?: Prisma.StringFieldUpdateOperationsInput | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type SettingUncheckedUpdateInput = { + key?: Prisma.StringFieldUpdateOperationsInput | string + value?: Prisma.StringFieldUpdateOperationsInput | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type SettingCreateManyInput = { + key: string + value: string + updatedAt?: Date | string +} + +export type SettingUpdateManyMutationInput = { + key?: Prisma.StringFieldUpdateOperationsInput | string + value?: Prisma.StringFieldUpdateOperationsInput | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type SettingUncheckedUpdateManyInput = { + key?: Prisma.StringFieldUpdateOperationsInput | string + value?: Prisma.StringFieldUpdateOperationsInput | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type SettingCountOrderByAggregateInput = { + key?: Prisma.SortOrder + value?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder +} + +export type SettingMaxOrderByAggregateInput = { + key?: Prisma.SortOrder + value?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder +} + +export type SettingMinOrderByAggregateInput = { + key?: Prisma.SortOrder + value?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder +} + + + +export type SettingSelect = runtime.Types.Extensions.GetSelect<{ + key?: boolean + value?: boolean + updatedAt?: boolean +}, ExtArgs["result"]["setting"]> + +export type SettingSelectCreateManyAndReturn = runtime.Types.Extensions.GetSelect<{ + key?: boolean + value?: boolean + updatedAt?: boolean +}, ExtArgs["result"]["setting"]> + +export type SettingSelectUpdateManyAndReturn = runtime.Types.Extensions.GetSelect<{ + key?: boolean + value?: boolean + updatedAt?: boolean +}, ExtArgs["result"]["setting"]> + +export type SettingSelectScalar = { + key?: boolean + value?: boolean + updatedAt?: boolean +} + +export type SettingOmit = runtime.Types.Extensions.GetOmit<"key" | "value" | "updatedAt", ExtArgs["result"]["setting"]> + +export type $SettingPayload = { + name: "Setting" + objects: {} + scalars: runtime.Types.Extensions.GetPayloadResult<{ + key: string + value: string + updatedAt: Date + }, ExtArgs["result"]["setting"]> + composites: {} +} + +export type SettingGetPayload = runtime.Types.Result.GetResult + +export type SettingCountArgs = + Omit & { + select?: SettingCountAggregateInputType | true + } + +export interface SettingDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Setting'], meta: { name: 'Setting' } } + /** + * Find zero or one Setting that matches the filter. + * @param {SettingFindUniqueArgs} args - Arguments to find a Setting + * @example + * // Get one Setting + * const setting = await prisma.setting.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__SettingClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one Setting that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {SettingFindUniqueOrThrowArgs} args - Arguments to find a Setting + * @example + * // Get one Setting + * const setting = await prisma.setting.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__SettingClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Setting 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 {SettingFindFirstArgs} args - Arguments to find a Setting + * @example + * // Get one Setting + * const setting = await prisma.setting.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__SettingClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Setting 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 {SettingFindFirstOrThrowArgs} args - Arguments to find a Setting + * @example + * // Get one Setting + * const setting = await prisma.setting.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__SettingClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more Settings 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 {SettingFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Settings + * const settings = await prisma.setting.findMany() + * + * // Get first 10 Settings + * const settings = await prisma.setting.findMany({ take: 10 }) + * + * // Only select the `key` + * const settingWithKeyOnly = await prisma.setting.findMany({ select: { key: true } }) + * + */ + findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> + + /** + * Create a Setting. + * @param {SettingCreateArgs} args - Arguments to create a Setting. + * @example + * // Create one Setting + * const Setting = await prisma.setting.create({ + * data: { + * // ... data to create a Setting + * } + * }) + * + */ + create(args: Prisma.SelectSubset>): Prisma.Prisma__SettingClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many Settings. + * @param {SettingCreateManyArgs} args - Arguments to create many Settings. + * @example + * // Create many Settings + * const setting = await prisma.setting.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Create many Settings and returns the data saved in the database. + * @param {SettingCreateManyAndReturnArgs} args - Arguments to create many Settings. + * @example + * // Create many Settings + * const setting = await prisma.setting.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Settings and only return the `key` + * const settingWithKeyOnly = await prisma.setting.createManyAndReturn({ + * select: { key: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "createManyAndReturn", GlobalOmitOptions>> + + /** + * Delete a Setting. + * @param {SettingDeleteArgs} args - Arguments to delete one Setting. + * @example + * // Delete one Setting + * const Setting = await prisma.setting.delete({ + * where: { + * // ... filter to delete one Setting + * } + * }) + * + */ + delete(args: Prisma.SelectSubset>): Prisma.Prisma__SettingClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one Setting. + * @param {SettingUpdateArgs} args - Arguments to update one Setting. + * @example + * // Update one Setting + * const setting = await prisma.setting.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: Prisma.SelectSubset>): Prisma.Prisma__SettingClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more Settings. + * @param {SettingDeleteManyArgs} args - Arguments to filter Settings to delete. + * @example + * // Delete a few Settings + * const { count } = await prisma.setting.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Settings. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {SettingUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Settings + * const setting = await prisma.setting.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Settings and returns the data updated in the database. + * @param {SettingUpdateManyAndReturnArgs} args - Arguments to update many Settings. + * @example + * // Update many Settings + * const setting = await prisma.setting.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more Settings and only return the `key` + * const settingWithKeyOnly = await prisma.setting.updateManyAndReturn({ + * select: { key: true }, + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + updateManyAndReturn(args: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "updateManyAndReturn", GlobalOmitOptions>> + + /** + * Create or update one Setting. + * @param {SettingUpsertArgs} args - Arguments to update or create a Setting. + * @example + * // Update or create a Setting + * const setting = await prisma.setting.upsert({ + * create: { + * // ... data to create a Setting + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Setting we want to update + * } + * }) + */ + upsert(args: Prisma.SelectSubset>): Prisma.Prisma__SettingClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of Settings. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {SettingCountArgs} args - Arguments to filter Settings to count. + * @example + * // Count the number of Settings + * const count = await prisma.setting.count({ + * where: { + * // ... the filter for the Settings we want to count + * } + * }) + **/ + count( + args?: Prisma.Subset, + ): Prisma.PrismaPromise< + T extends runtime.Types.Utils.Record<'select', any> + ? T['select'] extends true + ? number + : Prisma.GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a Setting. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {SettingAggregateArgs} 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: Prisma.Subset): Prisma.PrismaPromise> + + /** + * Group by Setting. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {SettingGroupByArgs} 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 SettingGroupByArgs, + HasSelectOrTake extends Prisma.Or< + Prisma.Extends<'skip', Prisma.Keys>, + Prisma.Extends<'take', Prisma.Keys> + >, + OrderByArg extends Prisma.True extends HasSelectOrTake + ? { orderBy: SettingGroupByArgs['orderBy'] } + : { orderBy?: SettingGroupByArgs['orderBy'] }, + OrderFields extends Prisma.ExcludeUnderscoreKeys>>, + ByFields extends Prisma.MaybeTupleToUnion, + ByValid extends Prisma.Has, + HavingFields extends Prisma.GetHavingFields, + HavingValid extends Prisma.Has, + ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, + InputErrors extends ByEmpty extends Prisma.True + ? `Error: "by" must not be empty.` + : HavingValid extends Prisma.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 Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.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 Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.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 Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetSettingGroupByPayload : Prisma.PrismaPromise +/** + * Fields of the Setting model + */ +readonly fields: SettingFieldRefs; +} + +/** + * The delegate class that acts as a "Promise-like" for Setting. + * 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__SettingClient 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): runtime.Types.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): runtime.Types.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): runtime.Types.Utils.JsPromise +} + + + + +/** + * Fields of the Setting model + */ +export interface SettingFieldRefs { + readonly key: Prisma.FieldRef<"Setting", 'String'> + readonly value: Prisma.FieldRef<"Setting", 'String'> + readonly updatedAt: Prisma.FieldRef<"Setting", 'DateTime'> +} + + +// Custom InputTypes +/** + * Setting findUnique + */ +export type SettingFindUniqueArgs = { + /** + * Select specific fields to fetch from the Setting + */ + select?: Prisma.SettingSelect | null + /** + * Omit specific fields from the Setting + */ + omit?: Prisma.SettingOmit | null + /** + * Filter, which Setting to fetch. + */ + where: Prisma.SettingWhereUniqueInput +} + +/** + * Setting findUniqueOrThrow + */ +export type SettingFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the Setting + */ + select?: Prisma.SettingSelect | null + /** + * Omit specific fields from the Setting + */ + omit?: Prisma.SettingOmit | null + /** + * Filter, which Setting to fetch. + */ + where: Prisma.SettingWhereUniqueInput +} + +/** + * Setting findFirst + */ +export type SettingFindFirstArgs = { + /** + * Select specific fields to fetch from the Setting + */ + select?: Prisma.SettingSelect | null + /** + * Omit specific fields from the Setting + */ + omit?: Prisma.SettingOmit | null + /** + * Filter, which Setting to fetch. + */ + where?: Prisma.SettingWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Settings to fetch. + */ + orderBy?: Prisma.SettingOrderByWithRelationInput | Prisma.SettingOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Settings. + */ + cursor?: Prisma.SettingWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Settings 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` Settings. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Settings. + */ + distinct?: Prisma.SettingScalarFieldEnum | Prisma.SettingScalarFieldEnum[] +} + +/** + * Setting findFirstOrThrow + */ +export type SettingFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the Setting + */ + select?: Prisma.SettingSelect | null + /** + * Omit specific fields from the Setting + */ + omit?: Prisma.SettingOmit | null + /** + * Filter, which Setting to fetch. + */ + where?: Prisma.SettingWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Settings to fetch. + */ + orderBy?: Prisma.SettingOrderByWithRelationInput | Prisma.SettingOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Settings. + */ + cursor?: Prisma.SettingWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Settings 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` Settings. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Settings. + */ + distinct?: Prisma.SettingScalarFieldEnum | Prisma.SettingScalarFieldEnum[] +} + +/** + * Setting findMany + */ +export type SettingFindManyArgs = { + /** + * Select specific fields to fetch from the Setting + */ + select?: Prisma.SettingSelect | null + /** + * Omit specific fields from the Setting + */ + omit?: Prisma.SettingOmit | null + /** + * Filter, which Settings to fetch. + */ + where?: Prisma.SettingWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Settings to fetch. + */ + orderBy?: Prisma.SettingOrderByWithRelationInput | Prisma.SettingOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Settings. + */ + cursor?: Prisma.SettingWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Settings 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` Settings. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Settings. + */ + distinct?: Prisma.SettingScalarFieldEnum | Prisma.SettingScalarFieldEnum[] +} + +/** + * Setting create + */ +export type SettingCreateArgs = { + /** + * Select specific fields to fetch from the Setting + */ + select?: Prisma.SettingSelect | null + /** + * Omit specific fields from the Setting + */ + omit?: Prisma.SettingOmit | null + /** + * The data needed to create a Setting. + */ + data: Prisma.XOR +} + +/** + * Setting createMany + */ +export type SettingCreateManyArgs = { + /** + * The data used to create many Settings. + */ + data: Prisma.SettingCreateManyInput | Prisma.SettingCreateManyInput[] +} + +/** + * Setting createManyAndReturn + */ +export type SettingCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Setting + */ + select?: Prisma.SettingSelectCreateManyAndReturn | null + /** + * Omit specific fields from the Setting + */ + omit?: Prisma.SettingOmit | null + /** + * The data used to create many Settings. + */ + data: Prisma.SettingCreateManyInput | Prisma.SettingCreateManyInput[] +} + +/** + * Setting update + */ +export type SettingUpdateArgs = { + /** + * Select specific fields to fetch from the Setting + */ + select?: Prisma.SettingSelect | null + /** + * Omit specific fields from the Setting + */ + omit?: Prisma.SettingOmit | null + /** + * The data needed to update a Setting. + */ + data: Prisma.XOR + /** + * Choose, which Setting to update. + */ + where: Prisma.SettingWhereUniqueInput +} + +/** + * Setting updateMany + */ +export type SettingUpdateManyArgs = { + /** + * The data used to update Settings. + */ + data: Prisma.XOR + /** + * Filter which Settings to update + */ + where?: Prisma.SettingWhereInput + /** + * Limit how many Settings to update. + */ + limit?: number +} + +/** + * Setting updateManyAndReturn + */ +export type SettingUpdateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the Setting + */ + select?: Prisma.SettingSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the Setting + */ + omit?: Prisma.SettingOmit | null + /** + * The data used to update Settings. + */ + data: Prisma.XOR + /** + * Filter which Settings to update + */ + where?: Prisma.SettingWhereInput + /** + * Limit how many Settings to update. + */ + limit?: number +} + +/** + * Setting upsert + */ +export type SettingUpsertArgs = { + /** + * Select specific fields to fetch from the Setting + */ + select?: Prisma.SettingSelect | null + /** + * Omit specific fields from the Setting + */ + omit?: Prisma.SettingOmit | null + /** + * The filter to search for the Setting to update in case it exists. + */ + where: Prisma.SettingWhereUniqueInput + /** + * In case the Setting found by the `where` argument doesn't exist, create a new Setting with this data. + */ + create: Prisma.XOR + /** + * In case the Setting was found with the provided `where` argument, update it with this data. + */ + update: Prisma.XOR +} + +/** + * Setting delete + */ +export type SettingDeleteArgs = { + /** + * Select specific fields to fetch from the Setting + */ + select?: Prisma.SettingSelect | null + /** + * Omit specific fields from the Setting + */ + omit?: Prisma.SettingOmit | null + /** + * Filter which Setting to delete. + */ + where: Prisma.SettingWhereUniqueInput +} + +/** + * Setting deleteMany + */ +export type SettingDeleteManyArgs = { + /** + * Filter which Settings to delete + */ + where?: Prisma.SettingWhereInput + /** + * Limit how many Settings to delete. + */ + limit?: number +} + +/** + * Setting without action + */ +export type SettingDefaultArgs = { + /** + * Select specific fields to fetch from the Setting + */ + select?: Prisma.SettingSelect | null + /** + * Omit specific fields from the Setting + */ + omit?: Prisma.SettingOmit | null +} diff --git a/src/lib/db-url.ts b/src/lib/db-url.ts new file mode 100644 index 0000000..dce6618 --- /dev/null +++ b/src/lib/db-url.ts @@ -0,0 +1,21 @@ +import path from "node:path"; + +/** + * SQLite의 상대 `file:` URL을 Prisma CLI와 동일하게 schema(prisma/) 기준으로 해석한다. + * + * Prisma CLI는 `file:./dev.db`를 `prisma/dev.db`로 해석하지만, + * `@prisma/adapter-better-sqlite3`는 현재 작업 디렉터리 기준으로 열기 때문에 + * 그대로 넘기면 프로젝트 루트에 빈 DB가 생기고 "table does not exist"가 난다. + * 절대 경로(`file:/srv/...`)와 SQLite 외 URL은 그대로 반환한다. + */ +export function resolveDatabaseUrl(url: string): string { + if (!url.startsWith("file:")) return url; + + const target = url.slice("file:".length); + if (target.startsWith("/") || /^[A-Za-z]:[\\/]/.test(target)) { + return url; + } + + const relative = target.replace(/^\.\//, ""); + return `file:${path.resolve(process.cwd(), "prisma", relative)}`; +} diff --git a/src/lib/db.ts b/src/lib/db.ts index 472ed2c..af6036c 100644 --- a/src/lib/db.ts +++ b/src/lib/db.ts @@ -1,12 +1,21 @@ -import { PrismaClient } from "@prisma/client"; +import { PrismaBetterSqlite3 } from "@prisma/adapter-better-sqlite3"; +import { PrismaClient } from "@/generated/prisma/client"; +import { resolveDatabaseUrl } from "./db-url"; const globalForPrisma = globalThis as unknown as { prisma?: PrismaClient; }; +const adapter = new PrismaBetterSqlite3( + { url: resolveDatabaseUrl(process.env.DATABASE_URL ?? "file:./dev.db") }, + // Prisma 6 네이티브 드라이버가 저장한 DateTime(Unix epoch ms) 호환 + { timestampFormat: "unixepoch-ms" }, +); + export const prisma = globalForPrisma.prisma ?? new PrismaClient({ + adapter, log: process.env.NODE_ENV === "development" ? ["error", "warn"] : ["error"], }); diff --git a/src/lib/posts.ts b/src/lib/posts.ts index df8f929..6ef484a 100644 --- a/src/lib/posts.ts +++ b/src/lib/posts.ts @@ -1,6 +1,6 @@ import "server-only"; -import type { Prisma } from "@prisma/client"; +import type { Prisma } from "@/generated/prisma/client"; import { prisma } from "@/lib/db"; import { PAGE_SIZE } from "@/lib/constants";