diff --git a/.env b/.env index 529ff9e..a32fb55 100644 --- a/.env +++ b/.env @@ -1,8 +1,2 @@ -# Environment variables declared in this file are NOT automatically loaded by Prisma. -# Please add `import "dotenv/config";` to your `prisma.config.ts` file, or use the Prisma CLI with Bun -# to load environment variables from .env files: https://pris.ly/prisma-config-env-vars. - -# Prisma supports the native connection string format for PostgreSQL, MySQL, SQLite, SQL Server, MongoDB and CockroachDB. -# See the documentation for all the connection string options: https://pris.ly/d/connection-strings - -DATABASE_URL="file:./dev.db" \ No newline at end of file +# Environment variables +DATABASE_URL="file:./dev.db" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..ead1b3d --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,39 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - uses: oven-sh/setup-bun@v1 + with: + bun-version: latest + + - name: Install dependencies + run: bun install + + - name: Generate Prisma Client + run: bun --bun run prisma generate + env: + DATABASE_URL: 'file:./test.db' + + - name: Lint + run: bun run lint + + - name: Format Check + run: bun run format:check + + - name: Typecheck + run: bun run typecheck + + - name: Run Tests + run: bun run test + env: + DATABASE_URL: 'file:./test.db' diff --git a/.gitignore b/.gitignore index aa1872c..41a989e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,12 @@ -# deps -node_modules/ \ No newline at end of file +node_modules +.bun +dist +out +.DS_Store +*.log +.env +.env.* +!.env.example +data/files/* +!data/files/.gitkeep +*.db diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..b903104 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,3 @@ +node_modules +dist +.bun diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..c03d068 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,7 @@ +{ + "semi": false, + "singleQuote": true, + "trailingComma": "all", + "printWidth": 100, + "tabWidth": 2 +} diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..a0230cd --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,60 @@ +# Developer Guide + +## Backend Architecture + +The backend is built with: + +- **Runtime**: Bun +- **Framework**: Hono +- **ORM**: Prisma (with SQLite) +- **Database**: SQLite (local file) + +### Layered Architecture + +We follow a strict layered architecture: + +1. **API Layer (`src/api`)**: Handles HTTP requests, validation, and calls Service layer. **Do not access DB directly.** +2. **Service Layer (`src/services`)**: Contains business logic and interacts with the Database via Prisma. +3. **Data Layer (`src/db.ts`)**: Exports the Prisma Client instance. + +## Testing + +We use `bun:test` for testing. + +### Service Tests + +- Located in `src/services/*.test.ts`. +- Mock `prisma` client using `mock.module('../db', ...)`. +- **Important**: Due to `bun test` module caching in parallel execution, service tests must import the service under test dynamically with a cache-busting query parameter to ensure a fresh module instance (and thus fresh mocks). + ```typescript + // @ts-ignore + const { MyService } = await import(`./myService?v=${Date.now()}`) + ``` + +### API Tests + +- Located in `src/api/*.test.ts`. +- Mock the Service layer using `mock.module('../services/myService', ...)`. +- Verify that the API calls the Service methods correctly. + +## Prisma Configuration + +- Schema: `prisma/schema.prisma` +- Generated Client: `src/generated/prisma` +- Config: `prisma.config.ts` (Required for Prisma 7+) +- Adapter: We use `@prisma/adapter-libsql` for SQLite compatibility with Bun. + +### Commands + +- Generate Client: `bun --bun run prisma generate` +- Push Schema to DB: `bun --bun run prisma db push` + +## Environment Variables + +- `.env`: Development environment variables (`DATABASE_URL="file:./dev.db"`). +- `.env.test`: Test environment variables (`DATABASE_URL="file:./test.db"`). + +## Known Issues + +- `bun test` module mocking can be sticky across test files running in the same process/worker. Use the dynamic import workaround in Service tests. +- `prisma generate` outputs to `src/generated/prisma`. This folder is ignored in git, prettier, eslint, and tsconfig. diff --git a/README.md b/README.md index 6dd13e7..d950ba6 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,11 @@ To install dependencies: + ```sh bun install ``` To run: + ```sh bun run dev ``` diff --git a/bun.lock b/bun.lock index 4d66786..d2b5395 100644 --- a/bun.lock +++ b/bun.lock @@ -1,17 +1,26 @@ { "lockfileVersion": 1, - "configVersion": 1, "workspaces": { "": { "name": "forgery", "dependencies": { + "@libsql/client": "^0.17.0", "@prisma/adapter-libsql": "^7.3.0", "@prisma/client": "^7.3.0", "hono": "^4.11.8", + "ulidx": "^2.4.1", }, "devDependencies": { - "@types/bun": "latest", + "@eslint/js": "^10.0.1", + "@types/bun": "^1.3.8", + "@typescript-eslint/eslint-plugin": "^8.54.0", + "@typescript-eslint/parser": "^8.54.0", + "eslint": "^10.0.0", + "eslint-config-prettier": "^10.1.8", + "prettier": "^3.8.1", "prisma": "^7.3.0", + "typescript": "^5.9.3", + "typescript-eslint": "^8.54.0", }, }, }, @@ -30,31 +39,63 @@ "@electric-sql/pglite-tools": ["@electric-sql/pglite-tools@0.2.20", "", { "peerDependencies": { "@electric-sql/pglite": "0.3.15" } }, "sha512-BK50ZnYa3IG7ztXhtgYf0Q7zijV32Iw1cYS8C+ThdQlwx12V5VZ9KRJ42y82Hyb4PkTxZQklVQA9JHyUlex33A=="], + "@eslint-community/eslint-utils": ["@eslint-community/eslint-utils@4.9.1", "", { "dependencies": { "eslint-visitor-keys": "^3.4.3" }, "peerDependencies": { "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } }, "sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ=="], + + "@eslint-community/regexpp": ["@eslint-community/regexpp@4.12.2", "", {}, "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew=="], + + "@eslint/config-array": ["@eslint/config-array@0.23.1", "", { "dependencies": { "@eslint/object-schema": "^3.0.1", "debug": "^4.3.1", "minimatch": "^10.1.1" } }, "sha512-uVSdg/V4dfQmTjJzR0szNczjOH/J+FyUMMjYtr07xFRXR7EDf9i1qdxrD0VusZH9knj1/ecxzCQQxyic5NzAiA=="], + + "@eslint/config-helpers": ["@eslint/config-helpers@0.5.2", "", { "dependencies": { "@eslint/core": "^1.1.0" } }, "sha512-a5MxrdDXEvqnIq+LisyCX6tQMPF/dSJpCfBgBauY+pNZ28yCtSsTvyTYrMhaI+LK26bVyCJfJkT0u8KIj2i1dQ=="], + + "@eslint/core": ["@eslint/core@1.1.0", "", { "dependencies": { "@types/json-schema": "^7.0.15" } }, "sha512-/nr9K9wkr3P1EzFTdFdMoLuo1PmIxjmwvPozwoSodjNBdefGujXQUF93u1DDZpEaTuDvMsIQddsd35BwtrW9Xw=="], + + "@eslint/js": ["@eslint/js@10.0.1", "", { "peerDependencies": { "eslint": "^10.0.0" }, "optionalPeers": ["eslint"] }, "sha512-zeR9k5pd4gxjZ0abRoIaxdc7I3nDktoXZk2qOv9gCNWx3mVwEn32VRhyLaRsDiJjTs0xq/T8mfPtyuXu7GWBcA=="], + + "@eslint/object-schema": ["@eslint/object-schema@3.0.1", "", {}, "sha512-P9cq2dpr+LU8j3qbLygLcSZrl2/ds/pUpfnHNNuk5HW7mnngHs+6WSq5C9mO3rqRX8A1poxqLTC9cu0KOyJlBg=="], + + "@eslint/plugin-kit": ["@eslint/plugin-kit@0.6.0", "", { "dependencies": { "@eslint/core": "^1.1.0", "levn": "^0.4.1" } }, "sha512-bIZEUzOI1jkhviX2cp5vNyXQc6olzb2ohewQubuYlMXZ2Q/XjBO0x0XhGPvc9fjSIiUN0vw+0hq53BJ4eQSJKQ=="], + "@hono/node-server": ["@hono/node-server@1.19.9", "", { "peerDependencies": { "hono": "^4" } }, "sha512-vHL6w3ecZsky+8P5MD+eFfaGTyCeOHUIFYMGpQGbrBTSmNNoxv0if69rEZ5giu36weC5saFuznL411gRX7bJDw=="], - "@libsql/client": ["@libsql/client@0.8.1", "", { "dependencies": { "@libsql/core": "^0.8.1", "@libsql/hrana-client": "^0.6.2", "js-base64": "^3.7.5", "libsql": "^0.3.10", "promise-limit": "^2.7.0" } }, "sha512-xGg0F4iTDFpeBZ0r4pA6icGsYa5rG6RAG+i/iLDnpCAnSuTqEWMDdPlVseiq4Z/91lWI9jvvKKiKpovqJ1kZWA=="], + "@humanfs/core": ["@humanfs/core@0.19.1", "", {}, "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA=="], - "@libsql/core": ["@libsql/core@0.8.1", "", { "dependencies": { "js-base64": "^3.7.5" } }, "sha512-u6nrj6HZMTPsgJ9EBhLzO2uhqhlHQJQmVHV+0yFLvfGf3oSP8w7TjZCNUgu1G8jHISx6KFi7bmcrdXW9lRt++A=="], + "@humanfs/node": ["@humanfs/node@0.16.7", "", { "dependencies": { "@humanfs/core": "^0.19.1", "@humanwhocodes/retry": "^0.4.0" } }, "sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ=="], - "@libsql/darwin-arm64": ["@libsql/darwin-arm64@0.3.19", "", { "os": "darwin", "cpu": "arm64" }, "sha512-rmOqsLcDI65zzxlUOoEiPJLhqmbFsZF6p4UJQ2kMqB+Kc0Rt5/A1OAdOZ/Wo8fQfJWjR1IbkbpEINFioyKf+nQ=="], + "@humanwhocodes/module-importer": ["@humanwhocodes/module-importer@1.0.1", "", {}, "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA=="], - "@libsql/darwin-x64": ["@libsql/darwin-x64@0.3.19", "", { "os": "darwin", "cpu": "x64" }, "sha512-q9O55B646zU+644SMmOQL3FIfpmEvdWpRpzubwFc2trsa+zoBlSkHuzU9v/C+UNoPHQVRMP7KQctJ455I/h/xw=="], + "@humanwhocodes/retry": ["@humanwhocodes/retry@0.4.3", "", {}, "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ=="], - "@libsql/hrana-client": ["@libsql/hrana-client@0.6.2", "", { "dependencies": { "@libsql/isomorphic-fetch": "^0.2.1", "@libsql/isomorphic-ws": "^0.1.5", "js-base64": "^3.7.5", "node-fetch": "^3.3.2" } }, "sha512-MWxgD7mXLNf9FXXiM0bc90wCjZSpErWKr5mGza7ERy2FJNNMXd7JIOv+DepBA1FQTIfI8TFO4/QDYgaQC0goNw=="], + "@isaacs/balanced-match": ["@isaacs/balanced-match@4.0.1", "", {}, "sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ=="], + + "@isaacs/brace-expansion": ["@isaacs/brace-expansion@5.0.1", "", { "dependencies": { "@isaacs/balanced-match": "^4.0.1" } }, "sha512-WMz71T1JS624nWj2n2fnYAuPovhv7EUhk69R6i9dsVyzxt5eM3bjwvgk9L+APE1TRscGysAVMANkB0jh0LQZrQ=="], + + "@libsql/client": ["@libsql/client@0.17.0", "", { "dependencies": { "@libsql/core": "^0.17.0", "@libsql/hrana-client": "^0.9.0", "js-base64": "^3.7.5", "libsql": "^0.5.22", "promise-limit": "^2.7.0" } }, "sha512-TLjSU9Otdpq0SpKHl1tD1Nc9MKhrsZbCFGot3EbCxRa8m1E5R1mMwoOjKMMM31IyF7fr+hPNHLpYfwbMKNusmg=="], + + "@libsql/core": ["@libsql/core@0.17.0", "", { "dependencies": { "js-base64": "^3.7.5" } }, "sha512-hnZRnJHiS+nrhHKLGYPoJbc78FE903MSDrFJTbftxo+e52X+E0Y0fHOCVYsKWcg6XgB7BbJYUrz/xEkVTSaipw=="], + + "@libsql/darwin-arm64": ["@libsql/darwin-arm64@0.5.22", "", { "os": "darwin", "cpu": "arm64" }, "sha512-4B8ZlX3nIDPndfct7GNe0nI3Yw6ibocEicWdC4fvQbSs/jdq/RC2oCsoJxJ4NzXkvktX70C1J4FcmmoBy069UA=="], + + "@libsql/darwin-x64": ["@libsql/darwin-x64@0.5.22", "", { "os": "darwin", "cpu": "x64" }, "sha512-ny2HYWt6lFSIdNFzUFIJ04uiW6finXfMNJ7wypkAD8Pqdm6nAByO+Fdqu8t7sD0sqJGeUCiOg480icjyQ2/8VA=="], + + "@libsql/hrana-client": ["@libsql/hrana-client@0.9.0", "", { "dependencies": { "@libsql/isomorphic-ws": "^0.1.5", "cross-fetch": "^4.0.0", "js-base64": "^3.7.5", "node-fetch": "^3.3.2" } }, "sha512-pxQ1986AuWfPX4oXzBvLwBnfgKDE5OMhAdR/5cZmRaB4Ygz5MecQybvwZupnRz341r2CtFmbk/BhSu7k2Lm+Jw=="], "@libsql/isomorphic-fetch": ["@libsql/isomorphic-fetch@0.2.5", "", {}, "sha512-8s/B2TClEHms2yb+JGpsVRTPBfy1ih/Pq6h6gvyaNcYnMVJvgQRY7wAa8U2nD0dppbCuDU5evTNMEhrQ17ZKKg=="], "@libsql/isomorphic-ws": ["@libsql/isomorphic-ws@0.1.5", "", { "dependencies": { "@types/ws": "^8.5.4", "ws": "^8.13.0" } }, "sha512-DtLWIH29onUYR00i0GlQ3UdcTRC6EP4u9w/h9LxpUZJWRMARk6dQwZ6Jkd+QdwVpuAOrdxt18v0K2uIYR3fwFg=="], - "@libsql/linux-arm64-gnu": ["@libsql/linux-arm64-gnu@0.3.19", "", { "os": "linux", "cpu": "arm64" }, "sha512-mgeAUU1oqqh57k7I3cQyU6Trpdsdt607eFyEmH5QO7dv303ti+LjUvh1pp21QWV6WX7wZyjeJV1/VzEImB+jRg=="], + "@libsql/linux-arm-gnueabihf": ["@libsql/linux-arm-gnueabihf@0.5.22", "", { "os": "linux", "cpu": "arm" }, "sha512-3Uo3SoDPJe/zBnyZKosziRGtszXaEtv57raWrZIahtQDsjxBVjuzYQinCm9LRCJCUT5t2r5Z5nLDPJi2CwZVoA=="], - "@libsql/linux-arm64-musl": ["@libsql/linux-arm64-musl@0.3.19", "", { "os": "linux", "cpu": "arm64" }, "sha512-VEZtxghyK6zwGzU9PHohvNxthruSxBEnRrX7BSL5jQ62tN4n2JNepJ6SdzXp70pdzTfwroOj/eMwiPt94gkVRg=="], + "@libsql/linux-arm-musleabihf": ["@libsql/linux-arm-musleabihf@0.5.22", "", { "os": "linux", "cpu": "arm" }, "sha512-LCsXh07jvSojTNJptT9CowOzwITznD+YFGGW+1XxUr7fS+7/ydUrpDfsMX7UqTqjm7xG17eq86VkWJgHJfvpNg=="], - "@libsql/linux-x64-gnu": ["@libsql/linux-x64-gnu@0.3.19", "", { "os": "linux", "cpu": "x64" }, "sha512-2t/J7LD5w2f63wGihEO+0GxfTyYIyLGEvTFEsMO16XI5o7IS9vcSHrxsvAJs4w2Pf907uDjmc7fUfMg6L82BrQ=="], + "@libsql/linux-arm64-gnu": ["@libsql/linux-arm64-gnu@0.5.22", "", { "os": "linux", "cpu": "arm64" }, "sha512-KSdnOMy88c9mpOFKUEzPskSaF3VLflfSUCBwas/pn1/sV3pEhtMF6H8VUCd2rsedwoukeeCSEONqX7LLnQwRMA=="], - "@libsql/linux-x64-musl": ["@libsql/linux-x64-musl@0.3.19", "", { "os": "linux", "cpu": "x64" }, "sha512-BLsXyJaL8gZD8+3W2LU08lDEd9MIgGds0yPy5iNPp8tfhXx3pV/Fge2GErN0FC+nzt4DYQtjL+A9GUMglQefXQ=="], + "@libsql/linux-arm64-musl": ["@libsql/linux-arm64-musl@0.5.22", "", { "os": "linux", "cpu": "arm64" }, "sha512-mCHSMAsDTLK5YH//lcV3eFEgiR23Ym0U9oEvgZA0667gqRZg/2px+7LshDvErEKv2XZ8ixzw3p1IrBzLQHGSsw=="], - "@libsql/win32-x64-msvc": ["@libsql/win32-x64-msvc@0.3.19", "", { "os": "win32", "cpu": "x64" }, "sha512-ay1X9AobE4BpzG0XPw1gplyLZPGHIgJOovvW23gUrukRegiUP62uzhpRbKNogLlUOynyXeq//prHgPXiebUfWg=="], + "@libsql/linux-x64-gnu": ["@libsql/linux-x64-gnu@0.5.22", "", { "os": "linux", "cpu": "x64" }, "sha512-kNBHaIkSg78Y4BqAdgjcR2mBilZXs4HYkAmi58J+4GRwDQZh5fIUWbnQvB9f95DkWUIGVeenqLRFY2pcTmlsew=="], + + "@libsql/linux-x64-musl": ["@libsql/linux-x64-musl@0.5.22", "", { "os": "linux", "cpu": "x64" }, "sha512-UZ4Xdxm4pu3pQXjvfJiyCzZop/9j/eA2JjmhMaAhe3EVLH2g11Fy4fwyUp9sT1QJYR1kpc2JLuybPM0kuXv/Tg=="], + + "@libsql/win32-x64-msvc": ["@libsql/win32-x64-msvc@0.5.22", "", { "os": "win32", "cpu": "x64" }, "sha512-Fj0j8RnBpo43tVZUVoNK6BV/9AtDUM5S7DF3LB4qTYg1LMSZqi3yeCneUTLJD6XomQJlZzbI4mst89yspVSAnA=="], "@mrleebo/prisma-ast": ["@mrleebo/prisma-ast@0.13.1", "", { "dependencies": { "chevrotain": "^10.5.0", "lilconfig": "^2.1.0" } }, "sha512-XyroGQXcHrZdvmrGJvsA9KNeOOgGMg1Vg9OlheUsBOSKznLMDl+YChxbkboRHvtFYJEMRYmlV3uoo/njCw05iw=="], @@ -90,16 +131,52 @@ "@types/bun": ["@types/bun@1.3.8", "", { "dependencies": { "bun-types": "1.3.8" } }, "sha512-3LvWJ2q5GerAXYxO2mffLTqOzEu5qnhEAlh48Vnu8WQfnmSwbgagjGZV6BoHKJztENYEDn6QmVd949W4uESRJA=="], + "@types/esrecurse": ["@types/esrecurse@4.3.1", "", {}, "sha512-xJBAbDifo5hpffDBuHl0Y8ywswbiAp/Wi7Y/GtAgSlZyIABppyurxVueOPE8LUQOxdlgi6Zqce7uoEpqNTeiUw=="], + + "@types/estree": ["@types/estree@1.0.8", "", {}, "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w=="], + + "@types/json-schema": ["@types/json-schema@7.0.15", "", {}, "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA=="], + "@types/node": ["@types/node@25.2.1", "", { "dependencies": { "undici-types": "~7.16.0" } }, "sha512-CPrnr8voK8vC6eEtyRzvMpgp3VyVRhgclonE7qYi6P9sXwYb59ucfrnmFBTaP0yUi8Gk4yZg/LlTJULGxvTNsg=="], "@types/react": ["@types/react@19.2.13", "", { "dependencies": { "csstype": "^3.2.2" } }, "sha512-KkiJeU6VbYbUOp5ITMIc7kBfqlYkKA5KhEHVrGMmUUMt7NeaZg65ojdPk+FtNrBAOXNVM5QM72jnADjM+XVRAQ=="], "@types/ws": ["@types/ws@8.18.1", "", { "dependencies": { "@types/node": "*" } }, "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg=="], + "@typescript-eslint/eslint-plugin": ["@typescript-eslint/eslint-plugin@8.54.0", "", { "dependencies": { "@eslint-community/regexpp": "^4.12.2", "@typescript-eslint/scope-manager": "8.54.0", "@typescript-eslint/type-utils": "8.54.0", "@typescript-eslint/utils": "8.54.0", "@typescript-eslint/visitor-keys": "8.54.0", "ignore": "^7.0.5", "natural-compare": "^1.4.0", "ts-api-utils": "^2.4.0" }, "peerDependencies": { "@typescript-eslint/parser": "^8.54.0", "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "sha512-hAAP5io/7csFStuOmR782YmTthKBJ9ND3WVL60hcOjvtGFb+HJxH4O5huAcmcZ9v9G8P+JETiZ/G1B8MALnWZQ=="], + + "@typescript-eslint/parser": ["@typescript-eslint/parser@8.54.0", "", { "dependencies": { "@typescript-eslint/scope-manager": "8.54.0", "@typescript-eslint/types": "8.54.0", "@typescript-eslint/typescript-estree": "8.54.0", "@typescript-eslint/visitor-keys": "8.54.0", "debug": "^4.4.3" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "sha512-BtE0k6cjwjLZoZixN0t5AKP0kSzlGu7FctRXYuPAm//aaiZhmfq1JwdYpYr1brzEspYyFeF+8XF5j2VK6oalrA=="], + + "@typescript-eslint/project-service": ["@typescript-eslint/project-service@8.54.0", "", { "dependencies": { "@typescript-eslint/tsconfig-utils": "^8.54.0", "@typescript-eslint/types": "^8.54.0", "debug": "^4.4.3" }, "peerDependencies": { "typescript": ">=4.8.4 <6.0.0" } }, "sha512-YPf+rvJ1s7MyiWM4uTRhE4DvBXrEV+d8oC3P9Y2eT7S+HBS0clybdMIPnhiATi9vZOYDc7OQ1L/i6ga6NFYK/g=="], + + "@typescript-eslint/scope-manager": ["@typescript-eslint/scope-manager@8.54.0", "", { "dependencies": { "@typescript-eslint/types": "8.54.0", "@typescript-eslint/visitor-keys": "8.54.0" } }, "sha512-27rYVQku26j/PbHYcVfRPonmOlVI6gihHtXFbTdB5sb6qA0wdAQAbyXFVarQ5t4HRojIz64IV90YtsjQSSGlQg=="], + + "@typescript-eslint/tsconfig-utils": ["@typescript-eslint/tsconfig-utils@8.54.0", "", { "peerDependencies": { "typescript": ">=4.8.4 <6.0.0" } }, "sha512-dRgOyT2hPk/JwxNMZDsIXDgyl9axdJI3ogZ2XWhBPsnZUv+hPesa5iuhdYt2gzwA9t8RE5ytOJ6xB0moV0Ujvw=="], + + "@typescript-eslint/type-utils": ["@typescript-eslint/type-utils@8.54.0", "", { "dependencies": { "@typescript-eslint/types": "8.54.0", "@typescript-eslint/typescript-estree": "8.54.0", "@typescript-eslint/utils": "8.54.0", "debug": "^4.4.3", "ts-api-utils": "^2.4.0" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "sha512-hiLguxJWHjjwL6xMBwD903ciAwd7DmK30Y9Axs/etOkftC3ZNN9K44IuRD/EB08amu+Zw6W37x9RecLkOo3pMA=="], + + "@typescript-eslint/types": ["@typescript-eslint/types@8.54.0", "", {}, "sha512-PDUI9R1BVjqu7AUDsRBbKMtwmjWcn4J3le+5LpcFgWULN3LvHC5rkc9gCVxbrsrGmO1jfPybN5s6h4Jy+OnkAA=="], + + "@typescript-eslint/typescript-estree": ["@typescript-eslint/typescript-estree@8.54.0", "", { "dependencies": { "@typescript-eslint/project-service": "8.54.0", "@typescript-eslint/tsconfig-utils": "8.54.0", "@typescript-eslint/types": "8.54.0", "@typescript-eslint/visitor-keys": "8.54.0", "debug": "^4.4.3", "minimatch": "^9.0.5", "semver": "^7.7.3", "tinyglobby": "^0.2.15", "ts-api-utils": "^2.4.0" }, "peerDependencies": { "typescript": ">=4.8.4 <6.0.0" } }, "sha512-BUwcskRaPvTk6fzVWgDPdUndLjB87KYDrN5EYGetnktoeAvPtO4ONHlAZDnj5VFnUANg0Sjm7j4usBlnoVMHwA=="], + + "@typescript-eslint/utils": ["@typescript-eslint/utils@8.54.0", "", { "dependencies": { "@eslint-community/eslint-utils": "^4.9.1", "@typescript-eslint/scope-manager": "8.54.0", "@typescript-eslint/types": "8.54.0", "@typescript-eslint/typescript-estree": "8.54.0" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "sha512-9Cnda8GS57AQakvRyG0PTejJNlA2xhvyNtEVIMlDWOOeEyBkYWhGPnfrIAnqxLMTSTo6q8g12XVjjev5l1NvMA=="], + + "@typescript-eslint/visitor-keys": ["@typescript-eslint/visitor-keys@8.54.0", "", { "dependencies": { "@typescript-eslint/types": "8.54.0", "eslint-visitor-keys": "^4.2.1" } }, "sha512-VFlhGSl4opC0bprJiItPQ1RfUhGDIBokcPwaFH4yiBCaNPeld/9VeXbiPO1cLyorQi1G1vL+ecBk1x8o1axORA=="], + + "acorn": ["acorn@8.15.0", "", { "bin": { "acorn": "bin/acorn" } }, "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg=="], + + "acorn-jsx": ["acorn-jsx@5.3.2", "", { "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ=="], + + "ajv": ["ajv@6.12.6", "", { "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", "json-schema-traverse": "^0.4.1", "uri-js": "^4.2.2" } }, "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g=="], + "async-mutex": ["async-mutex@0.5.0", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-1A94B18jkJ3DYq284ohPxoXbfTA5HsQ7/Mf4DEhcyLx3Bz27Rh59iScbB6EPiP+B+joue6YCxcMXSbFC1tZKwA=="], "aws-ssl-profiles": ["aws-ssl-profiles@1.1.2", "", {}, "sha512-NZKeq9AfyQvEeNlN0zSYAaWrmBffJh3IELMZfRpJVWgrpEbtEpnjvzqBPf+mxoI287JohRDoa+/nsfqqiZmF6g=="], + "balanced-match": ["balanced-match@1.0.2", "", {}, "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="], + + "brace-expansion": ["brace-expansion@2.0.2", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ=="], + "bun-types": ["bun-types@1.3.8", "", { "dependencies": { "@types/node": "*" } }, "sha512-fL99nxdOWvV4LqjmC+8Q9kW3M4QTtTR1eePs94v5ctGqU8OeceWrSUaRw3JYb7tU3FkMIAjkueehrHPPPGKi5Q=="], "c12": ["c12@3.1.0", "", { "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", "ohash": "^2.0.11", "pathe": "^2.0.3", "perfect-debounce": "^1.0.0", "pkg-types": "^2.2.0", "rc9": "^2.1.2" }, "peerDependencies": { "magicast": "^0.3.5" }, "optionalPeers": ["magicast"] }, "sha512-uWoS8OU1MEIsOv8p/5a82c3H31LsWVR5qiyXVfBNOzfffjUWtPnhAb4BYI2uG2HfGmZmFjCtui5XNWaps+iFuw=="], @@ -114,12 +191,18 @@ "consola": ["consola@3.4.2", "", {}, "sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA=="], + "cross-fetch": ["cross-fetch@4.1.0", "", { "dependencies": { "node-fetch": "^2.7.0" } }, "sha512-uKm5PU+MHTootlWEY+mZ4vvXoCn4fLQxT9dSc1sXVMSFkINTJVN8cAQROpwcKm8bJ/c7rgZVIBWzH5T78sNZZw=="], + "cross-spawn": ["cross-spawn@7.0.6", "", { "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", "which": "^2.0.1" } }, "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA=="], "csstype": ["csstype@3.2.3", "", {}, "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ=="], "data-uri-to-buffer": ["data-uri-to-buffer@4.0.1", "", {}, "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A=="], + "debug": ["debug@4.4.3", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA=="], + + "deep-is": ["deep-is@0.1.4", "", {}, "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ=="], + "deepmerge-ts": ["deepmerge-ts@7.1.5", "", {}, "sha512-HOJkrhaYsweh+W+e74Yn7YStZOilkoPb6fycpwNLKzSPtruFs48nYis0zy5yJz1+ktUhHxoRDJ27RQAWLIJVJw=="], "defu": ["defu@6.1.4", "", {}, "sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg=="], @@ -136,12 +219,48 @@ "empathic": ["empathic@2.0.0", "", {}, "sha512-i6UzDscO/XfAcNYD75CfICkmfLedpyPDdozrLMmQc5ORaQcdMoc21OnlEylMIqI7U8eniKrPMxxtj8k0vhmJhA=="], + "escape-string-regexp": ["escape-string-regexp@4.0.0", "", {}, "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA=="], + + "eslint": ["eslint@10.0.0", "", { "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.2", "@eslint/config-array": "^0.23.0", "@eslint/config-helpers": "^0.5.2", "@eslint/core": "^1.1.0", "@eslint/plugin-kit": "^0.6.0", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/retry": "^0.4.2", "@types/estree": "^1.0.6", "ajv": "^6.12.4", "cross-spawn": "^7.0.6", "debug": "^4.3.2", "escape-string-regexp": "^4.0.0", "eslint-scope": "^9.1.0", "eslint-visitor-keys": "^5.0.0", "espree": "^11.1.0", "esquery": "^1.7.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^8.0.0", "find-up": "^5.0.0", "glob-parent": "^6.0.2", "ignore": "^5.2.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", "json-stable-stringify-without-jsonify": "^1.0.1", "minimatch": "^10.1.1", "natural-compare": "^1.4.0", "optionator": "^0.9.3" }, "peerDependencies": { "jiti": "*" }, "optionalPeers": ["jiti"], "bin": { "eslint": "bin/eslint.js" } }, "sha512-O0piBKY36YSJhlFSG8p9VUdPV/SxxS4FYDWVpr/9GJuMaepzwlf4J8I4ov1b+ySQfDTPhc3DtLaxcT1fN0yqCg=="], + + "eslint-config-prettier": ["eslint-config-prettier@10.1.8", "", { "peerDependencies": { "eslint": ">=7.0.0" }, "bin": { "eslint-config-prettier": "bin/cli.js" } }, "sha512-82GZUjRS0p/jganf6q1rEO25VSoHH0hKPCTrgillPjdI/3bgBhAE1QzHrHTizjpRvy6pGAvKjDJtk2pF9NDq8w=="], + + "eslint-scope": ["eslint-scope@9.1.0", "", { "dependencies": { "@types/esrecurse": "^4.3.1", "@types/estree": "^1.0.8", "esrecurse": "^4.3.0", "estraverse": "^5.2.0" } }, "sha512-CkWE42hOJsNj9FJRaoMX9waUFYhqY4jmyLFdAdzZr6VaCg3ynLYx4WnOdkaIifGfH4gsUcBTn4OZbHXkpLD0FQ=="], + + "eslint-visitor-keys": ["eslint-visitor-keys@5.0.0", "", {}, "sha512-A0XeIi7CXU7nPlfHS9loMYEKxUaONu/hTEzHTGba9Huu94Cq1hPivf+DE5erJozZOky0LfvXAyrV/tcswpLI0Q=="], + + "espree": ["espree@11.1.0", "", { "dependencies": { "acorn": "^8.15.0", "acorn-jsx": "^5.3.2", "eslint-visitor-keys": "^5.0.0" } }, "sha512-WFWYhO1fV4iYkqOOvq8FbqIhr2pYfoDY0kCotMkDeNtGpiGGkZ1iov2u8ydjtgM8yF8rzK7oaTbw2NAzbAbehw=="], + + "esquery": ["esquery@1.7.0", "", { "dependencies": { "estraverse": "^5.1.0" } }, "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g=="], + + "esrecurse": ["esrecurse@4.3.0", "", { "dependencies": { "estraverse": "^5.2.0" } }, "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag=="], + + "estraverse": ["estraverse@5.3.0", "", {}, "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA=="], + + "esutils": ["esutils@2.0.3", "", {}, "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g=="], + "exsolve": ["exsolve@1.0.8", "", {}, "sha512-LmDxfWXwcTArk8fUEnOfSZpHOJ6zOMUJKOtFLFqJLoKJetuQG874Uc7/Kki7zFLzYybmZhp1M7+98pfMqeX8yA=="], "fast-check": ["fast-check@3.23.2", "", { "dependencies": { "pure-rand": "^6.1.0" } }, "sha512-h5+1OzzfCC3Ef7VbtKdcv7zsstUQwUDlYpUTvjeUsJAssPgLn7QzbboPtL5ro04Mq0rPOsMzl7q5hIbRs2wD1A=="], + "fast-deep-equal": ["fast-deep-equal@3.1.3", "", {}, "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="], + + "fast-json-stable-stringify": ["fast-json-stable-stringify@2.1.0", "", {}, "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw=="], + + "fast-levenshtein": ["fast-levenshtein@2.0.6", "", {}, "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw=="], + + "fdir": ["fdir@6.5.0", "", { "peerDependencies": { "picomatch": "^3 || ^4" }, "optionalPeers": ["picomatch"] }, "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg=="], + "fetch-blob": ["fetch-blob@3.2.0", "", { "dependencies": { "node-domexception": "^1.0.0", "web-streams-polyfill": "^3.0.3" } }, "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ=="], + "file-entry-cache": ["file-entry-cache@8.0.0", "", { "dependencies": { "flat-cache": "^4.0.0" } }, "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ=="], + + "find-up": ["find-up@5.0.0", "", { "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" } }, "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng=="], + + "flat-cache": ["flat-cache@4.0.1", "", { "dependencies": { "flatted": "^3.2.9", "keyv": "^4.5.4" } }, "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw=="], + + "flatted": ["flatted@3.3.3", "", {}, "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg=="], + "foreground-child": ["foreground-child@3.3.1", "", { "dependencies": { "cross-spawn": "^7.0.6", "signal-exit": "^4.0.1" } }, "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw=="], "formdata-polyfill": ["formdata-polyfill@4.0.10", "", { "dependencies": { "fetch-blob": "^3.1.2" } }, "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g=="], @@ -152,6 +271,8 @@ "giget": ["giget@2.0.0", "", { "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" }, "bin": { "giget": "dist/cli.mjs" } }, "sha512-L5bGsVkxJbJgdnwyuheIunkGatUF/zssUoxxjACCseZYAVbaqdh9Tsmmlkl8vYan09H7sbvKt4pS8GqKLBrEzA=="], + "glob-parent": ["glob-parent@6.0.2", "", { "dependencies": { "is-glob": "^4.0.3" } }, "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A=="], + "graceful-fs": ["graceful-fs@4.2.11", "", {}, "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ=="], "grammex": ["grammex@3.1.12", "", {}, "sha512-6ufJOsSA7LcQehIJNCO7HIBykfM7DXQual0Ny780/DEcJIpBlHRvcqEBWGPYd7hrXL2GJ3oJI1MIhaXjWmLQOQ=="], @@ -164,6 +285,14 @@ "iconv-lite": ["iconv-lite@0.7.2", "", { "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" } }, "sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw=="], + "ignore": ["ignore@7.0.5", "", {}, "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg=="], + + "imurmurhash": ["imurmurhash@0.1.4", "", {}, "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA=="], + + "is-extglob": ["is-extglob@2.1.1", "", {}, "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ=="], + + "is-glob": ["is-glob@4.0.3", "", { "dependencies": { "is-extglob": "^2.1.1" } }, "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg=="], + "is-property": ["is-property@1.0.2", "", {}, "sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g=="], "isexe": ["isexe@2.0.0", "", {}, "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw=="], @@ -172,20 +301,40 @@ "js-base64": ["js-base64@3.7.8", "", {}, "sha512-hNngCeKxIUQiEUN3GPJOkz4wF/YvdUdbNL9hsBcMQTkKzboD7T/q3OYOuuPZLUE6dBxSGpwhk5mwuDud7JVAow=="], - "libsql": ["libsql@0.3.19", "", { "dependencies": { "@neon-rs/load": "^0.0.4", "detect-libc": "2.0.2", "libsql": "^0.3.15" }, "optionalDependencies": { "@libsql/darwin-arm64": "0.3.19", "@libsql/darwin-x64": "0.3.19", "@libsql/linux-arm64-gnu": "0.3.19", "@libsql/linux-arm64-musl": "0.3.19", "@libsql/linux-x64-gnu": "0.3.19", "@libsql/linux-x64-musl": "0.3.19", "@libsql/win32-x64-msvc": "0.3.19" }, "os": [ "linux", "win32", "darwin", ], "cpu": [ "x64", "arm64", ] }, "sha512-Aj5cQ5uk/6fHdmeW0TiXK42FqUlwx7ytmMLPSaUQPin5HKKKuUPD62MAbN4OEweGBBI7q1BekoEN4gPUEL6MZA=="], + "json-buffer": ["json-buffer@3.0.1", "", {}, "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ=="], + + "json-schema-traverse": ["json-schema-traverse@0.4.1", "", {}, "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg=="], + + "json-stable-stringify-without-jsonify": ["json-stable-stringify-without-jsonify@1.0.1", "", {}, "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw=="], + + "keyv": ["keyv@4.5.4", "", { "dependencies": { "json-buffer": "3.0.1" } }, "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw=="], + + "layerr": ["layerr@3.0.0", "", {}, "sha512-tv754Ki2dXpPVApOrjTyRo4/QegVb9eVFq4mjqp4+NM5NaX7syQvN5BBNfV/ZpAHCEHV24XdUVrBAoka4jt3pA=="], + + "levn": ["levn@0.4.1", "", { "dependencies": { "prelude-ls": "^1.2.1", "type-check": "~0.4.0" } }, "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ=="], + + "libsql": ["libsql@0.5.22", "", { "dependencies": { "@neon-rs/load": "^0.0.4", "detect-libc": "2.0.2" }, "optionalDependencies": { "@libsql/darwin-arm64": "0.5.22", "@libsql/darwin-x64": "0.5.22", "@libsql/linux-arm-gnueabihf": "0.5.22", "@libsql/linux-arm-musleabihf": "0.5.22", "@libsql/linux-arm64-gnu": "0.5.22", "@libsql/linux-arm64-musl": "0.5.22", "@libsql/linux-x64-gnu": "0.5.22", "@libsql/linux-x64-musl": "0.5.22", "@libsql/win32-x64-msvc": "0.5.22" }, "os": [ "linux", "win32", "darwin", ], "cpu": [ "arm", "x64", "arm64", ] }, "sha512-NscWthMQt7fpU8lqd7LXMvT9pi+KhhmTHAJWUB/Lj6MWa0MKFv0F2V4C6WKKpjCVZl0VwcDz4nOI3CyaT1DDiA=="], "lilconfig": ["lilconfig@2.1.0", "", {}, "sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ=="], + "locate-path": ["locate-path@6.0.0", "", { "dependencies": { "p-locate": "^5.0.0" } }, "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw=="], + "lodash": ["lodash@4.17.21", "", {}, "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="], "long": ["long@5.3.2", "", {}, "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA=="], "lru.min": ["lru.min@1.1.4", "", {}, "sha512-DqC6n3QQ77zdFpCMASA1a3Jlb64Hv2N2DciFGkO/4L9+q/IpIAuRlKOvCXabtRW6cQf8usbmM6BE/TOPysCdIA=="], + "minimatch": ["minimatch@10.1.2", "", { "dependencies": { "@isaacs/brace-expansion": "^5.0.1" } }, "sha512-fu656aJ0n2kcXwsnwnv9g24tkU5uSmOlTjd6WyyaKm2Z+h1qmY6bAjrcaIxF/BslFqbZ8UBtbJi7KgQOZD2PTw=="], + + "ms": ["ms@2.1.3", "", {}, "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="], + "mysql2": ["mysql2@3.15.3", "", { "dependencies": { "aws-ssl-profiles": "^1.1.1", "denque": "^2.1.0", "generate-function": "^2.3.1", "iconv-lite": "^0.7.0", "long": "^5.2.1", "lru.min": "^1.0.0", "named-placeholders": "^1.1.3", "seq-queue": "^0.0.5", "sqlstring": "^2.3.2" } }, "sha512-FBrGau0IXmuqg4haEZRBfHNWB5mUARw6hNwPDXXGg0XzVJ50mr/9hb267lvpVMnhZ1FON3qNd4Xfcez1rbFwSg=="], "named-placeholders": ["named-placeholders@1.1.6", "", { "dependencies": { "lru.min": "^1.1.0" } }, "sha512-Tz09sEL2EEuv5fFowm419c1+a/jSMiBjI9gHxVLrVdbUkkNUUfjsVYs9pVZu5oCon/kmRh9TfLEObFtkVxmY0w=="], + "natural-compare": ["natural-compare@1.4.0", "", {}, "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw=="], + "node-domexception": ["node-domexception@1.0.0", "", {}, "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ=="], "node-fetch": ["node-fetch@3.3.2", "", { "dependencies": { "data-uri-to-buffer": "^4.0.0", "fetch-blob": "^3.1.4", "formdata-polyfill": "^4.0.10" } }, "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA=="], @@ -196,22 +345,38 @@ "ohash": ["ohash@2.0.11", "", {}, "sha512-RdR9FQrFwNBNXAr4GixM8YaRZRJ5PUWbKYbE5eOsrwAjJW0q2REGcf79oYPsLyskQCZG1PLN+S/K1V00joZAoQ=="], + "optionator": ["optionator@0.9.4", "", { "dependencies": { "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", "levn": "^0.4.1", "prelude-ls": "^1.2.1", "type-check": "^0.4.0", "word-wrap": "^1.2.5" } }, "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g=="], + + "p-limit": ["p-limit@3.1.0", "", { "dependencies": { "yocto-queue": "^0.1.0" } }, "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ=="], + + "p-locate": ["p-locate@5.0.0", "", { "dependencies": { "p-limit": "^3.0.2" } }, "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw=="], + + "path-exists": ["path-exists@4.0.0", "", {}, "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w=="], + "path-key": ["path-key@3.1.1", "", {}, "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q=="], "pathe": ["pathe@2.0.3", "", {}, "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w=="], "perfect-debounce": ["perfect-debounce@1.0.0", "", {}, "sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA=="], + "picomatch": ["picomatch@4.0.3", "", {}, "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q=="], + "pkg-types": ["pkg-types@2.3.0", "", { "dependencies": { "confbox": "^0.2.2", "exsolve": "^1.0.7", "pathe": "^2.0.3" } }, "sha512-SIqCzDRg0s9npO5XQ3tNZioRY1uK06lA41ynBC1YmFTmnY6FjUjVt6s4LoADmwoig1qqD0oK8h1p/8mlMx8Oig=="], "postgres": ["postgres@3.4.7", "", {}, "sha512-Jtc2612XINuBjIl/QTWsV5UvE8UHuNblcO3vVADSrKsrc6RqGX6lOW1cEo3CM2v0XG4Nat8nI+YM7/f26VxXLw=="], + "prelude-ls": ["prelude-ls@1.2.1", "", {}, "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g=="], + + "prettier": ["prettier@3.8.1", "", { "bin": { "prettier": "bin/prettier.cjs" } }, "sha512-UOnG6LftzbdaHZcKoPFtOcCKztrQ57WkHDeRD9t/PTQtmT0NHSeWWepj6pS0z/N7+08BHFDQVUrfmfMRcZwbMg=="], + "prisma": ["prisma@7.3.0", "", { "dependencies": { "@prisma/config": "7.3.0", "@prisma/dev": "0.20.0", "@prisma/engines": "7.3.0", "@prisma/studio-core": "0.13.1", "mysql2": "3.15.3", "postgres": "3.4.7" }, "peerDependencies": { "better-sqlite3": ">=9.0.0", "typescript": ">=5.4.0" }, "optionalPeers": ["better-sqlite3", "typescript"], "bin": { "prisma": "build/index.js" } }, "sha512-ApYSOLHfMN8WftJA+vL6XwAPOh/aZ0BgUyyKPwUFgjARmG6EBI9LzDPf6SWULQMSAxydV9qn5gLj037nPNlg2w=="], "promise-limit": ["promise-limit@2.7.0", "", {}, "sha512-7nJ6v5lnJsXwGprnGXga4wx6d1POjvi5Qmf1ivTRxTjH4Z/9Czja/UCMLVmB9N93GeWOU93XaFaEt6jbuoagNw=="], "proper-lockfile": ["proper-lockfile@4.1.2", "", { "dependencies": { "graceful-fs": "^4.2.4", "retry": "^0.12.0", "signal-exit": "^3.0.2" } }, "sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA=="], + "punycode": ["punycode@2.3.1", "", {}, "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg=="], + "pure-rand": ["pure-rand@6.1.0", "", {}, "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA=="], "rc9": ["rc9@2.1.2", "", { "dependencies": { "defu": "^6.1.4", "destr": "^2.0.3" } }, "sha512-btXCnMmRIBINM2LDZoEmOogIZU7Qe7zn4BpomSKZ/ykbLObuBdvG+mFq11DL6fjH1DRwHhrlgtYWG96bJiC7Cg=="], @@ -232,6 +397,8 @@ "scheduler": ["scheduler@0.27.0", "", {}, "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q=="], + "semver": ["semver@7.7.4", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA=="], + "seq-queue": ["seq-queue@0.0.5", "", {}, "sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q=="], "shebang-command": ["shebang-command@2.0.0", "", { "dependencies": { "shebang-regex": "^3.0.0" } }, "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA=="], @@ -246,20 +413,48 @@ "tinyexec": ["tinyexec@1.0.2", "", {}, "sha512-W/KYk+NFhkmsYpuHq5JykngiOCnxeVL8v8dFnqxSD8qEEdRfXk1SDM6JzNqcERbcGYj9tMrDQBYV9cjgnunFIg=="], + "tinyglobby": ["tinyglobby@0.2.15", "", { "dependencies": { "fdir": "^6.5.0", "picomatch": "^4.0.3" } }, "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ=="], + + "tr46": ["tr46@0.0.3", "", {}, "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="], + + "ts-api-utils": ["ts-api-utils@2.4.0", "", { "peerDependencies": { "typescript": ">=4.8.4" } }, "sha512-3TaVTaAv2gTiMB35i3FiGJaRfwb3Pyn/j3m/bfAvGe8FB7CF6u+LMYqYlDh7reQf7UNvoTvdfAqHGmPGOSsPmA=="], + "tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="], + "type-check": ["type-check@0.4.0", "", { "dependencies": { "prelude-ls": "^1.2.1" } }, "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew=="], + + "typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="], + + "typescript-eslint": ["typescript-eslint@8.54.0", "", { "dependencies": { "@typescript-eslint/eslint-plugin": "8.54.0", "@typescript-eslint/parser": "8.54.0", "@typescript-eslint/typescript-estree": "8.54.0", "@typescript-eslint/utils": "8.54.0" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <6.0.0" } }, "sha512-CKsJ+g53QpsNPqbzUsfKVgd3Lny4yKZ1pP4qN3jdMOg/sisIDLGyDMezycquXLE5JsEU0wp3dGNdzig0/fmSVQ=="], + + "ulidx": ["ulidx@2.4.1", "", { "dependencies": { "layerr": "^3.0.0" } }, "sha512-xY7c8LPyzvhvew0Fn+Ek3wBC9STZAuDI/Y5andCKi9AX6/jvfaX45PhsDX8oxgPL0YFp0Jhr8qWMbS/p9375Xg=="], + "undici-types": ["undici-types@7.16.0", "", {}, "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw=="], + "uri-js": ["uri-js@4.4.1", "", { "dependencies": { "punycode": "^2.1.0" } }, "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg=="], + "valibot": ["valibot@1.2.0", "", { "peerDependencies": { "typescript": ">=5" }, "optionalPeers": ["typescript"] }, "sha512-mm1rxUsmOxzrwnX5arGS+U4T25RdvpPjPN4yR0u9pUBov9+zGVtO84tif1eY4r6zWxVxu3KzIyknJy3rxfRZZg=="], "web-streams-polyfill": ["web-streams-polyfill@3.3.3", "", {}, "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw=="], + "webidl-conversions": ["webidl-conversions@3.0.1", "", {}, "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="], + + "whatwg-url": ["whatwg-url@5.0.0", "", { "dependencies": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" } }, "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw=="], + "which": ["which@2.0.2", "", { "dependencies": { "isexe": "^2.0.0" }, "bin": { "node-which": "./bin/node-which" } }, "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA=="], + "word-wrap": ["word-wrap@1.2.5", "", {}, "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA=="], + "ws": ["ws@8.19.0", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-blAT2mjOEIi0ZzruJfIhb3nps74PRWTCz1IjglWEEpQl5XS/UNama6u2/rjFkDDouqr4L67ry+1aGIALViWjDg=="], + "yocto-queue": ["yocto-queue@0.1.0", "", {}, "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q=="], + "zeptomatch": ["zeptomatch@2.1.0", "", { "dependencies": { "grammex": "^3.1.11", "graphmatch": "^1.1.0" } }, "sha512-KiGErG2J0G82LSpniV0CtIzjlJ10E04j02VOudJsPyPwNZgGnRKQy7I1R7GMyg/QswnE4l7ohSGrQbQbjXPPDA=="], + "@eslint-community/eslint-utils/eslint-visitor-keys": ["eslint-visitor-keys@3.4.3", "", {}, "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag=="], + + "@prisma/adapter-libsql/@libsql/client": ["@libsql/client@0.8.1", "", { "dependencies": { "@libsql/core": "^0.8.1", "@libsql/hrana-client": "^0.6.2", "js-base64": "^3.7.5", "libsql": "^0.3.10", "promise-limit": "^2.7.0" } }, "sha512-xGg0F4iTDFpeBZ0r4pA6icGsYa5rG6RAG+i/iLDnpCAnSuTqEWMDdPlVseiq4Z/91lWI9jvvKKiKpovqJ1kZWA=="], + "@prisma/dev/hono": ["hono@4.11.4", "", {}, "sha512-U7tt8JsyrxSRKspfhtLET79pU8K+tInj5QZXs1jSugO1Vq5dFj3kmZsRldo29mTBfcjDRVRXrEZ6LS63Cog9ZA=="], "@prisma/engines/@prisma/get-platform": ["@prisma/get-platform@7.3.0", "", { "dependencies": { "@prisma/debug": "7.3.0" } }, "sha512-N7c6m4/I0Q6JYmWKP2RCD/sM9eWiyCPY98g5c0uEktObNSZnugW2U/PO+pwL0UaqzxqTXt7gTsYsb0FnMnJNbg=="], @@ -268,8 +463,36 @@ "@prisma/get-platform/@prisma/debug": ["@prisma/debug@7.2.0", "", {}, "sha512-YSGTiSlBAVJPzX4ONZmMotL+ozJwQjRmZweQNIq/ER0tQJKJynNkRB3kyvt37eOfsbMCXk3gnLF6J9OJ4QWftw=="], + "@typescript-eslint/typescript-estree/minimatch": ["minimatch@9.0.5", "", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow=="], + + "@typescript-eslint/visitor-keys/eslint-visitor-keys": ["eslint-visitor-keys@4.2.1", "", {}, "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ=="], + + "cross-fetch/node-fetch": ["node-fetch@2.7.0", "", { "dependencies": { "whatwg-url": "^5.0.0" }, "peerDependencies": { "encoding": "^0.1.0" }, "optionalPeers": ["encoding"] }, "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A=="], + + "eslint/ignore": ["ignore@5.3.2", "", {}, "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g=="], + "nypm/citty": ["citty@0.2.0", "", {}, "sha512-8csy5IBFI2ex2hTVpaHN2j+LNE199AgiI7y4dMintrr8i0lQiFn+0AWMZrWdHKIgMOer65f8IThysYhoReqjWA=="], "proper-lockfile/signal-exit": ["signal-exit@3.0.7", "", {}, "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="], + + "@prisma/adapter-libsql/@libsql/client/@libsql/core": ["@libsql/core@0.8.1", "", { "dependencies": { "js-base64": "^3.7.5" } }, "sha512-u6nrj6HZMTPsgJ9EBhLzO2uhqhlHQJQmVHV+0yFLvfGf3oSP8w7TjZCNUgu1G8jHISx6KFi7bmcrdXW9lRt++A=="], + + "@prisma/adapter-libsql/@libsql/client/@libsql/hrana-client": ["@libsql/hrana-client@0.6.2", "", { "dependencies": { "@libsql/isomorphic-fetch": "^0.2.1", "@libsql/isomorphic-ws": "^0.1.5", "js-base64": "^3.7.5", "node-fetch": "^3.3.2" } }, "sha512-MWxgD7mXLNf9FXXiM0bc90wCjZSpErWKr5mGza7ERy2FJNNMXd7JIOv+DepBA1FQTIfI8TFO4/QDYgaQC0goNw=="], + + "@prisma/adapter-libsql/@libsql/client/libsql": ["libsql@0.3.19", "", { "dependencies": { "@neon-rs/load": "^0.0.4", "detect-libc": "2.0.2", "libsql": "^0.3.15" }, "optionalDependencies": { "@libsql/darwin-arm64": "0.3.19", "@libsql/darwin-x64": "0.3.19", "@libsql/linux-arm64-gnu": "0.3.19", "@libsql/linux-arm64-musl": "0.3.19", "@libsql/linux-x64-gnu": "0.3.19", "@libsql/linux-x64-musl": "0.3.19", "@libsql/win32-x64-msvc": "0.3.19" }, "os": [ "linux", "win32", "darwin", ], "cpu": [ "x64", "arm64", ] }, "sha512-Aj5cQ5uk/6fHdmeW0TiXK42FqUlwx7ytmMLPSaUQPin5HKKKuUPD62MAbN4OEweGBBI7q1BekoEN4gPUEL6MZA=="], + + "@prisma/adapter-libsql/@libsql/client/libsql/@libsql/darwin-arm64": ["@libsql/darwin-arm64@0.3.19", "", { "os": "darwin", "cpu": "arm64" }, "sha512-rmOqsLcDI65zzxlUOoEiPJLhqmbFsZF6p4UJQ2kMqB+Kc0Rt5/A1OAdOZ/Wo8fQfJWjR1IbkbpEINFioyKf+nQ=="], + + "@prisma/adapter-libsql/@libsql/client/libsql/@libsql/darwin-x64": ["@libsql/darwin-x64@0.3.19", "", { "os": "darwin", "cpu": "x64" }, "sha512-q9O55B646zU+644SMmOQL3FIfpmEvdWpRpzubwFc2trsa+zoBlSkHuzU9v/C+UNoPHQVRMP7KQctJ455I/h/xw=="], + + "@prisma/adapter-libsql/@libsql/client/libsql/@libsql/linux-arm64-gnu": ["@libsql/linux-arm64-gnu@0.3.19", "", { "os": "linux", "cpu": "arm64" }, "sha512-mgeAUU1oqqh57k7I3cQyU6Trpdsdt607eFyEmH5QO7dv303ti+LjUvh1pp21QWV6WX7wZyjeJV1/VzEImB+jRg=="], + + "@prisma/adapter-libsql/@libsql/client/libsql/@libsql/linux-arm64-musl": ["@libsql/linux-arm64-musl@0.3.19", "", { "os": "linux", "cpu": "arm64" }, "sha512-VEZtxghyK6zwGzU9PHohvNxthruSxBEnRrX7BSL5jQ62tN4n2JNepJ6SdzXp70pdzTfwroOj/eMwiPt94gkVRg=="], + + "@prisma/adapter-libsql/@libsql/client/libsql/@libsql/linux-x64-gnu": ["@libsql/linux-x64-gnu@0.3.19", "", { "os": "linux", "cpu": "x64" }, "sha512-2t/J7LD5w2f63wGihEO+0GxfTyYIyLGEvTFEsMO16XI5o7IS9vcSHrxsvAJs4w2Pf907uDjmc7fUfMg6L82BrQ=="], + + "@prisma/adapter-libsql/@libsql/client/libsql/@libsql/linux-x64-musl": ["@libsql/linux-x64-musl@0.3.19", "", { "os": "linux", "cpu": "x64" }, "sha512-BLsXyJaL8gZD8+3W2LU08lDEd9MIgGds0yPy5iNPp8tfhXx3pV/Fge2GErN0FC+nzt4DYQtjL+A9GUMglQefXQ=="], + + "@prisma/adapter-libsql/@libsql/client/libsql/@libsql/win32-x64-msvc": ["@libsql/win32-x64-msvc@0.3.19", "", { "os": "win32", "cpu": "x64" }, "sha512-ay1X9AobE4BpzG0XPw1gplyLZPGHIgJOovvW23gUrukRegiUP62uzhpRbKNogLlUOynyXeq//prHgPXiebUfWg=="], } } diff --git a/data/files/.gitkeep b/data/files/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/dev.db b/dev.db new file mode 100644 index 0000000..18ce430 Binary files /dev/null and b/dev.db differ diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000..437b8fd --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,12 @@ +import js from '@eslint/js' +import tseslint from 'typescript-eslint' +import prettier from 'eslint-config-prettier' + +export default tseslint.config(js.configs.recommended, ...tseslint.configs.recommended, prettier, { + ignores: ['dist/**', 'node_modules/**'], + rules: { + '@typescript-eslint/explicit-module-boundary-types': 'off', + '@typescript-eslint/no-explicit-any': 'warn', + '@typescript-eslint/ban-ts-comment': 'off', + }, +}) diff --git a/package.json b/package.json index 7a6aec0..b2793c1 100644 --- a/package.json +++ b/package.json @@ -1,15 +1,31 @@ { "name": "forgery", + "type": "module", "scripts": { - "dev": "bun run --hot src/index.ts" + "dev": "bun run --hot src/index.ts", + "lint": "eslint .", + "format": "prettier --write .", + "format:check": "prettier --check .", + "test": "bun test", + "typecheck": "tsc --noEmit" }, "dependencies": { + "@libsql/client": "^0.17.0", "@prisma/adapter-libsql": "^7.3.0", "@prisma/client": "^7.3.0", - "hono": "^4.11.8" + "hono": "^4.11.8", + "ulidx": "^2.4.1" }, "devDependencies": { - "@types/bun": "latest", - "prisma": "^7.3.0" + "@eslint/js": "^10.0.1", + "@types/bun": "^1.3.8", + "@typescript-eslint/eslint-plugin": "^8.54.0", + "@typescript-eslint/parser": "^8.54.0", + "eslint": "^10.0.0", + "eslint-config-prettier": "^10.1.8", + "prettier": "^3.8.1", + "prisma": "^7.3.0", + "typescript": "^5.9.3", + "typescript-eslint": "^8.54.0" } -} \ No newline at end of file +} diff --git a/prisma.config.ts b/prisma.config.ts index d5ecde5..3037072 100644 --- a/prisma.config.ts +++ b/prisma.config.ts @@ -1,12 +1,11 @@ -// This file was generated by Prisma, and assumes you run Prisma commands using `bun --bun run prisma [command]`. -import { defineConfig, env } from "prisma/config"; +import { defineConfig } from 'prisma/config' export default defineConfig({ - schema: "prisma/schema.prisma", + schema: 'prisma/schema.prisma', migrations: { - path: "prisma/migrations", + path: 'prisma/migrations', }, datasource: { - url: env("DATABASE_URL"), + url: process.env.DATABASE_URL || 'file:./dev.db', }, -}); +}) diff --git a/prisma/schema.prisma b/prisma/schema.prisma index abba8da..87dc8f3 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -2,10 +2,103 @@ // learn more about it in the docs: https://pris.ly/d/prisma-schema generator client { - provider = "prisma-client" - output = "../src/generated/prisma" + provider = "prisma-client" + output = "../src/generated/prisma" + previewFeatures = ["driverAdapters"] } datasource db { provider = "sqlite" } + +model Asset { + id String @id + name String + type String + path String + createdAt DateTime @default(now()) @map("created_at") + updatedAt DateTime @updatedAt @map("updated_at") + + // Relations + characters Character[] + equipments Equipment[] + generations Generation[] + + @@map("assets") +} + +model Character { + id String @id + name String + description String? + imageId String @map("image_id") + createdAt DateTime @default(now()) @map("created_at") + updatedAt DateTime @updatedAt @map("updated_at") + + // Relations + image Asset @relation(fields: [imageId], references: [id]) + generations Generation[] + + @@map("characters") +} + +model Category { + id String @id + name String + parentId String? @map("parent_id") + createdAt DateTime @default(now()) @map("created_at") + updatedAt DateTime @updatedAt @map("updated_at") + + // Relations + parent Category? @relation("CategoryToSubCategory", fields: [parentId], references: [id]) + subCategories Category[] @relation("CategoryToSubCategory") + equipmentsAsMain Equipment[] @relation("CategoryMain") + equipmentsAsSub Equipment[] @relation("CategorySub") + + @@map("categories") +} + +model Equipment { + id String @id + name String + description String + categoryId String @map("category_id") + subCategoryId String? @map("sub_category_id") + imageId String @map("image_id") + createdAt DateTime @default(now()) @map("created_at") + updatedAt DateTime @updatedAt @map("updated_at") + + // Relations + category Category @relation("CategoryMain", fields: [categoryId], references: [id]) + subCategory Category? @relation("CategorySub", fields: [subCategoryId], references: [id]) + image Asset @relation(fields: [imageId], references: [id]) + generations GenerationEquipment[] + + @@map("equipments") +} + +model Generation { + id String @id + characterId String @map("character_id") + imageId String @map("image_id") + createdAt DateTime @default(now()) @map("created_at") + updatedAt DateTime @updatedAt @map("updated_at") + + // Relations + character Character @relation(fields: [characterId], references: [id]) + image Asset @relation(fields: [imageId], references: [id]) + equipments GenerationEquipment[] + + @@map("generations") +} + +model GenerationEquipment { + generationId String @map("generation_id") + equipmentId String @map("equipment_id") + + generation Generation @relation(fields: [generationId], references: [id]) + equipment Equipment @relation(fields: [equipmentId], references: [id]) + + @@id([generationId, equipmentId]) + @@map("generation_equipments") +} diff --git a/src/api/asset.test.ts b/src/api/asset.test.ts new file mode 100644 index 0000000..d711a0e --- /dev/null +++ b/src/api/asset.test.ts @@ -0,0 +1,34 @@ +import { describe, it, expect, mock, afterEach } from 'bun:test' +import asset from './asset' + +const mockAssetService = { + createAsset: mock(), +} + +mock.module('../services/asset', () => ({ + AssetService: mockAssetService, +})) + +describe('Asset API', () => { + afterEach(() => { + mockAssetService.createAsset.mockClear() + }) + + it('POST /upload should create asset', async () => { + mockAssetService.createAsset.mockResolvedValue({ id: '1', name: 'Test' }) + + const formData = new FormData() + formData.append('file', new File(['test'], 'test.png', { type: 'image/png' })) + formData.append('name', 'Test Asset') + + const req = new Request('http://localhost/upload', { + method: 'POST', + body: formData, + }) + + const res = await asset.fetch(req) + expect(res.status).toBe(201) + expect(await res.json()).toEqual({ id: '1', name: 'Test' }) + expect(mockAssetService.createAsset).toHaveBeenCalled() + }) +}) diff --git a/src/api/asset.ts b/src/api/asset.ts new file mode 100644 index 0000000..2597633 --- /dev/null +++ b/src/api/asset.ts @@ -0,0 +1,31 @@ +import { Hono } from 'hono' +import { AssetService } from '../services/asset' + +const asset = new Hono() + +asset.post('/upload', async (c) => { + const body = await c.req.parseBody() + const file = body['file'] + const name = body['name'] as string + + if (!file || !(file instanceof File)) { + return c.json({ error: 'File is required' }, 400) + } + + if (!name) { + return c.json({ error: 'Name is required' }, 400) + } + + try { + const result = await AssetService.createAsset(file, { + name, + type: file.type, + }) + return c.json(result, 201) + } catch (error) { + console.error(error) + return c.json({ error: 'Internal Server Error' }, 500) + } +}) + +export default asset diff --git a/src/api/character.test.ts b/src/api/character.test.ts new file mode 100644 index 0000000..c981843 --- /dev/null +++ b/src/api/character.test.ts @@ -0,0 +1,48 @@ +import { describe, it, expect, mock, afterEach } from 'bun:test' +import character from './character' + +const mockCharacterService = { + createCharacter: mock(), + listCharacters: mock(), + updateCharacter: mock(), + deleteCharacter: mock(), +} + +mock.module('../services/character', () => ({ + CharacterService: mockCharacterService, +})) + +describe('Character API', () => { + afterEach(() => { + mockCharacterService.createCharacter.mockClear() + mockCharacterService.listCharacters.mockClear() + mockCharacterService.updateCharacter.mockClear() + mockCharacterService.deleteCharacter.mockClear() + }) + + it('GET / should list characters', async () => { + mockCharacterService.listCharacters.mockResolvedValue({ items: [], total: 0 }) + + const req = new Request('http://localhost/', { + method: 'GET', + }) + + const res = await character.fetch(req) + expect(res.status).toBe(200) + expect(mockCharacterService.listCharacters).toHaveBeenCalledWith({ page: 1, limit: 10 }) + }) + + it('POST / should create character', async () => { + mockCharacterService.createCharacter.mockResolvedValue({ id: '1', name: 'Char' }) + + const req = new Request('http://localhost/', { + method: 'POST', + body: JSON.stringify({ name: 'Char', imageId: 'img1' }), + headers: { 'Content-Type': 'application/json' }, + }) + + const res = await character.fetch(req) + expect(res.status).toBe(201) + expect(await res.json()).toEqual({ id: '1', name: 'Char' }) + }) +}) diff --git a/src/api/character.ts b/src/api/character.ts new file mode 100644 index 0000000..e5bf306 --- /dev/null +++ b/src/api/character.ts @@ -0,0 +1,36 @@ +import { Hono } from 'hono' +import { CharacterService } from '../services/character' + +const character = new Hono() + +character.get('/', async (c) => { + const page = parseInt(c.req.query('page') || '1') + const limit = parseInt(c.req.query('limit') || '10') + const result = await CharacterService.listCharacters({ page, limit }) + return c.json(result) +}) + +character.post('/', async (c) => { + const body = await c.req.json() + const { name, description, imageId } = body + if (!name || !imageId) { + return c.json({ error: 'Name and Image ID are required' }, 400) + } + const result = await CharacterService.createCharacter({ name, description, imageId }) + return c.json(result, 201) +}) + +character.put('/:id', async (c) => { + const id = c.req.param('id') + const body = await c.req.json() + const result = await CharacterService.updateCharacter(id, body) + return c.json(result) +}) + +character.delete('/:id', async (c) => { + const id = c.req.param('id') + await CharacterService.deleteCharacter(id) + return c.json({ success: true }, 200) +}) + +export default character diff --git a/src/api/equipment.test.ts b/src/api/equipment.test.ts new file mode 100644 index 0000000..65a675e --- /dev/null +++ b/src/api/equipment.test.ts @@ -0,0 +1,31 @@ +import { describe, it, expect, mock, afterEach } from 'bun:test' +import equipment from './equipment' + +const mockEquipmentService = { + listEquipments: mock(), +} + +mock.module('../services/equipment', () => ({ + EquipmentService: mockEquipmentService, +})) + +describe('Equipment API', () => { + afterEach(() => { + mockEquipmentService.listEquipments.mockClear() + }) + + it('GET / should list equipments with filters', async () => { + mockEquipmentService.listEquipments.mockResolvedValue({ items: [], total: 0 }) + + const req = new Request('http://localhost/?categoryId=cat1', { + method: 'GET', + }) + + const res = await equipment.fetch(req) + expect(res.status).toBe(200) + expect(mockEquipmentService.listEquipments).toHaveBeenCalledWith( + { page: 1, limit: 10 }, + { categoryId: 'cat1', subCategoryId: undefined }, + ) + }) +}) diff --git a/src/api/equipment.ts b/src/api/equipment.ts new file mode 100644 index 0000000..20a5a0b --- /dev/null +++ b/src/api/equipment.ts @@ -0,0 +1,19 @@ +import { Hono } from 'hono' +import { EquipmentService } from '../services/equipment' + +const equipment = new Hono() + +equipment.get('/', async (c) => { + const page = parseInt(c.req.query('page') || '1') + const limit = parseInt(c.req.query('limit') || '10') + const categoryId = c.req.query('categoryId') + const subCategoryId = c.req.query('subCategoryId') + + const result = await EquipmentService.listEquipments( + { page, limit }, + { categoryId, subCategoryId }, + ) + return c.json(result) +}) + +export default equipment diff --git a/src/api/generation.test.ts b/src/api/generation.test.ts new file mode 100644 index 0000000..83e95de --- /dev/null +++ b/src/api/generation.test.ts @@ -0,0 +1,31 @@ +import { describe, it, expect, mock, afterEach } from 'bun:test' +import generation from './generation' + +const mockGenerationService = { + listGenerations: mock(), +} + +mock.module('../services/generation', () => ({ + GenerationService: mockGenerationService, +})) + +describe('Generation API', () => { + afterEach(() => { + mockGenerationService.listGenerations.mockClear() + }) + + it('GET / should list generations with filters', async () => { + mockGenerationService.listGenerations.mockResolvedValue({ items: [], total: 0 }) + + const req = new Request('http://localhost/?equipmentId=eq1', { + method: 'GET', + }) + + const res = await generation.fetch(req) + expect(res.status).toBe(200) + expect(mockGenerationService.listGenerations).toHaveBeenCalledWith( + { page: 1, limit: 10 }, + { characterId: undefined, equipmentId: 'eq1' }, + ) + }) +}) diff --git a/src/api/generation.ts b/src/api/generation.ts new file mode 100644 index 0000000..408180c --- /dev/null +++ b/src/api/generation.ts @@ -0,0 +1,19 @@ +import { Hono } from 'hono' +import { GenerationService } from '../services/generation' + +const generation = new Hono() + +generation.get('/', async (c) => { + const page = parseInt(c.req.query('page') || '1') + const limit = parseInt(c.req.query('limit') || '10') + const characterId = c.req.query('characterId') + const equipmentId = c.req.query('equipmentId') + + const result = await GenerationService.listGenerations( + { page, limit }, + { characterId, equipmentId }, + ) + return c.json(result) +}) + +export default generation diff --git a/src/db.ts b/src/db.ts new file mode 100644 index 0000000..85c026a --- /dev/null +++ b/src/db.ts @@ -0,0 +1,11 @@ +import { PrismaClient } from './generated/prisma/client' +import { PrismaLibSql } from '@prisma/adapter-libsql' +import { createClient } from '@libsql/client' + +const libsql = createClient({ + url: process.env.DATABASE_URL || 'file:./dev.db', +}) + +const adapter = new PrismaLibSql(libsql as any) + +export const prisma = new PrismaClient({ adapter }) diff --git a/src/generated/prisma/browser.ts b/src/generated/prisma/browser.ts new file mode 100644 index 0000000..57f08ae --- /dev/null +++ b/src/generated/prisma/browser.ts @@ -0,0 +1,48 @@ +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ + +// 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.js' +export { Prisma } +export * as $Enums from './enums.js' +export * from './enums.js' +/** + * Model Asset + * + */ +export type Asset = Prisma.AssetModel +/** + * Model Character + * + */ +export type Character = Prisma.CharacterModel +/** + * Model Category + * + */ +export type Category = Prisma.CategoryModel +/** + * Model Equipment + * + */ +export type Equipment = Prisma.EquipmentModel +/** + * Model Generation + * + */ +export type Generation = Prisma.GenerationModel +/** + * Model GenerationEquipment + * + */ +export type GenerationEquipment = Prisma.GenerationEquipmentModel diff --git a/src/generated/prisma/client.ts b/src/generated/prisma/client.ts new file mode 100644 index 0000000..3fe4676 --- /dev/null +++ b/src/generated/prisma/client.ts @@ -0,0 +1,74 @@ +/* !!! 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.js' +import * as $Class from './internal/class.js' +import * as Prisma from './internal/prismaNamespace.js' + +export * as $Enums from './enums.js' +export * from './enums.js' +/** + * ## Prisma Client + * + * Type-safe database client for TypeScript + * @example + * ``` + * const prisma = new PrismaClient() + * // Fetch zero or more Assets + * const assets = await prisma.asset.findMany() + * ``` + * + * Read more in our [docs](https://pris.ly/d/client). + */ +export const PrismaClient = $Class.getPrismaClientClass() +export type PrismaClient< + LogOpts extends Prisma.LogLevel = never, + OmitOpts extends Prisma.PrismaClientOptions['omit'] = Prisma.PrismaClientOptions['omit'], + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = $Class.PrismaClient +export { Prisma } + +/** + * Model Asset + * + */ +export type Asset = Prisma.AssetModel +/** + * Model Character + * + */ +export type Character = Prisma.CharacterModel +/** + * Model Category + * + */ +export type Category = Prisma.CategoryModel +/** + * Model Equipment + * + */ +export type Equipment = Prisma.EquipmentModel +/** + * Model Generation + * + */ +export type Generation = Prisma.GenerationModel +/** + * Model GenerationEquipment + * + */ +export type GenerationEquipment = Prisma.GenerationEquipmentModel diff --git a/src/generated/prisma/commonInputTypes.ts b/src/generated/prisma/commonInputTypes.ts new file mode 100644 index 0000000..b37f1fb --- /dev/null +++ b/src/generated/prisma/commonInputTypes.ts @@ -0,0 +1,214 @@ +/* !!! 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.js' +import type * as Prisma from './internal/prismaNamespace.js' + +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 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 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 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 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 SortOrderInput = { + sort: Prisma.SortOrder + nulls?: Prisma.NullsOrder +} + +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 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 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 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 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 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 +} diff --git a/src/generated/prisma/enums.ts b/src/generated/prisma/enums.ts new file mode 100644 index 0000000..d8f41de --- /dev/null +++ b/src/generated/prisma/enums.ts @@ -0,0 +1,12 @@ +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ + +// 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..1a0d337 --- /dev/null +++ b/src/generated/prisma/internal/class.ts @@ -0,0 +1,277 @@ +/* !!! 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.js' + +const config: runtime.GetPrismaClientConfig = { + previewFeatures: ['driverAdapters'], + clientVersion: '7.3.0', + engineVersion: '9d6ad21cbbceab97458517b147a6a09ff43aa735', + activeProvider: 'sqlite', + inlineSchema: + '// This is your Prisma schema file,\n// learn more about it in the docs: https://pris.ly/d/prisma-schema\n\ngenerator client {\n provider = "prisma-client"\n output = "../src/generated/prisma"\n previewFeatures = ["driverAdapters"]\n}\n\ndatasource db {\n provider = "sqlite"\n}\n\nmodel Asset {\n id String @id\n name String\n type String\n path String\n createdAt DateTime @default(now()) @map("created_at")\n updatedAt DateTime @updatedAt @map("updated_at")\n\n // Relations\n characters Character[]\n equipments Equipment[]\n generations Generation[]\n\n @@map("assets")\n}\n\nmodel Character {\n id String @id\n name String\n description String?\n imageId String @map("image_id")\n createdAt DateTime @default(now()) @map("created_at")\n updatedAt DateTime @updatedAt @map("updated_at")\n\n // Relations\n image Asset @relation(fields: [imageId], references: [id])\n generations Generation[]\n\n @@map("characters")\n}\n\nmodel Category {\n id String @id\n name String\n parentId String? @map("parent_id")\n createdAt DateTime @default(now()) @map("created_at")\n updatedAt DateTime @updatedAt @map("updated_at")\n\n // Relations\n parent Category? @relation("CategoryToSubCategory", fields: [parentId], references: [id])\n subCategories Category[] @relation("CategoryToSubCategory")\n equipmentsAsMain Equipment[] @relation("CategoryMain")\n equipmentsAsSub Equipment[] @relation("CategorySub")\n\n @@map("categories")\n}\n\nmodel Equipment {\n id String @id\n name String\n description String\n categoryId String @map("category_id")\n subCategoryId String? @map("sub_category_id")\n imageId String @map("image_id")\n createdAt DateTime @default(now()) @map("created_at")\n updatedAt DateTime @updatedAt @map("updated_at")\n\n // Relations\n category Category @relation("CategoryMain", fields: [categoryId], references: [id])\n subCategory Category? @relation("CategorySub", fields: [subCategoryId], references: [id])\n image Asset @relation(fields: [imageId], references: [id])\n generations GenerationEquipment[]\n\n @@map("equipments")\n}\n\nmodel Generation {\n id String @id\n characterId String @map("character_id")\n imageId String @map("image_id")\n createdAt DateTime @default(now()) @map("created_at")\n updatedAt DateTime @updatedAt @map("updated_at")\n\n // Relations\n character Character @relation(fields: [characterId], references: [id])\n image Asset @relation(fields: [imageId], references: [id])\n equipments GenerationEquipment[]\n\n @@map("generations")\n}\n\nmodel GenerationEquipment {\n generationId String @map("generation_id")\n equipmentId String @map("equipment_id")\n\n generation Generation @relation(fields: [generationId], references: [id])\n equipment Equipment @relation(fields: [equipmentId], references: [id])\n\n @@id([generationId, equipmentId])\n @@map("generation_equipments")\n}\n', + runtimeDataModel: { + models: {}, + enums: {}, + types: {}, + }, +} + +config.runtimeDataModel = JSON.parse( + '{"models":{"Asset":{"fields":[{"name":"id","kind":"scalar","type":"String"},{"name":"name","kind":"scalar","type":"String"},{"name":"type","kind":"scalar","type":"String"},{"name":"path","kind":"scalar","type":"String"},{"name":"createdAt","kind":"scalar","type":"DateTime","dbName":"created_at"},{"name":"updatedAt","kind":"scalar","type":"DateTime","dbName":"updated_at"},{"name":"characters","kind":"object","type":"Character","relationName":"AssetToCharacter"},{"name":"equipments","kind":"object","type":"Equipment","relationName":"AssetToEquipment"},{"name":"generations","kind":"object","type":"Generation","relationName":"AssetToGeneration"}],"dbName":"assets"},"Character":{"fields":[{"name":"id","kind":"scalar","type":"String"},{"name":"name","kind":"scalar","type":"String"},{"name":"description","kind":"scalar","type":"String"},{"name":"imageId","kind":"scalar","type":"String","dbName":"image_id"},{"name":"createdAt","kind":"scalar","type":"DateTime","dbName":"created_at"},{"name":"updatedAt","kind":"scalar","type":"DateTime","dbName":"updated_at"},{"name":"image","kind":"object","type":"Asset","relationName":"AssetToCharacter"},{"name":"generations","kind":"object","type":"Generation","relationName":"CharacterToGeneration"}],"dbName":"characters"},"Category":{"fields":[{"name":"id","kind":"scalar","type":"String"},{"name":"name","kind":"scalar","type":"String"},{"name":"parentId","kind":"scalar","type":"String","dbName":"parent_id"},{"name":"createdAt","kind":"scalar","type":"DateTime","dbName":"created_at"},{"name":"updatedAt","kind":"scalar","type":"DateTime","dbName":"updated_at"},{"name":"parent","kind":"object","type":"Category","relationName":"CategoryToSubCategory"},{"name":"subCategories","kind":"object","type":"Category","relationName":"CategoryToSubCategory"},{"name":"equipmentsAsMain","kind":"object","type":"Equipment","relationName":"CategoryMain"},{"name":"equipmentsAsSub","kind":"object","type":"Equipment","relationName":"CategorySub"}],"dbName":"categories"},"Equipment":{"fields":[{"name":"id","kind":"scalar","type":"String"},{"name":"name","kind":"scalar","type":"String"},{"name":"description","kind":"scalar","type":"String"},{"name":"categoryId","kind":"scalar","type":"String","dbName":"category_id"},{"name":"subCategoryId","kind":"scalar","type":"String","dbName":"sub_category_id"},{"name":"imageId","kind":"scalar","type":"String","dbName":"image_id"},{"name":"createdAt","kind":"scalar","type":"DateTime","dbName":"created_at"},{"name":"updatedAt","kind":"scalar","type":"DateTime","dbName":"updated_at"},{"name":"category","kind":"object","type":"Category","relationName":"CategoryMain"},{"name":"subCategory","kind":"object","type":"Category","relationName":"CategorySub"},{"name":"image","kind":"object","type":"Asset","relationName":"AssetToEquipment"},{"name":"generations","kind":"object","type":"GenerationEquipment","relationName":"EquipmentToGenerationEquipment"}],"dbName":"equipments"},"Generation":{"fields":[{"name":"id","kind":"scalar","type":"String"},{"name":"characterId","kind":"scalar","type":"String","dbName":"character_id"},{"name":"imageId","kind":"scalar","type":"String","dbName":"image_id"},{"name":"createdAt","kind":"scalar","type":"DateTime","dbName":"created_at"},{"name":"updatedAt","kind":"scalar","type":"DateTime","dbName":"updated_at"},{"name":"character","kind":"object","type":"Character","relationName":"CharacterToGeneration"},{"name":"image","kind":"object","type":"Asset","relationName":"AssetToGeneration"},{"name":"equipments","kind":"object","type":"GenerationEquipment","relationName":"GenerationToGenerationEquipment"}],"dbName":"generations"},"GenerationEquipment":{"fields":[{"name":"generationId","kind":"scalar","type":"String","dbName":"generation_id"},{"name":"equipmentId","kind":"scalar","type":"String","dbName":"equipment_id"},{"name":"generation","kind":"object","type":"Generation","relationName":"GenerationToGenerationEquipment"},{"name":"equipment","kind":"object","type":"Equipment","relationName":"EquipmentToGenerationEquipment"}],"dbName":"generation_equipments"}},"enums":{},"types":{}}', +) + +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() + * // Fetch zero or more Assets + * const assets = await prisma.asset.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.Subset, + ): PrismaClient +} + +/** + * ## Prisma Client + * + * Type-safe database client for TypeScript + * @example + * ``` + * const prisma = new PrismaClient() + * // Fetch zero or more Assets + * const assets = await prisma.asset.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'] = undefined, + 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/concepts/components/prisma-client/transactions). + */ + $transaction

[]>( + arg: [...P], + options?: { 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< + Prisma.TypeMapCb, + { + extArgs: ExtArgs + } + > + > + + /** + * `prisma.asset`: Exposes CRUD operations for the **Asset** model. + * Example usage: + * ```ts + * // Fetch zero or more Assets + * const assets = await prisma.asset.findMany() + * ``` + */ + get asset(): Prisma.AssetDelegate + + /** + * `prisma.character`: Exposes CRUD operations for the **Character** model. + * Example usage: + * ```ts + * // Fetch zero or more Characters + * const characters = await prisma.character.findMany() + * ``` + */ + get character(): Prisma.CharacterDelegate + + /** + * `prisma.category`: Exposes CRUD operations for the **Category** model. + * Example usage: + * ```ts + * // Fetch zero or more Categories + * const categories = await prisma.category.findMany() + * ``` + */ + get category(): Prisma.CategoryDelegate + + /** + * `prisma.equipment`: Exposes CRUD operations for the **Equipment** model. + * Example usage: + * ```ts + * // Fetch zero or more Equipment + * const equipment = await prisma.equipment.findMany() + * ``` + */ + get equipment(): Prisma.EquipmentDelegate + + /** + * `prisma.generation`: Exposes CRUD operations for the **Generation** model. + * Example usage: + * ```ts + * // Fetch zero or more Generations + * const generations = await prisma.generation.findMany() + * ``` + */ + get generation(): Prisma.GenerationDelegate + + /** + * `prisma.generationEquipment`: Exposes CRUD operations for the **GenerationEquipment** model. + * Example usage: + * ```ts + * // Fetch zero or more GenerationEquipments + * const generationEquipments = await prisma.generationEquipment.findMany() + * ``` + */ + get generationEquipment(): Prisma.GenerationEquipmentDelegate +} + +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..4b8c863 --- /dev/null +++ b/src/generated/prisma/internal/prismaNamespace.ts @@ -0,0 +1,1161 @@ +/* !!! 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.js' +import { type PrismaClient } from './class.js' + +export type * from '../models.js' + +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.3.0 + * Query Engine version: 9d6ad21cbbceab97458517b147a6a09ff43aa735 + */ +export const prismaVersion: PrismaVersion = { + client: '7.3.0', + engine: '9d6ad21cbbceab97458517b147a6a09ff43aa735', +} + +/** + * 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 +} + +/** + * 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) + : 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 = { + 1: EitherStrict + 0: EitherLoose +}[strict] + +export type Either = 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< + Overwrite< + U, + { + [K in keyof U]-?: At + } + > +> + +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, 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> = + IsObject extends True ? U : T + +export type GetHavingFields = { + [K in keyof T]: 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< + T, + MaybeTupleToUnion +> + +/** + * 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 = { + Asset: 'Asset', + Character: 'Character', + Category: 'Category', + Equipment: 'Equipment', + Generation: 'Generation', + GenerationEquipment: 'GenerationEquipment', +} 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< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, + GlobalOmitOptions = {}, +> = { + globalOmitOptions: { + omit: GlobalOmitOptions + } + meta: { + modelProps: + | 'asset' + | 'character' + | 'category' + | 'equipment' + | 'generation' + | 'generationEquipment' + txIsolationLevel: TransactionIsolationLevel + } + model: { + Asset: { + payload: Prisma.$AssetPayload + fields: Prisma.AssetFieldRefs + operations: { + findUnique: { + args: Prisma.AssetFindUniqueArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.AssetFindUniqueOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findFirst: { + args: Prisma.AssetFindFirstArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.AssetFindFirstOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findMany: { + args: Prisma.AssetFindManyArgs + result: runtime.Types.Utils.PayloadToResult[] + } + create: { + args: Prisma.AssetCreateArgs + result: runtime.Types.Utils.PayloadToResult + } + createMany: { + args: Prisma.AssetCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.AssetCreateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + delete: { + args: Prisma.AssetDeleteArgs + result: runtime.Types.Utils.PayloadToResult + } + update: { + args: Prisma.AssetUpdateArgs + result: runtime.Types.Utils.PayloadToResult + } + deleteMany: { + args: Prisma.AssetDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.AssetUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.AssetUpdateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + upsert: { + args: Prisma.AssetUpsertArgs + result: runtime.Types.Utils.PayloadToResult + } + aggregate: { + args: Prisma.AssetAggregateArgs + result: runtime.Types.Utils.Optional + } + groupBy: { + args: Prisma.AssetGroupByArgs + result: runtime.Types.Utils.Optional[] + } + count: { + args: Prisma.AssetCountArgs + result: runtime.Types.Utils.Optional | number + } + } + } + Character: { + payload: Prisma.$CharacterPayload + fields: Prisma.CharacterFieldRefs + operations: { + findUnique: { + args: Prisma.CharacterFindUniqueArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.CharacterFindUniqueOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findFirst: { + args: Prisma.CharacterFindFirstArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.CharacterFindFirstOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findMany: { + args: Prisma.CharacterFindManyArgs + result: runtime.Types.Utils.PayloadToResult[] + } + create: { + args: Prisma.CharacterCreateArgs + result: runtime.Types.Utils.PayloadToResult + } + createMany: { + args: Prisma.CharacterCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.CharacterCreateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + delete: { + args: Prisma.CharacterDeleteArgs + result: runtime.Types.Utils.PayloadToResult + } + update: { + args: Prisma.CharacterUpdateArgs + result: runtime.Types.Utils.PayloadToResult + } + deleteMany: { + args: Prisma.CharacterDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.CharacterUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.CharacterUpdateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + upsert: { + args: Prisma.CharacterUpsertArgs + result: runtime.Types.Utils.PayloadToResult + } + aggregate: { + args: Prisma.CharacterAggregateArgs + result: runtime.Types.Utils.Optional + } + groupBy: { + args: Prisma.CharacterGroupByArgs + result: runtime.Types.Utils.Optional[] + } + count: { + args: Prisma.CharacterCountArgs + result: runtime.Types.Utils.Optional | number + } + } + } + Category: { + payload: Prisma.$CategoryPayload + fields: Prisma.CategoryFieldRefs + operations: { + findUnique: { + args: Prisma.CategoryFindUniqueArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.CategoryFindUniqueOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findFirst: { + args: Prisma.CategoryFindFirstArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.CategoryFindFirstOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findMany: { + args: Prisma.CategoryFindManyArgs + result: runtime.Types.Utils.PayloadToResult[] + } + create: { + args: Prisma.CategoryCreateArgs + result: runtime.Types.Utils.PayloadToResult + } + createMany: { + args: Prisma.CategoryCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.CategoryCreateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + delete: { + args: Prisma.CategoryDeleteArgs + result: runtime.Types.Utils.PayloadToResult + } + update: { + args: Prisma.CategoryUpdateArgs + result: runtime.Types.Utils.PayloadToResult + } + deleteMany: { + args: Prisma.CategoryDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.CategoryUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.CategoryUpdateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + upsert: { + args: Prisma.CategoryUpsertArgs + result: runtime.Types.Utils.PayloadToResult + } + aggregate: { + args: Prisma.CategoryAggregateArgs + result: runtime.Types.Utils.Optional + } + groupBy: { + args: Prisma.CategoryGroupByArgs + result: runtime.Types.Utils.Optional[] + } + count: { + args: Prisma.CategoryCountArgs + result: runtime.Types.Utils.Optional | number + } + } + } + Equipment: { + payload: Prisma.$EquipmentPayload + fields: Prisma.EquipmentFieldRefs + operations: { + findUnique: { + args: Prisma.EquipmentFindUniqueArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.EquipmentFindUniqueOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findFirst: { + args: Prisma.EquipmentFindFirstArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.EquipmentFindFirstOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findMany: { + args: Prisma.EquipmentFindManyArgs + result: runtime.Types.Utils.PayloadToResult[] + } + create: { + args: Prisma.EquipmentCreateArgs + result: runtime.Types.Utils.PayloadToResult + } + createMany: { + args: Prisma.EquipmentCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.EquipmentCreateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + delete: { + args: Prisma.EquipmentDeleteArgs + result: runtime.Types.Utils.PayloadToResult + } + update: { + args: Prisma.EquipmentUpdateArgs + result: runtime.Types.Utils.PayloadToResult + } + deleteMany: { + args: Prisma.EquipmentDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.EquipmentUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.EquipmentUpdateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + upsert: { + args: Prisma.EquipmentUpsertArgs + result: runtime.Types.Utils.PayloadToResult + } + aggregate: { + args: Prisma.EquipmentAggregateArgs + result: runtime.Types.Utils.Optional + } + groupBy: { + args: Prisma.EquipmentGroupByArgs + result: runtime.Types.Utils.Optional[] + } + count: { + args: Prisma.EquipmentCountArgs + result: runtime.Types.Utils.Optional | number + } + } + } + Generation: { + payload: Prisma.$GenerationPayload + fields: Prisma.GenerationFieldRefs + operations: { + findUnique: { + args: Prisma.GenerationFindUniqueArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.GenerationFindUniqueOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findFirst: { + args: Prisma.GenerationFindFirstArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.GenerationFindFirstOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findMany: { + args: Prisma.GenerationFindManyArgs + result: runtime.Types.Utils.PayloadToResult[] + } + create: { + args: Prisma.GenerationCreateArgs + result: runtime.Types.Utils.PayloadToResult + } + createMany: { + args: Prisma.GenerationCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.GenerationCreateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + delete: { + args: Prisma.GenerationDeleteArgs + result: runtime.Types.Utils.PayloadToResult + } + update: { + args: Prisma.GenerationUpdateArgs + result: runtime.Types.Utils.PayloadToResult + } + deleteMany: { + args: Prisma.GenerationDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.GenerationUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.GenerationUpdateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + upsert: { + args: Prisma.GenerationUpsertArgs + result: runtime.Types.Utils.PayloadToResult + } + aggregate: { + args: Prisma.GenerationAggregateArgs + result: runtime.Types.Utils.Optional + } + groupBy: { + args: Prisma.GenerationGroupByArgs + result: runtime.Types.Utils.Optional[] + } + count: { + args: Prisma.GenerationCountArgs + result: runtime.Types.Utils.Optional | number + } + } + } + GenerationEquipment: { + payload: Prisma.$GenerationEquipmentPayload + fields: Prisma.GenerationEquipmentFieldRefs + operations: { + findUnique: { + args: Prisma.GenerationEquipmentFindUniqueArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.GenerationEquipmentFindUniqueOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findFirst: { + args: Prisma.GenerationEquipmentFindFirstArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.GenerationEquipmentFindFirstOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findMany: { + args: Prisma.GenerationEquipmentFindManyArgs + result: runtime.Types.Utils.PayloadToResult[] + } + create: { + args: Prisma.GenerationEquipmentCreateArgs + result: runtime.Types.Utils.PayloadToResult + } + createMany: { + args: Prisma.GenerationEquipmentCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.GenerationEquipmentCreateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + delete: { + args: Prisma.GenerationEquipmentDeleteArgs + result: runtime.Types.Utils.PayloadToResult + } + update: { + args: Prisma.GenerationEquipmentUpdateArgs + result: runtime.Types.Utils.PayloadToResult + } + deleteMany: { + args: Prisma.GenerationEquipmentDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.GenerationEquipmentUpdateManyArgs + result: BatchPayload + } + updateManyAndReturn: { + args: Prisma.GenerationEquipmentUpdateManyAndReturnArgs + result: runtime.Types.Utils.PayloadToResult[] + } + upsert: { + args: Prisma.GenerationEquipmentUpsertArgs + result: runtime.Types.Utils.PayloadToResult + } + aggregate: { + args: Prisma.GenerationEquipmentAggregateArgs + result: runtime.Types.Utils.Optional + } + groupBy: { + args: Prisma.GenerationEquipmentGroupByArgs + result: runtime.Types.Utils.Optional[] + } + count: { + args: Prisma.GenerationEquipmentCountArgs + 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 AssetScalarFieldEnum = { + id: 'id', + name: 'name', + type: 'type', + path: 'path', + createdAt: 'createdAt', + updatedAt: 'updatedAt', +} as const + +export type AssetScalarFieldEnum = (typeof AssetScalarFieldEnum)[keyof typeof AssetScalarFieldEnum] + +export const CharacterScalarFieldEnum = { + id: 'id', + name: 'name', + description: 'description', + imageId: 'imageId', + createdAt: 'createdAt', + updatedAt: 'updatedAt', +} as const + +export type CharacterScalarFieldEnum = + (typeof CharacterScalarFieldEnum)[keyof typeof CharacterScalarFieldEnum] + +export const CategoryScalarFieldEnum = { + id: 'id', + name: 'name', + parentId: 'parentId', + createdAt: 'createdAt', + updatedAt: 'updatedAt', +} as const + +export type CategoryScalarFieldEnum = + (typeof CategoryScalarFieldEnum)[keyof typeof CategoryScalarFieldEnum] + +export const EquipmentScalarFieldEnum = { + id: 'id', + name: 'name', + description: 'description', + categoryId: 'categoryId', + subCategoryId: 'subCategoryId', + imageId: 'imageId', + createdAt: 'createdAt', + updatedAt: 'updatedAt', +} as const + +export type EquipmentScalarFieldEnum = + (typeof EquipmentScalarFieldEnum)[keyof typeof EquipmentScalarFieldEnum] + +export const GenerationScalarFieldEnum = { + id: 'id', + characterId: 'characterId', + imageId: 'imageId', + createdAt: 'createdAt', + updatedAt: 'updatedAt', +} as const + +export type GenerationScalarFieldEnum = + (typeof GenerationScalarFieldEnum)[keyof typeof GenerationScalarFieldEnum] + +export const GenerationEquipmentScalarFieldEnum = { + generationId: 'generationId', + equipmentId: 'equipmentId', +} as const + +export type GenerationEquipmentScalarFieldEnum = + (typeof GenerationEquipmentScalarFieldEnum)[keyof typeof GenerationEquipmentScalarFieldEnum] + +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'> + +/** + * 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' +export type PrismaClientOptions = ( + | { + /** + * Instance of a Driver Adapter, e.g., like one provided by `@prisma/adapter-pg`. + */ + adapter: runtime.SqlDriverAdapterFactory + accelerateUrl?: never + } + | { + /** + * Prisma Accelerate URL allowing the client to connect through Accelerate instead of a direct database. + */ + accelerateUrl: string + adapter?: never + } +) & { + /** + * @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[] +} +export type GlobalOmitConfig = { + asset?: Prisma.AssetOmit + character?: Prisma.CharacterOmit + category?: Prisma.CategoryOmit + equipment?: Prisma.EquipmentOmit + generation?: Prisma.GenerationOmit + generationEquipment?: Prisma.GenerationEquipmentOmit +} + +/* 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 + +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..b5073a9 --- /dev/null +++ b/src/generated/prisma/internal/prismaNamespaceBrowser.ts @@ -0,0 +1,151 @@ +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ + +// 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.js' +export type * from './prismaNamespace.js' + +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 = { + Asset: 'Asset', + Character: 'Character', + Category: 'Category', + Equipment: 'Equipment', + Generation: 'Generation', + GenerationEquipment: 'GenerationEquipment', +} 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 AssetScalarFieldEnum = { + id: 'id', + name: 'name', + type: 'type', + path: 'path', + createdAt: 'createdAt', + updatedAt: 'updatedAt', +} as const + +export type AssetScalarFieldEnum = (typeof AssetScalarFieldEnum)[keyof typeof AssetScalarFieldEnum] + +export const CharacterScalarFieldEnum = { + id: 'id', + name: 'name', + description: 'description', + imageId: 'imageId', + createdAt: 'createdAt', + updatedAt: 'updatedAt', +} as const + +export type CharacterScalarFieldEnum = + (typeof CharacterScalarFieldEnum)[keyof typeof CharacterScalarFieldEnum] + +export const CategoryScalarFieldEnum = { + id: 'id', + name: 'name', + parentId: 'parentId', + createdAt: 'createdAt', + updatedAt: 'updatedAt', +} as const + +export type CategoryScalarFieldEnum = + (typeof CategoryScalarFieldEnum)[keyof typeof CategoryScalarFieldEnum] + +export const EquipmentScalarFieldEnum = { + id: 'id', + name: 'name', + description: 'description', + categoryId: 'categoryId', + subCategoryId: 'subCategoryId', + imageId: 'imageId', + createdAt: 'createdAt', + updatedAt: 'updatedAt', +} as const + +export type EquipmentScalarFieldEnum = + (typeof EquipmentScalarFieldEnum)[keyof typeof EquipmentScalarFieldEnum] + +export const GenerationScalarFieldEnum = { + id: 'id', + characterId: 'characterId', + imageId: 'imageId', + createdAt: 'createdAt', + updatedAt: 'updatedAt', +} as const + +export type GenerationScalarFieldEnum = + (typeof GenerationScalarFieldEnum)[keyof typeof GenerationScalarFieldEnum] + +export const GenerationEquipmentScalarFieldEnum = { + generationId: 'generationId', + equipmentId: 'equipmentId', +} as const + +export type GenerationEquipmentScalarFieldEnum = + (typeof GenerationEquipmentScalarFieldEnum)[keyof typeof GenerationEquipmentScalarFieldEnum] + +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..1bad99a --- /dev/null +++ b/src/generated/prisma/models.ts @@ -0,0 +1,16 @@ +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ + +// 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/Asset.js' +export type * from './models/Character.js' +export type * from './models/Category.js' +export type * from './models/Equipment.js' +export type * from './models/Generation.js' +export type * from './models/GenerationEquipment.js' +export type * from './commonInputTypes.js' diff --git a/src/generated/prisma/models/Asset.ts b/src/generated/prisma/models/Asset.ts new file mode 100644 index 0000000..b3d04e5 --- /dev/null +++ b/src/generated/prisma/models/Asset.ts @@ -0,0 +1,1895 @@ +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * This file exports the `Asset` 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.js' +import type * as Prisma from '../internal/prismaNamespace.js' + +/** + * Model Asset + * + */ +export type AssetModel = runtime.Types.Result.DefaultSelection + +export type AggregateAsset = { + _count: AssetCountAggregateOutputType | null + _min: AssetMinAggregateOutputType | null + _max: AssetMaxAggregateOutputType | null +} + +export type AssetMinAggregateOutputType = { + id: string | null + name: string | null + type: string | null + path: string | null + createdAt: Date | null + updatedAt: Date | null +} + +export type AssetMaxAggregateOutputType = { + id: string | null + name: string | null + type: string | null + path: string | null + createdAt: Date | null + updatedAt: Date | null +} + +export type AssetCountAggregateOutputType = { + id: number + name: number + type: number + path: number + createdAt: number + updatedAt: number + _all: number +} + +export type AssetMinAggregateInputType = { + id?: true + name?: true + type?: true + path?: true + createdAt?: true + updatedAt?: true +} + +export type AssetMaxAggregateInputType = { + id?: true + name?: true + type?: true + path?: true + createdAt?: true + updatedAt?: true +} + +export type AssetCountAggregateInputType = { + id?: true + name?: true + type?: true + path?: true + createdAt?: true + updatedAt?: true + _all?: true +} + +export type AssetAggregateArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Filter which Asset to aggregate. + */ + where?: Prisma.AssetWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Assets to fetch. + */ + orderBy?: Prisma.AssetOrderByWithRelationInput | Prisma.AssetOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: Prisma.AssetWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Assets 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` Assets. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Assets + **/ + _count?: true | AssetCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: AssetMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: AssetMaxAggregateInputType +} + +export type GetAssetAggregateType = { + [P in keyof T & keyof AggregateAsset]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType +} + +export type AssetGroupByArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + where?: Prisma.AssetWhereInput + orderBy?: Prisma.AssetOrderByWithAggregationInput | Prisma.AssetOrderByWithAggregationInput[] + by: Prisma.AssetScalarFieldEnum[] | Prisma.AssetScalarFieldEnum + having?: Prisma.AssetScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: AssetCountAggregateInputType | true + _min?: AssetMinAggregateInputType + _max?: AssetMaxAggregateInputType +} + +export type AssetGroupByOutputType = { + id: string + name: string + type: string + path: string + createdAt: Date + updatedAt: Date + _count: AssetCountAggregateOutputType | null + _min: AssetMinAggregateOutputType | null + _max: AssetMaxAggregateOutputType | null +} + +type GetAssetGroupByPayload = Prisma.PrismaPromise< + Array< + Prisma.PickEnumerable & { + [P in keyof T & keyof AssetGroupByOutputType]: P extends '_count' + ? T[P] extends boolean + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType + } + > +> + +export type AssetWhereInput = { + AND?: Prisma.AssetWhereInput | Prisma.AssetWhereInput[] + OR?: Prisma.AssetWhereInput[] + NOT?: Prisma.AssetWhereInput | Prisma.AssetWhereInput[] + id?: Prisma.StringFilter<'Asset'> | string + name?: Prisma.StringFilter<'Asset'> | string + type?: Prisma.StringFilter<'Asset'> | string + path?: Prisma.StringFilter<'Asset'> | string + createdAt?: Prisma.DateTimeFilter<'Asset'> | Date | string + updatedAt?: Prisma.DateTimeFilter<'Asset'> | Date | string + characters?: Prisma.CharacterListRelationFilter + equipments?: Prisma.EquipmentListRelationFilter + generations?: Prisma.GenerationListRelationFilter +} + +export type AssetOrderByWithRelationInput = { + id?: Prisma.SortOrder + name?: Prisma.SortOrder + type?: Prisma.SortOrder + path?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + characters?: Prisma.CharacterOrderByRelationAggregateInput + equipments?: Prisma.EquipmentOrderByRelationAggregateInput + generations?: Prisma.GenerationOrderByRelationAggregateInput +} + +export type AssetWhereUniqueInput = Prisma.AtLeast< + { + id?: string + AND?: Prisma.AssetWhereInput | Prisma.AssetWhereInput[] + OR?: Prisma.AssetWhereInput[] + NOT?: Prisma.AssetWhereInput | Prisma.AssetWhereInput[] + name?: Prisma.StringFilter<'Asset'> | string + type?: Prisma.StringFilter<'Asset'> | string + path?: Prisma.StringFilter<'Asset'> | string + createdAt?: Prisma.DateTimeFilter<'Asset'> | Date | string + updatedAt?: Prisma.DateTimeFilter<'Asset'> | Date | string + characters?: Prisma.CharacterListRelationFilter + equipments?: Prisma.EquipmentListRelationFilter + generations?: Prisma.GenerationListRelationFilter + }, + 'id' +> + +export type AssetOrderByWithAggregationInput = { + id?: Prisma.SortOrder + name?: Prisma.SortOrder + type?: Prisma.SortOrder + path?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + _count?: Prisma.AssetCountOrderByAggregateInput + _max?: Prisma.AssetMaxOrderByAggregateInput + _min?: Prisma.AssetMinOrderByAggregateInput +} + +export type AssetScalarWhereWithAggregatesInput = { + AND?: Prisma.AssetScalarWhereWithAggregatesInput | Prisma.AssetScalarWhereWithAggregatesInput[] + OR?: Prisma.AssetScalarWhereWithAggregatesInput[] + NOT?: Prisma.AssetScalarWhereWithAggregatesInput | Prisma.AssetScalarWhereWithAggregatesInput[] + id?: Prisma.StringWithAggregatesFilter<'Asset'> | string + name?: Prisma.StringWithAggregatesFilter<'Asset'> | string + type?: Prisma.StringWithAggregatesFilter<'Asset'> | string + path?: Prisma.StringWithAggregatesFilter<'Asset'> | string + createdAt?: Prisma.DateTimeWithAggregatesFilter<'Asset'> | Date | string + updatedAt?: Prisma.DateTimeWithAggregatesFilter<'Asset'> | Date | string +} + +export type AssetCreateInput = { + id: string + name: string + type: string + path: string + createdAt?: Date | string + updatedAt?: Date | string + characters?: Prisma.CharacterCreateNestedManyWithoutImageInput + equipments?: Prisma.EquipmentCreateNestedManyWithoutImageInput + generations?: Prisma.GenerationCreateNestedManyWithoutImageInput +} + +export type AssetUncheckedCreateInput = { + id: string + name: string + type: string + path: string + createdAt?: Date | string + updatedAt?: Date | string + characters?: Prisma.CharacterUncheckedCreateNestedManyWithoutImageInput + equipments?: Prisma.EquipmentUncheckedCreateNestedManyWithoutImageInput + generations?: Prisma.GenerationUncheckedCreateNestedManyWithoutImageInput +} + +export type AssetUpdateInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + type?: Prisma.StringFieldUpdateOperationsInput | string + path?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + characters?: Prisma.CharacterUpdateManyWithoutImageNestedInput + equipments?: Prisma.EquipmentUpdateManyWithoutImageNestedInput + generations?: Prisma.GenerationUpdateManyWithoutImageNestedInput +} + +export type AssetUncheckedUpdateInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + type?: Prisma.StringFieldUpdateOperationsInput | string + path?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + characters?: Prisma.CharacterUncheckedUpdateManyWithoutImageNestedInput + equipments?: Prisma.EquipmentUncheckedUpdateManyWithoutImageNestedInput + generations?: Prisma.GenerationUncheckedUpdateManyWithoutImageNestedInput +} + +export type AssetCreateManyInput = { + id: string + name: string + type: string + path: string + createdAt?: Date | string + updatedAt?: Date | string +} + +export type AssetUpdateManyMutationInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + type?: Prisma.StringFieldUpdateOperationsInput | string + path?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type AssetUncheckedUpdateManyInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + type?: Prisma.StringFieldUpdateOperationsInput | string + path?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type AssetCountOrderByAggregateInput = { + id?: Prisma.SortOrder + name?: Prisma.SortOrder + type?: Prisma.SortOrder + path?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder +} + +export type AssetMaxOrderByAggregateInput = { + id?: Prisma.SortOrder + name?: Prisma.SortOrder + type?: Prisma.SortOrder + path?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder +} + +export type AssetMinOrderByAggregateInput = { + id?: Prisma.SortOrder + name?: Prisma.SortOrder + type?: Prisma.SortOrder + path?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder +} + +export type AssetScalarRelationFilter = { + is?: Prisma.AssetWhereInput + isNot?: Prisma.AssetWhereInput +} + +export type StringFieldUpdateOperationsInput = { + set?: string +} + +export type DateTimeFieldUpdateOperationsInput = { + set?: Date | string +} + +export type AssetCreateNestedOneWithoutCharactersInput = { + create?: Prisma.XOR< + Prisma.AssetCreateWithoutCharactersInput, + Prisma.AssetUncheckedCreateWithoutCharactersInput + > + connectOrCreate?: Prisma.AssetCreateOrConnectWithoutCharactersInput + connect?: Prisma.AssetWhereUniqueInput +} + +export type AssetUpdateOneRequiredWithoutCharactersNestedInput = { + create?: Prisma.XOR< + Prisma.AssetCreateWithoutCharactersInput, + Prisma.AssetUncheckedCreateWithoutCharactersInput + > + connectOrCreate?: Prisma.AssetCreateOrConnectWithoutCharactersInput + upsert?: Prisma.AssetUpsertWithoutCharactersInput + connect?: Prisma.AssetWhereUniqueInput + update?: Prisma.XOR< + Prisma.XOR< + Prisma.AssetUpdateToOneWithWhereWithoutCharactersInput, + Prisma.AssetUpdateWithoutCharactersInput + >, + Prisma.AssetUncheckedUpdateWithoutCharactersInput + > +} + +export type AssetCreateNestedOneWithoutEquipmentsInput = { + create?: Prisma.XOR< + Prisma.AssetCreateWithoutEquipmentsInput, + Prisma.AssetUncheckedCreateWithoutEquipmentsInput + > + connectOrCreate?: Prisma.AssetCreateOrConnectWithoutEquipmentsInput + connect?: Prisma.AssetWhereUniqueInput +} + +export type AssetUpdateOneRequiredWithoutEquipmentsNestedInput = { + create?: Prisma.XOR< + Prisma.AssetCreateWithoutEquipmentsInput, + Prisma.AssetUncheckedCreateWithoutEquipmentsInput + > + connectOrCreate?: Prisma.AssetCreateOrConnectWithoutEquipmentsInput + upsert?: Prisma.AssetUpsertWithoutEquipmentsInput + connect?: Prisma.AssetWhereUniqueInput + update?: Prisma.XOR< + Prisma.XOR< + Prisma.AssetUpdateToOneWithWhereWithoutEquipmentsInput, + Prisma.AssetUpdateWithoutEquipmentsInput + >, + Prisma.AssetUncheckedUpdateWithoutEquipmentsInput + > +} + +export type AssetCreateNestedOneWithoutGenerationsInput = { + create?: Prisma.XOR< + Prisma.AssetCreateWithoutGenerationsInput, + Prisma.AssetUncheckedCreateWithoutGenerationsInput + > + connectOrCreate?: Prisma.AssetCreateOrConnectWithoutGenerationsInput + connect?: Prisma.AssetWhereUniqueInput +} + +export type AssetUpdateOneRequiredWithoutGenerationsNestedInput = { + create?: Prisma.XOR< + Prisma.AssetCreateWithoutGenerationsInput, + Prisma.AssetUncheckedCreateWithoutGenerationsInput + > + connectOrCreate?: Prisma.AssetCreateOrConnectWithoutGenerationsInput + upsert?: Prisma.AssetUpsertWithoutGenerationsInput + connect?: Prisma.AssetWhereUniqueInput + update?: Prisma.XOR< + Prisma.XOR< + Prisma.AssetUpdateToOneWithWhereWithoutGenerationsInput, + Prisma.AssetUpdateWithoutGenerationsInput + >, + Prisma.AssetUncheckedUpdateWithoutGenerationsInput + > +} + +export type AssetCreateWithoutCharactersInput = { + id: string + name: string + type: string + path: string + createdAt?: Date | string + updatedAt?: Date | string + equipments?: Prisma.EquipmentCreateNestedManyWithoutImageInput + generations?: Prisma.GenerationCreateNestedManyWithoutImageInput +} + +export type AssetUncheckedCreateWithoutCharactersInput = { + id: string + name: string + type: string + path: string + createdAt?: Date | string + updatedAt?: Date | string + equipments?: Prisma.EquipmentUncheckedCreateNestedManyWithoutImageInput + generations?: Prisma.GenerationUncheckedCreateNestedManyWithoutImageInput +} + +export type AssetCreateOrConnectWithoutCharactersInput = { + where: Prisma.AssetWhereUniqueInput + create: Prisma.XOR< + Prisma.AssetCreateWithoutCharactersInput, + Prisma.AssetUncheckedCreateWithoutCharactersInput + > +} + +export type AssetUpsertWithoutCharactersInput = { + update: Prisma.XOR< + Prisma.AssetUpdateWithoutCharactersInput, + Prisma.AssetUncheckedUpdateWithoutCharactersInput + > + create: Prisma.XOR< + Prisma.AssetCreateWithoutCharactersInput, + Prisma.AssetUncheckedCreateWithoutCharactersInput + > + where?: Prisma.AssetWhereInput +} + +export type AssetUpdateToOneWithWhereWithoutCharactersInput = { + where?: Prisma.AssetWhereInput + data: Prisma.XOR< + Prisma.AssetUpdateWithoutCharactersInput, + Prisma.AssetUncheckedUpdateWithoutCharactersInput + > +} + +export type AssetUpdateWithoutCharactersInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + type?: Prisma.StringFieldUpdateOperationsInput | string + path?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + equipments?: Prisma.EquipmentUpdateManyWithoutImageNestedInput + generations?: Prisma.GenerationUpdateManyWithoutImageNestedInput +} + +export type AssetUncheckedUpdateWithoutCharactersInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + type?: Prisma.StringFieldUpdateOperationsInput | string + path?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + equipments?: Prisma.EquipmentUncheckedUpdateManyWithoutImageNestedInput + generations?: Prisma.GenerationUncheckedUpdateManyWithoutImageNestedInput +} + +export type AssetCreateWithoutEquipmentsInput = { + id: string + name: string + type: string + path: string + createdAt?: Date | string + updatedAt?: Date | string + characters?: Prisma.CharacterCreateNestedManyWithoutImageInput + generations?: Prisma.GenerationCreateNestedManyWithoutImageInput +} + +export type AssetUncheckedCreateWithoutEquipmentsInput = { + id: string + name: string + type: string + path: string + createdAt?: Date | string + updatedAt?: Date | string + characters?: Prisma.CharacterUncheckedCreateNestedManyWithoutImageInput + generations?: Prisma.GenerationUncheckedCreateNestedManyWithoutImageInput +} + +export type AssetCreateOrConnectWithoutEquipmentsInput = { + where: Prisma.AssetWhereUniqueInput + create: Prisma.XOR< + Prisma.AssetCreateWithoutEquipmentsInput, + Prisma.AssetUncheckedCreateWithoutEquipmentsInput + > +} + +export type AssetUpsertWithoutEquipmentsInput = { + update: Prisma.XOR< + Prisma.AssetUpdateWithoutEquipmentsInput, + Prisma.AssetUncheckedUpdateWithoutEquipmentsInput + > + create: Prisma.XOR< + Prisma.AssetCreateWithoutEquipmentsInput, + Prisma.AssetUncheckedCreateWithoutEquipmentsInput + > + where?: Prisma.AssetWhereInput +} + +export type AssetUpdateToOneWithWhereWithoutEquipmentsInput = { + where?: Prisma.AssetWhereInput + data: Prisma.XOR< + Prisma.AssetUpdateWithoutEquipmentsInput, + Prisma.AssetUncheckedUpdateWithoutEquipmentsInput + > +} + +export type AssetUpdateWithoutEquipmentsInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + type?: Prisma.StringFieldUpdateOperationsInput | string + path?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + characters?: Prisma.CharacterUpdateManyWithoutImageNestedInput + generations?: Prisma.GenerationUpdateManyWithoutImageNestedInput +} + +export type AssetUncheckedUpdateWithoutEquipmentsInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + type?: Prisma.StringFieldUpdateOperationsInput | string + path?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + characters?: Prisma.CharacterUncheckedUpdateManyWithoutImageNestedInput + generations?: Prisma.GenerationUncheckedUpdateManyWithoutImageNestedInput +} + +export type AssetCreateWithoutGenerationsInput = { + id: string + name: string + type: string + path: string + createdAt?: Date | string + updatedAt?: Date | string + characters?: Prisma.CharacterCreateNestedManyWithoutImageInput + equipments?: Prisma.EquipmentCreateNestedManyWithoutImageInput +} + +export type AssetUncheckedCreateWithoutGenerationsInput = { + id: string + name: string + type: string + path: string + createdAt?: Date | string + updatedAt?: Date | string + characters?: Prisma.CharacterUncheckedCreateNestedManyWithoutImageInput + equipments?: Prisma.EquipmentUncheckedCreateNestedManyWithoutImageInput +} + +export type AssetCreateOrConnectWithoutGenerationsInput = { + where: Prisma.AssetWhereUniqueInput + create: Prisma.XOR< + Prisma.AssetCreateWithoutGenerationsInput, + Prisma.AssetUncheckedCreateWithoutGenerationsInput + > +} + +export type AssetUpsertWithoutGenerationsInput = { + update: Prisma.XOR< + Prisma.AssetUpdateWithoutGenerationsInput, + Prisma.AssetUncheckedUpdateWithoutGenerationsInput + > + create: Prisma.XOR< + Prisma.AssetCreateWithoutGenerationsInput, + Prisma.AssetUncheckedCreateWithoutGenerationsInput + > + where?: Prisma.AssetWhereInput +} + +export type AssetUpdateToOneWithWhereWithoutGenerationsInput = { + where?: Prisma.AssetWhereInput + data: Prisma.XOR< + Prisma.AssetUpdateWithoutGenerationsInput, + Prisma.AssetUncheckedUpdateWithoutGenerationsInput + > +} + +export type AssetUpdateWithoutGenerationsInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + type?: Prisma.StringFieldUpdateOperationsInput | string + path?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + characters?: Prisma.CharacterUpdateManyWithoutImageNestedInput + equipments?: Prisma.EquipmentUpdateManyWithoutImageNestedInput +} + +export type AssetUncheckedUpdateWithoutGenerationsInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + type?: Prisma.StringFieldUpdateOperationsInput | string + path?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + characters?: Prisma.CharacterUncheckedUpdateManyWithoutImageNestedInput + equipments?: Prisma.EquipmentUncheckedUpdateManyWithoutImageNestedInput +} + +/** + * Count Type AssetCountOutputType + */ + +export type AssetCountOutputType = { + characters: number + equipments: number + generations: number +} + +export type AssetCountOutputTypeSelect< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + characters?: boolean | AssetCountOutputTypeCountCharactersArgs + equipments?: boolean | AssetCountOutputTypeCountEquipmentsArgs + generations?: boolean | AssetCountOutputTypeCountGenerationsArgs +} + +/** + * AssetCountOutputType without action + */ +export type AssetCountOutputTypeDefaultArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the AssetCountOutputType + */ + select?: Prisma.AssetCountOutputTypeSelect | null +} + +/** + * AssetCountOutputType without action + */ +export type AssetCountOutputTypeCountCharactersArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + where?: Prisma.CharacterWhereInput +} + +/** + * AssetCountOutputType without action + */ +export type AssetCountOutputTypeCountEquipmentsArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + where?: Prisma.EquipmentWhereInput +} + +/** + * AssetCountOutputType without action + */ +export type AssetCountOutputTypeCountGenerationsArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + where?: Prisma.GenerationWhereInput +} + +export type AssetSelect< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = runtime.Types.Extensions.GetSelect< + { + id?: boolean + name?: boolean + type?: boolean + path?: boolean + createdAt?: boolean + updatedAt?: boolean + characters?: boolean | Prisma.Asset$charactersArgs + equipments?: boolean | Prisma.Asset$equipmentsArgs + generations?: boolean | Prisma.Asset$generationsArgs + _count?: boolean | Prisma.AssetCountOutputTypeDefaultArgs + }, + ExtArgs['result']['asset'] +> + +export type AssetSelectCreateManyAndReturn< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = runtime.Types.Extensions.GetSelect< + { + id?: boolean + name?: boolean + type?: boolean + path?: boolean + createdAt?: boolean + updatedAt?: boolean + }, + ExtArgs['result']['asset'] +> + +export type AssetSelectUpdateManyAndReturn< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = runtime.Types.Extensions.GetSelect< + { + id?: boolean + name?: boolean + type?: boolean + path?: boolean + createdAt?: boolean + updatedAt?: boolean + }, + ExtArgs['result']['asset'] +> + +export type AssetSelectScalar = { + id?: boolean + name?: boolean + type?: boolean + path?: boolean + createdAt?: boolean + updatedAt?: boolean +} + +export type AssetOmit< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = runtime.Types.Extensions.GetOmit< + 'id' | 'name' | 'type' | 'path' | 'createdAt' | 'updatedAt', + ExtArgs['result']['asset'] +> +export type AssetInclude< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + characters?: boolean | Prisma.Asset$charactersArgs + equipments?: boolean | Prisma.Asset$equipmentsArgs + generations?: boolean | Prisma.Asset$generationsArgs + _count?: boolean | Prisma.AssetCountOutputTypeDefaultArgs +} +export type AssetIncludeCreateManyAndReturn< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = {} +export type AssetIncludeUpdateManyAndReturn< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = {} + +export type $AssetPayload< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + name: 'Asset' + objects: { + characters: Prisma.$CharacterPayload[] + equipments: Prisma.$EquipmentPayload[] + generations: Prisma.$GenerationPayload[] + } + scalars: runtime.Types.Extensions.GetPayloadResult< + { + id: string + name: string + type: string + path: string + createdAt: Date + updatedAt: Date + }, + ExtArgs['result']['asset'] + > + composites: {} +} + +export type AssetGetPayload = + runtime.Types.Result.GetResult + +export type AssetCountArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = Omit & { + select?: AssetCountAggregateInputType | true +} + +export interface AssetDelegate< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, + GlobalOmitOptions = {}, +> { + [K: symbol]: { types: Prisma.TypeMap['model']['Asset']; meta: { name: 'Asset' } } + /** + * Find zero or one Asset that matches the filter. + * @param {AssetFindUniqueArgs} args - Arguments to find a Asset + * @example + * // Get one Asset + * const asset = await prisma.asset.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__AssetClient< + runtime.Types.Result.GetResult< + Prisma.$AssetPayload, + T, + 'findUnique', + GlobalOmitOptions + > | null, + null, + ExtArgs, + GlobalOmitOptions + > + + /** + * Find one Asset that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {AssetFindUniqueOrThrowArgs} args - Arguments to find a Asset + * @example + * // Get one Asset + * const asset = await prisma.asset.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__AssetClient< + runtime.Types.Result.GetResult< + Prisma.$AssetPayload, + T, + 'findUniqueOrThrow', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > + + /** + * Find the first Asset 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 {AssetFindFirstArgs} args - Arguments to find a Asset + * @example + * // Get one Asset + * const asset = await prisma.asset.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst( + args?: Prisma.SelectSubset>, + ): Prisma.Prisma__AssetClient< + runtime.Types.Result.GetResult< + Prisma.$AssetPayload, + T, + 'findFirst', + GlobalOmitOptions + > | null, + null, + ExtArgs, + GlobalOmitOptions + > + + /** + * Find the first Asset 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 {AssetFindFirstOrThrowArgs} args - Arguments to find a Asset + * @example + * // Get one Asset + * const asset = await prisma.asset.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow( + args?: Prisma.SelectSubset>, + ): Prisma.Prisma__AssetClient< + runtime.Types.Result.GetResult< + Prisma.$AssetPayload, + T, + 'findFirstOrThrow', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > + + /** + * Find zero or more Assets 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 {AssetFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Assets + * const assets = await prisma.asset.findMany() + * + * // Get first 10 Assets + * const assets = await prisma.asset.findMany({ take: 10 }) + * + * // Only select the `id` + * const assetWithIdOnly = await prisma.asset.findMany({ select: { id: true } }) + * + */ + findMany( + args?: Prisma.SelectSubset>, + ): Prisma.PrismaPromise< + runtime.Types.Result.GetResult, T, 'findMany', GlobalOmitOptions> + > + + /** + * Create a Asset. + * @param {AssetCreateArgs} args - Arguments to create a Asset. + * @example + * // Create one Asset + * const Asset = await prisma.asset.create({ + * data: { + * // ... data to create a Asset + * } + * }) + * + */ + create( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__AssetClient< + runtime.Types.Result.GetResult, T, 'create', GlobalOmitOptions>, + never, + ExtArgs, + GlobalOmitOptions + > + + /** + * Create many Assets. + * @param {AssetCreateManyArgs} args - Arguments to create many Assets. + * @example + * // Create many Assets + * const asset = await prisma.asset.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany( + args?: Prisma.SelectSubset>, + ): Prisma.PrismaPromise + + /** + * Create many Assets and returns the data saved in the database. + * @param {AssetCreateManyAndReturnArgs} args - Arguments to create many Assets. + * @example + * // Create many Assets + * const asset = await prisma.asset.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Assets and only return the `id` + * const assetWithIdOnly = await prisma.asset.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< + runtime.Types.Result.GetResult< + Prisma.$AssetPayload, + T, + 'createManyAndReturn', + GlobalOmitOptions + > + > + + /** + * Delete a Asset. + * @param {AssetDeleteArgs} args - Arguments to delete one Asset. + * @example + * // Delete one Asset + * const Asset = await prisma.asset.delete({ + * where: { + * // ... filter to delete one Asset + * } + * }) + * + */ + delete( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__AssetClient< + runtime.Types.Result.GetResult, T, 'delete', GlobalOmitOptions>, + never, + ExtArgs, + GlobalOmitOptions + > + + /** + * Update one Asset. + * @param {AssetUpdateArgs} args - Arguments to update one Asset. + * @example + * // Update one Asset + * const asset = await prisma.asset.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__AssetClient< + runtime.Types.Result.GetResult, T, 'update', GlobalOmitOptions>, + never, + ExtArgs, + GlobalOmitOptions + > + + /** + * Delete zero or more Assets. + * @param {AssetDeleteManyArgs} args - Arguments to filter Assets to delete. + * @example + * // Delete a few Assets + * const { count } = await prisma.asset.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany( + args?: Prisma.SelectSubset>, + ): Prisma.PrismaPromise + + /** + * Update zero or more Assets. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AssetUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Assets + * const asset = await prisma.asset.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany( + args: Prisma.SelectSubset>, + ): Prisma.PrismaPromise + + /** + * Update zero or more Assets and returns the data updated in the database. + * @param {AssetUpdateManyAndReturnArgs} args - Arguments to update many Assets. + * @example + * // Update many Assets + * const asset = await prisma.asset.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more Assets and only return the `id` + * const assetWithIdOnly = await prisma.asset.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< + runtime.Types.Result.GetResult< + Prisma.$AssetPayload, + T, + 'updateManyAndReturn', + GlobalOmitOptions + > + > + + /** + * Create or update one Asset. + * @param {AssetUpsertArgs} args - Arguments to update or create a Asset. + * @example + * // Update or create a Asset + * const asset = await prisma.asset.upsert({ + * create: { + * // ... data to create a Asset + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Asset we want to update + * } + * }) + */ + upsert( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__AssetClient< + runtime.Types.Result.GetResult, T, 'upsert', GlobalOmitOptions>, + never, + ExtArgs, + GlobalOmitOptions + > + + /** + * Count the number of Assets. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AssetCountArgs} args - Arguments to filter Assets to count. + * @example + * // Count the number of Assets + * const count = await prisma.asset.count({ + * where: { + * // ... the filter for the Assets 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 Asset. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AssetAggregateArgs} 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 Asset. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AssetGroupByArgs} 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 AssetGroupByArgs, + HasSelectOrTake extends Prisma.Or< + Prisma.Extends<'skip', Prisma.Keys>, + Prisma.Extends<'take', Prisma.Keys> + >, + OrderByArg extends Prisma.True extends HasSelectOrTake + ? { orderBy: AssetGroupByArgs['orderBy'] } + : { orderBy?: AssetGroupByArgs['orderBy'] }, + OrderFields extends Prisma.ExcludeUnderscoreKeys< + Prisma.Keys> + >, + 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 ? GetAssetGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the Asset model + */ + readonly fields: AssetFieldRefs +} + +/** + * The delegate class that acts as a "Promise-like" for Asset. + * 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__AssetClient< + T, + Null = never, + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, + GlobalOmitOptions = {}, +> extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: 'PrismaPromise' + characters = {}>( + args?: Prisma.Subset>, + ): Prisma.PrismaPromise< + | runtime.Types.Result.GetResult< + Prisma.$CharacterPayload, + T, + 'findMany', + GlobalOmitOptions + > + | Null + > + equipments = {}>( + args?: Prisma.Subset>, + ): Prisma.PrismaPromise< + | runtime.Types.Result.GetResult< + Prisma.$EquipmentPayload, + T, + 'findMany', + GlobalOmitOptions + > + | Null + > + generations = {}>( + args?: Prisma.Subset>, + ): Prisma.PrismaPromise< + | runtime.Types.Result.GetResult< + Prisma.$GenerationPayload, + 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 Asset model + */ +export interface AssetFieldRefs { + readonly id: Prisma.FieldRef<'Asset', 'String'> + readonly name: Prisma.FieldRef<'Asset', 'String'> + readonly type: Prisma.FieldRef<'Asset', 'String'> + readonly path: Prisma.FieldRef<'Asset', 'String'> + readonly createdAt: Prisma.FieldRef<'Asset', 'DateTime'> + readonly updatedAt: Prisma.FieldRef<'Asset', 'DateTime'> +} + +// Custom InputTypes +/** + * Asset findUnique + */ +export type AssetFindUniqueArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Asset + */ + select?: Prisma.AssetSelect | null + /** + * Omit specific fields from the Asset + */ + omit?: Prisma.AssetOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AssetInclude | null + /** + * Filter, which Asset to fetch. + */ + where: Prisma.AssetWhereUniqueInput +} + +/** + * Asset findUniqueOrThrow + */ +export type AssetFindUniqueOrThrowArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Asset + */ + select?: Prisma.AssetSelect | null + /** + * Omit specific fields from the Asset + */ + omit?: Prisma.AssetOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AssetInclude | null + /** + * Filter, which Asset to fetch. + */ + where: Prisma.AssetWhereUniqueInput +} + +/** + * Asset findFirst + */ +export type AssetFindFirstArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Asset + */ + select?: Prisma.AssetSelect | null + /** + * Omit specific fields from the Asset + */ + omit?: Prisma.AssetOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AssetInclude | null + /** + * Filter, which Asset to fetch. + */ + where?: Prisma.AssetWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Assets to fetch. + */ + orderBy?: Prisma.AssetOrderByWithRelationInput | Prisma.AssetOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Assets. + */ + cursor?: Prisma.AssetWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Assets 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` Assets. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Assets. + */ + distinct?: Prisma.AssetScalarFieldEnum | Prisma.AssetScalarFieldEnum[] +} + +/** + * Asset findFirstOrThrow + */ +export type AssetFindFirstOrThrowArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Asset + */ + select?: Prisma.AssetSelect | null + /** + * Omit specific fields from the Asset + */ + omit?: Prisma.AssetOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AssetInclude | null + /** + * Filter, which Asset to fetch. + */ + where?: Prisma.AssetWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Assets to fetch. + */ + orderBy?: Prisma.AssetOrderByWithRelationInput | Prisma.AssetOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Assets. + */ + cursor?: Prisma.AssetWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Assets 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` Assets. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Assets. + */ + distinct?: Prisma.AssetScalarFieldEnum | Prisma.AssetScalarFieldEnum[] +} + +/** + * Asset findMany + */ +export type AssetFindManyArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Asset + */ + select?: Prisma.AssetSelect | null + /** + * Omit specific fields from the Asset + */ + omit?: Prisma.AssetOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AssetInclude | null + /** + * Filter, which Assets to fetch. + */ + where?: Prisma.AssetWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Assets to fetch. + */ + orderBy?: Prisma.AssetOrderByWithRelationInput | Prisma.AssetOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Assets. + */ + cursor?: Prisma.AssetWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Assets 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` Assets. + */ + skip?: number + distinct?: Prisma.AssetScalarFieldEnum | Prisma.AssetScalarFieldEnum[] +} + +/** + * Asset create + */ +export type AssetCreateArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Asset + */ + select?: Prisma.AssetSelect | null + /** + * Omit specific fields from the Asset + */ + omit?: Prisma.AssetOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AssetInclude | null + /** + * The data needed to create a Asset. + */ + data: Prisma.XOR +} + +/** + * Asset createMany + */ +export type AssetCreateManyArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * The data used to create many Assets. + */ + data: Prisma.AssetCreateManyInput | Prisma.AssetCreateManyInput[] +} + +/** + * Asset createManyAndReturn + */ +export type AssetCreateManyAndReturnArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Asset + */ + select?: Prisma.AssetSelectCreateManyAndReturn | null + /** + * Omit specific fields from the Asset + */ + omit?: Prisma.AssetOmit | null + /** + * The data used to create many Assets. + */ + data: Prisma.AssetCreateManyInput | Prisma.AssetCreateManyInput[] +} + +/** + * Asset update + */ +export type AssetUpdateArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Asset + */ + select?: Prisma.AssetSelect | null + /** + * Omit specific fields from the Asset + */ + omit?: Prisma.AssetOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AssetInclude | null + /** + * The data needed to update a Asset. + */ + data: Prisma.XOR + /** + * Choose, which Asset to update. + */ + where: Prisma.AssetWhereUniqueInput +} + +/** + * Asset updateMany + */ +export type AssetUpdateManyArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * The data used to update Assets. + */ + data: Prisma.XOR + /** + * Filter which Assets to update + */ + where?: Prisma.AssetWhereInput + /** + * Limit how many Assets to update. + */ + limit?: number +} + +/** + * Asset updateManyAndReturn + */ +export type AssetUpdateManyAndReturnArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Asset + */ + select?: Prisma.AssetSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the Asset + */ + omit?: Prisma.AssetOmit | null + /** + * The data used to update Assets. + */ + data: Prisma.XOR + /** + * Filter which Assets to update + */ + where?: Prisma.AssetWhereInput + /** + * Limit how many Assets to update. + */ + limit?: number +} + +/** + * Asset upsert + */ +export type AssetUpsertArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Asset + */ + select?: Prisma.AssetSelect | null + /** + * Omit specific fields from the Asset + */ + omit?: Prisma.AssetOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AssetInclude | null + /** + * The filter to search for the Asset to update in case it exists. + */ + where: Prisma.AssetWhereUniqueInput + /** + * In case the Asset found by the `where` argument doesn't exist, create a new Asset with this data. + */ + create: Prisma.XOR + /** + * In case the Asset was found with the provided `where` argument, update it with this data. + */ + update: Prisma.XOR +} + +/** + * Asset delete + */ +export type AssetDeleteArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Asset + */ + select?: Prisma.AssetSelect | null + /** + * Omit specific fields from the Asset + */ + omit?: Prisma.AssetOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AssetInclude | null + /** + * Filter which Asset to delete. + */ + where: Prisma.AssetWhereUniqueInput +} + +/** + * Asset deleteMany + */ +export type AssetDeleteManyArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Filter which Assets to delete + */ + where?: Prisma.AssetWhereInput + /** + * Limit how many Assets to delete. + */ + limit?: number +} + +/** + * Asset.characters + */ +export type Asset$charactersArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Character + */ + select?: Prisma.CharacterSelect | null + /** + * Omit specific fields from the Character + */ + omit?: Prisma.CharacterOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.CharacterInclude | null + where?: Prisma.CharacterWhereInput + orderBy?: Prisma.CharacterOrderByWithRelationInput | Prisma.CharacterOrderByWithRelationInput[] + cursor?: Prisma.CharacterWhereUniqueInput + take?: number + skip?: number + distinct?: Prisma.CharacterScalarFieldEnum | Prisma.CharacterScalarFieldEnum[] +} + +/** + * Asset.equipments + */ +export type Asset$equipmentsArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Equipment + */ + select?: Prisma.EquipmentSelect | null + /** + * Omit specific fields from the Equipment + */ + omit?: Prisma.EquipmentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.EquipmentInclude | null + where?: Prisma.EquipmentWhereInput + orderBy?: Prisma.EquipmentOrderByWithRelationInput | Prisma.EquipmentOrderByWithRelationInput[] + cursor?: Prisma.EquipmentWhereUniqueInput + take?: number + skip?: number + distinct?: Prisma.EquipmentScalarFieldEnum | Prisma.EquipmentScalarFieldEnum[] +} + +/** + * Asset.generations + */ +export type Asset$generationsArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Generation + */ + select?: Prisma.GenerationSelect | null + /** + * Omit specific fields from the Generation + */ + omit?: Prisma.GenerationOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GenerationInclude | null + where?: Prisma.GenerationWhereInput + orderBy?: Prisma.GenerationOrderByWithRelationInput | Prisma.GenerationOrderByWithRelationInput[] + cursor?: Prisma.GenerationWhereUniqueInput + take?: number + skip?: number + distinct?: Prisma.GenerationScalarFieldEnum | Prisma.GenerationScalarFieldEnum[] +} + +/** + * Asset without action + */ +export type AssetDefaultArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Asset + */ + select?: Prisma.AssetSelect | null + /** + * Omit specific fields from the Asset + */ + omit?: Prisma.AssetOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.AssetInclude | null +} diff --git a/src/generated/prisma/models/Category.ts b/src/generated/prisma/models/Category.ts new file mode 100644 index 0000000..8c103fd --- /dev/null +++ b/src/generated/prisma/models/Category.ts @@ -0,0 +1,2144 @@ +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * This file exports the `Category` 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.js' +import type * as Prisma from '../internal/prismaNamespace.js' + +/** + * Model Category + * + */ +export type CategoryModel = runtime.Types.Result.DefaultSelection + +export type AggregateCategory = { + _count: CategoryCountAggregateOutputType | null + _min: CategoryMinAggregateOutputType | null + _max: CategoryMaxAggregateOutputType | null +} + +export type CategoryMinAggregateOutputType = { + id: string | null + name: string | null + parentId: string | null + createdAt: Date | null + updatedAt: Date | null +} + +export type CategoryMaxAggregateOutputType = { + id: string | null + name: string | null + parentId: string | null + createdAt: Date | null + updatedAt: Date | null +} + +export type CategoryCountAggregateOutputType = { + id: number + name: number + parentId: number + createdAt: number + updatedAt: number + _all: number +} + +export type CategoryMinAggregateInputType = { + id?: true + name?: true + parentId?: true + createdAt?: true + updatedAt?: true +} + +export type CategoryMaxAggregateInputType = { + id?: true + name?: true + parentId?: true + createdAt?: true + updatedAt?: true +} + +export type CategoryCountAggregateInputType = { + id?: true + name?: true + parentId?: true + createdAt?: true + updatedAt?: true + _all?: true +} + +export type CategoryAggregateArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Filter which Category to aggregate. + */ + where?: Prisma.CategoryWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Categories to fetch. + */ + orderBy?: Prisma.CategoryOrderByWithRelationInput | Prisma.CategoryOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: Prisma.CategoryWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Categories 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` Categories. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Categories + **/ + _count?: true | CategoryCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: CategoryMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: CategoryMaxAggregateInputType +} + +export type GetCategoryAggregateType = { + [P in keyof T & keyof AggregateCategory]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType +} + +export type CategoryGroupByArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + where?: Prisma.CategoryWhereInput + orderBy?: + | Prisma.CategoryOrderByWithAggregationInput + | Prisma.CategoryOrderByWithAggregationInput[] + by: Prisma.CategoryScalarFieldEnum[] | Prisma.CategoryScalarFieldEnum + having?: Prisma.CategoryScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: CategoryCountAggregateInputType | true + _min?: CategoryMinAggregateInputType + _max?: CategoryMaxAggregateInputType +} + +export type CategoryGroupByOutputType = { + id: string + name: string + parentId: string | null + createdAt: Date + updatedAt: Date + _count: CategoryCountAggregateOutputType | null + _min: CategoryMinAggregateOutputType | null + _max: CategoryMaxAggregateOutputType | null +} + +type GetCategoryGroupByPayload = Prisma.PrismaPromise< + Array< + Prisma.PickEnumerable & { + [P in keyof T & keyof CategoryGroupByOutputType]: P extends '_count' + ? T[P] extends boolean + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType + } + > +> + +export type CategoryWhereInput = { + AND?: Prisma.CategoryWhereInput | Prisma.CategoryWhereInput[] + OR?: Prisma.CategoryWhereInput[] + NOT?: Prisma.CategoryWhereInput | Prisma.CategoryWhereInput[] + id?: Prisma.StringFilter<'Category'> | string + name?: Prisma.StringFilter<'Category'> | string + parentId?: Prisma.StringNullableFilter<'Category'> | string | null + createdAt?: Prisma.DateTimeFilter<'Category'> | Date | string + updatedAt?: Prisma.DateTimeFilter<'Category'> | Date | string + parent?: Prisma.XOR | null + subCategories?: Prisma.CategoryListRelationFilter + equipmentsAsMain?: Prisma.EquipmentListRelationFilter + equipmentsAsSub?: Prisma.EquipmentListRelationFilter +} + +export type CategoryOrderByWithRelationInput = { + id?: Prisma.SortOrder + name?: Prisma.SortOrder + parentId?: Prisma.SortOrderInput | Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + parent?: Prisma.CategoryOrderByWithRelationInput + subCategories?: Prisma.CategoryOrderByRelationAggregateInput + equipmentsAsMain?: Prisma.EquipmentOrderByRelationAggregateInput + equipmentsAsSub?: Prisma.EquipmentOrderByRelationAggregateInput +} + +export type CategoryWhereUniqueInput = Prisma.AtLeast< + { + id?: string + AND?: Prisma.CategoryWhereInput | Prisma.CategoryWhereInput[] + OR?: Prisma.CategoryWhereInput[] + NOT?: Prisma.CategoryWhereInput | Prisma.CategoryWhereInput[] + name?: Prisma.StringFilter<'Category'> | string + parentId?: Prisma.StringNullableFilter<'Category'> | string | null + createdAt?: Prisma.DateTimeFilter<'Category'> | Date | string + updatedAt?: Prisma.DateTimeFilter<'Category'> | Date | string + parent?: Prisma.XOR< + Prisma.CategoryNullableScalarRelationFilter, + Prisma.CategoryWhereInput + > | null + subCategories?: Prisma.CategoryListRelationFilter + equipmentsAsMain?: Prisma.EquipmentListRelationFilter + equipmentsAsSub?: Prisma.EquipmentListRelationFilter + }, + 'id' +> + +export type CategoryOrderByWithAggregationInput = { + id?: Prisma.SortOrder + name?: Prisma.SortOrder + parentId?: Prisma.SortOrderInput | Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + _count?: Prisma.CategoryCountOrderByAggregateInput + _max?: Prisma.CategoryMaxOrderByAggregateInput + _min?: Prisma.CategoryMinOrderByAggregateInput +} + +export type CategoryScalarWhereWithAggregatesInput = { + AND?: + | Prisma.CategoryScalarWhereWithAggregatesInput + | Prisma.CategoryScalarWhereWithAggregatesInput[] + OR?: Prisma.CategoryScalarWhereWithAggregatesInput[] + NOT?: + | Prisma.CategoryScalarWhereWithAggregatesInput + | Prisma.CategoryScalarWhereWithAggregatesInput[] + id?: Prisma.StringWithAggregatesFilter<'Category'> | string + name?: Prisma.StringWithAggregatesFilter<'Category'> | string + parentId?: Prisma.StringNullableWithAggregatesFilter<'Category'> | string | null + createdAt?: Prisma.DateTimeWithAggregatesFilter<'Category'> | Date | string + updatedAt?: Prisma.DateTimeWithAggregatesFilter<'Category'> | Date | string +} + +export type CategoryCreateInput = { + id: string + name: string + createdAt?: Date | string + updatedAt?: Date | string + parent?: Prisma.CategoryCreateNestedOneWithoutSubCategoriesInput + subCategories?: Prisma.CategoryCreateNestedManyWithoutParentInput + equipmentsAsMain?: Prisma.EquipmentCreateNestedManyWithoutCategoryInput + equipmentsAsSub?: Prisma.EquipmentCreateNestedManyWithoutSubCategoryInput +} + +export type CategoryUncheckedCreateInput = { + id: string + name: string + parentId?: string | null + createdAt?: Date | string + updatedAt?: Date | string + subCategories?: Prisma.CategoryUncheckedCreateNestedManyWithoutParentInput + equipmentsAsMain?: Prisma.EquipmentUncheckedCreateNestedManyWithoutCategoryInput + equipmentsAsSub?: Prisma.EquipmentUncheckedCreateNestedManyWithoutSubCategoryInput +} + +export type CategoryUpdateInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + parent?: Prisma.CategoryUpdateOneWithoutSubCategoriesNestedInput + subCategories?: Prisma.CategoryUpdateManyWithoutParentNestedInput + equipmentsAsMain?: Prisma.EquipmentUpdateManyWithoutCategoryNestedInput + equipmentsAsSub?: Prisma.EquipmentUpdateManyWithoutSubCategoryNestedInput +} + +export type CategoryUncheckedUpdateInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + parentId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + subCategories?: Prisma.CategoryUncheckedUpdateManyWithoutParentNestedInput + equipmentsAsMain?: Prisma.EquipmentUncheckedUpdateManyWithoutCategoryNestedInput + equipmentsAsSub?: Prisma.EquipmentUncheckedUpdateManyWithoutSubCategoryNestedInput +} + +export type CategoryCreateManyInput = { + id: string + name: string + parentId?: string | null + createdAt?: Date | string + updatedAt?: Date | string +} + +export type CategoryUpdateManyMutationInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type CategoryUncheckedUpdateManyInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + parentId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type CategoryNullableScalarRelationFilter = { + is?: Prisma.CategoryWhereInput | null + isNot?: Prisma.CategoryWhereInput | null +} + +export type CategoryListRelationFilter = { + every?: Prisma.CategoryWhereInput + some?: Prisma.CategoryWhereInput + none?: Prisma.CategoryWhereInput +} + +export type CategoryOrderByRelationAggregateInput = { + _count?: Prisma.SortOrder +} + +export type CategoryCountOrderByAggregateInput = { + id?: Prisma.SortOrder + name?: Prisma.SortOrder + parentId?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder +} + +export type CategoryMaxOrderByAggregateInput = { + id?: Prisma.SortOrder + name?: Prisma.SortOrder + parentId?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder +} + +export type CategoryMinOrderByAggregateInput = { + id?: Prisma.SortOrder + name?: Prisma.SortOrder + parentId?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder +} + +export type CategoryScalarRelationFilter = { + is?: Prisma.CategoryWhereInput + isNot?: Prisma.CategoryWhereInput +} + +export type CategoryCreateNestedOneWithoutSubCategoriesInput = { + create?: Prisma.XOR< + Prisma.CategoryCreateWithoutSubCategoriesInput, + Prisma.CategoryUncheckedCreateWithoutSubCategoriesInput + > + connectOrCreate?: Prisma.CategoryCreateOrConnectWithoutSubCategoriesInput + connect?: Prisma.CategoryWhereUniqueInput +} + +export type CategoryCreateNestedManyWithoutParentInput = { + create?: + | Prisma.XOR< + Prisma.CategoryCreateWithoutParentInput, + Prisma.CategoryUncheckedCreateWithoutParentInput + > + | Prisma.CategoryCreateWithoutParentInput[] + | Prisma.CategoryUncheckedCreateWithoutParentInput[] + connectOrCreate?: + | Prisma.CategoryCreateOrConnectWithoutParentInput + | Prisma.CategoryCreateOrConnectWithoutParentInput[] + createMany?: Prisma.CategoryCreateManyParentInputEnvelope + connect?: Prisma.CategoryWhereUniqueInput | Prisma.CategoryWhereUniqueInput[] +} + +export type CategoryUncheckedCreateNestedManyWithoutParentInput = { + create?: + | Prisma.XOR< + Prisma.CategoryCreateWithoutParentInput, + Prisma.CategoryUncheckedCreateWithoutParentInput + > + | Prisma.CategoryCreateWithoutParentInput[] + | Prisma.CategoryUncheckedCreateWithoutParentInput[] + connectOrCreate?: + | Prisma.CategoryCreateOrConnectWithoutParentInput + | Prisma.CategoryCreateOrConnectWithoutParentInput[] + createMany?: Prisma.CategoryCreateManyParentInputEnvelope + connect?: Prisma.CategoryWhereUniqueInput | Prisma.CategoryWhereUniqueInput[] +} + +export type CategoryUpdateOneWithoutSubCategoriesNestedInput = { + create?: Prisma.XOR< + Prisma.CategoryCreateWithoutSubCategoriesInput, + Prisma.CategoryUncheckedCreateWithoutSubCategoriesInput + > + connectOrCreate?: Prisma.CategoryCreateOrConnectWithoutSubCategoriesInput + upsert?: Prisma.CategoryUpsertWithoutSubCategoriesInput + disconnect?: Prisma.CategoryWhereInput | boolean + delete?: Prisma.CategoryWhereInput | boolean + connect?: Prisma.CategoryWhereUniqueInput + update?: Prisma.XOR< + Prisma.XOR< + Prisma.CategoryUpdateToOneWithWhereWithoutSubCategoriesInput, + Prisma.CategoryUpdateWithoutSubCategoriesInput + >, + Prisma.CategoryUncheckedUpdateWithoutSubCategoriesInput + > +} + +export type CategoryUpdateManyWithoutParentNestedInput = { + create?: + | Prisma.XOR< + Prisma.CategoryCreateWithoutParentInput, + Prisma.CategoryUncheckedCreateWithoutParentInput + > + | Prisma.CategoryCreateWithoutParentInput[] + | Prisma.CategoryUncheckedCreateWithoutParentInput[] + connectOrCreate?: + | Prisma.CategoryCreateOrConnectWithoutParentInput + | Prisma.CategoryCreateOrConnectWithoutParentInput[] + upsert?: + | Prisma.CategoryUpsertWithWhereUniqueWithoutParentInput + | Prisma.CategoryUpsertWithWhereUniqueWithoutParentInput[] + createMany?: Prisma.CategoryCreateManyParentInputEnvelope + set?: Prisma.CategoryWhereUniqueInput | Prisma.CategoryWhereUniqueInput[] + disconnect?: Prisma.CategoryWhereUniqueInput | Prisma.CategoryWhereUniqueInput[] + delete?: Prisma.CategoryWhereUniqueInput | Prisma.CategoryWhereUniqueInput[] + connect?: Prisma.CategoryWhereUniqueInput | Prisma.CategoryWhereUniqueInput[] + update?: + | Prisma.CategoryUpdateWithWhereUniqueWithoutParentInput + | Prisma.CategoryUpdateWithWhereUniqueWithoutParentInput[] + updateMany?: + | Prisma.CategoryUpdateManyWithWhereWithoutParentInput + | Prisma.CategoryUpdateManyWithWhereWithoutParentInput[] + deleteMany?: Prisma.CategoryScalarWhereInput | Prisma.CategoryScalarWhereInput[] +} + +export type CategoryUncheckedUpdateManyWithoutParentNestedInput = { + create?: + | Prisma.XOR< + Prisma.CategoryCreateWithoutParentInput, + Prisma.CategoryUncheckedCreateWithoutParentInput + > + | Prisma.CategoryCreateWithoutParentInput[] + | Prisma.CategoryUncheckedCreateWithoutParentInput[] + connectOrCreate?: + | Prisma.CategoryCreateOrConnectWithoutParentInput + | Prisma.CategoryCreateOrConnectWithoutParentInput[] + upsert?: + | Prisma.CategoryUpsertWithWhereUniqueWithoutParentInput + | Prisma.CategoryUpsertWithWhereUniqueWithoutParentInput[] + createMany?: Prisma.CategoryCreateManyParentInputEnvelope + set?: Prisma.CategoryWhereUniqueInput | Prisma.CategoryWhereUniqueInput[] + disconnect?: Prisma.CategoryWhereUniqueInput | Prisma.CategoryWhereUniqueInput[] + delete?: Prisma.CategoryWhereUniqueInput | Prisma.CategoryWhereUniqueInput[] + connect?: Prisma.CategoryWhereUniqueInput | Prisma.CategoryWhereUniqueInput[] + update?: + | Prisma.CategoryUpdateWithWhereUniqueWithoutParentInput + | Prisma.CategoryUpdateWithWhereUniqueWithoutParentInput[] + updateMany?: + | Prisma.CategoryUpdateManyWithWhereWithoutParentInput + | Prisma.CategoryUpdateManyWithWhereWithoutParentInput[] + deleteMany?: Prisma.CategoryScalarWhereInput | Prisma.CategoryScalarWhereInput[] +} + +export type CategoryCreateNestedOneWithoutEquipmentsAsMainInput = { + create?: Prisma.XOR< + Prisma.CategoryCreateWithoutEquipmentsAsMainInput, + Prisma.CategoryUncheckedCreateWithoutEquipmentsAsMainInput + > + connectOrCreate?: Prisma.CategoryCreateOrConnectWithoutEquipmentsAsMainInput + connect?: Prisma.CategoryWhereUniqueInput +} + +export type CategoryCreateNestedOneWithoutEquipmentsAsSubInput = { + create?: Prisma.XOR< + Prisma.CategoryCreateWithoutEquipmentsAsSubInput, + Prisma.CategoryUncheckedCreateWithoutEquipmentsAsSubInput + > + connectOrCreate?: Prisma.CategoryCreateOrConnectWithoutEquipmentsAsSubInput + connect?: Prisma.CategoryWhereUniqueInput +} + +export type CategoryUpdateOneRequiredWithoutEquipmentsAsMainNestedInput = { + create?: Prisma.XOR< + Prisma.CategoryCreateWithoutEquipmentsAsMainInput, + Prisma.CategoryUncheckedCreateWithoutEquipmentsAsMainInput + > + connectOrCreate?: Prisma.CategoryCreateOrConnectWithoutEquipmentsAsMainInput + upsert?: Prisma.CategoryUpsertWithoutEquipmentsAsMainInput + connect?: Prisma.CategoryWhereUniqueInput + update?: Prisma.XOR< + Prisma.XOR< + Prisma.CategoryUpdateToOneWithWhereWithoutEquipmentsAsMainInput, + Prisma.CategoryUpdateWithoutEquipmentsAsMainInput + >, + Prisma.CategoryUncheckedUpdateWithoutEquipmentsAsMainInput + > +} + +export type CategoryUpdateOneWithoutEquipmentsAsSubNestedInput = { + create?: Prisma.XOR< + Prisma.CategoryCreateWithoutEquipmentsAsSubInput, + Prisma.CategoryUncheckedCreateWithoutEquipmentsAsSubInput + > + connectOrCreate?: Prisma.CategoryCreateOrConnectWithoutEquipmentsAsSubInput + upsert?: Prisma.CategoryUpsertWithoutEquipmentsAsSubInput + disconnect?: Prisma.CategoryWhereInput | boolean + delete?: Prisma.CategoryWhereInput | boolean + connect?: Prisma.CategoryWhereUniqueInput + update?: Prisma.XOR< + Prisma.XOR< + Prisma.CategoryUpdateToOneWithWhereWithoutEquipmentsAsSubInput, + Prisma.CategoryUpdateWithoutEquipmentsAsSubInput + >, + Prisma.CategoryUncheckedUpdateWithoutEquipmentsAsSubInput + > +} + +export type CategoryCreateWithoutSubCategoriesInput = { + id: string + name: string + createdAt?: Date | string + updatedAt?: Date | string + parent?: Prisma.CategoryCreateNestedOneWithoutSubCategoriesInput + equipmentsAsMain?: Prisma.EquipmentCreateNestedManyWithoutCategoryInput + equipmentsAsSub?: Prisma.EquipmentCreateNestedManyWithoutSubCategoryInput +} + +export type CategoryUncheckedCreateWithoutSubCategoriesInput = { + id: string + name: string + parentId?: string | null + createdAt?: Date | string + updatedAt?: Date | string + equipmentsAsMain?: Prisma.EquipmentUncheckedCreateNestedManyWithoutCategoryInput + equipmentsAsSub?: Prisma.EquipmentUncheckedCreateNestedManyWithoutSubCategoryInput +} + +export type CategoryCreateOrConnectWithoutSubCategoriesInput = { + where: Prisma.CategoryWhereUniqueInput + create: Prisma.XOR< + Prisma.CategoryCreateWithoutSubCategoriesInput, + Prisma.CategoryUncheckedCreateWithoutSubCategoriesInput + > +} + +export type CategoryCreateWithoutParentInput = { + id: string + name: string + createdAt?: Date | string + updatedAt?: Date | string + subCategories?: Prisma.CategoryCreateNestedManyWithoutParentInput + equipmentsAsMain?: Prisma.EquipmentCreateNestedManyWithoutCategoryInput + equipmentsAsSub?: Prisma.EquipmentCreateNestedManyWithoutSubCategoryInput +} + +export type CategoryUncheckedCreateWithoutParentInput = { + id: string + name: string + createdAt?: Date | string + updatedAt?: Date | string + subCategories?: Prisma.CategoryUncheckedCreateNestedManyWithoutParentInput + equipmentsAsMain?: Prisma.EquipmentUncheckedCreateNestedManyWithoutCategoryInput + equipmentsAsSub?: Prisma.EquipmentUncheckedCreateNestedManyWithoutSubCategoryInput +} + +export type CategoryCreateOrConnectWithoutParentInput = { + where: Prisma.CategoryWhereUniqueInput + create: Prisma.XOR< + Prisma.CategoryCreateWithoutParentInput, + Prisma.CategoryUncheckedCreateWithoutParentInput + > +} + +export type CategoryCreateManyParentInputEnvelope = { + data: Prisma.CategoryCreateManyParentInput | Prisma.CategoryCreateManyParentInput[] +} + +export type CategoryUpsertWithoutSubCategoriesInput = { + update: Prisma.XOR< + Prisma.CategoryUpdateWithoutSubCategoriesInput, + Prisma.CategoryUncheckedUpdateWithoutSubCategoriesInput + > + create: Prisma.XOR< + Prisma.CategoryCreateWithoutSubCategoriesInput, + Prisma.CategoryUncheckedCreateWithoutSubCategoriesInput + > + where?: Prisma.CategoryWhereInput +} + +export type CategoryUpdateToOneWithWhereWithoutSubCategoriesInput = { + where?: Prisma.CategoryWhereInput + data: Prisma.XOR< + Prisma.CategoryUpdateWithoutSubCategoriesInput, + Prisma.CategoryUncheckedUpdateWithoutSubCategoriesInput + > +} + +export type CategoryUpdateWithoutSubCategoriesInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + parent?: Prisma.CategoryUpdateOneWithoutSubCategoriesNestedInput + equipmentsAsMain?: Prisma.EquipmentUpdateManyWithoutCategoryNestedInput + equipmentsAsSub?: Prisma.EquipmentUpdateManyWithoutSubCategoryNestedInput +} + +export type CategoryUncheckedUpdateWithoutSubCategoriesInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + parentId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + equipmentsAsMain?: Prisma.EquipmentUncheckedUpdateManyWithoutCategoryNestedInput + equipmentsAsSub?: Prisma.EquipmentUncheckedUpdateManyWithoutSubCategoryNestedInput +} + +export type CategoryUpsertWithWhereUniqueWithoutParentInput = { + where: Prisma.CategoryWhereUniqueInput + update: Prisma.XOR< + Prisma.CategoryUpdateWithoutParentInput, + Prisma.CategoryUncheckedUpdateWithoutParentInput + > + create: Prisma.XOR< + Prisma.CategoryCreateWithoutParentInput, + Prisma.CategoryUncheckedCreateWithoutParentInput + > +} + +export type CategoryUpdateWithWhereUniqueWithoutParentInput = { + where: Prisma.CategoryWhereUniqueInput + data: Prisma.XOR< + Prisma.CategoryUpdateWithoutParentInput, + Prisma.CategoryUncheckedUpdateWithoutParentInput + > +} + +export type CategoryUpdateManyWithWhereWithoutParentInput = { + where: Prisma.CategoryScalarWhereInput + data: Prisma.XOR< + Prisma.CategoryUpdateManyMutationInput, + Prisma.CategoryUncheckedUpdateManyWithoutParentInput + > +} + +export type CategoryScalarWhereInput = { + AND?: Prisma.CategoryScalarWhereInput | Prisma.CategoryScalarWhereInput[] + OR?: Prisma.CategoryScalarWhereInput[] + NOT?: Prisma.CategoryScalarWhereInput | Prisma.CategoryScalarWhereInput[] + id?: Prisma.StringFilter<'Category'> | string + name?: Prisma.StringFilter<'Category'> | string + parentId?: Prisma.StringNullableFilter<'Category'> | string | null + createdAt?: Prisma.DateTimeFilter<'Category'> | Date | string + updatedAt?: Prisma.DateTimeFilter<'Category'> | Date | string +} + +export type CategoryCreateWithoutEquipmentsAsMainInput = { + id: string + name: string + createdAt?: Date | string + updatedAt?: Date | string + parent?: Prisma.CategoryCreateNestedOneWithoutSubCategoriesInput + subCategories?: Prisma.CategoryCreateNestedManyWithoutParentInput + equipmentsAsSub?: Prisma.EquipmentCreateNestedManyWithoutSubCategoryInput +} + +export type CategoryUncheckedCreateWithoutEquipmentsAsMainInput = { + id: string + name: string + parentId?: string | null + createdAt?: Date | string + updatedAt?: Date | string + subCategories?: Prisma.CategoryUncheckedCreateNestedManyWithoutParentInput + equipmentsAsSub?: Prisma.EquipmentUncheckedCreateNestedManyWithoutSubCategoryInput +} + +export type CategoryCreateOrConnectWithoutEquipmentsAsMainInput = { + where: Prisma.CategoryWhereUniqueInput + create: Prisma.XOR< + Prisma.CategoryCreateWithoutEquipmentsAsMainInput, + Prisma.CategoryUncheckedCreateWithoutEquipmentsAsMainInput + > +} + +export type CategoryCreateWithoutEquipmentsAsSubInput = { + id: string + name: string + createdAt?: Date | string + updatedAt?: Date | string + parent?: Prisma.CategoryCreateNestedOneWithoutSubCategoriesInput + subCategories?: Prisma.CategoryCreateNestedManyWithoutParentInput + equipmentsAsMain?: Prisma.EquipmentCreateNestedManyWithoutCategoryInput +} + +export type CategoryUncheckedCreateWithoutEquipmentsAsSubInput = { + id: string + name: string + parentId?: string | null + createdAt?: Date | string + updatedAt?: Date | string + subCategories?: Prisma.CategoryUncheckedCreateNestedManyWithoutParentInput + equipmentsAsMain?: Prisma.EquipmentUncheckedCreateNestedManyWithoutCategoryInput +} + +export type CategoryCreateOrConnectWithoutEquipmentsAsSubInput = { + where: Prisma.CategoryWhereUniqueInput + create: Prisma.XOR< + Prisma.CategoryCreateWithoutEquipmentsAsSubInput, + Prisma.CategoryUncheckedCreateWithoutEquipmentsAsSubInput + > +} + +export type CategoryUpsertWithoutEquipmentsAsMainInput = { + update: Prisma.XOR< + Prisma.CategoryUpdateWithoutEquipmentsAsMainInput, + Prisma.CategoryUncheckedUpdateWithoutEquipmentsAsMainInput + > + create: Prisma.XOR< + Prisma.CategoryCreateWithoutEquipmentsAsMainInput, + Prisma.CategoryUncheckedCreateWithoutEquipmentsAsMainInput + > + where?: Prisma.CategoryWhereInput +} + +export type CategoryUpdateToOneWithWhereWithoutEquipmentsAsMainInput = { + where?: Prisma.CategoryWhereInput + data: Prisma.XOR< + Prisma.CategoryUpdateWithoutEquipmentsAsMainInput, + Prisma.CategoryUncheckedUpdateWithoutEquipmentsAsMainInput + > +} + +export type CategoryUpdateWithoutEquipmentsAsMainInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + parent?: Prisma.CategoryUpdateOneWithoutSubCategoriesNestedInput + subCategories?: Prisma.CategoryUpdateManyWithoutParentNestedInput + equipmentsAsSub?: Prisma.EquipmentUpdateManyWithoutSubCategoryNestedInput +} + +export type CategoryUncheckedUpdateWithoutEquipmentsAsMainInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + parentId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + subCategories?: Prisma.CategoryUncheckedUpdateManyWithoutParentNestedInput + equipmentsAsSub?: Prisma.EquipmentUncheckedUpdateManyWithoutSubCategoryNestedInput +} + +export type CategoryUpsertWithoutEquipmentsAsSubInput = { + update: Prisma.XOR< + Prisma.CategoryUpdateWithoutEquipmentsAsSubInput, + Prisma.CategoryUncheckedUpdateWithoutEquipmentsAsSubInput + > + create: Prisma.XOR< + Prisma.CategoryCreateWithoutEquipmentsAsSubInput, + Prisma.CategoryUncheckedCreateWithoutEquipmentsAsSubInput + > + where?: Prisma.CategoryWhereInput +} + +export type CategoryUpdateToOneWithWhereWithoutEquipmentsAsSubInput = { + where?: Prisma.CategoryWhereInput + data: Prisma.XOR< + Prisma.CategoryUpdateWithoutEquipmentsAsSubInput, + Prisma.CategoryUncheckedUpdateWithoutEquipmentsAsSubInput + > +} + +export type CategoryUpdateWithoutEquipmentsAsSubInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + parent?: Prisma.CategoryUpdateOneWithoutSubCategoriesNestedInput + subCategories?: Prisma.CategoryUpdateManyWithoutParentNestedInput + equipmentsAsMain?: Prisma.EquipmentUpdateManyWithoutCategoryNestedInput +} + +export type CategoryUncheckedUpdateWithoutEquipmentsAsSubInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + parentId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + subCategories?: Prisma.CategoryUncheckedUpdateManyWithoutParentNestedInput + equipmentsAsMain?: Prisma.EquipmentUncheckedUpdateManyWithoutCategoryNestedInput +} + +export type CategoryCreateManyParentInput = { + id: string + name: string + createdAt?: Date | string + updatedAt?: Date | string +} + +export type CategoryUpdateWithoutParentInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + subCategories?: Prisma.CategoryUpdateManyWithoutParentNestedInput + equipmentsAsMain?: Prisma.EquipmentUpdateManyWithoutCategoryNestedInput + equipmentsAsSub?: Prisma.EquipmentUpdateManyWithoutSubCategoryNestedInput +} + +export type CategoryUncheckedUpdateWithoutParentInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + subCategories?: Prisma.CategoryUncheckedUpdateManyWithoutParentNestedInput + equipmentsAsMain?: Prisma.EquipmentUncheckedUpdateManyWithoutCategoryNestedInput + equipmentsAsSub?: Prisma.EquipmentUncheckedUpdateManyWithoutSubCategoryNestedInput +} + +export type CategoryUncheckedUpdateManyWithoutParentInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +/** + * Count Type CategoryCountOutputType + */ + +export type CategoryCountOutputType = { + subCategories: number + equipmentsAsMain: number + equipmentsAsSub: number +} + +export type CategoryCountOutputTypeSelect< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + subCategories?: boolean | CategoryCountOutputTypeCountSubCategoriesArgs + equipmentsAsMain?: boolean | CategoryCountOutputTypeCountEquipmentsAsMainArgs + equipmentsAsSub?: boolean | CategoryCountOutputTypeCountEquipmentsAsSubArgs +} + +/** + * CategoryCountOutputType without action + */ +export type CategoryCountOutputTypeDefaultArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the CategoryCountOutputType + */ + select?: Prisma.CategoryCountOutputTypeSelect | null +} + +/** + * CategoryCountOutputType without action + */ +export type CategoryCountOutputTypeCountSubCategoriesArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + where?: Prisma.CategoryWhereInput +} + +/** + * CategoryCountOutputType without action + */ +export type CategoryCountOutputTypeCountEquipmentsAsMainArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + where?: Prisma.EquipmentWhereInput +} + +/** + * CategoryCountOutputType without action + */ +export type CategoryCountOutputTypeCountEquipmentsAsSubArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + where?: Prisma.EquipmentWhereInput +} + +export type CategorySelect< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = runtime.Types.Extensions.GetSelect< + { + id?: boolean + name?: boolean + parentId?: boolean + createdAt?: boolean + updatedAt?: boolean + parent?: boolean | Prisma.Category$parentArgs + subCategories?: boolean | Prisma.Category$subCategoriesArgs + equipmentsAsMain?: boolean | Prisma.Category$equipmentsAsMainArgs + equipmentsAsSub?: boolean | Prisma.Category$equipmentsAsSubArgs + _count?: boolean | Prisma.CategoryCountOutputTypeDefaultArgs + }, + ExtArgs['result']['category'] +> + +export type CategorySelectCreateManyAndReturn< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = runtime.Types.Extensions.GetSelect< + { + id?: boolean + name?: boolean + parentId?: boolean + createdAt?: boolean + updatedAt?: boolean + parent?: boolean | Prisma.Category$parentArgs + }, + ExtArgs['result']['category'] +> + +export type CategorySelectUpdateManyAndReturn< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = runtime.Types.Extensions.GetSelect< + { + id?: boolean + name?: boolean + parentId?: boolean + createdAt?: boolean + updatedAt?: boolean + parent?: boolean | Prisma.Category$parentArgs + }, + ExtArgs['result']['category'] +> + +export type CategorySelectScalar = { + id?: boolean + name?: boolean + parentId?: boolean + createdAt?: boolean + updatedAt?: boolean +} + +export type CategoryOmit< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = runtime.Types.Extensions.GetOmit< + 'id' | 'name' | 'parentId' | 'createdAt' | 'updatedAt', + ExtArgs['result']['category'] +> +export type CategoryInclude< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + parent?: boolean | Prisma.Category$parentArgs + subCategories?: boolean | Prisma.Category$subCategoriesArgs + equipmentsAsMain?: boolean | Prisma.Category$equipmentsAsMainArgs + equipmentsAsSub?: boolean | Prisma.Category$equipmentsAsSubArgs + _count?: boolean | Prisma.CategoryCountOutputTypeDefaultArgs +} +export type CategoryIncludeCreateManyAndReturn< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + parent?: boolean | Prisma.Category$parentArgs +} +export type CategoryIncludeUpdateManyAndReturn< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + parent?: boolean | Prisma.Category$parentArgs +} + +export type $CategoryPayload< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + name: 'Category' + objects: { + parent: Prisma.$CategoryPayload | null + subCategories: Prisma.$CategoryPayload[] + equipmentsAsMain: Prisma.$EquipmentPayload[] + equipmentsAsSub: Prisma.$EquipmentPayload[] + } + scalars: runtime.Types.Extensions.GetPayloadResult< + { + id: string + name: string + parentId: string | null + createdAt: Date + updatedAt: Date + }, + ExtArgs['result']['category'] + > + composites: {} +} + +export type CategoryGetPayload = + runtime.Types.Result.GetResult + +export type CategoryCountArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = Omit & { + select?: CategoryCountAggregateInputType | true +} + +export interface CategoryDelegate< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, + GlobalOmitOptions = {}, +> { + [K: symbol]: { types: Prisma.TypeMap['model']['Category']; meta: { name: 'Category' } } + /** + * Find zero or one Category that matches the filter. + * @param {CategoryFindUniqueArgs} args - Arguments to find a Category + * @example + * // Get one Category + * const category = await prisma.category.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__CategoryClient< + runtime.Types.Result.GetResult< + Prisma.$CategoryPayload, + T, + 'findUnique', + GlobalOmitOptions + > | null, + null, + ExtArgs, + GlobalOmitOptions + > + + /** + * Find one Category that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {CategoryFindUniqueOrThrowArgs} args - Arguments to find a Category + * @example + * // Get one Category + * const category = await prisma.category.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__CategoryClient< + runtime.Types.Result.GetResult< + Prisma.$CategoryPayload, + T, + 'findUniqueOrThrow', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > + + /** + * Find the first Category 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 {CategoryFindFirstArgs} args - Arguments to find a Category + * @example + * // Get one Category + * const category = await prisma.category.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst( + args?: Prisma.SelectSubset>, + ): Prisma.Prisma__CategoryClient< + runtime.Types.Result.GetResult< + Prisma.$CategoryPayload, + T, + 'findFirst', + GlobalOmitOptions + > | null, + null, + ExtArgs, + GlobalOmitOptions + > + + /** + * Find the first Category 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 {CategoryFindFirstOrThrowArgs} args - Arguments to find a Category + * @example + * // Get one Category + * const category = await prisma.category.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow( + args?: Prisma.SelectSubset>, + ): Prisma.Prisma__CategoryClient< + runtime.Types.Result.GetResult< + Prisma.$CategoryPayload, + T, + 'findFirstOrThrow', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > + + /** + * Find zero or more Categories 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 {CategoryFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Categories + * const categories = await prisma.category.findMany() + * + * // Get first 10 Categories + * const categories = await prisma.category.findMany({ take: 10 }) + * + * // Only select the `id` + * const categoryWithIdOnly = await prisma.category.findMany({ select: { id: true } }) + * + */ + findMany( + args?: Prisma.SelectSubset>, + ): Prisma.PrismaPromise< + runtime.Types.Result.GetResult< + Prisma.$CategoryPayload, + T, + 'findMany', + GlobalOmitOptions + > + > + + /** + * Create a Category. + * @param {CategoryCreateArgs} args - Arguments to create a Category. + * @example + * // Create one Category + * const Category = await prisma.category.create({ + * data: { + * // ... data to create a Category + * } + * }) + * + */ + create( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__CategoryClient< + runtime.Types.Result.GetResult< + Prisma.$CategoryPayload, + T, + 'create', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > + + /** + * Create many Categories. + * @param {CategoryCreateManyArgs} args - Arguments to create many Categories. + * @example + * // Create many Categories + * const category = await prisma.category.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany( + args?: Prisma.SelectSubset>, + ): Prisma.PrismaPromise + + /** + * Create many Categories and returns the data saved in the database. + * @param {CategoryCreateManyAndReturnArgs} args - Arguments to create many Categories. + * @example + * // Create many Categories + * const category = await prisma.category.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Categories and only return the `id` + * const categoryWithIdOnly = await prisma.category.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< + runtime.Types.Result.GetResult< + Prisma.$CategoryPayload, + T, + 'createManyAndReturn', + GlobalOmitOptions + > + > + + /** + * Delete a Category. + * @param {CategoryDeleteArgs} args - Arguments to delete one Category. + * @example + * // Delete one Category + * const Category = await prisma.category.delete({ + * where: { + * // ... filter to delete one Category + * } + * }) + * + */ + delete( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__CategoryClient< + runtime.Types.Result.GetResult< + Prisma.$CategoryPayload, + T, + 'delete', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > + + /** + * Update one Category. + * @param {CategoryUpdateArgs} args - Arguments to update one Category. + * @example + * // Update one Category + * const category = await prisma.category.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__CategoryClient< + runtime.Types.Result.GetResult< + Prisma.$CategoryPayload, + T, + 'update', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > + + /** + * Delete zero or more Categories. + * @param {CategoryDeleteManyArgs} args - Arguments to filter Categories to delete. + * @example + * // Delete a few Categories + * const { count } = await prisma.category.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany( + args?: Prisma.SelectSubset>, + ): Prisma.PrismaPromise + + /** + * Update zero or more Categories. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CategoryUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Categories + * const category = await prisma.category.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany( + args: Prisma.SelectSubset>, + ): Prisma.PrismaPromise + + /** + * Update zero or more Categories and returns the data updated in the database. + * @param {CategoryUpdateManyAndReturnArgs} args - Arguments to update many Categories. + * @example + * // Update many Categories + * const category = await prisma.category.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more Categories and only return the `id` + * const categoryWithIdOnly = await prisma.category.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< + runtime.Types.Result.GetResult< + Prisma.$CategoryPayload, + T, + 'updateManyAndReturn', + GlobalOmitOptions + > + > + + /** + * Create or update one Category. + * @param {CategoryUpsertArgs} args - Arguments to update or create a Category. + * @example + * // Update or create a Category + * const category = await prisma.category.upsert({ + * create: { + * // ... data to create a Category + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Category we want to update + * } + * }) + */ + upsert( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__CategoryClient< + runtime.Types.Result.GetResult< + Prisma.$CategoryPayload, + T, + 'upsert', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > + + /** + * Count the number of Categories. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CategoryCountArgs} args - Arguments to filter Categories to count. + * @example + * // Count the number of Categories + * const count = await prisma.category.count({ + * where: { + * // ... the filter for the Categories 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 Category. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CategoryAggregateArgs} 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 Category. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CategoryGroupByArgs} 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 CategoryGroupByArgs, + HasSelectOrTake extends Prisma.Or< + Prisma.Extends<'skip', Prisma.Keys>, + Prisma.Extends<'take', Prisma.Keys> + >, + OrderByArg extends Prisma.True extends HasSelectOrTake + ? { orderBy: CategoryGroupByArgs['orderBy'] } + : { orderBy?: CategoryGroupByArgs['orderBy'] }, + OrderFields extends Prisma.ExcludeUnderscoreKeys< + Prisma.Keys> + >, + 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 ? GetCategoryGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the Category model + */ + readonly fields: CategoryFieldRefs +} + +/** + * The delegate class that acts as a "Promise-like" for Category. + * 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__CategoryClient< + T, + Null = never, + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, + GlobalOmitOptions = {}, +> extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: 'PrismaPromise' + parent = {}>( + args?: Prisma.Subset>, + ): Prisma.Prisma__CategoryClient< + runtime.Types.Result.GetResult< + Prisma.$CategoryPayload, + T, + 'findUniqueOrThrow', + GlobalOmitOptions + > | null, + null, + ExtArgs, + GlobalOmitOptions + > + subCategories = {}>( + args?: Prisma.Subset>, + ): Prisma.PrismaPromise< + | runtime.Types.Result.GetResult< + Prisma.$CategoryPayload, + T, + 'findMany', + GlobalOmitOptions + > + | Null + > + equipmentsAsMain = {}>( + args?: Prisma.Subset>, + ): Prisma.PrismaPromise< + | runtime.Types.Result.GetResult< + Prisma.$EquipmentPayload, + T, + 'findMany', + GlobalOmitOptions + > + | Null + > + equipmentsAsSub = {}>( + args?: Prisma.Subset>, + ): Prisma.PrismaPromise< + | runtime.Types.Result.GetResult< + Prisma.$EquipmentPayload, + 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 Category model + */ +export interface CategoryFieldRefs { + readonly id: Prisma.FieldRef<'Category', 'String'> + readonly name: Prisma.FieldRef<'Category', 'String'> + readonly parentId: Prisma.FieldRef<'Category', 'String'> + readonly createdAt: Prisma.FieldRef<'Category', 'DateTime'> + readonly updatedAt: Prisma.FieldRef<'Category', 'DateTime'> +} + +// Custom InputTypes +/** + * Category findUnique + */ +export type CategoryFindUniqueArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Category + */ + select?: Prisma.CategorySelect | null + /** + * Omit specific fields from the Category + */ + omit?: Prisma.CategoryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.CategoryInclude | null + /** + * Filter, which Category to fetch. + */ + where: Prisma.CategoryWhereUniqueInput +} + +/** + * Category findUniqueOrThrow + */ +export type CategoryFindUniqueOrThrowArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Category + */ + select?: Prisma.CategorySelect | null + /** + * Omit specific fields from the Category + */ + omit?: Prisma.CategoryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.CategoryInclude | null + /** + * Filter, which Category to fetch. + */ + where: Prisma.CategoryWhereUniqueInput +} + +/** + * Category findFirst + */ +export type CategoryFindFirstArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Category + */ + select?: Prisma.CategorySelect | null + /** + * Omit specific fields from the Category + */ + omit?: Prisma.CategoryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.CategoryInclude | null + /** + * Filter, which Category to fetch. + */ + where?: Prisma.CategoryWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Categories to fetch. + */ + orderBy?: Prisma.CategoryOrderByWithRelationInput | Prisma.CategoryOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Categories. + */ + cursor?: Prisma.CategoryWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Categories 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` Categories. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Categories. + */ + distinct?: Prisma.CategoryScalarFieldEnum | Prisma.CategoryScalarFieldEnum[] +} + +/** + * Category findFirstOrThrow + */ +export type CategoryFindFirstOrThrowArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Category + */ + select?: Prisma.CategorySelect | null + /** + * Omit specific fields from the Category + */ + omit?: Prisma.CategoryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.CategoryInclude | null + /** + * Filter, which Category to fetch. + */ + where?: Prisma.CategoryWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Categories to fetch. + */ + orderBy?: Prisma.CategoryOrderByWithRelationInput | Prisma.CategoryOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Categories. + */ + cursor?: Prisma.CategoryWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Categories 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` Categories. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Categories. + */ + distinct?: Prisma.CategoryScalarFieldEnum | Prisma.CategoryScalarFieldEnum[] +} + +/** + * Category findMany + */ +export type CategoryFindManyArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Category + */ + select?: Prisma.CategorySelect | null + /** + * Omit specific fields from the Category + */ + omit?: Prisma.CategoryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.CategoryInclude | null + /** + * Filter, which Categories to fetch. + */ + where?: Prisma.CategoryWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Categories to fetch. + */ + orderBy?: Prisma.CategoryOrderByWithRelationInput | Prisma.CategoryOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Categories. + */ + cursor?: Prisma.CategoryWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Categories 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` Categories. + */ + skip?: number + distinct?: Prisma.CategoryScalarFieldEnum | Prisma.CategoryScalarFieldEnum[] +} + +/** + * Category create + */ +export type CategoryCreateArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Category + */ + select?: Prisma.CategorySelect | null + /** + * Omit specific fields from the Category + */ + omit?: Prisma.CategoryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.CategoryInclude | null + /** + * The data needed to create a Category. + */ + data: Prisma.XOR +} + +/** + * Category createMany + */ +export type CategoryCreateManyArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * The data used to create many Categories. + */ + data: Prisma.CategoryCreateManyInput | Prisma.CategoryCreateManyInput[] +} + +/** + * Category createManyAndReturn + */ +export type CategoryCreateManyAndReturnArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Category + */ + select?: Prisma.CategorySelectCreateManyAndReturn | null + /** + * Omit specific fields from the Category + */ + omit?: Prisma.CategoryOmit | null + /** + * The data used to create many Categories. + */ + data: Prisma.CategoryCreateManyInput | Prisma.CategoryCreateManyInput[] + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.CategoryIncludeCreateManyAndReturn | null +} + +/** + * Category update + */ +export type CategoryUpdateArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Category + */ + select?: Prisma.CategorySelect | null + /** + * Omit specific fields from the Category + */ + omit?: Prisma.CategoryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.CategoryInclude | null + /** + * The data needed to update a Category. + */ + data: Prisma.XOR + /** + * Choose, which Category to update. + */ + where: Prisma.CategoryWhereUniqueInput +} + +/** + * Category updateMany + */ +export type CategoryUpdateManyArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * The data used to update Categories. + */ + data: Prisma.XOR + /** + * Filter which Categories to update + */ + where?: Prisma.CategoryWhereInput + /** + * Limit how many Categories to update. + */ + limit?: number +} + +/** + * Category updateManyAndReturn + */ +export type CategoryUpdateManyAndReturnArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Category + */ + select?: Prisma.CategorySelectUpdateManyAndReturn | null + /** + * Omit specific fields from the Category + */ + omit?: Prisma.CategoryOmit | null + /** + * The data used to update Categories. + */ + data: Prisma.XOR + /** + * Filter which Categories to update + */ + where?: Prisma.CategoryWhereInput + /** + * Limit how many Categories to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.CategoryIncludeUpdateManyAndReturn | null +} + +/** + * Category upsert + */ +export type CategoryUpsertArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Category + */ + select?: Prisma.CategorySelect | null + /** + * Omit specific fields from the Category + */ + omit?: Prisma.CategoryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.CategoryInclude | null + /** + * The filter to search for the Category to update in case it exists. + */ + where: Prisma.CategoryWhereUniqueInput + /** + * In case the Category found by the `where` argument doesn't exist, create a new Category with this data. + */ + create: Prisma.XOR + /** + * In case the Category was found with the provided `where` argument, update it with this data. + */ + update: Prisma.XOR +} + +/** + * Category delete + */ +export type CategoryDeleteArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Category + */ + select?: Prisma.CategorySelect | null + /** + * Omit specific fields from the Category + */ + omit?: Prisma.CategoryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.CategoryInclude | null + /** + * Filter which Category to delete. + */ + where: Prisma.CategoryWhereUniqueInput +} + +/** + * Category deleteMany + */ +export type CategoryDeleteManyArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Filter which Categories to delete + */ + where?: Prisma.CategoryWhereInput + /** + * Limit how many Categories to delete. + */ + limit?: number +} + +/** + * Category.parent + */ +export type Category$parentArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Category + */ + select?: Prisma.CategorySelect | null + /** + * Omit specific fields from the Category + */ + omit?: Prisma.CategoryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.CategoryInclude | null + where?: Prisma.CategoryWhereInput +} + +/** + * Category.subCategories + */ +export type Category$subCategoriesArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Category + */ + select?: Prisma.CategorySelect | null + /** + * Omit specific fields from the Category + */ + omit?: Prisma.CategoryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.CategoryInclude | null + where?: Prisma.CategoryWhereInput + orderBy?: Prisma.CategoryOrderByWithRelationInput | Prisma.CategoryOrderByWithRelationInput[] + cursor?: Prisma.CategoryWhereUniqueInput + take?: number + skip?: number + distinct?: Prisma.CategoryScalarFieldEnum | Prisma.CategoryScalarFieldEnum[] +} + +/** + * Category.equipmentsAsMain + */ +export type Category$equipmentsAsMainArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Equipment + */ + select?: Prisma.EquipmentSelect | null + /** + * Omit specific fields from the Equipment + */ + omit?: Prisma.EquipmentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.EquipmentInclude | null + where?: Prisma.EquipmentWhereInput + orderBy?: Prisma.EquipmentOrderByWithRelationInput | Prisma.EquipmentOrderByWithRelationInput[] + cursor?: Prisma.EquipmentWhereUniqueInput + take?: number + skip?: number + distinct?: Prisma.EquipmentScalarFieldEnum | Prisma.EquipmentScalarFieldEnum[] +} + +/** + * Category.equipmentsAsSub + */ +export type Category$equipmentsAsSubArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Equipment + */ + select?: Prisma.EquipmentSelect | null + /** + * Omit specific fields from the Equipment + */ + omit?: Prisma.EquipmentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.EquipmentInclude | null + where?: Prisma.EquipmentWhereInput + orderBy?: Prisma.EquipmentOrderByWithRelationInput | Prisma.EquipmentOrderByWithRelationInput[] + cursor?: Prisma.EquipmentWhereUniqueInput + take?: number + skip?: number + distinct?: Prisma.EquipmentScalarFieldEnum | Prisma.EquipmentScalarFieldEnum[] +} + +/** + * Category without action + */ +export type CategoryDefaultArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Category + */ + select?: Prisma.CategorySelect | null + /** + * Omit specific fields from the Category + */ + omit?: Prisma.CategoryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.CategoryInclude | null +} diff --git a/src/generated/prisma/models/Character.ts b/src/generated/prisma/models/Character.ts new file mode 100644 index 0000000..143a97f --- /dev/null +++ b/src/generated/prisma/models/Character.ts @@ -0,0 +1,1841 @@ +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * This file exports the `Character` 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.js' +import type * as Prisma from '../internal/prismaNamespace.js' + +/** + * Model Character + * + */ +export type CharacterModel = runtime.Types.Result.DefaultSelection + +export type AggregateCharacter = { + _count: CharacterCountAggregateOutputType | null + _min: CharacterMinAggregateOutputType | null + _max: CharacterMaxAggregateOutputType | null +} + +export type CharacterMinAggregateOutputType = { + id: string | null + name: string | null + description: string | null + imageId: string | null + createdAt: Date | null + updatedAt: Date | null +} + +export type CharacterMaxAggregateOutputType = { + id: string | null + name: string | null + description: string | null + imageId: string | null + createdAt: Date | null + updatedAt: Date | null +} + +export type CharacterCountAggregateOutputType = { + id: number + name: number + description: number + imageId: number + createdAt: number + updatedAt: number + _all: number +} + +export type CharacterMinAggregateInputType = { + id?: true + name?: true + description?: true + imageId?: true + createdAt?: true + updatedAt?: true +} + +export type CharacterMaxAggregateInputType = { + id?: true + name?: true + description?: true + imageId?: true + createdAt?: true + updatedAt?: true +} + +export type CharacterCountAggregateInputType = { + id?: true + name?: true + description?: true + imageId?: true + createdAt?: true + updatedAt?: true + _all?: true +} + +export type CharacterAggregateArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Filter which Character to aggregate. + */ + where?: Prisma.CharacterWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Characters to fetch. + */ + orderBy?: Prisma.CharacterOrderByWithRelationInput | Prisma.CharacterOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: Prisma.CharacterWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Characters 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` Characters. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Characters + **/ + _count?: true | CharacterCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: CharacterMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: CharacterMaxAggregateInputType +} + +export type GetCharacterAggregateType = { + [P in keyof T & keyof AggregateCharacter]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType +} + +export type CharacterGroupByArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + where?: Prisma.CharacterWhereInput + orderBy?: + | Prisma.CharacterOrderByWithAggregationInput + | Prisma.CharacterOrderByWithAggregationInput[] + by: Prisma.CharacterScalarFieldEnum[] | Prisma.CharacterScalarFieldEnum + having?: Prisma.CharacterScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: CharacterCountAggregateInputType | true + _min?: CharacterMinAggregateInputType + _max?: CharacterMaxAggregateInputType +} + +export type CharacterGroupByOutputType = { + id: string + name: string + description: string | null + imageId: string + createdAt: Date + updatedAt: Date + _count: CharacterCountAggregateOutputType | null + _min: CharacterMinAggregateOutputType | null + _max: CharacterMaxAggregateOutputType | null +} + +type GetCharacterGroupByPayload = Prisma.PrismaPromise< + Array< + Prisma.PickEnumerable & { + [P in keyof T & keyof CharacterGroupByOutputType]: P extends '_count' + ? T[P] extends boolean + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType + } + > +> + +export type CharacterWhereInput = { + AND?: Prisma.CharacterWhereInput | Prisma.CharacterWhereInput[] + OR?: Prisma.CharacterWhereInput[] + NOT?: Prisma.CharacterWhereInput | Prisma.CharacterWhereInput[] + id?: Prisma.StringFilter<'Character'> | string + name?: Prisma.StringFilter<'Character'> | string + description?: Prisma.StringNullableFilter<'Character'> | string | null + imageId?: Prisma.StringFilter<'Character'> | string + createdAt?: Prisma.DateTimeFilter<'Character'> | Date | string + updatedAt?: Prisma.DateTimeFilter<'Character'> | Date | string + image?: Prisma.XOR + generations?: Prisma.GenerationListRelationFilter +} + +export type CharacterOrderByWithRelationInput = { + id?: Prisma.SortOrder + name?: Prisma.SortOrder + description?: Prisma.SortOrderInput | Prisma.SortOrder + imageId?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + image?: Prisma.AssetOrderByWithRelationInput + generations?: Prisma.GenerationOrderByRelationAggregateInput +} + +export type CharacterWhereUniqueInput = Prisma.AtLeast< + { + id?: string + AND?: Prisma.CharacterWhereInput | Prisma.CharacterWhereInput[] + OR?: Prisma.CharacterWhereInput[] + NOT?: Prisma.CharacterWhereInput | Prisma.CharacterWhereInput[] + name?: Prisma.StringFilter<'Character'> | string + description?: Prisma.StringNullableFilter<'Character'> | string | null + imageId?: Prisma.StringFilter<'Character'> | string + createdAt?: Prisma.DateTimeFilter<'Character'> | Date | string + updatedAt?: Prisma.DateTimeFilter<'Character'> | Date | string + image?: Prisma.XOR + generations?: Prisma.GenerationListRelationFilter + }, + 'id' +> + +export type CharacterOrderByWithAggregationInput = { + id?: Prisma.SortOrder + name?: Prisma.SortOrder + description?: Prisma.SortOrderInput | Prisma.SortOrder + imageId?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + _count?: Prisma.CharacterCountOrderByAggregateInput + _max?: Prisma.CharacterMaxOrderByAggregateInput + _min?: Prisma.CharacterMinOrderByAggregateInput +} + +export type CharacterScalarWhereWithAggregatesInput = { + AND?: + | Prisma.CharacterScalarWhereWithAggregatesInput + | Prisma.CharacterScalarWhereWithAggregatesInput[] + OR?: Prisma.CharacterScalarWhereWithAggregatesInput[] + NOT?: + | Prisma.CharacterScalarWhereWithAggregatesInput + | Prisma.CharacterScalarWhereWithAggregatesInput[] + id?: Prisma.StringWithAggregatesFilter<'Character'> | string + name?: Prisma.StringWithAggregatesFilter<'Character'> | string + description?: Prisma.StringNullableWithAggregatesFilter<'Character'> | string | null + imageId?: Prisma.StringWithAggregatesFilter<'Character'> | string + createdAt?: Prisma.DateTimeWithAggregatesFilter<'Character'> | Date | string + updatedAt?: Prisma.DateTimeWithAggregatesFilter<'Character'> | Date | string +} + +export type CharacterCreateInput = { + id: string + name: string + description?: string | null + createdAt?: Date | string + updatedAt?: Date | string + image: Prisma.AssetCreateNestedOneWithoutCharactersInput + generations?: Prisma.GenerationCreateNestedManyWithoutCharacterInput +} + +export type CharacterUncheckedCreateInput = { + id: string + name: string + description?: string | null + imageId: string + createdAt?: Date | string + updatedAt?: Date | string + generations?: Prisma.GenerationUncheckedCreateNestedManyWithoutCharacterInput +} + +export type CharacterUpdateInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + image?: Prisma.AssetUpdateOneRequiredWithoutCharactersNestedInput + generations?: Prisma.GenerationUpdateManyWithoutCharacterNestedInput +} + +export type CharacterUncheckedUpdateInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + imageId?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + generations?: Prisma.GenerationUncheckedUpdateManyWithoutCharacterNestedInput +} + +export type CharacterCreateManyInput = { + id: string + name: string + description?: string | null + imageId: string + createdAt?: Date | string + updatedAt?: Date | string +} + +export type CharacterUpdateManyMutationInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type CharacterUncheckedUpdateManyInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + imageId?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type CharacterListRelationFilter = { + every?: Prisma.CharacterWhereInput + some?: Prisma.CharacterWhereInput + none?: Prisma.CharacterWhereInput +} + +export type CharacterOrderByRelationAggregateInput = { + _count?: Prisma.SortOrder +} + +export type CharacterCountOrderByAggregateInput = { + id?: Prisma.SortOrder + name?: Prisma.SortOrder + description?: Prisma.SortOrder + imageId?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder +} + +export type CharacterMaxOrderByAggregateInput = { + id?: Prisma.SortOrder + name?: Prisma.SortOrder + description?: Prisma.SortOrder + imageId?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder +} + +export type CharacterMinOrderByAggregateInput = { + id?: Prisma.SortOrder + name?: Prisma.SortOrder + description?: Prisma.SortOrder + imageId?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder +} + +export type CharacterScalarRelationFilter = { + is?: Prisma.CharacterWhereInput + isNot?: Prisma.CharacterWhereInput +} + +export type CharacterCreateNestedManyWithoutImageInput = { + create?: + | Prisma.XOR< + Prisma.CharacterCreateWithoutImageInput, + Prisma.CharacterUncheckedCreateWithoutImageInput + > + | Prisma.CharacterCreateWithoutImageInput[] + | Prisma.CharacterUncheckedCreateWithoutImageInput[] + connectOrCreate?: + | Prisma.CharacterCreateOrConnectWithoutImageInput + | Prisma.CharacterCreateOrConnectWithoutImageInput[] + createMany?: Prisma.CharacterCreateManyImageInputEnvelope + connect?: Prisma.CharacterWhereUniqueInput | Prisma.CharacterWhereUniqueInput[] +} + +export type CharacterUncheckedCreateNestedManyWithoutImageInput = { + create?: + | Prisma.XOR< + Prisma.CharacterCreateWithoutImageInput, + Prisma.CharacterUncheckedCreateWithoutImageInput + > + | Prisma.CharacterCreateWithoutImageInput[] + | Prisma.CharacterUncheckedCreateWithoutImageInput[] + connectOrCreate?: + | Prisma.CharacterCreateOrConnectWithoutImageInput + | Prisma.CharacterCreateOrConnectWithoutImageInput[] + createMany?: Prisma.CharacterCreateManyImageInputEnvelope + connect?: Prisma.CharacterWhereUniqueInput | Prisma.CharacterWhereUniqueInput[] +} + +export type CharacterUpdateManyWithoutImageNestedInput = { + create?: + | Prisma.XOR< + Prisma.CharacterCreateWithoutImageInput, + Prisma.CharacterUncheckedCreateWithoutImageInput + > + | Prisma.CharacterCreateWithoutImageInput[] + | Prisma.CharacterUncheckedCreateWithoutImageInput[] + connectOrCreate?: + | Prisma.CharacterCreateOrConnectWithoutImageInput + | Prisma.CharacterCreateOrConnectWithoutImageInput[] + upsert?: + | Prisma.CharacterUpsertWithWhereUniqueWithoutImageInput + | Prisma.CharacterUpsertWithWhereUniqueWithoutImageInput[] + createMany?: Prisma.CharacterCreateManyImageInputEnvelope + set?: Prisma.CharacterWhereUniqueInput | Prisma.CharacterWhereUniqueInput[] + disconnect?: Prisma.CharacterWhereUniqueInput | Prisma.CharacterWhereUniqueInput[] + delete?: Prisma.CharacterWhereUniqueInput | Prisma.CharacterWhereUniqueInput[] + connect?: Prisma.CharacterWhereUniqueInput | Prisma.CharacterWhereUniqueInput[] + update?: + | Prisma.CharacterUpdateWithWhereUniqueWithoutImageInput + | Prisma.CharacterUpdateWithWhereUniqueWithoutImageInput[] + updateMany?: + | Prisma.CharacterUpdateManyWithWhereWithoutImageInput + | Prisma.CharacterUpdateManyWithWhereWithoutImageInput[] + deleteMany?: Prisma.CharacterScalarWhereInput | Prisma.CharacterScalarWhereInput[] +} + +export type CharacterUncheckedUpdateManyWithoutImageNestedInput = { + create?: + | Prisma.XOR< + Prisma.CharacterCreateWithoutImageInput, + Prisma.CharacterUncheckedCreateWithoutImageInput + > + | Prisma.CharacterCreateWithoutImageInput[] + | Prisma.CharacterUncheckedCreateWithoutImageInput[] + connectOrCreate?: + | Prisma.CharacterCreateOrConnectWithoutImageInput + | Prisma.CharacterCreateOrConnectWithoutImageInput[] + upsert?: + | Prisma.CharacterUpsertWithWhereUniqueWithoutImageInput + | Prisma.CharacterUpsertWithWhereUniqueWithoutImageInput[] + createMany?: Prisma.CharacterCreateManyImageInputEnvelope + set?: Prisma.CharacterWhereUniqueInput | Prisma.CharacterWhereUniqueInput[] + disconnect?: Prisma.CharacterWhereUniqueInput | Prisma.CharacterWhereUniqueInput[] + delete?: Prisma.CharacterWhereUniqueInput | Prisma.CharacterWhereUniqueInput[] + connect?: Prisma.CharacterWhereUniqueInput | Prisma.CharacterWhereUniqueInput[] + update?: + | Prisma.CharacterUpdateWithWhereUniqueWithoutImageInput + | Prisma.CharacterUpdateWithWhereUniqueWithoutImageInput[] + updateMany?: + | Prisma.CharacterUpdateManyWithWhereWithoutImageInput + | Prisma.CharacterUpdateManyWithWhereWithoutImageInput[] + deleteMany?: Prisma.CharacterScalarWhereInput | Prisma.CharacterScalarWhereInput[] +} + +export type NullableStringFieldUpdateOperationsInput = { + set?: string | null +} + +export type CharacterCreateNestedOneWithoutGenerationsInput = { + create?: Prisma.XOR< + Prisma.CharacterCreateWithoutGenerationsInput, + Prisma.CharacterUncheckedCreateWithoutGenerationsInput + > + connectOrCreate?: Prisma.CharacterCreateOrConnectWithoutGenerationsInput + connect?: Prisma.CharacterWhereUniqueInput +} + +export type CharacterUpdateOneRequiredWithoutGenerationsNestedInput = { + create?: Prisma.XOR< + Prisma.CharacterCreateWithoutGenerationsInput, + Prisma.CharacterUncheckedCreateWithoutGenerationsInput + > + connectOrCreate?: Prisma.CharacterCreateOrConnectWithoutGenerationsInput + upsert?: Prisma.CharacterUpsertWithoutGenerationsInput + connect?: Prisma.CharacterWhereUniqueInput + update?: Prisma.XOR< + Prisma.XOR< + Prisma.CharacterUpdateToOneWithWhereWithoutGenerationsInput, + Prisma.CharacterUpdateWithoutGenerationsInput + >, + Prisma.CharacterUncheckedUpdateWithoutGenerationsInput + > +} + +export type CharacterCreateWithoutImageInput = { + id: string + name: string + description?: string | null + createdAt?: Date | string + updatedAt?: Date | string + generations?: Prisma.GenerationCreateNestedManyWithoutCharacterInput +} + +export type CharacterUncheckedCreateWithoutImageInput = { + id: string + name: string + description?: string | null + createdAt?: Date | string + updatedAt?: Date | string + generations?: Prisma.GenerationUncheckedCreateNestedManyWithoutCharacterInput +} + +export type CharacterCreateOrConnectWithoutImageInput = { + where: Prisma.CharacterWhereUniqueInput + create: Prisma.XOR< + Prisma.CharacterCreateWithoutImageInput, + Prisma.CharacterUncheckedCreateWithoutImageInput + > +} + +export type CharacterCreateManyImageInputEnvelope = { + data: Prisma.CharacterCreateManyImageInput | Prisma.CharacterCreateManyImageInput[] +} + +export type CharacterUpsertWithWhereUniqueWithoutImageInput = { + where: Prisma.CharacterWhereUniqueInput + update: Prisma.XOR< + Prisma.CharacterUpdateWithoutImageInput, + Prisma.CharacterUncheckedUpdateWithoutImageInput + > + create: Prisma.XOR< + Prisma.CharacterCreateWithoutImageInput, + Prisma.CharacterUncheckedCreateWithoutImageInput + > +} + +export type CharacterUpdateWithWhereUniqueWithoutImageInput = { + where: Prisma.CharacterWhereUniqueInput + data: Prisma.XOR< + Prisma.CharacterUpdateWithoutImageInput, + Prisma.CharacterUncheckedUpdateWithoutImageInput + > +} + +export type CharacterUpdateManyWithWhereWithoutImageInput = { + where: Prisma.CharacterScalarWhereInput + data: Prisma.XOR< + Prisma.CharacterUpdateManyMutationInput, + Prisma.CharacterUncheckedUpdateManyWithoutImageInput + > +} + +export type CharacterScalarWhereInput = { + AND?: Prisma.CharacterScalarWhereInput | Prisma.CharacterScalarWhereInput[] + OR?: Prisma.CharacterScalarWhereInput[] + NOT?: Prisma.CharacterScalarWhereInput | Prisma.CharacterScalarWhereInput[] + id?: Prisma.StringFilter<'Character'> | string + name?: Prisma.StringFilter<'Character'> | string + description?: Prisma.StringNullableFilter<'Character'> | string | null + imageId?: Prisma.StringFilter<'Character'> | string + createdAt?: Prisma.DateTimeFilter<'Character'> | Date | string + updatedAt?: Prisma.DateTimeFilter<'Character'> | Date | string +} + +export type CharacterCreateWithoutGenerationsInput = { + id: string + name: string + description?: string | null + createdAt?: Date | string + updatedAt?: Date | string + image: Prisma.AssetCreateNestedOneWithoutCharactersInput +} + +export type CharacterUncheckedCreateWithoutGenerationsInput = { + id: string + name: string + description?: string | null + imageId: string + createdAt?: Date | string + updatedAt?: Date | string +} + +export type CharacterCreateOrConnectWithoutGenerationsInput = { + where: Prisma.CharacterWhereUniqueInput + create: Prisma.XOR< + Prisma.CharacterCreateWithoutGenerationsInput, + Prisma.CharacterUncheckedCreateWithoutGenerationsInput + > +} + +export type CharacterUpsertWithoutGenerationsInput = { + update: Prisma.XOR< + Prisma.CharacterUpdateWithoutGenerationsInput, + Prisma.CharacterUncheckedUpdateWithoutGenerationsInput + > + create: Prisma.XOR< + Prisma.CharacterCreateWithoutGenerationsInput, + Prisma.CharacterUncheckedCreateWithoutGenerationsInput + > + where?: Prisma.CharacterWhereInput +} + +export type CharacterUpdateToOneWithWhereWithoutGenerationsInput = { + where?: Prisma.CharacterWhereInput + data: Prisma.XOR< + Prisma.CharacterUpdateWithoutGenerationsInput, + Prisma.CharacterUncheckedUpdateWithoutGenerationsInput + > +} + +export type CharacterUpdateWithoutGenerationsInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + image?: Prisma.AssetUpdateOneRequiredWithoutCharactersNestedInput +} + +export type CharacterUncheckedUpdateWithoutGenerationsInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + imageId?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type CharacterCreateManyImageInput = { + id: string + name: string + description?: string | null + createdAt?: Date | string + updatedAt?: Date | string +} + +export type CharacterUpdateWithoutImageInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + generations?: Prisma.GenerationUpdateManyWithoutCharacterNestedInput +} + +export type CharacterUncheckedUpdateWithoutImageInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + generations?: Prisma.GenerationUncheckedUpdateManyWithoutCharacterNestedInput +} + +export type CharacterUncheckedUpdateManyWithoutImageInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +/** + * Count Type CharacterCountOutputType + */ + +export type CharacterCountOutputType = { + generations: number +} + +export type CharacterCountOutputTypeSelect< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + generations?: boolean | CharacterCountOutputTypeCountGenerationsArgs +} + +/** + * CharacterCountOutputType without action + */ +export type CharacterCountOutputTypeDefaultArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the CharacterCountOutputType + */ + select?: Prisma.CharacterCountOutputTypeSelect | null +} + +/** + * CharacterCountOutputType without action + */ +export type CharacterCountOutputTypeCountGenerationsArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + where?: Prisma.GenerationWhereInput +} + +export type CharacterSelect< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = runtime.Types.Extensions.GetSelect< + { + id?: boolean + name?: boolean + description?: boolean + imageId?: boolean + createdAt?: boolean + updatedAt?: boolean + image?: boolean | Prisma.AssetDefaultArgs + generations?: boolean | Prisma.Character$generationsArgs + _count?: boolean | Prisma.CharacterCountOutputTypeDefaultArgs + }, + ExtArgs['result']['character'] +> + +export type CharacterSelectCreateManyAndReturn< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = runtime.Types.Extensions.GetSelect< + { + id?: boolean + name?: boolean + description?: boolean + imageId?: boolean + createdAt?: boolean + updatedAt?: boolean + image?: boolean | Prisma.AssetDefaultArgs + }, + ExtArgs['result']['character'] +> + +export type CharacterSelectUpdateManyAndReturn< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = runtime.Types.Extensions.GetSelect< + { + id?: boolean + name?: boolean + description?: boolean + imageId?: boolean + createdAt?: boolean + updatedAt?: boolean + image?: boolean | Prisma.AssetDefaultArgs + }, + ExtArgs['result']['character'] +> + +export type CharacterSelectScalar = { + id?: boolean + name?: boolean + description?: boolean + imageId?: boolean + createdAt?: boolean + updatedAt?: boolean +} + +export type CharacterOmit< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = runtime.Types.Extensions.GetOmit< + 'id' | 'name' | 'description' | 'imageId' | 'createdAt' | 'updatedAt', + ExtArgs['result']['character'] +> +export type CharacterInclude< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + image?: boolean | Prisma.AssetDefaultArgs + generations?: boolean | Prisma.Character$generationsArgs + _count?: boolean | Prisma.CharacterCountOutputTypeDefaultArgs +} +export type CharacterIncludeCreateManyAndReturn< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + image?: boolean | Prisma.AssetDefaultArgs +} +export type CharacterIncludeUpdateManyAndReturn< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + image?: boolean | Prisma.AssetDefaultArgs +} + +export type $CharacterPayload< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + name: 'Character' + objects: { + image: Prisma.$AssetPayload + generations: Prisma.$GenerationPayload[] + } + scalars: runtime.Types.Extensions.GetPayloadResult< + { + id: string + name: string + description: string | null + imageId: string + createdAt: Date + updatedAt: Date + }, + ExtArgs['result']['character'] + > + composites: {} +} + +export type CharacterGetPayload = + runtime.Types.Result.GetResult + +export type CharacterCountArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = Omit & { + select?: CharacterCountAggregateInputType | true +} + +export interface CharacterDelegate< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, + GlobalOmitOptions = {}, +> { + [K: symbol]: { types: Prisma.TypeMap['model']['Character']; meta: { name: 'Character' } } + /** + * Find zero or one Character that matches the filter. + * @param {CharacterFindUniqueArgs} args - Arguments to find a Character + * @example + * // Get one Character + * const character = await prisma.character.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__CharacterClient< + runtime.Types.Result.GetResult< + Prisma.$CharacterPayload, + T, + 'findUnique', + GlobalOmitOptions + > | null, + null, + ExtArgs, + GlobalOmitOptions + > + + /** + * Find one Character that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {CharacterFindUniqueOrThrowArgs} args - Arguments to find a Character + * @example + * // Get one Character + * const character = await prisma.character.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__CharacterClient< + runtime.Types.Result.GetResult< + Prisma.$CharacterPayload, + T, + 'findUniqueOrThrow', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > + + /** + * Find the first Character 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 {CharacterFindFirstArgs} args - Arguments to find a Character + * @example + * // Get one Character + * const character = await prisma.character.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst( + args?: Prisma.SelectSubset>, + ): Prisma.Prisma__CharacterClient< + runtime.Types.Result.GetResult< + Prisma.$CharacterPayload, + T, + 'findFirst', + GlobalOmitOptions + > | null, + null, + ExtArgs, + GlobalOmitOptions + > + + /** + * Find the first Character 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 {CharacterFindFirstOrThrowArgs} args - Arguments to find a Character + * @example + * // Get one Character + * const character = await prisma.character.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow( + args?: Prisma.SelectSubset>, + ): Prisma.Prisma__CharacterClient< + runtime.Types.Result.GetResult< + Prisma.$CharacterPayload, + T, + 'findFirstOrThrow', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > + + /** + * Find zero or more Characters 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 {CharacterFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Characters + * const characters = await prisma.character.findMany() + * + * // Get first 10 Characters + * const characters = await prisma.character.findMany({ take: 10 }) + * + * // Only select the `id` + * const characterWithIdOnly = await prisma.character.findMany({ select: { id: true } }) + * + */ + findMany( + args?: Prisma.SelectSubset>, + ): Prisma.PrismaPromise< + runtime.Types.Result.GetResult< + Prisma.$CharacterPayload, + T, + 'findMany', + GlobalOmitOptions + > + > + + /** + * Create a Character. + * @param {CharacterCreateArgs} args - Arguments to create a Character. + * @example + * // Create one Character + * const Character = await prisma.character.create({ + * data: { + * // ... data to create a Character + * } + * }) + * + */ + create( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__CharacterClient< + runtime.Types.Result.GetResult< + Prisma.$CharacterPayload, + T, + 'create', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > + + /** + * Create many Characters. + * @param {CharacterCreateManyArgs} args - Arguments to create many Characters. + * @example + * // Create many Characters + * const character = await prisma.character.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany( + args?: Prisma.SelectSubset>, + ): Prisma.PrismaPromise + + /** + * Create many Characters and returns the data saved in the database. + * @param {CharacterCreateManyAndReturnArgs} args - Arguments to create many Characters. + * @example + * // Create many Characters + * const character = await prisma.character.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Characters and only return the `id` + * const characterWithIdOnly = await prisma.character.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< + runtime.Types.Result.GetResult< + Prisma.$CharacterPayload, + T, + 'createManyAndReturn', + GlobalOmitOptions + > + > + + /** + * Delete a Character. + * @param {CharacterDeleteArgs} args - Arguments to delete one Character. + * @example + * // Delete one Character + * const Character = await prisma.character.delete({ + * where: { + * // ... filter to delete one Character + * } + * }) + * + */ + delete( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__CharacterClient< + runtime.Types.Result.GetResult< + Prisma.$CharacterPayload, + T, + 'delete', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > + + /** + * Update one Character. + * @param {CharacterUpdateArgs} args - Arguments to update one Character. + * @example + * // Update one Character + * const character = await prisma.character.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__CharacterClient< + runtime.Types.Result.GetResult< + Prisma.$CharacterPayload, + T, + 'update', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > + + /** + * Delete zero or more Characters. + * @param {CharacterDeleteManyArgs} args - Arguments to filter Characters to delete. + * @example + * // Delete a few Characters + * const { count } = await prisma.character.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany( + args?: Prisma.SelectSubset>, + ): Prisma.PrismaPromise + + /** + * Update zero or more Characters. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CharacterUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Characters + * const character = await prisma.character.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany( + args: Prisma.SelectSubset>, + ): Prisma.PrismaPromise + + /** + * Update zero or more Characters and returns the data updated in the database. + * @param {CharacterUpdateManyAndReturnArgs} args - Arguments to update many Characters. + * @example + * // Update many Characters + * const character = await prisma.character.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more Characters and only return the `id` + * const characterWithIdOnly = await prisma.character.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< + runtime.Types.Result.GetResult< + Prisma.$CharacterPayload, + T, + 'updateManyAndReturn', + GlobalOmitOptions + > + > + + /** + * Create or update one Character. + * @param {CharacterUpsertArgs} args - Arguments to update or create a Character. + * @example + * // Update or create a Character + * const character = await prisma.character.upsert({ + * create: { + * // ... data to create a Character + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Character we want to update + * } + * }) + */ + upsert( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__CharacterClient< + runtime.Types.Result.GetResult< + Prisma.$CharacterPayload, + T, + 'upsert', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > + + /** + * Count the number of Characters. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CharacterCountArgs} args - Arguments to filter Characters to count. + * @example + * // Count the number of Characters + * const count = await prisma.character.count({ + * where: { + * // ... the filter for the Characters 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 Character. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CharacterAggregateArgs} 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 Character. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CharacterGroupByArgs} 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 CharacterGroupByArgs, + HasSelectOrTake extends Prisma.Or< + Prisma.Extends<'skip', Prisma.Keys>, + Prisma.Extends<'take', Prisma.Keys> + >, + OrderByArg extends Prisma.True extends HasSelectOrTake + ? { orderBy: CharacterGroupByArgs['orderBy'] } + : { orderBy?: CharacterGroupByArgs['orderBy'] }, + OrderFields extends Prisma.ExcludeUnderscoreKeys< + Prisma.Keys> + >, + 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 ? GetCharacterGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the Character model + */ + readonly fields: CharacterFieldRefs +} + +/** + * The delegate class that acts as a "Promise-like" for Character. + * 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__CharacterClient< + T, + Null = never, + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, + GlobalOmitOptions = {}, +> extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: 'PrismaPromise' + image = {}>( + args?: Prisma.Subset>, + ): Prisma.Prisma__AssetClient< + | runtime.Types.Result.GetResult< + Prisma.$AssetPayload, + T, + 'findUniqueOrThrow', + GlobalOmitOptions + > + | Null, + Null, + ExtArgs, + GlobalOmitOptions + > + generations = {}>( + args?: Prisma.Subset>, + ): Prisma.PrismaPromise< + | runtime.Types.Result.GetResult< + Prisma.$GenerationPayload, + 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 Character model + */ +export interface CharacterFieldRefs { + readonly id: Prisma.FieldRef<'Character', 'String'> + readonly name: Prisma.FieldRef<'Character', 'String'> + readonly description: Prisma.FieldRef<'Character', 'String'> + readonly imageId: Prisma.FieldRef<'Character', 'String'> + readonly createdAt: Prisma.FieldRef<'Character', 'DateTime'> + readonly updatedAt: Prisma.FieldRef<'Character', 'DateTime'> +} + +// Custom InputTypes +/** + * Character findUnique + */ +export type CharacterFindUniqueArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Character + */ + select?: Prisma.CharacterSelect | null + /** + * Omit specific fields from the Character + */ + omit?: Prisma.CharacterOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.CharacterInclude | null + /** + * Filter, which Character to fetch. + */ + where: Prisma.CharacterWhereUniqueInput +} + +/** + * Character findUniqueOrThrow + */ +export type CharacterFindUniqueOrThrowArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Character + */ + select?: Prisma.CharacterSelect | null + /** + * Omit specific fields from the Character + */ + omit?: Prisma.CharacterOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.CharacterInclude | null + /** + * Filter, which Character to fetch. + */ + where: Prisma.CharacterWhereUniqueInput +} + +/** + * Character findFirst + */ +export type CharacterFindFirstArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Character + */ + select?: Prisma.CharacterSelect | null + /** + * Omit specific fields from the Character + */ + omit?: Prisma.CharacterOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.CharacterInclude | null + /** + * Filter, which Character to fetch. + */ + where?: Prisma.CharacterWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Characters to fetch. + */ + orderBy?: Prisma.CharacterOrderByWithRelationInput | Prisma.CharacterOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Characters. + */ + cursor?: Prisma.CharacterWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Characters 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` Characters. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Characters. + */ + distinct?: Prisma.CharacterScalarFieldEnum | Prisma.CharacterScalarFieldEnum[] +} + +/** + * Character findFirstOrThrow + */ +export type CharacterFindFirstOrThrowArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Character + */ + select?: Prisma.CharacterSelect | null + /** + * Omit specific fields from the Character + */ + omit?: Prisma.CharacterOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.CharacterInclude | null + /** + * Filter, which Character to fetch. + */ + where?: Prisma.CharacterWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Characters to fetch. + */ + orderBy?: Prisma.CharacterOrderByWithRelationInput | Prisma.CharacterOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Characters. + */ + cursor?: Prisma.CharacterWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Characters 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` Characters. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Characters. + */ + distinct?: Prisma.CharacterScalarFieldEnum | Prisma.CharacterScalarFieldEnum[] +} + +/** + * Character findMany + */ +export type CharacterFindManyArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Character + */ + select?: Prisma.CharacterSelect | null + /** + * Omit specific fields from the Character + */ + omit?: Prisma.CharacterOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.CharacterInclude | null + /** + * Filter, which Characters to fetch. + */ + where?: Prisma.CharacterWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Characters to fetch. + */ + orderBy?: Prisma.CharacterOrderByWithRelationInput | Prisma.CharacterOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Characters. + */ + cursor?: Prisma.CharacterWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Characters 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` Characters. + */ + skip?: number + distinct?: Prisma.CharacterScalarFieldEnum | Prisma.CharacterScalarFieldEnum[] +} + +/** + * Character create + */ +export type CharacterCreateArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Character + */ + select?: Prisma.CharacterSelect | null + /** + * Omit specific fields from the Character + */ + omit?: Prisma.CharacterOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.CharacterInclude | null + /** + * The data needed to create a Character. + */ + data: Prisma.XOR +} + +/** + * Character createMany + */ +export type CharacterCreateManyArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * The data used to create many Characters. + */ + data: Prisma.CharacterCreateManyInput | Prisma.CharacterCreateManyInput[] +} + +/** + * Character createManyAndReturn + */ +export type CharacterCreateManyAndReturnArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Character + */ + select?: Prisma.CharacterSelectCreateManyAndReturn | null + /** + * Omit specific fields from the Character + */ + omit?: Prisma.CharacterOmit | null + /** + * The data used to create many Characters. + */ + data: Prisma.CharacterCreateManyInput | Prisma.CharacterCreateManyInput[] + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.CharacterIncludeCreateManyAndReturn | null +} + +/** + * Character update + */ +export type CharacterUpdateArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Character + */ + select?: Prisma.CharacterSelect | null + /** + * Omit specific fields from the Character + */ + omit?: Prisma.CharacterOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.CharacterInclude | null + /** + * The data needed to update a Character. + */ + data: Prisma.XOR + /** + * Choose, which Character to update. + */ + where: Prisma.CharacterWhereUniqueInput +} + +/** + * Character updateMany + */ +export type CharacterUpdateManyArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * The data used to update Characters. + */ + data: Prisma.XOR< + Prisma.CharacterUpdateManyMutationInput, + Prisma.CharacterUncheckedUpdateManyInput + > + /** + * Filter which Characters to update + */ + where?: Prisma.CharacterWhereInput + /** + * Limit how many Characters to update. + */ + limit?: number +} + +/** + * Character updateManyAndReturn + */ +export type CharacterUpdateManyAndReturnArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Character + */ + select?: Prisma.CharacterSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the Character + */ + omit?: Prisma.CharacterOmit | null + /** + * The data used to update Characters. + */ + data: Prisma.XOR< + Prisma.CharacterUpdateManyMutationInput, + Prisma.CharacterUncheckedUpdateManyInput + > + /** + * Filter which Characters to update + */ + where?: Prisma.CharacterWhereInput + /** + * Limit how many Characters to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.CharacterIncludeUpdateManyAndReturn | null +} + +/** + * Character upsert + */ +export type CharacterUpsertArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Character + */ + select?: Prisma.CharacterSelect | null + /** + * Omit specific fields from the Character + */ + omit?: Prisma.CharacterOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.CharacterInclude | null + /** + * The filter to search for the Character to update in case it exists. + */ + where: Prisma.CharacterWhereUniqueInput + /** + * In case the Character found by the `where` argument doesn't exist, create a new Character with this data. + */ + create: Prisma.XOR + /** + * In case the Character was found with the provided `where` argument, update it with this data. + */ + update: Prisma.XOR +} + +/** + * Character delete + */ +export type CharacterDeleteArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Character + */ + select?: Prisma.CharacterSelect | null + /** + * Omit specific fields from the Character + */ + omit?: Prisma.CharacterOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.CharacterInclude | null + /** + * Filter which Character to delete. + */ + where: Prisma.CharacterWhereUniqueInput +} + +/** + * Character deleteMany + */ +export type CharacterDeleteManyArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Filter which Characters to delete + */ + where?: Prisma.CharacterWhereInput + /** + * Limit how many Characters to delete. + */ + limit?: number +} + +/** + * Character.generations + */ +export type Character$generationsArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Generation + */ + select?: Prisma.GenerationSelect | null + /** + * Omit specific fields from the Generation + */ + omit?: Prisma.GenerationOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GenerationInclude | null + where?: Prisma.GenerationWhereInput + orderBy?: Prisma.GenerationOrderByWithRelationInput | Prisma.GenerationOrderByWithRelationInput[] + cursor?: Prisma.GenerationWhereUniqueInput + take?: number + skip?: number + distinct?: Prisma.GenerationScalarFieldEnum | Prisma.GenerationScalarFieldEnum[] +} + +/** + * Character without action + */ +export type CharacterDefaultArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Character + */ + select?: Prisma.CharacterSelect | null + /** + * Omit specific fields from the Character + */ + omit?: Prisma.CharacterOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.CharacterInclude | null +} diff --git a/src/generated/prisma/models/Equipment.ts b/src/generated/prisma/models/Equipment.ts new file mode 100644 index 0000000..97b720c --- /dev/null +++ b/src/generated/prisma/models/Equipment.ts @@ -0,0 +1,2376 @@ +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * This file exports the `Equipment` 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.js' +import type * as Prisma from '../internal/prismaNamespace.js' + +/** + * Model Equipment + * + */ +export type EquipmentModel = runtime.Types.Result.DefaultSelection + +export type AggregateEquipment = { + _count: EquipmentCountAggregateOutputType | null + _min: EquipmentMinAggregateOutputType | null + _max: EquipmentMaxAggregateOutputType | null +} + +export type EquipmentMinAggregateOutputType = { + id: string | null + name: string | null + description: string | null + categoryId: string | null + subCategoryId: string | null + imageId: string | null + createdAt: Date | null + updatedAt: Date | null +} + +export type EquipmentMaxAggregateOutputType = { + id: string | null + name: string | null + description: string | null + categoryId: string | null + subCategoryId: string | null + imageId: string | null + createdAt: Date | null + updatedAt: Date | null +} + +export type EquipmentCountAggregateOutputType = { + id: number + name: number + description: number + categoryId: number + subCategoryId: number + imageId: number + createdAt: number + updatedAt: number + _all: number +} + +export type EquipmentMinAggregateInputType = { + id?: true + name?: true + description?: true + categoryId?: true + subCategoryId?: true + imageId?: true + createdAt?: true + updatedAt?: true +} + +export type EquipmentMaxAggregateInputType = { + id?: true + name?: true + description?: true + categoryId?: true + subCategoryId?: true + imageId?: true + createdAt?: true + updatedAt?: true +} + +export type EquipmentCountAggregateInputType = { + id?: true + name?: true + description?: true + categoryId?: true + subCategoryId?: true + imageId?: true + createdAt?: true + updatedAt?: true + _all?: true +} + +export type EquipmentAggregateArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Filter which Equipment to aggregate. + */ + where?: Prisma.EquipmentWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Equipment to fetch. + */ + orderBy?: Prisma.EquipmentOrderByWithRelationInput | Prisma.EquipmentOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: Prisma.EquipmentWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Equipment 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` Equipment. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Equipment + **/ + _count?: true | EquipmentCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: EquipmentMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: EquipmentMaxAggregateInputType +} + +export type GetEquipmentAggregateType = { + [P in keyof T & keyof AggregateEquipment]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType +} + +export type EquipmentGroupByArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + where?: Prisma.EquipmentWhereInput + orderBy?: + | Prisma.EquipmentOrderByWithAggregationInput + | Prisma.EquipmentOrderByWithAggregationInput[] + by: Prisma.EquipmentScalarFieldEnum[] | Prisma.EquipmentScalarFieldEnum + having?: Prisma.EquipmentScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: EquipmentCountAggregateInputType | true + _min?: EquipmentMinAggregateInputType + _max?: EquipmentMaxAggregateInputType +} + +export type EquipmentGroupByOutputType = { + id: string + name: string + description: string + categoryId: string + subCategoryId: string | null + imageId: string + createdAt: Date + updatedAt: Date + _count: EquipmentCountAggregateOutputType | null + _min: EquipmentMinAggregateOutputType | null + _max: EquipmentMaxAggregateOutputType | null +} + +type GetEquipmentGroupByPayload = Prisma.PrismaPromise< + Array< + Prisma.PickEnumerable & { + [P in keyof T & keyof EquipmentGroupByOutputType]: P extends '_count' + ? T[P] extends boolean + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType + } + > +> + +export type EquipmentWhereInput = { + AND?: Prisma.EquipmentWhereInput | Prisma.EquipmentWhereInput[] + OR?: Prisma.EquipmentWhereInput[] + NOT?: Prisma.EquipmentWhereInput | Prisma.EquipmentWhereInput[] + id?: Prisma.StringFilter<'Equipment'> | string + name?: Prisma.StringFilter<'Equipment'> | string + description?: Prisma.StringFilter<'Equipment'> | string + categoryId?: Prisma.StringFilter<'Equipment'> | string + subCategoryId?: Prisma.StringNullableFilter<'Equipment'> | string | null + imageId?: Prisma.StringFilter<'Equipment'> | string + createdAt?: Prisma.DateTimeFilter<'Equipment'> | Date | string + updatedAt?: Prisma.DateTimeFilter<'Equipment'> | Date | string + category?: Prisma.XOR + subCategory?: Prisma.XOR< + Prisma.CategoryNullableScalarRelationFilter, + Prisma.CategoryWhereInput + > | null + image?: Prisma.XOR + generations?: Prisma.GenerationEquipmentListRelationFilter +} + +export type EquipmentOrderByWithRelationInput = { + id?: Prisma.SortOrder + name?: Prisma.SortOrder + description?: Prisma.SortOrder + categoryId?: Prisma.SortOrder + subCategoryId?: Prisma.SortOrderInput | Prisma.SortOrder + imageId?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + category?: Prisma.CategoryOrderByWithRelationInput + subCategory?: Prisma.CategoryOrderByWithRelationInput + image?: Prisma.AssetOrderByWithRelationInput + generations?: Prisma.GenerationEquipmentOrderByRelationAggregateInput +} + +export type EquipmentWhereUniqueInput = Prisma.AtLeast< + { + id?: string + AND?: Prisma.EquipmentWhereInput | Prisma.EquipmentWhereInput[] + OR?: Prisma.EquipmentWhereInput[] + NOT?: Prisma.EquipmentWhereInput | Prisma.EquipmentWhereInput[] + name?: Prisma.StringFilter<'Equipment'> | string + description?: Prisma.StringFilter<'Equipment'> | string + categoryId?: Prisma.StringFilter<'Equipment'> | string + subCategoryId?: Prisma.StringNullableFilter<'Equipment'> | string | null + imageId?: Prisma.StringFilter<'Equipment'> | string + createdAt?: Prisma.DateTimeFilter<'Equipment'> | Date | string + updatedAt?: Prisma.DateTimeFilter<'Equipment'> | Date | string + category?: Prisma.XOR + subCategory?: Prisma.XOR< + Prisma.CategoryNullableScalarRelationFilter, + Prisma.CategoryWhereInput + > | null + image?: Prisma.XOR + generations?: Prisma.GenerationEquipmentListRelationFilter + }, + 'id' +> + +export type EquipmentOrderByWithAggregationInput = { + id?: Prisma.SortOrder + name?: Prisma.SortOrder + description?: Prisma.SortOrder + categoryId?: Prisma.SortOrder + subCategoryId?: Prisma.SortOrderInput | Prisma.SortOrder + imageId?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + _count?: Prisma.EquipmentCountOrderByAggregateInput + _max?: Prisma.EquipmentMaxOrderByAggregateInput + _min?: Prisma.EquipmentMinOrderByAggregateInput +} + +export type EquipmentScalarWhereWithAggregatesInput = { + AND?: + | Prisma.EquipmentScalarWhereWithAggregatesInput + | Prisma.EquipmentScalarWhereWithAggregatesInput[] + OR?: Prisma.EquipmentScalarWhereWithAggregatesInput[] + NOT?: + | Prisma.EquipmentScalarWhereWithAggregatesInput + | Prisma.EquipmentScalarWhereWithAggregatesInput[] + id?: Prisma.StringWithAggregatesFilter<'Equipment'> | string + name?: Prisma.StringWithAggregatesFilter<'Equipment'> | string + description?: Prisma.StringWithAggregatesFilter<'Equipment'> | string + categoryId?: Prisma.StringWithAggregatesFilter<'Equipment'> | string + subCategoryId?: Prisma.StringNullableWithAggregatesFilter<'Equipment'> | string | null + imageId?: Prisma.StringWithAggregatesFilter<'Equipment'> | string + createdAt?: Prisma.DateTimeWithAggregatesFilter<'Equipment'> | Date | string + updatedAt?: Prisma.DateTimeWithAggregatesFilter<'Equipment'> | Date | string +} + +export type EquipmentCreateInput = { + id: string + name: string + description: string + createdAt?: Date | string + updatedAt?: Date | string + category: Prisma.CategoryCreateNestedOneWithoutEquipmentsAsMainInput + subCategory?: Prisma.CategoryCreateNestedOneWithoutEquipmentsAsSubInput + image: Prisma.AssetCreateNestedOneWithoutEquipmentsInput + generations?: Prisma.GenerationEquipmentCreateNestedManyWithoutEquipmentInput +} + +export type EquipmentUncheckedCreateInput = { + id: string + name: string + description: string + categoryId: string + subCategoryId?: string | null + imageId: string + createdAt?: Date | string + updatedAt?: Date | string + generations?: Prisma.GenerationEquipmentUncheckedCreateNestedManyWithoutEquipmentInput +} + +export type EquipmentUpdateInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + category?: Prisma.CategoryUpdateOneRequiredWithoutEquipmentsAsMainNestedInput + subCategory?: Prisma.CategoryUpdateOneWithoutEquipmentsAsSubNestedInput + image?: Prisma.AssetUpdateOneRequiredWithoutEquipmentsNestedInput + generations?: Prisma.GenerationEquipmentUpdateManyWithoutEquipmentNestedInput +} + +export type EquipmentUncheckedUpdateInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.StringFieldUpdateOperationsInput | string + categoryId?: Prisma.StringFieldUpdateOperationsInput | string + subCategoryId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + imageId?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + generations?: Prisma.GenerationEquipmentUncheckedUpdateManyWithoutEquipmentNestedInput +} + +export type EquipmentCreateManyInput = { + id: string + name: string + description: string + categoryId: string + subCategoryId?: string | null + imageId: string + createdAt?: Date | string + updatedAt?: Date | string +} + +export type EquipmentUpdateManyMutationInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type EquipmentUncheckedUpdateManyInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.StringFieldUpdateOperationsInput | string + categoryId?: Prisma.StringFieldUpdateOperationsInput | string + subCategoryId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + imageId?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type EquipmentListRelationFilter = { + every?: Prisma.EquipmentWhereInput + some?: Prisma.EquipmentWhereInput + none?: Prisma.EquipmentWhereInput +} + +export type EquipmentOrderByRelationAggregateInput = { + _count?: Prisma.SortOrder +} + +export type EquipmentCountOrderByAggregateInput = { + id?: Prisma.SortOrder + name?: Prisma.SortOrder + description?: Prisma.SortOrder + categoryId?: Prisma.SortOrder + subCategoryId?: Prisma.SortOrder + imageId?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder +} + +export type EquipmentMaxOrderByAggregateInput = { + id?: Prisma.SortOrder + name?: Prisma.SortOrder + description?: Prisma.SortOrder + categoryId?: Prisma.SortOrder + subCategoryId?: Prisma.SortOrder + imageId?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder +} + +export type EquipmentMinOrderByAggregateInput = { + id?: Prisma.SortOrder + name?: Prisma.SortOrder + description?: Prisma.SortOrder + categoryId?: Prisma.SortOrder + subCategoryId?: Prisma.SortOrder + imageId?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder +} + +export type EquipmentScalarRelationFilter = { + is?: Prisma.EquipmentWhereInput + isNot?: Prisma.EquipmentWhereInput +} + +export type EquipmentCreateNestedManyWithoutImageInput = { + create?: + | Prisma.XOR< + Prisma.EquipmentCreateWithoutImageInput, + Prisma.EquipmentUncheckedCreateWithoutImageInput + > + | Prisma.EquipmentCreateWithoutImageInput[] + | Prisma.EquipmentUncheckedCreateWithoutImageInput[] + connectOrCreate?: + | Prisma.EquipmentCreateOrConnectWithoutImageInput + | Prisma.EquipmentCreateOrConnectWithoutImageInput[] + createMany?: Prisma.EquipmentCreateManyImageInputEnvelope + connect?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] +} + +export type EquipmentUncheckedCreateNestedManyWithoutImageInput = { + create?: + | Prisma.XOR< + Prisma.EquipmentCreateWithoutImageInput, + Prisma.EquipmentUncheckedCreateWithoutImageInput + > + | Prisma.EquipmentCreateWithoutImageInput[] + | Prisma.EquipmentUncheckedCreateWithoutImageInput[] + connectOrCreate?: + | Prisma.EquipmentCreateOrConnectWithoutImageInput + | Prisma.EquipmentCreateOrConnectWithoutImageInput[] + createMany?: Prisma.EquipmentCreateManyImageInputEnvelope + connect?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] +} + +export type EquipmentUpdateManyWithoutImageNestedInput = { + create?: + | Prisma.XOR< + Prisma.EquipmentCreateWithoutImageInput, + Prisma.EquipmentUncheckedCreateWithoutImageInput + > + | Prisma.EquipmentCreateWithoutImageInput[] + | Prisma.EquipmentUncheckedCreateWithoutImageInput[] + connectOrCreate?: + | Prisma.EquipmentCreateOrConnectWithoutImageInput + | Prisma.EquipmentCreateOrConnectWithoutImageInput[] + upsert?: + | Prisma.EquipmentUpsertWithWhereUniqueWithoutImageInput + | Prisma.EquipmentUpsertWithWhereUniqueWithoutImageInput[] + createMany?: Prisma.EquipmentCreateManyImageInputEnvelope + set?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] + disconnect?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] + delete?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] + connect?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] + update?: + | Prisma.EquipmentUpdateWithWhereUniqueWithoutImageInput + | Prisma.EquipmentUpdateWithWhereUniqueWithoutImageInput[] + updateMany?: + | Prisma.EquipmentUpdateManyWithWhereWithoutImageInput + | Prisma.EquipmentUpdateManyWithWhereWithoutImageInput[] + deleteMany?: Prisma.EquipmentScalarWhereInput | Prisma.EquipmentScalarWhereInput[] +} + +export type EquipmentUncheckedUpdateManyWithoutImageNestedInput = { + create?: + | Prisma.XOR< + Prisma.EquipmentCreateWithoutImageInput, + Prisma.EquipmentUncheckedCreateWithoutImageInput + > + | Prisma.EquipmentCreateWithoutImageInput[] + | Prisma.EquipmentUncheckedCreateWithoutImageInput[] + connectOrCreate?: + | Prisma.EquipmentCreateOrConnectWithoutImageInput + | Prisma.EquipmentCreateOrConnectWithoutImageInput[] + upsert?: + | Prisma.EquipmentUpsertWithWhereUniqueWithoutImageInput + | Prisma.EquipmentUpsertWithWhereUniqueWithoutImageInput[] + createMany?: Prisma.EquipmentCreateManyImageInputEnvelope + set?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] + disconnect?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] + delete?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] + connect?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] + update?: + | Prisma.EquipmentUpdateWithWhereUniqueWithoutImageInput + | Prisma.EquipmentUpdateWithWhereUniqueWithoutImageInput[] + updateMany?: + | Prisma.EquipmentUpdateManyWithWhereWithoutImageInput + | Prisma.EquipmentUpdateManyWithWhereWithoutImageInput[] + deleteMany?: Prisma.EquipmentScalarWhereInput | Prisma.EquipmentScalarWhereInput[] +} + +export type EquipmentCreateNestedManyWithoutCategoryInput = { + create?: + | Prisma.XOR< + Prisma.EquipmentCreateWithoutCategoryInput, + Prisma.EquipmentUncheckedCreateWithoutCategoryInput + > + | Prisma.EquipmentCreateWithoutCategoryInput[] + | Prisma.EquipmentUncheckedCreateWithoutCategoryInput[] + connectOrCreate?: + | Prisma.EquipmentCreateOrConnectWithoutCategoryInput + | Prisma.EquipmentCreateOrConnectWithoutCategoryInput[] + createMany?: Prisma.EquipmentCreateManyCategoryInputEnvelope + connect?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] +} + +export type EquipmentCreateNestedManyWithoutSubCategoryInput = { + create?: + | Prisma.XOR< + Prisma.EquipmentCreateWithoutSubCategoryInput, + Prisma.EquipmentUncheckedCreateWithoutSubCategoryInput + > + | Prisma.EquipmentCreateWithoutSubCategoryInput[] + | Prisma.EquipmentUncheckedCreateWithoutSubCategoryInput[] + connectOrCreate?: + | Prisma.EquipmentCreateOrConnectWithoutSubCategoryInput + | Prisma.EquipmentCreateOrConnectWithoutSubCategoryInput[] + createMany?: Prisma.EquipmentCreateManySubCategoryInputEnvelope + connect?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] +} + +export type EquipmentUncheckedCreateNestedManyWithoutCategoryInput = { + create?: + | Prisma.XOR< + Prisma.EquipmentCreateWithoutCategoryInput, + Prisma.EquipmentUncheckedCreateWithoutCategoryInput + > + | Prisma.EquipmentCreateWithoutCategoryInput[] + | Prisma.EquipmentUncheckedCreateWithoutCategoryInput[] + connectOrCreate?: + | Prisma.EquipmentCreateOrConnectWithoutCategoryInput + | Prisma.EquipmentCreateOrConnectWithoutCategoryInput[] + createMany?: Prisma.EquipmentCreateManyCategoryInputEnvelope + connect?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] +} + +export type EquipmentUncheckedCreateNestedManyWithoutSubCategoryInput = { + create?: + | Prisma.XOR< + Prisma.EquipmentCreateWithoutSubCategoryInput, + Prisma.EquipmentUncheckedCreateWithoutSubCategoryInput + > + | Prisma.EquipmentCreateWithoutSubCategoryInput[] + | Prisma.EquipmentUncheckedCreateWithoutSubCategoryInput[] + connectOrCreate?: + | Prisma.EquipmentCreateOrConnectWithoutSubCategoryInput + | Prisma.EquipmentCreateOrConnectWithoutSubCategoryInput[] + createMany?: Prisma.EquipmentCreateManySubCategoryInputEnvelope + connect?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] +} + +export type EquipmentUpdateManyWithoutCategoryNestedInput = { + create?: + | Prisma.XOR< + Prisma.EquipmentCreateWithoutCategoryInput, + Prisma.EquipmentUncheckedCreateWithoutCategoryInput + > + | Prisma.EquipmentCreateWithoutCategoryInput[] + | Prisma.EquipmentUncheckedCreateWithoutCategoryInput[] + connectOrCreate?: + | Prisma.EquipmentCreateOrConnectWithoutCategoryInput + | Prisma.EquipmentCreateOrConnectWithoutCategoryInput[] + upsert?: + | Prisma.EquipmentUpsertWithWhereUniqueWithoutCategoryInput + | Prisma.EquipmentUpsertWithWhereUniqueWithoutCategoryInput[] + createMany?: Prisma.EquipmentCreateManyCategoryInputEnvelope + set?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] + disconnect?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] + delete?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] + connect?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] + update?: + | Prisma.EquipmentUpdateWithWhereUniqueWithoutCategoryInput + | Prisma.EquipmentUpdateWithWhereUniqueWithoutCategoryInput[] + updateMany?: + | Prisma.EquipmentUpdateManyWithWhereWithoutCategoryInput + | Prisma.EquipmentUpdateManyWithWhereWithoutCategoryInput[] + deleteMany?: Prisma.EquipmentScalarWhereInput | Prisma.EquipmentScalarWhereInput[] +} + +export type EquipmentUpdateManyWithoutSubCategoryNestedInput = { + create?: + | Prisma.XOR< + Prisma.EquipmentCreateWithoutSubCategoryInput, + Prisma.EquipmentUncheckedCreateWithoutSubCategoryInput + > + | Prisma.EquipmentCreateWithoutSubCategoryInput[] + | Prisma.EquipmentUncheckedCreateWithoutSubCategoryInput[] + connectOrCreate?: + | Prisma.EquipmentCreateOrConnectWithoutSubCategoryInput + | Prisma.EquipmentCreateOrConnectWithoutSubCategoryInput[] + upsert?: + | Prisma.EquipmentUpsertWithWhereUniqueWithoutSubCategoryInput + | Prisma.EquipmentUpsertWithWhereUniqueWithoutSubCategoryInput[] + createMany?: Prisma.EquipmentCreateManySubCategoryInputEnvelope + set?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] + disconnect?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] + delete?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] + connect?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] + update?: + | Prisma.EquipmentUpdateWithWhereUniqueWithoutSubCategoryInput + | Prisma.EquipmentUpdateWithWhereUniqueWithoutSubCategoryInput[] + updateMany?: + | Prisma.EquipmentUpdateManyWithWhereWithoutSubCategoryInput + | Prisma.EquipmentUpdateManyWithWhereWithoutSubCategoryInput[] + deleteMany?: Prisma.EquipmentScalarWhereInput | Prisma.EquipmentScalarWhereInput[] +} + +export type EquipmentUncheckedUpdateManyWithoutCategoryNestedInput = { + create?: + | Prisma.XOR< + Prisma.EquipmentCreateWithoutCategoryInput, + Prisma.EquipmentUncheckedCreateWithoutCategoryInput + > + | Prisma.EquipmentCreateWithoutCategoryInput[] + | Prisma.EquipmentUncheckedCreateWithoutCategoryInput[] + connectOrCreate?: + | Prisma.EquipmentCreateOrConnectWithoutCategoryInput + | Prisma.EquipmentCreateOrConnectWithoutCategoryInput[] + upsert?: + | Prisma.EquipmentUpsertWithWhereUniqueWithoutCategoryInput + | Prisma.EquipmentUpsertWithWhereUniqueWithoutCategoryInput[] + createMany?: Prisma.EquipmentCreateManyCategoryInputEnvelope + set?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] + disconnect?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] + delete?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] + connect?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] + update?: + | Prisma.EquipmentUpdateWithWhereUniqueWithoutCategoryInput + | Prisma.EquipmentUpdateWithWhereUniqueWithoutCategoryInput[] + updateMany?: + | Prisma.EquipmentUpdateManyWithWhereWithoutCategoryInput + | Prisma.EquipmentUpdateManyWithWhereWithoutCategoryInput[] + deleteMany?: Prisma.EquipmentScalarWhereInput | Prisma.EquipmentScalarWhereInput[] +} + +export type EquipmentUncheckedUpdateManyWithoutSubCategoryNestedInput = { + create?: + | Prisma.XOR< + Prisma.EquipmentCreateWithoutSubCategoryInput, + Prisma.EquipmentUncheckedCreateWithoutSubCategoryInput + > + | Prisma.EquipmentCreateWithoutSubCategoryInput[] + | Prisma.EquipmentUncheckedCreateWithoutSubCategoryInput[] + connectOrCreate?: + | Prisma.EquipmentCreateOrConnectWithoutSubCategoryInput + | Prisma.EquipmentCreateOrConnectWithoutSubCategoryInput[] + upsert?: + | Prisma.EquipmentUpsertWithWhereUniqueWithoutSubCategoryInput + | Prisma.EquipmentUpsertWithWhereUniqueWithoutSubCategoryInput[] + createMany?: Prisma.EquipmentCreateManySubCategoryInputEnvelope + set?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] + disconnect?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] + delete?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] + connect?: Prisma.EquipmentWhereUniqueInput | Prisma.EquipmentWhereUniqueInput[] + update?: + | Prisma.EquipmentUpdateWithWhereUniqueWithoutSubCategoryInput + | Prisma.EquipmentUpdateWithWhereUniqueWithoutSubCategoryInput[] + updateMany?: + | Prisma.EquipmentUpdateManyWithWhereWithoutSubCategoryInput + | Prisma.EquipmentUpdateManyWithWhereWithoutSubCategoryInput[] + deleteMany?: Prisma.EquipmentScalarWhereInput | Prisma.EquipmentScalarWhereInput[] +} + +export type EquipmentCreateNestedOneWithoutGenerationsInput = { + create?: Prisma.XOR< + Prisma.EquipmentCreateWithoutGenerationsInput, + Prisma.EquipmentUncheckedCreateWithoutGenerationsInput + > + connectOrCreate?: Prisma.EquipmentCreateOrConnectWithoutGenerationsInput + connect?: Prisma.EquipmentWhereUniqueInput +} + +export type EquipmentUpdateOneRequiredWithoutGenerationsNestedInput = { + create?: Prisma.XOR< + Prisma.EquipmentCreateWithoutGenerationsInput, + Prisma.EquipmentUncheckedCreateWithoutGenerationsInput + > + connectOrCreate?: Prisma.EquipmentCreateOrConnectWithoutGenerationsInput + upsert?: Prisma.EquipmentUpsertWithoutGenerationsInput + connect?: Prisma.EquipmentWhereUniqueInput + update?: Prisma.XOR< + Prisma.XOR< + Prisma.EquipmentUpdateToOneWithWhereWithoutGenerationsInput, + Prisma.EquipmentUpdateWithoutGenerationsInput + >, + Prisma.EquipmentUncheckedUpdateWithoutGenerationsInput + > +} + +export type EquipmentCreateWithoutImageInput = { + id: string + name: string + description: string + createdAt?: Date | string + updatedAt?: Date | string + category: Prisma.CategoryCreateNestedOneWithoutEquipmentsAsMainInput + subCategory?: Prisma.CategoryCreateNestedOneWithoutEquipmentsAsSubInput + generations?: Prisma.GenerationEquipmentCreateNestedManyWithoutEquipmentInput +} + +export type EquipmentUncheckedCreateWithoutImageInput = { + id: string + name: string + description: string + categoryId: string + subCategoryId?: string | null + createdAt?: Date | string + updatedAt?: Date | string + generations?: Prisma.GenerationEquipmentUncheckedCreateNestedManyWithoutEquipmentInput +} + +export type EquipmentCreateOrConnectWithoutImageInput = { + where: Prisma.EquipmentWhereUniqueInput + create: Prisma.XOR< + Prisma.EquipmentCreateWithoutImageInput, + Prisma.EquipmentUncheckedCreateWithoutImageInput + > +} + +export type EquipmentCreateManyImageInputEnvelope = { + data: Prisma.EquipmentCreateManyImageInput | Prisma.EquipmentCreateManyImageInput[] +} + +export type EquipmentUpsertWithWhereUniqueWithoutImageInput = { + where: Prisma.EquipmentWhereUniqueInput + update: Prisma.XOR< + Prisma.EquipmentUpdateWithoutImageInput, + Prisma.EquipmentUncheckedUpdateWithoutImageInput + > + create: Prisma.XOR< + Prisma.EquipmentCreateWithoutImageInput, + Prisma.EquipmentUncheckedCreateWithoutImageInput + > +} + +export type EquipmentUpdateWithWhereUniqueWithoutImageInput = { + where: Prisma.EquipmentWhereUniqueInput + data: Prisma.XOR< + Prisma.EquipmentUpdateWithoutImageInput, + Prisma.EquipmentUncheckedUpdateWithoutImageInput + > +} + +export type EquipmentUpdateManyWithWhereWithoutImageInput = { + where: Prisma.EquipmentScalarWhereInput + data: Prisma.XOR< + Prisma.EquipmentUpdateManyMutationInput, + Prisma.EquipmentUncheckedUpdateManyWithoutImageInput + > +} + +export type EquipmentScalarWhereInput = { + AND?: Prisma.EquipmentScalarWhereInput | Prisma.EquipmentScalarWhereInput[] + OR?: Prisma.EquipmentScalarWhereInput[] + NOT?: Prisma.EquipmentScalarWhereInput | Prisma.EquipmentScalarWhereInput[] + id?: Prisma.StringFilter<'Equipment'> | string + name?: Prisma.StringFilter<'Equipment'> | string + description?: Prisma.StringFilter<'Equipment'> | string + categoryId?: Prisma.StringFilter<'Equipment'> | string + subCategoryId?: Prisma.StringNullableFilter<'Equipment'> | string | null + imageId?: Prisma.StringFilter<'Equipment'> | string + createdAt?: Prisma.DateTimeFilter<'Equipment'> | Date | string + updatedAt?: Prisma.DateTimeFilter<'Equipment'> | Date | string +} + +export type EquipmentCreateWithoutCategoryInput = { + id: string + name: string + description: string + createdAt?: Date | string + updatedAt?: Date | string + subCategory?: Prisma.CategoryCreateNestedOneWithoutEquipmentsAsSubInput + image: Prisma.AssetCreateNestedOneWithoutEquipmentsInput + generations?: Prisma.GenerationEquipmentCreateNestedManyWithoutEquipmentInput +} + +export type EquipmentUncheckedCreateWithoutCategoryInput = { + id: string + name: string + description: string + subCategoryId?: string | null + imageId: string + createdAt?: Date | string + updatedAt?: Date | string + generations?: Prisma.GenerationEquipmentUncheckedCreateNestedManyWithoutEquipmentInput +} + +export type EquipmentCreateOrConnectWithoutCategoryInput = { + where: Prisma.EquipmentWhereUniqueInput + create: Prisma.XOR< + Prisma.EquipmentCreateWithoutCategoryInput, + Prisma.EquipmentUncheckedCreateWithoutCategoryInput + > +} + +export type EquipmentCreateManyCategoryInputEnvelope = { + data: Prisma.EquipmentCreateManyCategoryInput | Prisma.EquipmentCreateManyCategoryInput[] +} + +export type EquipmentCreateWithoutSubCategoryInput = { + id: string + name: string + description: string + createdAt?: Date | string + updatedAt?: Date | string + category: Prisma.CategoryCreateNestedOneWithoutEquipmentsAsMainInput + image: Prisma.AssetCreateNestedOneWithoutEquipmentsInput + generations?: Prisma.GenerationEquipmentCreateNestedManyWithoutEquipmentInput +} + +export type EquipmentUncheckedCreateWithoutSubCategoryInput = { + id: string + name: string + description: string + categoryId: string + imageId: string + createdAt?: Date | string + updatedAt?: Date | string + generations?: Prisma.GenerationEquipmentUncheckedCreateNestedManyWithoutEquipmentInput +} + +export type EquipmentCreateOrConnectWithoutSubCategoryInput = { + where: Prisma.EquipmentWhereUniqueInput + create: Prisma.XOR< + Prisma.EquipmentCreateWithoutSubCategoryInput, + Prisma.EquipmentUncheckedCreateWithoutSubCategoryInput + > +} + +export type EquipmentCreateManySubCategoryInputEnvelope = { + data: Prisma.EquipmentCreateManySubCategoryInput | Prisma.EquipmentCreateManySubCategoryInput[] +} + +export type EquipmentUpsertWithWhereUniqueWithoutCategoryInput = { + where: Prisma.EquipmentWhereUniqueInput + update: Prisma.XOR< + Prisma.EquipmentUpdateWithoutCategoryInput, + Prisma.EquipmentUncheckedUpdateWithoutCategoryInput + > + create: Prisma.XOR< + Prisma.EquipmentCreateWithoutCategoryInput, + Prisma.EquipmentUncheckedCreateWithoutCategoryInput + > +} + +export type EquipmentUpdateWithWhereUniqueWithoutCategoryInput = { + where: Prisma.EquipmentWhereUniqueInput + data: Prisma.XOR< + Prisma.EquipmentUpdateWithoutCategoryInput, + Prisma.EquipmentUncheckedUpdateWithoutCategoryInput + > +} + +export type EquipmentUpdateManyWithWhereWithoutCategoryInput = { + where: Prisma.EquipmentScalarWhereInput + data: Prisma.XOR< + Prisma.EquipmentUpdateManyMutationInput, + Prisma.EquipmentUncheckedUpdateManyWithoutCategoryInput + > +} + +export type EquipmentUpsertWithWhereUniqueWithoutSubCategoryInput = { + where: Prisma.EquipmentWhereUniqueInput + update: Prisma.XOR< + Prisma.EquipmentUpdateWithoutSubCategoryInput, + Prisma.EquipmentUncheckedUpdateWithoutSubCategoryInput + > + create: Prisma.XOR< + Prisma.EquipmentCreateWithoutSubCategoryInput, + Prisma.EquipmentUncheckedCreateWithoutSubCategoryInput + > +} + +export type EquipmentUpdateWithWhereUniqueWithoutSubCategoryInput = { + where: Prisma.EquipmentWhereUniqueInput + data: Prisma.XOR< + Prisma.EquipmentUpdateWithoutSubCategoryInput, + Prisma.EquipmentUncheckedUpdateWithoutSubCategoryInput + > +} + +export type EquipmentUpdateManyWithWhereWithoutSubCategoryInput = { + where: Prisma.EquipmentScalarWhereInput + data: Prisma.XOR< + Prisma.EquipmentUpdateManyMutationInput, + Prisma.EquipmentUncheckedUpdateManyWithoutSubCategoryInput + > +} + +export type EquipmentCreateWithoutGenerationsInput = { + id: string + name: string + description: string + createdAt?: Date | string + updatedAt?: Date | string + category: Prisma.CategoryCreateNestedOneWithoutEquipmentsAsMainInput + subCategory?: Prisma.CategoryCreateNestedOneWithoutEquipmentsAsSubInput + image: Prisma.AssetCreateNestedOneWithoutEquipmentsInput +} + +export type EquipmentUncheckedCreateWithoutGenerationsInput = { + id: string + name: string + description: string + categoryId: string + subCategoryId?: string | null + imageId: string + createdAt?: Date | string + updatedAt?: Date | string +} + +export type EquipmentCreateOrConnectWithoutGenerationsInput = { + where: Prisma.EquipmentWhereUniqueInput + create: Prisma.XOR< + Prisma.EquipmentCreateWithoutGenerationsInput, + Prisma.EquipmentUncheckedCreateWithoutGenerationsInput + > +} + +export type EquipmentUpsertWithoutGenerationsInput = { + update: Prisma.XOR< + Prisma.EquipmentUpdateWithoutGenerationsInput, + Prisma.EquipmentUncheckedUpdateWithoutGenerationsInput + > + create: Prisma.XOR< + Prisma.EquipmentCreateWithoutGenerationsInput, + Prisma.EquipmentUncheckedCreateWithoutGenerationsInput + > + where?: Prisma.EquipmentWhereInput +} + +export type EquipmentUpdateToOneWithWhereWithoutGenerationsInput = { + where?: Prisma.EquipmentWhereInput + data: Prisma.XOR< + Prisma.EquipmentUpdateWithoutGenerationsInput, + Prisma.EquipmentUncheckedUpdateWithoutGenerationsInput + > +} + +export type EquipmentUpdateWithoutGenerationsInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + category?: Prisma.CategoryUpdateOneRequiredWithoutEquipmentsAsMainNestedInput + subCategory?: Prisma.CategoryUpdateOneWithoutEquipmentsAsSubNestedInput + image?: Prisma.AssetUpdateOneRequiredWithoutEquipmentsNestedInput +} + +export type EquipmentUncheckedUpdateWithoutGenerationsInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.StringFieldUpdateOperationsInput | string + categoryId?: Prisma.StringFieldUpdateOperationsInput | string + subCategoryId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + imageId?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type EquipmentCreateManyImageInput = { + id: string + name: string + description: string + categoryId: string + subCategoryId?: string | null + createdAt?: Date | string + updatedAt?: Date | string +} + +export type EquipmentUpdateWithoutImageInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + category?: Prisma.CategoryUpdateOneRequiredWithoutEquipmentsAsMainNestedInput + subCategory?: Prisma.CategoryUpdateOneWithoutEquipmentsAsSubNestedInput + generations?: Prisma.GenerationEquipmentUpdateManyWithoutEquipmentNestedInput +} + +export type EquipmentUncheckedUpdateWithoutImageInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.StringFieldUpdateOperationsInput | string + categoryId?: Prisma.StringFieldUpdateOperationsInput | string + subCategoryId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + generations?: Prisma.GenerationEquipmentUncheckedUpdateManyWithoutEquipmentNestedInput +} + +export type EquipmentUncheckedUpdateManyWithoutImageInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.StringFieldUpdateOperationsInput | string + categoryId?: Prisma.StringFieldUpdateOperationsInput | string + subCategoryId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type EquipmentCreateManyCategoryInput = { + id: string + name: string + description: string + subCategoryId?: string | null + imageId: string + createdAt?: Date | string + updatedAt?: Date | string +} + +export type EquipmentCreateManySubCategoryInput = { + id: string + name: string + description: string + categoryId: string + imageId: string + createdAt?: Date | string + updatedAt?: Date | string +} + +export type EquipmentUpdateWithoutCategoryInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + subCategory?: Prisma.CategoryUpdateOneWithoutEquipmentsAsSubNestedInput + image?: Prisma.AssetUpdateOneRequiredWithoutEquipmentsNestedInput + generations?: Prisma.GenerationEquipmentUpdateManyWithoutEquipmentNestedInput +} + +export type EquipmentUncheckedUpdateWithoutCategoryInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.StringFieldUpdateOperationsInput | string + subCategoryId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + imageId?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + generations?: Prisma.GenerationEquipmentUncheckedUpdateManyWithoutEquipmentNestedInput +} + +export type EquipmentUncheckedUpdateManyWithoutCategoryInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.StringFieldUpdateOperationsInput | string + subCategoryId?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + imageId?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type EquipmentUpdateWithoutSubCategoryInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + category?: Prisma.CategoryUpdateOneRequiredWithoutEquipmentsAsMainNestedInput + image?: Prisma.AssetUpdateOneRequiredWithoutEquipmentsNestedInput + generations?: Prisma.GenerationEquipmentUpdateManyWithoutEquipmentNestedInput +} + +export type EquipmentUncheckedUpdateWithoutSubCategoryInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.StringFieldUpdateOperationsInput | string + categoryId?: Prisma.StringFieldUpdateOperationsInput | string + imageId?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + generations?: Prisma.GenerationEquipmentUncheckedUpdateManyWithoutEquipmentNestedInput +} + +export type EquipmentUncheckedUpdateManyWithoutSubCategoryInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.StringFieldUpdateOperationsInput | string + categoryId?: Prisma.StringFieldUpdateOperationsInput | string + imageId?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +/** + * Count Type EquipmentCountOutputType + */ + +export type EquipmentCountOutputType = { + generations: number +} + +export type EquipmentCountOutputTypeSelect< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + generations?: boolean | EquipmentCountOutputTypeCountGenerationsArgs +} + +/** + * EquipmentCountOutputType without action + */ +export type EquipmentCountOutputTypeDefaultArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the EquipmentCountOutputType + */ + select?: Prisma.EquipmentCountOutputTypeSelect | null +} + +/** + * EquipmentCountOutputType without action + */ +export type EquipmentCountOutputTypeCountGenerationsArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + where?: Prisma.GenerationEquipmentWhereInput +} + +export type EquipmentSelect< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = runtime.Types.Extensions.GetSelect< + { + id?: boolean + name?: boolean + description?: boolean + categoryId?: boolean + subCategoryId?: boolean + imageId?: boolean + createdAt?: boolean + updatedAt?: boolean + category?: boolean | Prisma.CategoryDefaultArgs + subCategory?: boolean | Prisma.Equipment$subCategoryArgs + image?: boolean | Prisma.AssetDefaultArgs + generations?: boolean | Prisma.Equipment$generationsArgs + _count?: boolean | Prisma.EquipmentCountOutputTypeDefaultArgs + }, + ExtArgs['result']['equipment'] +> + +export type EquipmentSelectCreateManyAndReturn< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = runtime.Types.Extensions.GetSelect< + { + id?: boolean + name?: boolean + description?: boolean + categoryId?: boolean + subCategoryId?: boolean + imageId?: boolean + createdAt?: boolean + updatedAt?: boolean + category?: boolean | Prisma.CategoryDefaultArgs + subCategory?: boolean | Prisma.Equipment$subCategoryArgs + image?: boolean | Prisma.AssetDefaultArgs + }, + ExtArgs['result']['equipment'] +> + +export type EquipmentSelectUpdateManyAndReturn< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = runtime.Types.Extensions.GetSelect< + { + id?: boolean + name?: boolean + description?: boolean + categoryId?: boolean + subCategoryId?: boolean + imageId?: boolean + createdAt?: boolean + updatedAt?: boolean + category?: boolean | Prisma.CategoryDefaultArgs + subCategory?: boolean | Prisma.Equipment$subCategoryArgs + image?: boolean | Prisma.AssetDefaultArgs + }, + ExtArgs['result']['equipment'] +> + +export type EquipmentSelectScalar = { + id?: boolean + name?: boolean + description?: boolean + categoryId?: boolean + subCategoryId?: boolean + imageId?: boolean + createdAt?: boolean + updatedAt?: boolean +} + +export type EquipmentOmit< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = runtime.Types.Extensions.GetOmit< + | 'id' + | 'name' + | 'description' + | 'categoryId' + | 'subCategoryId' + | 'imageId' + | 'createdAt' + | 'updatedAt', + ExtArgs['result']['equipment'] +> +export type EquipmentInclude< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + category?: boolean | Prisma.CategoryDefaultArgs + subCategory?: boolean | Prisma.Equipment$subCategoryArgs + image?: boolean | Prisma.AssetDefaultArgs + generations?: boolean | Prisma.Equipment$generationsArgs + _count?: boolean | Prisma.EquipmentCountOutputTypeDefaultArgs +} +export type EquipmentIncludeCreateManyAndReturn< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + category?: boolean | Prisma.CategoryDefaultArgs + subCategory?: boolean | Prisma.Equipment$subCategoryArgs + image?: boolean | Prisma.AssetDefaultArgs +} +export type EquipmentIncludeUpdateManyAndReturn< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + category?: boolean | Prisma.CategoryDefaultArgs + subCategory?: boolean | Prisma.Equipment$subCategoryArgs + image?: boolean | Prisma.AssetDefaultArgs +} + +export type $EquipmentPayload< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + name: 'Equipment' + objects: { + category: Prisma.$CategoryPayload + subCategory: Prisma.$CategoryPayload | null + image: Prisma.$AssetPayload + generations: Prisma.$GenerationEquipmentPayload[] + } + scalars: runtime.Types.Extensions.GetPayloadResult< + { + id: string + name: string + description: string + categoryId: string + subCategoryId: string | null + imageId: string + createdAt: Date + updatedAt: Date + }, + ExtArgs['result']['equipment'] + > + composites: {} +} + +export type EquipmentGetPayload = + runtime.Types.Result.GetResult + +export type EquipmentCountArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = Omit & { + select?: EquipmentCountAggregateInputType | true +} + +export interface EquipmentDelegate< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, + GlobalOmitOptions = {}, +> { + [K: symbol]: { types: Prisma.TypeMap['model']['Equipment']; meta: { name: 'Equipment' } } + /** + * Find zero or one Equipment that matches the filter. + * @param {EquipmentFindUniqueArgs} args - Arguments to find a Equipment + * @example + * // Get one Equipment + * const equipment = await prisma.equipment.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__EquipmentClient< + runtime.Types.Result.GetResult< + Prisma.$EquipmentPayload, + T, + 'findUnique', + GlobalOmitOptions + > | null, + null, + ExtArgs, + GlobalOmitOptions + > + + /** + * Find one Equipment that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {EquipmentFindUniqueOrThrowArgs} args - Arguments to find a Equipment + * @example + * // Get one Equipment + * const equipment = await prisma.equipment.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__EquipmentClient< + runtime.Types.Result.GetResult< + Prisma.$EquipmentPayload, + T, + 'findUniqueOrThrow', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > + + /** + * Find the first Equipment 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 {EquipmentFindFirstArgs} args - Arguments to find a Equipment + * @example + * // Get one Equipment + * const equipment = await prisma.equipment.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst( + args?: Prisma.SelectSubset>, + ): Prisma.Prisma__EquipmentClient< + runtime.Types.Result.GetResult< + Prisma.$EquipmentPayload, + T, + 'findFirst', + GlobalOmitOptions + > | null, + null, + ExtArgs, + GlobalOmitOptions + > + + /** + * Find the first Equipment 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 {EquipmentFindFirstOrThrowArgs} args - Arguments to find a Equipment + * @example + * // Get one Equipment + * const equipment = await prisma.equipment.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow( + args?: Prisma.SelectSubset>, + ): Prisma.Prisma__EquipmentClient< + runtime.Types.Result.GetResult< + Prisma.$EquipmentPayload, + T, + 'findFirstOrThrow', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > + + /** + * Find zero or more Equipment 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 {EquipmentFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Equipment + * const equipment = await prisma.equipment.findMany() + * + * // Get first 10 Equipment + * const equipment = await prisma.equipment.findMany({ take: 10 }) + * + * // Only select the `id` + * const equipmentWithIdOnly = await prisma.equipment.findMany({ select: { id: true } }) + * + */ + findMany( + args?: Prisma.SelectSubset>, + ): Prisma.PrismaPromise< + runtime.Types.Result.GetResult< + Prisma.$EquipmentPayload, + T, + 'findMany', + GlobalOmitOptions + > + > + + /** + * Create a Equipment. + * @param {EquipmentCreateArgs} args - Arguments to create a Equipment. + * @example + * // Create one Equipment + * const Equipment = await prisma.equipment.create({ + * data: { + * // ... data to create a Equipment + * } + * }) + * + */ + create( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__EquipmentClient< + runtime.Types.Result.GetResult< + Prisma.$EquipmentPayload, + T, + 'create', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > + + /** + * Create many Equipment. + * @param {EquipmentCreateManyArgs} args - Arguments to create many Equipment. + * @example + * // Create many Equipment + * const equipment = await prisma.equipment.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany( + args?: Prisma.SelectSubset>, + ): Prisma.PrismaPromise + + /** + * Create many Equipment and returns the data saved in the database. + * @param {EquipmentCreateManyAndReturnArgs} args - Arguments to create many Equipment. + * @example + * // Create many Equipment + * const equipment = await prisma.equipment.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Equipment and only return the `id` + * const equipmentWithIdOnly = await prisma.equipment.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< + runtime.Types.Result.GetResult< + Prisma.$EquipmentPayload, + T, + 'createManyAndReturn', + GlobalOmitOptions + > + > + + /** + * Delete a Equipment. + * @param {EquipmentDeleteArgs} args - Arguments to delete one Equipment. + * @example + * // Delete one Equipment + * const Equipment = await prisma.equipment.delete({ + * where: { + * // ... filter to delete one Equipment + * } + * }) + * + */ + delete( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__EquipmentClient< + runtime.Types.Result.GetResult< + Prisma.$EquipmentPayload, + T, + 'delete', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > + + /** + * Update one Equipment. + * @param {EquipmentUpdateArgs} args - Arguments to update one Equipment. + * @example + * // Update one Equipment + * const equipment = await prisma.equipment.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__EquipmentClient< + runtime.Types.Result.GetResult< + Prisma.$EquipmentPayload, + T, + 'update', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > + + /** + * Delete zero or more Equipment. + * @param {EquipmentDeleteManyArgs} args - Arguments to filter Equipment to delete. + * @example + * // Delete a few Equipment + * const { count } = await prisma.equipment.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany( + args?: Prisma.SelectSubset>, + ): Prisma.PrismaPromise + + /** + * Update zero or more Equipment. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {EquipmentUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Equipment + * const equipment = await prisma.equipment.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany( + args: Prisma.SelectSubset>, + ): Prisma.PrismaPromise + + /** + * Update zero or more Equipment and returns the data updated in the database. + * @param {EquipmentUpdateManyAndReturnArgs} args - Arguments to update many Equipment. + * @example + * // Update many Equipment + * const equipment = await prisma.equipment.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more Equipment and only return the `id` + * const equipmentWithIdOnly = await prisma.equipment.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< + runtime.Types.Result.GetResult< + Prisma.$EquipmentPayload, + T, + 'updateManyAndReturn', + GlobalOmitOptions + > + > + + /** + * Create or update one Equipment. + * @param {EquipmentUpsertArgs} args - Arguments to update or create a Equipment. + * @example + * // Update or create a Equipment + * const equipment = await prisma.equipment.upsert({ + * create: { + * // ... data to create a Equipment + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Equipment we want to update + * } + * }) + */ + upsert( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__EquipmentClient< + runtime.Types.Result.GetResult< + Prisma.$EquipmentPayload, + T, + 'upsert', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > + + /** + * Count the number of Equipment. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {EquipmentCountArgs} args - Arguments to filter Equipment to count. + * @example + * // Count the number of Equipment + * const count = await prisma.equipment.count({ + * where: { + * // ... the filter for the Equipment 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 Equipment. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {EquipmentAggregateArgs} 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 Equipment. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {EquipmentGroupByArgs} 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 EquipmentGroupByArgs, + HasSelectOrTake extends Prisma.Or< + Prisma.Extends<'skip', Prisma.Keys>, + Prisma.Extends<'take', Prisma.Keys> + >, + OrderByArg extends Prisma.True extends HasSelectOrTake + ? { orderBy: EquipmentGroupByArgs['orderBy'] } + : { orderBy?: EquipmentGroupByArgs['orderBy'] }, + OrderFields extends Prisma.ExcludeUnderscoreKeys< + Prisma.Keys> + >, + 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 ? GetEquipmentGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the Equipment model + */ + readonly fields: EquipmentFieldRefs +} + +/** + * The delegate class that acts as a "Promise-like" for Equipment. + * 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__EquipmentClient< + T, + Null = never, + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, + GlobalOmitOptions = {}, +> extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: 'PrismaPromise' + category = {}>( + args?: Prisma.Subset>, + ): Prisma.Prisma__CategoryClient< + | runtime.Types.Result.GetResult< + Prisma.$CategoryPayload, + T, + 'findUniqueOrThrow', + GlobalOmitOptions + > + | Null, + Null, + ExtArgs, + GlobalOmitOptions + > + subCategory = {}>( + args?: Prisma.Subset>, + ): Prisma.Prisma__CategoryClient< + runtime.Types.Result.GetResult< + Prisma.$CategoryPayload, + T, + 'findUniqueOrThrow', + GlobalOmitOptions + > | null, + null, + ExtArgs, + GlobalOmitOptions + > + image = {}>( + args?: Prisma.Subset>, + ): Prisma.Prisma__AssetClient< + | runtime.Types.Result.GetResult< + Prisma.$AssetPayload, + T, + 'findUniqueOrThrow', + GlobalOmitOptions + > + | Null, + Null, + ExtArgs, + GlobalOmitOptions + > + generations = {}>( + args?: Prisma.Subset>, + ): Prisma.PrismaPromise< + | runtime.Types.Result.GetResult< + Prisma.$GenerationEquipmentPayload, + 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 Equipment model + */ +export interface EquipmentFieldRefs { + readonly id: Prisma.FieldRef<'Equipment', 'String'> + readonly name: Prisma.FieldRef<'Equipment', 'String'> + readonly description: Prisma.FieldRef<'Equipment', 'String'> + readonly categoryId: Prisma.FieldRef<'Equipment', 'String'> + readonly subCategoryId: Prisma.FieldRef<'Equipment', 'String'> + readonly imageId: Prisma.FieldRef<'Equipment', 'String'> + readonly createdAt: Prisma.FieldRef<'Equipment', 'DateTime'> + readonly updatedAt: Prisma.FieldRef<'Equipment', 'DateTime'> +} + +// Custom InputTypes +/** + * Equipment findUnique + */ +export type EquipmentFindUniqueArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Equipment + */ + select?: Prisma.EquipmentSelect | null + /** + * Omit specific fields from the Equipment + */ + omit?: Prisma.EquipmentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.EquipmentInclude | null + /** + * Filter, which Equipment to fetch. + */ + where: Prisma.EquipmentWhereUniqueInput +} + +/** + * Equipment findUniqueOrThrow + */ +export type EquipmentFindUniqueOrThrowArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Equipment + */ + select?: Prisma.EquipmentSelect | null + /** + * Omit specific fields from the Equipment + */ + omit?: Prisma.EquipmentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.EquipmentInclude | null + /** + * Filter, which Equipment to fetch. + */ + where: Prisma.EquipmentWhereUniqueInput +} + +/** + * Equipment findFirst + */ +export type EquipmentFindFirstArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Equipment + */ + select?: Prisma.EquipmentSelect | null + /** + * Omit specific fields from the Equipment + */ + omit?: Prisma.EquipmentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.EquipmentInclude | null + /** + * Filter, which Equipment to fetch. + */ + where?: Prisma.EquipmentWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Equipment to fetch. + */ + orderBy?: Prisma.EquipmentOrderByWithRelationInput | Prisma.EquipmentOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Equipment. + */ + cursor?: Prisma.EquipmentWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Equipment 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` Equipment. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Equipment. + */ + distinct?: Prisma.EquipmentScalarFieldEnum | Prisma.EquipmentScalarFieldEnum[] +} + +/** + * Equipment findFirstOrThrow + */ +export type EquipmentFindFirstOrThrowArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Equipment + */ + select?: Prisma.EquipmentSelect | null + /** + * Omit specific fields from the Equipment + */ + omit?: Prisma.EquipmentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.EquipmentInclude | null + /** + * Filter, which Equipment to fetch. + */ + where?: Prisma.EquipmentWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Equipment to fetch. + */ + orderBy?: Prisma.EquipmentOrderByWithRelationInput | Prisma.EquipmentOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Equipment. + */ + cursor?: Prisma.EquipmentWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Equipment 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` Equipment. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Equipment. + */ + distinct?: Prisma.EquipmentScalarFieldEnum | Prisma.EquipmentScalarFieldEnum[] +} + +/** + * Equipment findMany + */ +export type EquipmentFindManyArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Equipment + */ + select?: Prisma.EquipmentSelect | null + /** + * Omit specific fields from the Equipment + */ + omit?: Prisma.EquipmentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.EquipmentInclude | null + /** + * Filter, which Equipment to fetch. + */ + where?: Prisma.EquipmentWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Equipment to fetch. + */ + orderBy?: Prisma.EquipmentOrderByWithRelationInput | Prisma.EquipmentOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Equipment. + */ + cursor?: Prisma.EquipmentWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Equipment 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` Equipment. + */ + skip?: number + distinct?: Prisma.EquipmentScalarFieldEnum | Prisma.EquipmentScalarFieldEnum[] +} + +/** + * Equipment create + */ +export type EquipmentCreateArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Equipment + */ + select?: Prisma.EquipmentSelect | null + /** + * Omit specific fields from the Equipment + */ + omit?: Prisma.EquipmentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.EquipmentInclude | null + /** + * The data needed to create a Equipment. + */ + data: Prisma.XOR +} + +/** + * Equipment createMany + */ +export type EquipmentCreateManyArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * The data used to create many Equipment. + */ + data: Prisma.EquipmentCreateManyInput | Prisma.EquipmentCreateManyInput[] +} + +/** + * Equipment createManyAndReturn + */ +export type EquipmentCreateManyAndReturnArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Equipment + */ + select?: Prisma.EquipmentSelectCreateManyAndReturn | null + /** + * Omit specific fields from the Equipment + */ + omit?: Prisma.EquipmentOmit | null + /** + * The data used to create many Equipment. + */ + data: Prisma.EquipmentCreateManyInput | Prisma.EquipmentCreateManyInput[] + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.EquipmentIncludeCreateManyAndReturn | null +} + +/** + * Equipment update + */ +export type EquipmentUpdateArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Equipment + */ + select?: Prisma.EquipmentSelect | null + /** + * Omit specific fields from the Equipment + */ + omit?: Prisma.EquipmentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.EquipmentInclude | null + /** + * The data needed to update a Equipment. + */ + data: Prisma.XOR + /** + * Choose, which Equipment to update. + */ + where: Prisma.EquipmentWhereUniqueInput +} + +/** + * Equipment updateMany + */ +export type EquipmentUpdateManyArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * The data used to update Equipment. + */ + data: Prisma.XOR< + Prisma.EquipmentUpdateManyMutationInput, + Prisma.EquipmentUncheckedUpdateManyInput + > + /** + * Filter which Equipment to update + */ + where?: Prisma.EquipmentWhereInput + /** + * Limit how many Equipment to update. + */ + limit?: number +} + +/** + * Equipment updateManyAndReturn + */ +export type EquipmentUpdateManyAndReturnArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Equipment + */ + select?: Prisma.EquipmentSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the Equipment + */ + omit?: Prisma.EquipmentOmit | null + /** + * The data used to update Equipment. + */ + data: Prisma.XOR< + Prisma.EquipmentUpdateManyMutationInput, + Prisma.EquipmentUncheckedUpdateManyInput + > + /** + * Filter which Equipment to update + */ + where?: Prisma.EquipmentWhereInput + /** + * Limit how many Equipment to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.EquipmentIncludeUpdateManyAndReturn | null +} + +/** + * Equipment upsert + */ +export type EquipmentUpsertArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Equipment + */ + select?: Prisma.EquipmentSelect | null + /** + * Omit specific fields from the Equipment + */ + omit?: Prisma.EquipmentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.EquipmentInclude | null + /** + * The filter to search for the Equipment to update in case it exists. + */ + where: Prisma.EquipmentWhereUniqueInput + /** + * In case the Equipment found by the `where` argument doesn't exist, create a new Equipment with this data. + */ + create: Prisma.XOR + /** + * In case the Equipment was found with the provided `where` argument, update it with this data. + */ + update: Prisma.XOR +} + +/** + * Equipment delete + */ +export type EquipmentDeleteArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Equipment + */ + select?: Prisma.EquipmentSelect | null + /** + * Omit specific fields from the Equipment + */ + omit?: Prisma.EquipmentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.EquipmentInclude | null + /** + * Filter which Equipment to delete. + */ + where: Prisma.EquipmentWhereUniqueInput +} + +/** + * Equipment deleteMany + */ +export type EquipmentDeleteManyArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Filter which Equipment to delete + */ + where?: Prisma.EquipmentWhereInput + /** + * Limit how many Equipment to delete. + */ + limit?: number +} + +/** + * Equipment.subCategory + */ +export type Equipment$subCategoryArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Category + */ + select?: Prisma.CategorySelect | null + /** + * Omit specific fields from the Category + */ + omit?: Prisma.CategoryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.CategoryInclude | null + where?: Prisma.CategoryWhereInput +} + +/** + * Equipment.generations + */ +export type Equipment$generationsArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the GenerationEquipment + */ + select?: Prisma.GenerationEquipmentSelect | null + /** + * Omit specific fields from the GenerationEquipment + */ + omit?: Prisma.GenerationEquipmentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GenerationEquipmentInclude | null + where?: Prisma.GenerationEquipmentWhereInput + orderBy?: + | Prisma.GenerationEquipmentOrderByWithRelationInput + | Prisma.GenerationEquipmentOrderByWithRelationInput[] + cursor?: Prisma.GenerationEquipmentWhereUniqueInput + take?: number + skip?: number + distinct?: Prisma.GenerationEquipmentScalarFieldEnum | Prisma.GenerationEquipmentScalarFieldEnum[] +} + +/** + * Equipment without action + */ +export type EquipmentDefaultArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Equipment + */ + select?: Prisma.EquipmentSelect | null + /** + * Omit specific fields from the Equipment + */ + omit?: Prisma.EquipmentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.EquipmentInclude | null +} diff --git a/src/generated/prisma/models/Generation.ts b/src/generated/prisma/models/Generation.ts new file mode 100644 index 0000000..a42c24f --- /dev/null +++ b/src/generated/prisma/models/Generation.ts @@ -0,0 +1,1998 @@ +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * This file exports the `Generation` 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.js' +import type * as Prisma from '../internal/prismaNamespace.js' + +/** + * Model Generation + * + */ +export type GenerationModel = runtime.Types.Result.DefaultSelection + +export type AggregateGeneration = { + _count: GenerationCountAggregateOutputType | null + _min: GenerationMinAggregateOutputType | null + _max: GenerationMaxAggregateOutputType | null +} + +export type GenerationMinAggregateOutputType = { + id: string | null + characterId: string | null + imageId: string | null + createdAt: Date | null + updatedAt: Date | null +} + +export type GenerationMaxAggregateOutputType = { + id: string | null + characterId: string | null + imageId: string | null + createdAt: Date | null + updatedAt: Date | null +} + +export type GenerationCountAggregateOutputType = { + id: number + characterId: number + imageId: number + createdAt: number + updatedAt: number + _all: number +} + +export type GenerationMinAggregateInputType = { + id?: true + characterId?: true + imageId?: true + createdAt?: true + updatedAt?: true +} + +export type GenerationMaxAggregateInputType = { + id?: true + characterId?: true + imageId?: true + createdAt?: true + updatedAt?: true +} + +export type GenerationCountAggregateInputType = { + id?: true + characterId?: true + imageId?: true + createdAt?: true + updatedAt?: true + _all?: true +} + +export type GenerationAggregateArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Filter which Generation to aggregate. + */ + where?: Prisma.GenerationWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Generations to fetch. + */ + orderBy?: Prisma.GenerationOrderByWithRelationInput | Prisma.GenerationOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: Prisma.GenerationWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Generations 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` Generations. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Generations + **/ + _count?: true | GenerationCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: GenerationMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: GenerationMaxAggregateInputType +} + +export type GetGenerationAggregateType = { + [P in keyof T & keyof AggregateGeneration]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType +} + +export type GenerationGroupByArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + where?: Prisma.GenerationWhereInput + orderBy?: + | Prisma.GenerationOrderByWithAggregationInput + | Prisma.GenerationOrderByWithAggregationInput[] + by: Prisma.GenerationScalarFieldEnum[] | Prisma.GenerationScalarFieldEnum + having?: Prisma.GenerationScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: GenerationCountAggregateInputType | true + _min?: GenerationMinAggregateInputType + _max?: GenerationMaxAggregateInputType +} + +export type GenerationGroupByOutputType = { + id: string + characterId: string + imageId: string + createdAt: Date + updatedAt: Date + _count: GenerationCountAggregateOutputType | null + _min: GenerationMinAggregateOutputType | null + _max: GenerationMaxAggregateOutputType | null +} + +type GetGenerationGroupByPayload = Prisma.PrismaPromise< + Array< + Prisma.PickEnumerable & { + [P in keyof T & keyof GenerationGroupByOutputType]: P extends '_count' + ? T[P] extends boolean + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType + } + > +> + +export type GenerationWhereInput = { + AND?: Prisma.GenerationWhereInput | Prisma.GenerationWhereInput[] + OR?: Prisma.GenerationWhereInput[] + NOT?: Prisma.GenerationWhereInput | Prisma.GenerationWhereInput[] + id?: Prisma.StringFilter<'Generation'> | string + characterId?: Prisma.StringFilter<'Generation'> | string + imageId?: Prisma.StringFilter<'Generation'> | string + createdAt?: Prisma.DateTimeFilter<'Generation'> | Date | string + updatedAt?: Prisma.DateTimeFilter<'Generation'> | Date | string + character?: Prisma.XOR + image?: Prisma.XOR + equipments?: Prisma.GenerationEquipmentListRelationFilter +} + +export type GenerationOrderByWithRelationInput = { + id?: Prisma.SortOrder + characterId?: Prisma.SortOrder + imageId?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + character?: Prisma.CharacterOrderByWithRelationInput + image?: Prisma.AssetOrderByWithRelationInput + equipments?: Prisma.GenerationEquipmentOrderByRelationAggregateInput +} + +export type GenerationWhereUniqueInput = Prisma.AtLeast< + { + id?: string + AND?: Prisma.GenerationWhereInput | Prisma.GenerationWhereInput[] + OR?: Prisma.GenerationWhereInput[] + NOT?: Prisma.GenerationWhereInput | Prisma.GenerationWhereInput[] + characterId?: Prisma.StringFilter<'Generation'> | string + imageId?: Prisma.StringFilter<'Generation'> | string + createdAt?: Prisma.DateTimeFilter<'Generation'> | Date | string + updatedAt?: Prisma.DateTimeFilter<'Generation'> | Date | string + character?: Prisma.XOR + image?: Prisma.XOR + equipments?: Prisma.GenerationEquipmentListRelationFilter + }, + 'id' +> + +export type GenerationOrderByWithAggregationInput = { + id?: Prisma.SortOrder + characterId?: Prisma.SortOrder + imageId?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + _count?: Prisma.GenerationCountOrderByAggregateInput + _max?: Prisma.GenerationMaxOrderByAggregateInput + _min?: Prisma.GenerationMinOrderByAggregateInput +} + +export type GenerationScalarWhereWithAggregatesInput = { + AND?: + | Prisma.GenerationScalarWhereWithAggregatesInput + | Prisma.GenerationScalarWhereWithAggregatesInput[] + OR?: Prisma.GenerationScalarWhereWithAggregatesInput[] + NOT?: + | Prisma.GenerationScalarWhereWithAggregatesInput + | Prisma.GenerationScalarWhereWithAggregatesInput[] + id?: Prisma.StringWithAggregatesFilter<'Generation'> | string + characterId?: Prisma.StringWithAggregatesFilter<'Generation'> | string + imageId?: Prisma.StringWithAggregatesFilter<'Generation'> | string + createdAt?: Prisma.DateTimeWithAggregatesFilter<'Generation'> | Date | string + updatedAt?: Prisma.DateTimeWithAggregatesFilter<'Generation'> | Date | string +} + +export type GenerationCreateInput = { + id: string + createdAt?: Date | string + updatedAt?: Date | string + character: Prisma.CharacterCreateNestedOneWithoutGenerationsInput + image: Prisma.AssetCreateNestedOneWithoutGenerationsInput + equipments?: Prisma.GenerationEquipmentCreateNestedManyWithoutGenerationInput +} + +export type GenerationUncheckedCreateInput = { + id: string + characterId: string + imageId: string + createdAt?: Date | string + updatedAt?: Date | string + equipments?: Prisma.GenerationEquipmentUncheckedCreateNestedManyWithoutGenerationInput +} + +export type GenerationUpdateInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + character?: Prisma.CharacterUpdateOneRequiredWithoutGenerationsNestedInput + image?: Prisma.AssetUpdateOneRequiredWithoutGenerationsNestedInput + equipments?: Prisma.GenerationEquipmentUpdateManyWithoutGenerationNestedInput +} + +export type GenerationUncheckedUpdateInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + characterId?: Prisma.StringFieldUpdateOperationsInput | string + imageId?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + equipments?: Prisma.GenerationEquipmentUncheckedUpdateManyWithoutGenerationNestedInput +} + +export type GenerationCreateManyInput = { + id: string + characterId: string + imageId: string + createdAt?: Date | string + updatedAt?: Date | string +} + +export type GenerationUpdateManyMutationInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type GenerationUncheckedUpdateManyInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + characterId?: Prisma.StringFieldUpdateOperationsInput | string + imageId?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type GenerationListRelationFilter = { + every?: Prisma.GenerationWhereInput + some?: Prisma.GenerationWhereInput + none?: Prisma.GenerationWhereInput +} + +export type GenerationOrderByRelationAggregateInput = { + _count?: Prisma.SortOrder +} + +export type GenerationCountOrderByAggregateInput = { + id?: Prisma.SortOrder + characterId?: Prisma.SortOrder + imageId?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder +} + +export type GenerationMaxOrderByAggregateInput = { + id?: Prisma.SortOrder + characterId?: Prisma.SortOrder + imageId?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder +} + +export type GenerationMinOrderByAggregateInput = { + id?: Prisma.SortOrder + characterId?: Prisma.SortOrder + imageId?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder +} + +export type GenerationScalarRelationFilter = { + is?: Prisma.GenerationWhereInput + isNot?: Prisma.GenerationWhereInput +} + +export type GenerationCreateNestedManyWithoutImageInput = { + create?: + | Prisma.XOR< + Prisma.GenerationCreateWithoutImageInput, + Prisma.GenerationUncheckedCreateWithoutImageInput + > + | Prisma.GenerationCreateWithoutImageInput[] + | Prisma.GenerationUncheckedCreateWithoutImageInput[] + connectOrCreate?: + | Prisma.GenerationCreateOrConnectWithoutImageInput + | Prisma.GenerationCreateOrConnectWithoutImageInput[] + createMany?: Prisma.GenerationCreateManyImageInputEnvelope + connect?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] +} + +export type GenerationUncheckedCreateNestedManyWithoutImageInput = { + create?: + | Prisma.XOR< + Prisma.GenerationCreateWithoutImageInput, + Prisma.GenerationUncheckedCreateWithoutImageInput + > + | Prisma.GenerationCreateWithoutImageInput[] + | Prisma.GenerationUncheckedCreateWithoutImageInput[] + connectOrCreate?: + | Prisma.GenerationCreateOrConnectWithoutImageInput + | Prisma.GenerationCreateOrConnectWithoutImageInput[] + createMany?: Prisma.GenerationCreateManyImageInputEnvelope + connect?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] +} + +export type GenerationUpdateManyWithoutImageNestedInput = { + create?: + | Prisma.XOR< + Prisma.GenerationCreateWithoutImageInput, + Prisma.GenerationUncheckedCreateWithoutImageInput + > + | Prisma.GenerationCreateWithoutImageInput[] + | Prisma.GenerationUncheckedCreateWithoutImageInput[] + connectOrCreate?: + | Prisma.GenerationCreateOrConnectWithoutImageInput + | Prisma.GenerationCreateOrConnectWithoutImageInput[] + upsert?: + | Prisma.GenerationUpsertWithWhereUniqueWithoutImageInput + | Prisma.GenerationUpsertWithWhereUniqueWithoutImageInput[] + createMany?: Prisma.GenerationCreateManyImageInputEnvelope + set?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] + disconnect?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] + delete?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] + connect?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] + update?: + | Prisma.GenerationUpdateWithWhereUniqueWithoutImageInput + | Prisma.GenerationUpdateWithWhereUniqueWithoutImageInput[] + updateMany?: + | Prisma.GenerationUpdateManyWithWhereWithoutImageInput + | Prisma.GenerationUpdateManyWithWhereWithoutImageInput[] + deleteMany?: Prisma.GenerationScalarWhereInput | Prisma.GenerationScalarWhereInput[] +} + +export type GenerationUncheckedUpdateManyWithoutImageNestedInput = { + create?: + | Prisma.XOR< + Prisma.GenerationCreateWithoutImageInput, + Prisma.GenerationUncheckedCreateWithoutImageInput + > + | Prisma.GenerationCreateWithoutImageInput[] + | Prisma.GenerationUncheckedCreateWithoutImageInput[] + connectOrCreate?: + | Prisma.GenerationCreateOrConnectWithoutImageInput + | Prisma.GenerationCreateOrConnectWithoutImageInput[] + upsert?: + | Prisma.GenerationUpsertWithWhereUniqueWithoutImageInput + | Prisma.GenerationUpsertWithWhereUniqueWithoutImageInput[] + createMany?: Prisma.GenerationCreateManyImageInputEnvelope + set?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] + disconnect?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] + delete?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] + connect?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] + update?: + | Prisma.GenerationUpdateWithWhereUniqueWithoutImageInput + | Prisma.GenerationUpdateWithWhereUniqueWithoutImageInput[] + updateMany?: + | Prisma.GenerationUpdateManyWithWhereWithoutImageInput + | Prisma.GenerationUpdateManyWithWhereWithoutImageInput[] + deleteMany?: Prisma.GenerationScalarWhereInput | Prisma.GenerationScalarWhereInput[] +} + +export type GenerationCreateNestedManyWithoutCharacterInput = { + create?: + | Prisma.XOR< + Prisma.GenerationCreateWithoutCharacterInput, + Prisma.GenerationUncheckedCreateWithoutCharacterInput + > + | Prisma.GenerationCreateWithoutCharacterInput[] + | Prisma.GenerationUncheckedCreateWithoutCharacterInput[] + connectOrCreate?: + | Prisma.GenerationCreateOrConnectWithoutCharacterInput + | Prisma.GenerationCreateOrConnectWithoutCharacterInput[] + createMany?: Prisma.GenerationCreateManyCharacterInputEnvelope + connect?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] +} + +export type GenerationUncheckedCreateNestedManyWithoutCharacterInput = { + create?: + | Prisma.XOR< + Prisma.GenerationCreateWithoutCharacterInput, + Prisma.GenerationUncheckedCreateWithoutCharacterInput + > + | Prisma.GenerationCreateWithoutCharacterInput[] + | Prisma.GenerationUncheckedCreateWithoutCharacterInput[] + connectOrCreate?: + | Prisma.GenerationCreateOrConnectWithoutCharacterInput + | Prisma.GenerationCreateOrConnectWithoutCharacterInput[] + createMany?: Prisma.GenerationCreateManyCharacterInputEnvelope + connect?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] +} + +export type GenerationUpdateManyWithoutCharacterNestedInput = { + create?: + | Prisma.XOR< + Prisma.GenerationCreateWithoutCharacterInput, + Prisma.GenerationUncheckedCreateWithoutCharacterInput + > + | Prisma.GenerationCreateWithoutCharacterInput[] + | Prisma.GenerationUncheckedCreateWithoutCharacterInput[] + connectOrCreate?: + | Prisma.GenerationCreateOrConnectWithoutCharacterInput + | Prisma.GenerationCreateOrConnectWithoutCharacterInput[] + upsert?: + | Prisma.GenerationUpsertWithWhereUniqueWithoutCharacterInput + | Prisma.GenerationUpsertWithWhereUniqueWithoutCharacterInput[] + createMany?: Prisma.GenerationCreateManyCharacterInputEnvelope + set?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] + disconnect?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] + delete?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] + connect?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] + update?: + | Prisma.GenerationUpdateWithWhereUniqueWithoutCharacterInput + | Prisma.GenerationUpdateWithWhereUniqueWithoutCharacterInput[] + updateMany?: + | Prisma.GenerationUpdateManyWithWhereWithoutCharacterInput + | Prisma.GenerationUpdateManyWithWhereWithoutCharacterInput[] + deleteMany?: Prisma.GenerationScalarWhereInput | Prisma.GenerationScalarWhereInput[] +} + +export type GenerationUncheckedUpdateManyWithoutCharacterNestedInput = { + create?: + | Prisma.XOR< + Prisma.GenerationCreateWithoutCharacterInput, + Prisma.GenerationUncheckedCreateWithoutCharacterInput + > + | Prisma.GenerationCreateWithoutCharacterInput[] + | Prisma.GenerationUncheckedCreateWithoutCharacterInput[] + connectOrCreate?: + | Prisma.GenerationCreateOrConnectWithoutCharacterInput + | Prisma.GenerationCreateOrConnectWithoutCharacterInput[] + upsert?: + | Prisma.GenerationUpsertWithWhereUniqueWithoutCharacterInput + | Prisma.GenerationUpsertWithWhereUniqueWithoutCharacterInput[] + createMany?: Prisma.GenerationCreateManyCharacterInputEnvelope + set?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] + disconnect?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] + delete?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] + connect?: Prisma.GenerationWhereUniqueInput | Prisma.GenerationWhereUniqueInput[] + update?: + | Prisma.GenerationUpdateWithWhereUniqueWithoutCharacterInput + | Prisma.GenerationUpdateWithWhereUniqueWithoutCharacterInput[] + updateMany?: + | Prisma.GenerationUpdateManyWithWhereWithoutCharacterInput + | Prisma.GenerationUpdateManyWithWhereWithoutCharacterInput[] + deleteMany?: Prisma.GenerationScalarWhereInput | Prisma.GenerationScalarWhereInput[] +} + +export type GenerationCreateNestedOneWithoutEquipmentsInput = { + create?: Prisma.XOR< + Prisma.GenerationCreateWithoutEquipmentsInput, + Prisma.GenerationUncheckedCreateWithoutEquipmentsInput + > + connectOrCreate?: Prisma.GenerationCreateOrConnectWithoutEquipmentsInput + connect?: Prisma.GenerationWhereUniqueInput +} + +export type GenerationUpdateOneRequiredWithoutEquipmentsNestedInput = { + create?: Prisma.XOR< + Prisma.GenerationCreateWithoutEquipmentsInput, + Prisma.GenerationUncheckedCreateWithoutEquipmentsInput + > + connectOrCreate?: Prisma.GenerationCreateOrConnectWithoutEquipmentsInput + upsert?: Prisma.GenerationUpsertWithoutEquipmentsInput + connect?: Prisma.GenerationWhereUniqueInput + update?: Prisma.XOR< + Prisma.XOR< + Prisma.GenerationUpdateToOneWithWhereWithoutEquipmentsInput, + Prisma.GenerationUpdateWithoutEquipmentsInput + >, + Prisma.GenerationUncheckedUpdateWithoutEquipmentsInput + > +} + +export type GenerationCreateWithoutImageInput = { + id: string + createdAt?: Date | string + updatedAt?: Date | string + character: Prisma.CharacterCreateNestedOneWithoutGenerationsInput + equipments?: Prisma.GenerationEquipmentCreateNestedManyWithoutGenerationInput +} + +export type GenerationUncheckedCreateWithoutImageInput = { + id: string + characterId: string + createdAt?: Date | string + updatedAt?: Date | string + equipments?: Prisma.GenerationEquipmentUncheckedCreateNestedManyWithoutGenerationInput +} + +export type GenerationCreateOrConnectWithoutImageInput = { + where: Prisma.GenerationWhereUniqueInput + create: Prisma.XOR< + Prisma.GenerationCreateWithoutImageInput, + Prisma.GenerationUncheckedCreateWithoutImageInput + > +} + +export type GenerationCreateManyImageInputEnvelope = { + data: Prisma.GenerationCreateManyImageInput | Prisma.GenerationCreateManyImageInput[] +} + +export type GenerationUpsertWithWhereUniqueWithoutImageInput = { + where: Prisma.GenerationWhereUniqueInput + update: Prisma.XOR< + Prisma.GenerationUpdateWithoutImageInput, + Prisma.GenerationUncheckedUpdateWithoutImageInput + > + create: Prisma.XOR< + Prisma.GenerationCreateWithoutImageInput, + Prisma.GenerationUncheckedCreateWithoutImageInput + > +} + +export type GenerationUpdateWithWhereUniqueWithoutImageInput = { + where: Prisma.GenerationWhereUniqueInput + data: Prisma.XOR< + Prisma.GenerationUpdateWithoutImageInput, + Prisma.GenerationUncheckedUpdateWithoutImageInput + > +} + +export type GenerationUpdateManyWithWhereWithoutImageInput = { + where: Prisma.GenerationScalarWhereInput + data: Prisma.XOR< + Prisma.GenerationUpdateManyMutationInput, + Prisma.GenerationUncheckedUpdateManyWithoutImageInput + > +} + +export type GenerationScalarWhereInput = { + AND?: Prisma.GenerationScalarWhereInput | Prisma.GenerationScalarWhereInput[] + OR?: Prisma.GenerationScalarWhereInput[] + NOT?: Prisma.GenerationScalarWhereInput | Prisma.GenerationScalarWhereInput[] + id?: Prisma.StringFilter<'Generation'> | string + characterId?: Prisma.StringFilter<'Generation'> | string + imageId?: Prisma.StringFilter<'Generation'> | string + createdAt?: Prisma.DateTimeFilter<'Generation'> | Date | string + updatedAt?: Prisma.DateTimeFilter<'Generation'> | Date | string +} + +export type GenerationCreateWithoutCharacterInput = { + id: string + createdAt?: Date | string + updatedAt?: Date | string + image: Prisma.AssetCreateNestedOneWithoutGenerationsInput + equipments?: Prisma.GenerationEquipmentCreateNestedManyWithoutGenerationInput +} + +export type GenerationUncheckedCreateWithoutCharacterInput = { + id: string + imageId: string + createdAt?: Date | string + updatedAt?: Date | string + equipments?: Prisma.GenerationEquipmentUncheckedCreateNestedManyWithoutGenerationInput +} + +export type GenerationCreateOrConnectWithoutCharacterInput = { + where: Prisma.GenerationWhereUniqueInput + create: Prisma.XOR< + Prisma.GenerationCreateWithoutCharacterInput, + Prisma.GenerationUncheckedCreateWithoutCharacterInput + > +} + +export type GenerationCreateManyCharacterInputEnvelope = { + data: Prisma.GenerationCreateManyCharacterInput | Prisma.GenerationCreateManyCharacterInput[] +} + +export type GenerationUpsertWithWhereUniqueWithoutCharacterInput = { + where: Prisma.GenerationWhereUniqueInput + update: Prisma.XOR< + Prisma.GenerationUpdateWithoutCharacterInput, + Prisma.GenerationUncheckedUpdateWithoutCharacterInput + > + create: Prisma.XOR< + Prisma.GenerationCreateWithoutCharacterInput, + Prisma.GenerationUncheckedCreateWithoutCharacterInput + > +} + +export type GenerationUpdateWithWhereUniqueWithoutCharacterInput = { + where: Prisma.GenerationWhereUniqueInput + data: Prisma.XOR< + Prisma.GenerationUpdateWithoutCharacterInput, + Prisma.GenerationUncheckedUpdateWithoutCharacterInput + > +} + +export type GenerationUpdateManyWithWhereWithoutCharacterInput = { + where: Prisma.GenerationScalarWhereInput + data: Prisma.XOR< + Prisma.GenerationUpdateManyMutationInput, + Prisma.GenerationUncheckedUpdateManyWithoutCharacterInput + > +} + +export type GenerationCreateWithoutEquipmentsInput = { + id: string + createdAt?: Date | string + updatedAt?: Date | string + character: Prisma.CharacterCreateNestedOneWithoutGenerationsInput + image: Prisma.AssetCreateNestedOneWithoutGenerationsInput +} + +export type GenerationUncheckedCreateWithoutEquipmentsInput = { + id: string + characterId: string + imageId: string + createdAt?: Date | string + updatedAt?: Date | string +} + +export type GenerationCreateOrConnectWithoutEquipmentsInput = { + where: Prisma.GenerationWhereUniqueInput + create: Prisma.XOR< + Prisma.GenerationCreateWithoutEquipmentsInput, + Prisma.GenerationUncheckedCreateWithoutEquipmentsInput + > +} + +export type GenerationUpsertWithoutEquipmentsInput = { + update: Prisma.XOR< + Prisma.GenerationUpdateWithoutEquipmentsInput, + Prisma.GenerationUncheckedUpdateWithoutEquipmentsInput + > + create: Prisma.XOR< + Prisma.GenerationCreateWithoutEquipmentsInput, + Prisma.GenerationUncheckedCreateWithoutEquipmentsInput + > + where?: Prisma.GenerationWhereInput +} + +export type GenerationUpdateToOneWithWhereWithoutEquipmentsInput = { + where?: Prisma.GenerationWhereInput + data: Prisma.XOR< + Prisma.GenerationUpdateWithoutEquipmentsInput, + Prisma.GenerationUncheckedUpdateWithoutEquipmentsInput + > +} + +export type GenerationUpdateWithoutEquipmentsInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + character?: Prisma.CharacterUpdateOneRequiredWithoutGenerationsNestedInput + image?: Prisma.AssetUpdateOneRequiredWithoutGenerationsNestedInput +} + +export type GenerationUncheckedUpdateWithoutEquipmentsInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + characterId?: Prisma.StringFieldUpdateOperationsInput | string + imageId?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type GenerationCreateManyImageInput = { + id: string + characterId: string + createdAt?: Date | string + updatedAt?: Date | string +} + +export type GenerationUpdateWithoutImageInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + character?: Prisma.CharacterUpdateOneRequiredWithoutGenerationsNestedInput + equipments?: Prisma.GenerationEquipmentUpdateManyWithoutGenerationNestedInput +} + +export type GenerationUncheckedUpdateWithoutImageInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + characterId?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + equipments?: Prisma.GenerationEquipmentUncheckedUpdateManyWithoutGenerationNestedInput +} + +export type GenerationUncheckedUpdateManyWithoutImageInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + characterId?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type GenerationCreateManyCharacterInput = { + id: string + imageId: string + createdAt?: Date | string + updatedAt?: Date | string +} + +export type GenerationUpdateWithoutCharacterInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + image?: Prisma.AssetUpdateOneRequiredWithoutGenerationsNestedInput + equipments?: Prisma.GenerationEquipmentUpdateManyWithoutGenerationNestedInput +} + +export type GenerationUncheckedUpdateWithoutCharacterInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + imageId?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + equipments?: Prisma.GenerationEquipmentUncheckedUpdateManyWithoutGenerationNestedInput +} + +export type GenerationUncheckedUpdateManyWithoutCharacterInput = { + id?: Prisma.StringFieldUpdateOperationsInput | string + imageId?: Prisma.StringFieldUpdateOperationsInput | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +/** + * Count Type GenerationCountOutputType + */ + +export type GenerationCountOutputType = { + equipments: number +} + +export type GenerationCountOutputTypeSelect< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + equipments?: boolean | GenerationCountOutputTypeCountEquipmentsArgs +} + +/** + * GenerationCountOutputType without action + */ +export type GenerationCountOutputTypeDefaultArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the GenerationCountOutputType + */ + select?: Prisma.GenerationCountOutputTypeSelect | null +} + +/** + * GenerationCountOutputType without action + */ +export type GenerationCountOutputTypeCountEquipmentsArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + where?: Prisma.GenerationEquipmentWhereInput +} + +export type GenerationSelect< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = runtime.Types.Extensions.GetSelect< + { + id?: boolean + characterId?: boolean + imageId?: boolean + createdAt?: boolean + updatedAt?: boolean + character?: boolean | Prisma.CharacterDefaultArgs + image?: boolean | Prisma.AssetDefaultArgs + equipments?: boolean | Prisma.Generation$equipmentsArgs + _count?: boolean | Prisma.GenerationCountOutputTypeDefaultArgs + }, + ExtArgs['result']['generation'] +> + +export type GenerationSelectCreateManyAndReturn< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = runtime.Types.Extensions.GetSelect< + { + id?: boolean + characterId?: boolean + imageId?: boolean + createdAt?: boolean + updatedAt?: boolean + character?: boolean | Prisma.CharacterDefaultArgs + image?: boolean | Prisma.AssetDefaultArgs + }, + ExtArgs['result']['generation'] +> + +export type GenerationSelectUpdateManyAndReturn< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = runtime.Types.Extensions.GetSelect< + { + id?: boolean + characterId?: boolean + imageId?: boolean + createdAt?: boolean + updatedAt?: boolean + character?: boolean | Prisma.CharacterDefaultArgs + image?: boolean | Prisma.AssetDefaultArgs + }, + ExtArgs['result']['generation'] +> + +export type GenerationSelectScalar = { + id?: boolean + characterId?: boolean + imageId?: boolean + createdAt?: boolean + updatedAt?: boolean +} + +export type GenerationOmit< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = runtime.Types.Extensions.GetOmit< + 'id' | 'characterId' | 'imageId' | 'createdAt' | 'updatedAt', + ExtArgs['result']['generation'] +> +export type GenerationInclude< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + character?: boolean | Prisma.CharacterDefaultArgs + image?: boolean | Prisma.AssetDefaultArgs + equipments?: boolean | Prisma.Generation$equipmentsArgs + _count?: boolean | Prisma.GenerationCountOutputTypeDefaultArgs +} +export type GenerationIncludeCreateManyAndReturn< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + character?: boolean | Prisma.CharacterDefaultArgs + image?: boolean | Prisma.AssetDefaultArgs +} +export type GenerationIncludeUpdateManyAndReturn< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + character?: boolean | Prisma.CharacterDefaultArgs + image?: boolean | Prisma.AssetDefaultArgs +} + +export type $GenerationPayload< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + name: 'Generation' + objects: { + character: Prisma.$CharacterPayload + image: Prisma.$AssetPayload + equipments: Prisma.$GenerationEquipmentPayload[] + } + scalars: runtime.Types.Extensions.GetPayloadResult< + { + id: string + characterId: string + imageId: string + createdAt: Date + updatedAt: Date + }, + ExtArgs['result']['generation'] + > + composites: {} +} + +export type GenerationGetPayload = + runtime.Types.Result.GetResult + +export type GenerationCountArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = Omit & { + select?: GenerationCountAggregateInputType | true +} + +export interface GenerationDelegate< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, + GlobalOmitOptions = {}, +> { + [K: symbol]: { + types: Prisma.TypeMap['model']['Generation'] + meta: { name: 'Generation' } + } + /** + * Find zero or one Generation that matches the filter. + * @param {GenerationFindUniqueArgs} args - Arguments to find a Generation + * @example + * // Get one Generation + * const generation = await prisma.generation.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__GenerationClient< + runtime.Types.Result.GetResult< + Prisma.$GenerationPayload, + T, + 'findUnique', + GlobalOmitOptions + > | null, + null, + ExtArgs, + GlobalOmitOptions + > + + /** + * Find one Generation that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {GenerationFindUniqueOrThrowArgs} args - Arguments to find a Generation + * @example + * // Get one Generation + * const generation = await prisma.generation.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__GenerationClient< + runtime.Types.Result.GetResult< + Prisma.$GenerationPayload, + T, + 'findUniqueOrThrow', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > + + /** + * Find the first Generation 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 {GenerationFindFirstArgs} args - Arguments to find a Generation + * @example + * // Get one Generation + * const generation = await prisma.generation.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst( + args?: Prisma.SelectSubset>, + ): Prisma.Prisma__GenerationClient< + runtime.Types.Result.GetResult< + Prisma.$GenerationPayload, + T, + 'findFirst', + GlobalOmitOptions + > | null, + null, + ExtArgs, + GlobalOmitOptions + > + + /** + * Find the first Generation 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 {GenerationFindFirstOrThrowArgs} args - Arguments to find a Generation + * @example + * // Get one Generation + * const generation = await prisma.generation.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow( + args?: Prisma.SelectSubset>, + ): Prisma.Prisma__GenerationClient< + runtime.Types.Result.GetResult< + Prisma.$GenerationPayload, + T, + 'findFirstOrThrow', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > + + /** + * Find zero or more Generations 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 {GenerationFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Generations + * const generations = await prisma.generation.findMany() + * + * // Get first 10 Generations + * const generations = await prisma.generation.findMany({ take: 10 }) + * + * // Only select the `id` + * const generationWithIdOnly = await prisma.generation.findMany({ select: { id: true } }) + * + */ + findMany( + args?: Prisma.SelectSubset>, + ): Prisma.PrismaPromise< + runtime.Types.Result.GetResult< + Prisma.$GenerationPayload, + T, + 'findMany', + GlobalOmitOptions + > + > + + /** + * Create a Generation. + * @param {GenerationCreateArgs} args - Arguments to create a Generation. + * @example + * // Create one Generation + * const Generation = await prisma.generation.create({ + * data: { + * // ... data to create a Generation + * } + * }) + * + */ + create( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__GenerationClient< + runtime.Types.Result.GetResult< + Prisma.$GenerationPayload, + T, + 'create', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > + + /** + * Create many Generations. + * @param {GenerationCreateManyArgs} args - Arguments to create many Generations. + * @example + * // Create many Generations + * const generation = await prisma.generation.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany( + args?: Prisma.SelectSubset>, + ): Prisma.PrismaPromise + + /** + * Create many Generations and returns the data saved in the database. + * @param {GenerationCreateManyAndReturnArgs} args - Arguments to create many Generations. + * @example + * // Create many Generations + * const generation = await prisma.generation.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many Generations and only return the `id` + * const generationWithIdOnly = await prisma.generation.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< + runtime.Types.Result.GetResult< + Prisma.$GenerationPayload, + T, + 'createManyAndReturn', + GlobalOmitOptions + > + > + + /** + * Delete a Generation. + * @param {GenerationDeleteArgs} args - Arguments to delete one Generation. + * @example + * // Delete one Generation + * const Generation = await prisma.generation.delete({ + * where: { + * // ... filter to delete one Generation + * } + * }) + * + */ + delete( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__GenerationClient< + runtime.Types.Result.GetResult< + Prisma.$GenerationPayload, + T, + 'delete', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > + + /** + * Update one Generation. + * @param {GenerationUpdateArgs} args - Arguments to update one Generation. + * @example + * // Update one Generation + * const generation = await prisma.generation.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__GenerationClient< + runtime.Types.Result.GetResult< + Prisma.$GenerationPayload, + T, + 'update', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > + + /** + * Delete zero or more Generations. + * @param {GenerationDeleteManyArgs} args - Arguments to filter Generations to delete. + * @example + * // Delete a few Generations + * const { count } = await prisma.generation.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany( + args?: Prisma.SelectSubset>, + ): Prisma.PrismaPromise + + /** + * Update zero or more Generations. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {GenerationUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Generations + * const generation = await prisma.generation.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany( + args: Prisma.SelectSubset>, + ): Prisma.PrismaPromise + + /** + * Update zero or more Generations and returns the data updated in the database. + * @param {GenerationUpdateManyAndReturnArgs} args - Arguments to update many Generations. + * @example + * // Update many Generations + * const generation = await prisma.generation.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more Generations and only return the `id` + * const generationWithIdOnly = await prisma.generation.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< + runtime.Types.Result.GetResult< + Prisma.$GenerationPayload, + T, + 'updateManyAndReturn', + GlobalOmitOptions + > + > + + /** + * Create or update one Generation. + * @param {GenerationUpsertArgs} args - Arguments to update or create a Generation. + * @example + * // Update or create a Generation + * const generation = await prisma.generation.upsert({ + * create: { + * // ... data to create a Generation + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Generation we want to update + * } + * }) + */ + upsert( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__GenerationClient< + runtime.Types.Result.GetResult< + Prisma.$GenerationPayload, + T, + 'upsert', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > + + /** + * Count the number of Generations. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {GenerationCountArgs} args - Arguments to filter Generations to count. + * @example + * // Count the number of Generations + * const count = await prisma.generation.count({ + * where: { + * // ... the filter for the Generations 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 Generation. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {GenerationAggregateArgs} 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 Generation. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {GenerationGroupByArgs} 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 GenerationGroupByArgs, + HasSelectOrTake extends Prisma.Or< + Prisma.Extends<'skip', Prisma.Keys>, + Prisma.Extends<'take', Prisma.Keys> + >, + OrderByArg extends Prisma.True extends HasSelectOrTake + ? { orderBy: GenerationGroupByArgs['orderBy'] } + : { orderBy?: GenerationGroupByArgs['orderBy'] }, + OrderFields extends Prisma.ExcludeUnderscoreKeys< + Prisma.Keys> + >, + 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 ? GetGenerationGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the Generation model + */ + readonly fields: GenerationFieldRefs +} + +/** + * The delegate class that acts as a "Promise-like" for Generation. + * 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__GenerationClient< + T, + Null = never, + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, + GlobalOmitOptions = {}, +> extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: 'PrismaPromise' + character = {}>( + args?: Prisma.Subset>, + ): Prisma.Prisma__CharacterClient< + | runtime.Types.Result.GetResult< + Prisma.$CharacterPayload, + T, + 'findUniqueOrThrow', + GlobalOmitOptions + > + | Null, + Null, + ExtArgs, + GlobalOmitOptions + > + image = {}>( + args?: Prisma.Subset>, + ): Prisma.Prisma__AssetClient< + | runtime.Types.Result.GetResult< + Prisma.$AssetPayload, + T, + 'findUniqueOrThrow', + GlobalOmitOptions + > + | Null, + Null, + ExtArgs, + GlobalOmitOptions + > + equipments = {}>( + args?: Prisma.Subset>, + ): Prisma.PrismaPromise< + | runtime.Types.Result.GetResult< + Prisma.$GenerationEquipmentPayload, + 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 Generation model + */ +export interface GenerationFieldRefs { + readonly id: Prisma.FieldRef<'Generation', 'String'> + readonly characterId: Prisma.FieldRef<'Generation', 'String'> + readonly imageId: Prisma.FieldRef<'Generation', 'String'> + readonly createdAt: Prisma.FieldRef<'Generation', 'DateTime'> + readonly updatedAt: Prisma.FieldRef<'Generation', 'DateTime'> +} + +// Custom InputTypes +/** + * Generation findUnique + */ +export type GenerationFindUniqueArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Generation + */ + select?: Prisma.GenerationSelect | null + /** + * Omit specific fields from the Generation + */ + omit?: Prisma.GenerationOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GenerationInclude | null + /** + * Filter, which Generation to fetch. + */ + where: Prisma.GenerationWhereUniqueInput +} + +/** + * Generation findUniqueOrThrow + */ +export type GenerationFindUniqueOrThrowArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Generation + */ + select?: Prisma.GenerationSelect | null + /** + * Omit specific fields from the Generation + */ + omit?: Prisma.GenerationOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GenerationInclude | null + /** + * Filter, which Generation to fetch. + */ + where: Prisma.GenerationWhereUniqueInput +} + +/** + * Generation findFirst + */ +export type GenerationFindFirstArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Generation + */ + select?: Prisma.GenerationSelect | null + /** + * Omit specific fields from the Generation + */ + omit?: Prisma.GenerationOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GenerationInclude | null + /** + * Filter, which Generation to fetch. + */ + where?: Prisma.GenerationWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Generations to fetch. + */ + orderBy?: Prisma.GenerationOrderByWithRelationInput | Prisma.GenerationOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Generations. + */ + cursor?: Prisma.GenerationWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Generations 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` Generations. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Generations. + */ + distinct?: Prisma.GenerationScalarFieldEnum | Prisma.GenerationScalarFieldEnum[] +} + +/** + * Generation findFirstOrThrow + */ +export type GenerationFindFirstOrThrowArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Generation + */ + select?: Prisma.GenerationSelect | null + /** + * Omit specific fields from the Generation + */ + omit?: Prisma.GenerationOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GenerationInclude | null + /** + * Filter, which Generation to fetch. + */ + where?: Prisma.GenerationWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Generations to fetch. + */ + orderBy?: Prisma.GenerationOrderByWithRelationInput | Prisma.GenerationOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Generations. + */ + cursor?: Prisma.GenerationWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Generations 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` Generations. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Generations. + */ + distinct?: Prisma.GenerationScalarFieldEnum | Prisma.GenerationScalarFieldEnum[] +} + +/** + * Generation findMany + */ +export type GenerationFindManyArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Generation + */ + select?: Prisma.GenerationSelect | null + /** + * Omit specific fields from the Generation + */ + omit?: Prisma.GenerationOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GenerationInclude | null + /** + * Filter, which Generations to fetch. + */ + where?: Prisma.GenerationWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Generations to fetch. + */ + orderBy?: Prisma.GenerationOrderByWithRelationInput | Prisma.GenerationOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Generations. + */ + cursor?: Prisma.GenerationWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Generations 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` Generations. + */ + skip?: number + distinct?: Prisma.GenerationScalarFieldEnum | Prisma.GenerationScalarFieldEnum[] +} + +/** + * Generation create + */ +export type GenerationCreateArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Generation + */ + select?: Prisma.GenerationSelect | null + /** + * Omit specific fields from the Generation + */ + omit?: Prisma.GenerationOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GenerationInclude | null + /** + * The data needed to create a Generation. + */ + data: Prisma.XOR +} + +/** + * Generation createMany + */ +export type GenerationCreateManyArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * The data used to create many Generations. + */ + data: Prisma.GenerationCreateManyInput | Prisma.GenerationCreateManyInput[] +} + +/** + * Generation createManyAndReturn + */ +export type GenerationCreateManyAndReturnArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Generation + */ + select?: Prisma.GenerationSelectCreateManyAndReturn | null + /** + * Omit specific fields from the Generation + */ + omit?: Prisma.GenerationOmit | null + /** + * The data used to create many Generations. + */ + data: Prisma.GenerationCreateManyInput | Prisma.GenerationCreateManyInput[] + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GenerationIncludeCreateManyAndReturn | null +} + +/** + * Generation update + */ +export type GenerationUpdateArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Generation + */ + select?: Prisma.GenerationSelect | null + /** + * Omit specific fields from the Generation + */ + omit?: Prisma.GenerationOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GenerationInclude | null + /** + * The data needed to update a Generation. + */ + data: Prisma.XOR + /** + * Choose, which Generation to update. + */ + where: Prisma.GenerationWhereUniqueInput +} + +/** + * Generation updateMany + */ +export type GenerationUpdateManyArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * The data used to update Generations. + */ + data: Prisma.XOR< + Prisma.GenerationUpdateManyMutationInput, + Prisma.GenerationUncheckedUpdateManyInput + > + /** + * Filter which Generations to update + */ + where?: Prisma.GenerationWhereInput + /** + * Limit how many Generations to update. + */ + limit?: number +} + +/** + * Generation updateManyAndReturn + */ +export type GenerationUpdateManyAndReturnArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Generation + */ + select?: Prisma.GenerationSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the Generation + */ + omit?: Prisma.GenerationOmit | null + /** + * The data used to update Generations. + */ + data: Prisma.XOR< + Prisma.GenerationUpdateManyMutationInput, + Prisma.GenerationUncheckedUpdateManyInput + > + /** + * Filter which Generations to update + */ + where?: Prisma.GenerationWhereInput + /** + * Limit how many Generations to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GenerationIncludeUpdateManyAndReturn | null +} + +/** + * Generation upsert + */ +export type GenerationUpsertArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Generation + */ + select?: Prisma.GenerationSelect | null + /** + * Omit specific fields from the Generation + */ + omit?: Prisma.GenerationOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GenerationInclude | null + /** + * The filter to search for the Generation to update in case it exists. + */ + where: Prisma.GenerationWhereUniqueInput + /** + * In case the Generation found by the `where` argument doesn't exist, create a new Generation with this data. + */ + create: Prisma.XOR + /** + * In case the Generation was found with the provided `where` argument, update it with this data. + */ + update: Prisma.XOR +} + +/** + * Generation delete + */ +export type GenerationDeleteArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Generation + */ + select?: Prisma.GenerationSelect | null + /** + * Omit specific fields from the Generation + */ + omit?: Prisma.GenerationOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GenerationInclude | null + /** + * Filter which Generation to delete. + */ + where: Prisma.GenerationWhereUniqueInput +} + +/** + * Generation deleteMany + */ +export type GenerationDeleteManyArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Filter which Generations to delete + */ + where?: Prisma.GenerationWhereInput + /** + * Limit how many Generations to delete. + */ + limit?: number +} + +/** + * Generation.equipments + */ +export type Generation$equipmentsArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the GenerationEquipment + */ + select?: Prisma.GenerationEquipmentSelect | null + /** + * Omit specific fields from the GenerationEquipment + */ + omit?: Prisma.GenerationEquipmentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GenerationEquipmentInclude | null + where?: Prisma.GenerationEquipmentWhereInput + orderBy?: + | Prisma.GenerationEquipmentOrderByWithRelationInput + | Prisma.GenerationEquipmentOrderByWithRelationInput[] + cursor?: Prisma.GenerationEquipmentWhereUniqueInput + take?: number + skip?: number + distinct?: Prisma.GenerationEquipmentScalarFieldEnum | Prisma.GenerationEquipmentScalarFieldEnum[] +} + +/** + * Generation without action + */ +export type GenerationDefaultArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the Generation + */ + select?: Prisma.GenerationSelect | null + /** + * Omit specific fields from the Generation + */ + omit?: Prisma.GenerationOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GenerationInclude | null +} diff --git a/src/generated/prisma/models/GenerationEquipment.ts b/src/generated/prisma/models/GenerationEquipment.ts new file mode 100644 index 0000000..1443de9 --- /dev/null +++ b/src/generated/prisma/models/GenerationEquipment.ts @@ -0,0 +1,1756 @@ +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * This file exports the `GenerationEquipment` 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.js' +import type * as Prisma from '../internal/prismaNamespace.js' + +/** + * Model GenerationEquipment + * + */ +export type GenerationEquipmentModel = + runtime.Types.Result.DefaultSelection + +export type AggregateGenerationEquipment = { + _count: GenerationEquipmentCountAggregateOutputType | null + _min: GenerationEquipmentMinAggregateOutputType | null + _max: GenerationEquipmentMaxAggregateOutputType | null +} + +export type GenerationEquipmentMinAggregateOutputType = { + generationId: string | null + equipmentId: string | null +} + +export type GenerationEquipmentMaxAggregateOutputType = { + generationId: string | null + equipmentId: string | null +} + +export type GenerationEquipmentCountAggregateOutputType = { + generationId: number + equipmentId: number + _all: number +} + +export type GenerationEquipmentMinAggregateInputType = { + generationId?: true + equipmentId?: true +} + +export type GenerationEquipmentMaxAggregateInputType = { + generationId?: true + equipmentId?: true +} + +export type GenerationEquipmentCountAggregateInputType = { + generationId?: true + equipmentId?: true + _all?: true +} + +export type GenerationEquipmentAggregateArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Filter which GenerationEquipment to aggregate. + */ + where?: Prisma.GenerationEquipmentWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of GenerationEquipments to fetch. + */ + orderBy?: + | Prisma.GenerationEquipmentOrderByWithRelationInput + | Prisma.GenerationEquipmentOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: Prisma.GenerationEquipmentWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` GenerationEquipments 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` GenerationEquipments. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned GenerationEquipments + **/ + _count?: true | GenerationEquipmentCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: GenerationEquipmentMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: GenerationEquipmentMaxAggregateInputType +} + +export type GetGenerationEquipmentAggregateType = { + [P in keyof T & keyof AggregateGenerationEquipment]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType +} + +export type GenerationEquipmentGroupByArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + where?: Prisma.GenerationEquipmentWhereInput + orderBy?: + | Prisma.GenerationEquipmentOrderByWithAggregationInput + | Prisma.GenerationEquipmentOrderByWithAggregationInput[] + by: Prisma.GenerationEquipmentScalarFieldEnum[] | Prisma.GenerationEquipmentScalarFieldEnum + having?: Prisma.GenerationEquipmentScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: GenerationEquipmentCountAggregateInputType | true + _min?: GenerationEquipmentMinAggregateInputType + _max?: GenerationEquipmentMaxAggregateInputType +} + +export type GenerationEquipmentGroupByOutputType = { + generationId: string + equipmentId: string + _count: GenerationEquipmentCountAggregateOutputType | null + _min: GenerationEquipmentMinAggregateOutputType | null + _max: GenerationEquipmentMaxAggregateOutputType | null +} + +type GetGenerationEquipmentGroupByPayload = + Prisma.PrismaPromise< + Array< + Prisma.PickEnumerable & { + [P in keyof T & keyof GenerationEquipmentGroupByOutputType]: P extends '_count' + ? T[P] extends boolean + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType + } + > + > + +export type GenerationEquipmentWhereInput = { + AND?: Prisma.GenerationEquipmentWhereInput | Prisma.GenerationEquipmentWhereInput[] + OR?: Prisma.GenerationEquipmentWhereInput[] + NOT?: Prisma.GenerationEquipmentWhereInput | Prisma.GenerationEquipmentWhereInput[] + generationId?: Prisma.StringFilter<'GenerationEquipment'> | string + equipmentId?: Prisma.StringFilter<'GenerationEquipment'> | string + generation?: Prisma.XOR + equipment?: Prisma.XOR +} + +export type GenerationEquipmentOrderByWithRelationInput = { + generationId?: Prisma.SortOrder + equipmentId?: Prisma.SortOrder + generation?: Prisma.GenerationOrderByWithRelationInput + equipment?: Prisma.EquipmentOrderByWithRelationInput +} + +export type GenerationEquipmentWhereUniqueInput = Prisma.AtLeast< + { + generationId_equipmentId?: Prisma.GenerationEquipmentGenerationIdEquipmentIdCompoundUniqueInput + AND?: Prisma.GenerationEquipmentWhereInput | Prisma.GenerationEquipmentWhereInput[] + OR?: Prisma.GenerationEquipmentWhereInput[] + NOT?: Prisma.GenerationEquipmentWhereInput | Prisma.GenerationEquipmentWhereInput[] + generationId?: Prisma.StringFilter<'GenerationEquipment'> | string + equipmentId?: Prisma.StringFilter<'GenerationEquipment'> | string + generation?: Prisma.XOR + equipment?: Prisma.XOR + }, + 'generationId_equipmentId' +> + +export type GenerationEquipmentOrderByWithAggregationInput = { + generationId?: Prisma.SortOrder + equipmentId?: Prisma.SortOrder + _count?: Prisma.GenerationEquipmentCountOrderByAggregateInput + _max?: Prisma.GenerationEquipmentMaxOrderByAggregateInput + _min?: Prisma.GenerationEquipmentMinOrderByAggregateInput +} + +export type GenerationEquipmentScalarWhereWithAggregatesInput = { + AND?: + | Prisma.GenerationEquipmentScalarWhereWithAggregatesInput + | Prisma.GenerationEquipmentScalarWhereWithAggregatesInput[] + OR?: Prisma.GenerationEquipmentScalarWhereWithAggregatesInput[] + NOT?: + | Prisma.GenerationEquipmentScalarWhereWithAggregatesInput + | Prisma.GenerationEquipmentScalarWhereWithAggregatesInput[] + generationId?: Prisma.StringWithAggregatesFilter<'GenerationEquipment'> | string + equipmentId?: Prisma.StringWithAggregatesFilter<'GenerationEquipment'> | string +} + +export type GenerationEquipmentCreateInput = { + generation: Prisma.GenerationCreateNestedOneWithoutEquipmentsInput + equipment: Prisma.EquipmentCreateNestedOneWithoutGenerationsInput +} + +export type GenerationEquipmentUncheckedCreateInput = { + generationId: string + equipmentId: string +} + +export type GenerationEquipmentUpdateInput = { + generation?: Prisma.GenerationUpdateOneRequiredWithoutEquipmentsNestedInput + equipment?: Prisma.EquipmentUpdateOneRequiredWithoutGenerationsNestedInput +} + +export type GenerationEquipmentUncheckedUpdateInput = { + generationId?: Prisma.StringFieldUpdateOperationsInput | string + equipmentId?: Prisma.StringFieldUpdateOperationsInput | string +} + +export type GenerationEquipmentCreateManyInput = { + generationId: string + equipmentId: string +} + +export type GenerationEquipmentUpdateManyMutationInput = {} + +export type GenerationEquipmentUncheckedUpdateManyInput = { + generationId?: Prisma.StringFieldUpdateOperationsInput | string + equipmentId?: Prisma.StringFieldUpdateOperationsInput | string +} + +export type GenerationEquipmentListRelationFilter = { + every?: Prisma.GenerationEquipmentWhereInput + some?: Prisma.GenerationEquipmentWhereInput + none?: Prisma.GenerationEquipmentWhereInput +} + +export type GenerationEquipmentOrderByRelationAggregateInput = { + _count?: Prisma.SortOrder +} + +export type GenerationEquipmentGenerationIdEquipmentIdCompoundUniqueInput = { + generationId: string + equipmentId: string +} + +export type GenerationEquipmentCountOrderByAggregateInput = { + generationId?: Prisma.SortOrder + equipmentId?: Prisma.SortOrder +} + +export type GenerationEquipmentMaxOrderByAggregateInput = { + generationId?: Prisma.SortOrder + equipmentId?: Prisma.SortOrder +} + +export type GenerationEquipmentMinOrderByAggregateInput = { + generationId?: Prisma.SortOrder + equipmentId?: Prisma.SortOrder +} + +export type GenerationEquipmentCreateNestedManyWithoutEquipmentInput = { + create?: + | Prisma.XOR< + Prisma.GenerationEquipmentCreateWithoutEquipmentInput, + Prisma.GenerationEquipmentUncheckedCreateWithoutEquipmentInput + > + | Prisma.GenerationEquipmentCreateWithoutEquipmentInput[] + | Prisma.GenerationEquipmentUncheckedCreateWithoutEquipmentInput[] + connectOrCreate?: + | Prisma.GenerationEquipmentCreateOrConnectWithoutEquipmentInput + | Prisma.GenerationEquipmentCreateOrConnectWithoutEquipmentInput[] + createMany?: Prisma.GenerationEquipmentCreateManyEquipmentInputEnvelope + connect?: + | Prisma.GenerationEquipmentWhereUniqueInput + | Prisma.GenerationEquipmentWhereUniqueInput[] +} + +export type GenerationEquipmentUncheckedCreateNestedManyWithoutEquipmentInput = { + create?: + | Prisma.XOR< + Prisma.GenerationEquipmentCreateWithoutEquipmentInput, + Prisma.GenerationEquipmentUncheckedCreateWithoutEquipmentInput + > + | Prisma.GenerationEquipmentCreateWithoutEquipmentInput[] + | Prisma.GenerationEquipmentUncheckedCreateWithoutEquipmentInput[] + connectOrCreate?: + | Prisma.GenerationEquipmentCreateOrConnectWithoutEquipmentInput + | Prisma.GenerationEquipmentCreateOrConnectWithoutEquipmentInput[] + createMany?: Prisma.GenerationEquipmentCreateManyEquipmentInputEnvelope + connect?: + | Prisma.GenerationEquipmentWhereUniqueInput + | Prisma.GenerationEquipmentWhereUniqueInput[] +} + +export type GenerationEquipmentUpdateManyWithoutEquipmentNestedInput = { + create?: + | Prisma.XOR< + Prisma.GenerationEquipmentCreateWithoutEquipmentInput, + Prisma.GenerationEquipmentUncheckedCreateWithoutEquipmentInput + > + | Prisma.GenerationEquipmentCreateWithoutEquipmentInput[] + | Prisma.GenerationEquipmentUncheckedCreateWithoutEquipmentInput[] + connectOrCreate?: + | Prisma.GenerationEquipmentCreateOrConnectWithoutEquipmentInput + | Prisma.GenerationEquipmentCreateOrConnectWithoutEquipmentInput[] + upsert?: + | Prisma.GenerationEquipmentUpsertWithWhereUniqueWithoutEquipmentInput + | Prisma.GenerationEquipmentUpsertWithWhereUniqueWithoutEquipmentInput[] + createMany?: Prisma.GenerationEquipmentCreateManyEquipmentInputEnvelope + set?: Prisma.GenerationEquipmentWhereUniqueInput | Prisma.GenerationEquipmentWhereUniqueInput[] + disconnect?: + | Prisma.GenerationEquipmentWhereUniqueInput + | Prisma.GenerationEquipmentWhereUniqueInput[] + delete?: Prisma.GenerationEquipmentWhereUniqueInput | Prisma.GenerationEquipmentWhereUniqueInput[] + connect?: + | Prisma.GenerationEquipmentWhereUniqueInput + | Prisma.GenerationEquipmentWhereUniqueInput[] + update?: + | Prisma.GenerationEquipmentUpdateWithWhereUniqueWithoutEquipmentInput + | Prisma.GenerationEquipmentUpdateWithWhereUniqueWithoutEquipmentInput[] + updateMany?: + | Prisma.GenerationEquipmentUpdateManyWithWhereWithoutEquipmentInput + | Prisma.GenerationEquipmentUpdateManyWithWhereWithoutEquipmentInput[] + deleteMany?: + | Prisma.GenerationEquipmentScalarWhereInput + | Prisma.GenerationEquipmentScalarWhereInput[] +} + +export type GenerationEquipmentUncheckedUpdateManyWithoutEquipmentNestedInput = { + create?: + | Prisma.XOR< + Prisma.GenerationEquipmentCreateWithoutEquipmentInput, + Prisma.GenerationEquipmentUncheckedCreateWithoutEquipmentInput + > + | Prisma.GenerationEquipmentCreateWithoutEquipmentInput[] + | Prisma.GenerationEquipmentUncheckedCreateWithoutEquipmentInput[] + connectOrCreate?: + | Prisma.GenerationEquipmentCreateOrConnectWithoutEquipmentInput + | Prisma.GenerationEquipmentCreateOrConnectWithoutEquipmentInput[] + upsert?: + | Prisma.GenerationEquipmentUpsertWithWhereUniqueWithoutEquipmentInput + | Prisma.GenerationEquipmentUpsertWithWhereUniqueWithoutEquipmentInput[] + createMany?: Prisma.GenerationEquipmentCreateManyEquipmentInputEnvelope + set?: Prisma.GenerationEquipmentWhereUniqueInput | Prisma.GenerationEquipmentWhereUniqueInput[] + disconnect?: + | Prisma.GenerationEquipmentWhereUniqueInput + | Prisma.GenerationEquipmentWhereUniqueInput[] + delete?: Prisma.GenerationEquipmentWhereUniqueInput | Prisma.GenerationEquipmentWhereUniqueInput[] + connect?: + | Prisma.GenerationEquipmentWhereUniqueInput + | Prisma.GenerationEquipmentWhereUniqueInput[] + update?: + | Prisma.GenerationEquipmentUpdateWithWhereUniqueWithoutEquipmentInput + | Prisma.GenerationEquipmentUpdateWithWhereUniqueWithoutEquipmentInput[] + updateMany?: + | Prisma.GenerationEquipmentUpdateManyWithWhereWithoutEquipmentInput + | Prisma.GenerationEquipmentUpdateManyWithWhereWithoutEquipmentInput[] + deleteMany?: + | Prisma.GenerationEquipmentScalarWhereInput + | Prisma.GenerationEquipmentScalarWhereInput[] +} + +export type GenerationEquipmentCreateNestedManyWithoutGenerationInput = { + create?: + | Prisma.XOR< + Prisma.GenerationEquipmentCreateWithoutGenerationInput, + Prisma.GenerationEquipmentUncheckedCreateWithoutGenerationInput + > + | Prisma.GenerationEquipmentCreateWithoutGenerationInput[] + | Prisma.GenerationEquipmentUncheckedCreateWithoutGenerationInput[] + connectOrCreate?: + | Prisma.GenerationEquipmentCreateOrConnectWithoutGenerationInput + | Prisma.GenerationEquipmentCreateOrConnectWithoutGenerationInput[] + createMany?: Prisma.GenerationEquipmentCreateManyGenerationInputEnvelope + connect?: + | Prisma.GenerationEquipmentWhereUniqueInput + | Prisma.GenerationEquipmentWhereUniqueInput[] +} + +export type GenerationEquipmentUncheckedCreateNestedManyWithoutGenerationInput = { + create?: + | Prisma.XOR< + Prisma.GenerationEquipmentCreateWithoutGenerationInput, + Prisma.GenerationEquipmentUncheckedCreateWithoutGenerationInput + > + | Prisma.GenerationEquipmentCreateWithoutGenerationInput[] + | Prisma.GenerationEquipmentUncheckedCreateWithoutGenerationInput[] + connectOrCreate?: + | Prisma.GenerationEquipmentCreateOrConnectWithoutGenerationInput + | Prisma.GenerationEquipmentCreateOrConnectWithoutGenerationInput[] + createMany?: Prisma.GenerationEquipmentCreateManyGenerationInputEnvelope + connect?: + | Prisma.GenerationEquipmentWhereUniqueInput + | Prisma.GenerationEquipmentWhereUniqueInput[] +} + +export type GenerationEquipmentUpdateManyWithoutGenerationNestedInput = { + create?: + | Prisma.XOR< + Prisma.GenerationEquipmentCreateWithoutGenerationInput, + Prisma.GenerationEquipmentUncheckedCreateWithoutGenerationInput + > + | Prisma.GenerationEquipmentCreateWithoutGenerationInput[] + | Prisma.GenerationEquipmentUncheckedCreateWithoutGenerationInput[] + connectOrCreate?: + | Prisma.GenerationEquipmentCreateOrConnectWithoutGenerationInput + | Prisma.GenerationEquipmentCreateOrConnectWithoutGenerationInput[] + upsert?: + | Prisma.GenerationEquipmentUpsertWithWhereUniqueWithoutGenerationInput + | Prisma.GenerationEquipmentUpsertWithWhereUniqueWithoutGenerationInput[] + createMany?: Prisma.GenerationEquipmentCreateManyGenerationInputEnvelope + set?: Prisma.GenerationEquipmentWhereUniqueInput | Prisma.GenerationEquipmentWhereUniqueInput[] + disconnect?: + | Prisma.GenerationEquipmentWhereUniqueInput + | Prisma.GenerationEquipmentWhereUniqueInput[] + delete?: Prisma.GenerationEquipmentWhereUniqueInput | Prisma.GenerationEquipmentWhereUniqueInput[] + connect?: + | Prisma.GenerationEquipmentWhereUniqueInput + | Prisma.GenerationEquipmentWhereUniqueInput[] + update?: + | Prisma.GenerationEquipmentUpdateWithWhereUniqueWithoutGenerationInput + | Prisma.GenerationEquipmentUpdateWithWhereUniqueWithoutGenerationInput[] + updateMany?: + | Prisma.GenerationEquipmentUpdateManyWithWhereWithoutGenerationInput + | Prisma.GenerationEquipmentUpdateManyWithWhereWithoutGenerationInput[] + deleteMany?: + | Prisma.GenerationEquipmentScalarWhereInput + | Prisma.GenerationEquipmentScalarWhereInput[] +} + +export type GenerationEquipmentUncheckedUpdateManyWithoutGenerationNestedInput = { + create?: + | Prisma.XOR< + Prisma.GenerationEquipmentCreateWithoutGenerationInput, + Prisma.GenerationEquipmentUncheckedCreateWithoutGenerationInput + > + | Prisma.GenerationEquipmentCreateWithoutGenerationInput[] + | Prisma.GenerationEquipmentUncheckedCreateWithoutGenerationInput[] + connectOrCreate?: + | Prisma.GenerationEquipmentCreateOrConnectWithoutGenerationInput + | Prisma.GenerationEquipmentCreateOrConnectWithoutGenerationInput[] + upsert?: + | Prisma.GenerationEquipmentUpsertWithWhereUniqueWithoutGenerationInput + | Prisma.GenerationEquipmentUpsertWithWhereUniqueWithoutGenerationInput[] + createMany?: Prisma.GenerationEquipmentCreateManyGenerationInputEnvelope + set?: Prisma.GenerationEquipmentWhereUniqueInput | Prisma.GenerationEquipmentWhereUniqueInput[] + disconnect?: + | Prisma.GenerationEquipmentWhereUniqueInput + | Prisma.GenerationEquipmentWhereUniqueInput[] + delete?: Prisma.GenerationEquipmentWhereUniqueInput | Prisma.GenerationEquipmentWhereUniqueInput[] + connect?: + | Prisma.GenerationEquipmentWhereUniqueInput + | Prisma.GenerationEquipmentWhereUniqueInput[] + update?: + | Prisma.GenerationEquipmentUpdateWithWhereUniqueWithoutGenerationInput + | Prisma.GenerationEquipmentUpdateWithWhereUniqueWithoutGenerationInput[] + updateMany?: + | Prisma.GenerationEquipmentUpdateManyWithWhereWithoutGenerationInput + | Prisma.GenerationEquipmentUpdateManyWithWhereWithoutGenerationInput[] + deleteMany?: + | Prisma.GenerationEquipmentScalarWhereInput + | Prisma.GenerationEquipmentScalarWhereInput[] +} + +export type GenerationEquipmentCreateWithoutEquipmentInput = { + generation: Prisma.GenerationCreateNestedOneWithoutEquipmentsInput +} + +export type GenerationEquipmentUncheckedCreateWithoutEquipmentInput = { + generationId: string +} + +export type GenerationEquipmentCreateOrConnectWithoutEquipmentInput = { + where: Prisma.GenerationEquipmentWhereUniqueInput + create: Prisma.XOR< + Prisma.GenerationEquipmentCreateWithoutEquipmentInput, + Prisma.GenerationEquipmentUncheckedCreateWithoutEquipmentInput + > +} + +export type GenerationEquipmentCreateManyEquipmentInputEnvelope = { + data: + | Prisma.GenerationEquipmentCreateManyEquipmentInput + | Prisma.GenerationEquipmentCreateManyEquipmentInput[] +} + +export type GenerationEquipmentUpsertWithWhereUniqueWithoutEquipmentInput = { + where: Prisma.GenerationEquipmentWhereUniqueInput + update: Prisma.XOR< + Prisma.GenerationEquipmentUpdateWithoutEquipmentInput, + Prisma.GenerationEquipmentUncheckedUpdateWithoutEquipmentInput + > + create: Prisma.XOR< + Prisma.GenerationEquipmentCreateWithoutEquipmentInput, + Prisma.GenerationEquipmentUncheckedCreateWithoutEquipmentInput + > +} + +export type GenerationEquipmentUpdateWithWhereUniqueWithoutEquipmentInput = { + where: Prisma.GenerationEquipmentWhereUniqueInput + data: Prisma.XOR< + Prisma.GenerationEquipmentUpdateWithoutEquipmentInput, + Prisma.GenerationEquipmentUncheckedUpdateWithoutEquipmentInput + > +} + +export type GenerationEquipmentUpdateManyWithWhereWithoutEquipmentInput = { + where: Prisma.GenerationEquipmentScalarWhereInput + data: Prisma.XOR< + Prisma.GenerationEquipmentUpdateManyMutationInput, + Prisma.GenerationEquipmentUncheckedUpdateManyWithoutEquipmentInput + > +} + +export type GenerationEquipmentScalarWhereInput = { + AND?: Prisma.GenerationEquipmentScalarWhereInput | Prisma.GenerationEquipmentScalarWhereInput[] + OR?: Prisma.GenerationEquipmentScalarWhereInput[] + NOT?: Prisma.GenerationEquipmentScalarWhereInput | Prisma.GenerationEquipmentScalarWhereInput[] + generationId?: Prisma.StringFilter<'GenerationEquipment'> | string + equipmentId?: Prisma.StringFilter<'GenerationEquipment'> | string +} + +export type GenerationEquipmentCreateWithoutGenerationInput = { + equipment: Prisma.EquipmentCreateNestedOneWithoutGenerationsInput +} + +export type GenerationEquipmentUncheckedCreateWithoutGenerationInput = { + equipmentId: string +} + +export type GenerationEquipmentCreateOrConnectWithoutGenerationInput = { + where: Prisma.GenerationEquipmentWhereUniqueInput + create: Prisma.XOR< + Prisma.GenerationEquipmentCreateWithoutGenerationInput, + Prisma.GenerationEquipmentUncheckedCreateWithoutGenerationInput + > +} + +export type GenerationEquipmentCreateManyGenerationInputEnvelope = { + data: + | Prisma.GenerationEquipmentCreateManyGenerationInput + | Prisma.GenerationEquipmentCreateManyGenerationInput[] +} + +export type GenerationEquipmentUpsertWithWhereUniqueWithoutGenerationInput = { + where: Prisma.GenerationEquipmentWhereUniqueInput + update: Prisma.XOR< + Prisma.GenerationEquipmentUpdateWithoutGenerationInput, + Prisma.GenerationEquipmentUncheckedUpdateWithoutGenerationInput + > + create: Prisma.XOR< + Prisma.GenerationEquipmentCreateWithoutGenerationInput, + Prisma.GenerationEquipmentUncheckedCreateWithoutGenerationInput + > +} + +export type GenerationEquipmentUpdateWithWhereUniqueWithoutGenerationInput = { + where: Prisma.GenerationEquipmentWhereUniqueInput + data: Prisma.XOR< + Prisma.GenerationEquipmentUpdateWithoutGenerationInput, + Prisma.GenerationEquipmentUncheckedUpdateWithoutGenerationInput + > +} + +export type GenerationEquipmentUpdateManyWithWhereWithoutGenerationInput = { + where: Prisma.GenerationEquipmentScalarWhereInput + data: Prisma.XOR< + Prisma.GenerationEquipmentUpdateManyMutationInput, + Prisma.GenerationEquipmentUncheckedUpdateManyWithoutGenerationInput + > +} + +export type GenerationEquipmentCreateManyEquipmentInput = { + generationId: string +} + +export type GenerationEquipmentUpdateWithoutEquipmentInput = { + generation?: Prisma.GenerationUpdateOneRequiredWithoutEquipmentsNestedInput +} + +export type GenerationEquipmentUncheckedUpdateWithoutEquipmentInput = { + generationId?: Prisma.StringFieldUpdateOperationsInput | string +} + +export type GenerationEquipmentUncheckedUpdateManyWithoutEquipmentInput = { + generationId?: Prisma.StringFieldUpdateOperationsInput | string +} + +export type GenerationEquipmentCreateManyGenerationInput = { + equipmentId: string +} + +export type GenerationEquipmentUpdateWithoutGenerationInput = { + equipment?: Prisma.EquipmentUpdateOneRequiredWithoutGenerationsNestedInput +} + +export type GenerationEquipmentUncheckedUpdateWithoutGenerationInput = { + equipmentId?: Prisma.StringFieldUpdateOperationsInput | string +} + +export type GenerationEquipmentUncheckedUpdateManyWithoutGenerationInput = { + equipmentId?: Prisma.StringFieldUpdateOperationsInput | string +} + +export type GenerationEquipmentSelect< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = runtime.Types.Extensions.GetSelect< + { + generationId?: boolean + equipmentId?: boolean + generation?: boolean | Prisma.GenerationDefaultArgs + equipment?: boolean | Prisma.EquipmentDefaultArgs + }, + ExtArgs['result']['generationEquipment'] +> + +export type GenerationEquipmentSelectCreateManyAndReturn< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = runtime.Types.Extensions.GetSelect< + { + generationId?: boolean + equipmentId?: boolean + generation?: boolean | Prisma.GenerationDefaultArgs + equipment?: boolean | Prisma.EquipmentDefaultArgs + }, + ExtArgs['result']['generationEquipment'] +> + +export type GenerationEquipmentSelectUpdateManyAndReturn< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = runtime.Types.Extensions.GetSelect< + { + generationId?: boolean + equipmentId?: boolean + generation?: boolean | Prisma.GenerationDefaultArgs + equipment?: boolean | Prisma.EquipmentDefaultArgs + }, + ExtArgs['result']['generationEquipment'] +> + +export type GenerationEquipmentSelectScalar = { + generationId?: boolean + equipmentId?: boolean +} + +export type GenerationEquipmentOmit< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = runtime.Types.Extensions.GetOmit< + 'generationId' | 'equipmentId', + ExtArgs['result']['generationEquipment'] +> +export type GenerationEquipmentInclude< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + generation?: boolean | Prisma.GenerationDefaultArgs + equipment?: boolean | Prisma.EquipmentDefaultArgs +} +export type GenerationEquipmentIncludeCreateManyAndReturn< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + generation?: boolean | Prisma.GenerationDefaultArgs + equipment?: boolean | Prisma.EquipmentDefaultArgs +} +export type GenerationEquipmentIncludeUpdateManyAndReturn< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + generation?: boolean | Prisma.GenerationDefaultArgs + equipment?: boolean | Prisma.EquipmentDefaultArgs +} + +export type $GenerationEquipmentPayload< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + name: 'GenerationEquipment' + objects: { + generation: Prisma.$GenerationPayload + equipment: Prisma.$EquipmentPayload + } + scalars: runtime.Types.Extensions.GetPayloadResult< + { + generationId: string + equipmentId: string + }, + ExtArgs['result']['generationEquipment'] + > + composites: {} +} + +export type GenerationEquipmentGetPayload< + S extends boolean | null | undefined | GenerationEquipmentDefaultArgs, +> = runtime.Types.Result.GetResult + +export type GenerationEquipmentCountArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = Omit & { + select?: GenerationEquipmentCountAggregateInputType | true +} + +export interface GenerationEquipmentDelegate< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, + GlobalOmitOptions = {}, +> { + [K: symbol]: { + types: Prisma.TypeMap['model']['GenerationEquipment'] + meta: { name: 'GenerationEquipment' } + } + /** + * Find zero or one GenerationEquipment that matches the filter. + * @param {GenerationEquipmentFindUniqueArgs} args - Arguments to find a GenerationEquipment + * @example + * // Get one GenerationEquipment + * const generationEquipment = await prisma.generationEquipment.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__GenerationEquipmentClient< + runtime.Types.Result.GetResult< + Prisma.$GenerationEquipmentPayload, + T, + 'findUnique', + GlobalOmitOptions + > | null, + null, + ExtArgs, + GlobalOmitOptions + > + + /** + * Find one GenerationEquipment that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {GenerationEquipmentFindUniqueOrThrowArgs} args - Arguments to find a GenerationEquipment + * @example + * // Get one GenerationEquipment + * const generationEquipment = await prisma.generationEquipment.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__GenerationEquipmentClient< + runtime.Types.Result.GetResult< + Prisma.$GenerationEquipmentPayload, + T, + 'findUniqueOrThrow', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > + + /** + * Find the first GenerationEquipment 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 {GenerationEquipmentFindFirstArgs} args - Arguments to find a GenerationEquipment + * @example + * // Get one GenerationEquipment + * const generationEquipment = await prisma.generationEquipment.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst( + args?: Prisma.SelectSubset>, + ): Prisma.Prisma__GenerationEquipmentClient< + runtime.Types.Result.GetResult< + Prisma.$GenerationEquipmentPayload, + T, + 'findFirst', + GlobalOmitOptions + > | null, + null, + ExtArgs, + GlobalOmitOptions + > + + /** + * Find the first GenerationEquipment 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 {GenerationEquipmentFindFirstOrThrowArgs} args - Arguments to find a GenerationEquipment + * @example + * // Get one GenerationEquipment + * const generationEquipment = await prisma.generationEquipment.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow( + args?: Prisma.SelectSubset>, + ): Prisma.Prisma__GenerationEquipmentClient< + runtime.Types.Result.GetResult< + Prisma.$GenerationEquipmentPayload, + T, + 'findFirstOrThrow', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > + + /** + * Find zero or more GenerationEquipments 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 {GenerationEquipmentFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all GenerationEquipments + * const generationEquipments = await prisma.generationEquipment.findMany() + * + * // Get first 10 GenerationEquipments + * const generationEquipments = await prisma.generationEquipment.findMany({ take: 10 }) + * + * // Only select the `generationId` + * const generationEquipmentWithGenerationIdOnly = await prisma.generationEquipment.findMany({ select: { generationId: true } }) + * + */ + findMany( + args?: Prisma.SelectSubset>, + ): Prisma.PrismaPromise< + runtime.Types.Result.GetResult< + Prisma.$GenerationEquipmentPayload, + T, + 'findMany', + GlobalOmitOptions + > + > + + /** + * Create a GenerationEquipment. + * @param {GenerationEquipmentCreateArgs} args - Arguments to create a GenerationEquipment. + * @example + * // Create one GenerationEquipment + * const GenerationEquipment = await prisma.generationEquipment.create({ + * data: { + * // ... data to create a GenerationEquipment + * } + * }) + * + */ + create( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__GenerationEquipmentClient< + runtime.Types.Result.GetResult< + Prisma.$GenerationEquipmentPayload, + T, + 'create', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > + + /** + * Create many GenerationEquipments. + * @param {GenerationEquipmentCreateManyArgs} args - Arguments to create many GenerationEquipments. + * @example + * // Create many GenerationEquipments + * const generationEquipment = await prisma.generationEquipment.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany( + args?: Prisma.SelectSubset>, + ): Prisma.PrismaPromise + + /** + * Create many GenerationEquipments and returns the data saved in the database. + * @param {GenerationEquipmentCreateManyAndReturnArgs} args - Arguments to create many GenerationEquipments. + * @example + * // Create many GenerationEquipments + * const generationEquipment = await prisma.generationEquipment.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many GenerationEquipments and only return the `generationId` + * const generationEquipmentWithGenerationIdOnly = await prisma.generationEquipment.createManyAndReturn({ + * select: { generationId: 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< + runtime.Types.Result.GetResult< + Prisma.$GenerationEquipmentPayload, + T, + 'createManyAndReturn', + GlobalOmitOptions + > + > + + /** + * Delete a GenerationEquipment. + * @param {GenerationEquipmentDeleteArgs} args - Arguments to delete one GenerationEquipment. + * @example + * // Delete one GenerationEquipment + * const GenerationEquipment = await prisma.generationEquipment.delete({ + * where: { + * // ... filter to delete one GenerationEquipment + * } + * }) + * + */ + delete( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__GenerationEquipmentClient< + runtime.Types.Result.GetResult< + Prisma.$GenerationEquipmentPayload, + T, + 'delete', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > + + /** + * Update one GenerationEquipment. + * @param {GenerationEquipmentUpdateArgs} args - Arguments to update one GenerationEquipment. + * @example + * // Update one GenerationEquipment + * const generationEquipment = await prisma.generationEquipment.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__GenerationEquipmentClient< + runtime.Types.Result.GetResult< + Prisma.$GenerationEquipmentPayload, + T, + 'update', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > + + /** + * Delete zero or more GenerationEquipments. + * @param {GenerationEquipmentDeleteManyArgs} args - Arguments to filter GenerationEquipments to delete. + * @example + * // Delete a few GenerationEquipments + * const { count } = await prisma.generationEquipment.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany( + args?: Prisma.SelectSubset>, + ): Prisma.PrismaPromise + + /** + * Update zero or more GenerationEquipments. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {GenerationEquipmentUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many GenerationEquipments + * const generationEquipment = await prisma.generationEquipment.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany( + args: Prisma.SelectSubset>, + ): Prisma.PrismaPromise + + /** + * Update zero or more GenerationEquipments and returns the data updated in the database. + * @param {GenerationEquipmentUpdateManyAndReturnArgs} args - Arguments to update many GenerationEquipments. + * @example + * // Update many GenerationEquipments + * const generationEquipment = await prisma.generationEquipment.updateManyAndReturn({ + * where: { + * // ... provide filter here + * }, + * data: [ + * // ... provide data here + * ] + * }) + * + * // Update zero or more GenerationEquipments and only return the `generationId` + * const generationEquipmentWithGenerationIdOnly = await prisma.generationEquipment.updateManyAndReturn({ + * select: { generationId: 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< + runtime.Types.Result.GetResult< + Prisma.$GenerationEquipmentPayload, + T, + 'updateManyAndReturn', + GlobalOmitOptions + > + > + + /** + * Create or update one GenerationEquipment. + * @param {GenerationEquipmentUpsertArgs} args - Arguments to update or create a GenerationEquipment. + * @example + * // Update or create a GenerationEquipment + * const generationEquipment = await prisma.generationEquipment.upsert({ + * create: { + * // ... data to create a GenerationEquipment + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the GenerationEquipment we want to update + * } + * }) + */ + upsert( + args: Prisma.SelectSubset>, + ): Prisma.Prisma__GenerationEquipmentClient< + runtime.Types.Result.GetResult< + Prisma.$GenerationEquipmentPayload, + T, + 'upsert', + GlobalOmitOptions + >, + never, + ExtArgs, + GlobalOmitOptions + > + + /** + * Count the number of GenerationEquipments. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {GenerationEquipmentCountArgs} args - Arguments to filter GenerationEquipments to count. + * @example + * // Count the number of GenerationEquipments + * const count = await prisma.generationEquipment.count({ + * where: { + * // ... the filter for the GenerationEquipments 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 GenerationEquipment. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {GenerationEquipmentAggregateArgs} 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 GenerationEquipment. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {GenerationEquipmentGroupByArgs} 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 GenerationEquipmentGroupByArgs, + HasSelectOrTake extends Prisma.Or< + Prisma.Extends<'skip', Prisma.Keys>, + Prisma.Extends<'take', Prisma.Keys> + >, + OrderByArg extends Prisma.True extends HasSelectOrTake + ? { orderBy: GenerationEquipmentGroupByArgs['orderBy'] } + : { orderBy?: GenerationEquipmentGroupByArgs['orderBy'] }, + OrderFields extends Prisma.ExcludeUnderscoreKeys< + Prisma.Keys> + >, + 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 + ? GetGenerationEquipmentGroupByPayload + : Prisma.PrismaPromise + /** + * Fields of the GenerationEquipment model + */ + readonly fields: GenerationEquipmentFieldRefs +} + +/** + * The delegate class that acts as a "Promise-like" for GenerationEquipment. + * 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__GenerationEquipmentClient< + T, + Null = never, + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, + GlobalOmitOptions = {}, +> extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: 'PrismaPromise' + generation = {}>( + args?: Prisma.Subset>, + ): Prisma.Prisma__GenerationClient< + | runtime.Types.Result.GetResult< + Prisma.$GenerationPayload, + T, + 'findUniqueOrThrow', + GlobalOmitOptions + > + | Null, + Null, + ExtArgs, + GlobalOmitOptions + > + equipment = {}>( + args?: Prisma.Subset>, + ): Prisma.Prisma__EquipmentClient< + | runtime.Types.Result.GetResult< + Prisma.$EquipmentPayload, + 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 GenerationEquipment model + */ +export interface GenerationEquipmentFieldRefs { + readonly generationId: Prisma.FieldRef<'GenerationEquipment', 'String'> + readonly equipmentId: Prisma.FieldRef<'GenerationEquipment', 'String'> +} + +// Custom InputTypes +/** + * GenerationEquipment findUnique + */ +export type GenerationEquipmentFindUniqueArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the GenerationEquipment + */ + select?: Prisma.GenerationEquipmentSelect | null + /** + * Omit specific fields from the GenerationEquipment + */ + omit?: Prisma.GenerationEquipmentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GenerationEquipmentInclude | null + /** + * Filter, which GenerationEquipment to fetch. + */ + where: Prisma.GenerationEquipmentWhereUniqueInput +} + +/** + * GenerationEquipment findUniqueOrThrow + */ +export type GenerationEquipmentFindUniqueOrThrowArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the GenerationEquipment + */ + select?: Prisma.GenerationEquipmentSelect | null + /** + * Omit specific fields from the GenerationEquipment + */ + omit?: Prisma.GenerationEquipmentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GenerationEquipmentInclude | null + /** + * Filter, which GenerationEquipment to fetch. + */ + where: Prisma.GenerationEquipmentWhereUniqueInput +} + +/** + * GenerationEquipment findFirst + */ +export type GenerationEquipmentFindFirstArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the GenerationEquipment + */ + select?: Prisma.GenerationEquipmentSelect | null + /** + * Omit specific fields from the GenerationEquipment + */ + omit?: Prisma.GenerationEquipmentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GenerationEquipmentInclude | null + /** + * Filter, which GenerationEquipment to fetch. + */ + where?: Prisma.GenerationEquipmentWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of GenerationEquipments to fetch. + */ + orderBy?: + | Prisma.GenerationEquipmentOrderByWithRelationInput + | Prisma.GenerationEquipmentOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for GenerationEquipments. + */ + cursor?: Prisma.GenerationEquipmentWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` GenerationEquipments 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` GenerationEquipments. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of GenerationEquipments. + */ + distinct?: Prisma.GenerationEquipmentScalarFieldEnum | Prisma.GenerationEquipmentScalarFieldEnum[] +} + +/** + * GenerationEquipment findFirstOrThrow + */ +export type GenerationEquipmentFindFirstOrThrowArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the GenerationEquipment + */ + select?: Prisma.GenerationEquipmentSelect | null + /** + * Omit specific fields from the GenerationEquipment + */ + omit?: Prisma.GenerationEquipmentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GenerationEquipmentInclude | null + /** + * Filter, which GenerationEquipment to fetch. + */ + where?: Prisma.GenerationEquipmentWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of GenerationEquipments to fetch. + */ + orderBy?: + | Prisma.GenerationEquipmentOrderByWithRelationInput + | Prisma.GenerationEquipmentOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for GenerationEquipments. + */ + cursor?: Prisma.GenerationEquipmentWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` GenerationEquipments 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` GenerationEquipments. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of GenerationEquipments. + */ + distinct?: Prisma.GenerationEquipmentScalarFieldEnum | Prisma.GenerationEquipmentScalarFieldEnum[] +} + +/** + * GenerationEquipment findMany + */ +export type GenerationEquipmentFindManyArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the GenerationEquipment + */ + select?: Prisma.GenerationEquipmentSelect | null + /** + * Omit specific fields from the GenerationEquipment + */ + omit?: Prisma.GenerationEquipmentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GenerationEquipmentInclude | null + /** + * Filter, which GenerationEquipments to fetch. + */ + where?: Prisma.GenerationEquipmentWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of GenerationEquipments to fetch. + */ + orderBy?: + | Prisma.GenerationEquipmentOrderByWithRelationInput + | Prisma.GenerationEquipmentOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing GenerationEquipments. + */ + cursor?: Prisma.GenerationEquipmentWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` GenerationEquipments 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` GenerationEquipments. + */ + skip?: number + distinct?: Prisma.GenerationEquipmentScalarFieldEnum | Prisma.GenerationEquipmentScalarFieldEnum[] +} + +/** + * GenerationEquipment create + */ +export type GenerationEquipmentCreateArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the GenerationEquipment + */ + select?: Prisma.GenerationEquipmentSelect | null + /** + * Omit specific fields from the GenerationEquipment + */ + omit?: Prisma.GenerationEquipmentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GenerationEquipmentInclude | null + /** + * The data needed to create a GenerationEquipment. + */ + data: Prisma.XOR< + Prisma.GenerationEquipmentCreateInput, + Prisma.GenerationEquipmentUncheckedCreateInput + > +} + +/** + * GenerationEquipment createMany + */ +export type GenerationEquipmentCreateManyArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * The data used to create many GenerationEquipments. + */ + data: Prisma.GenerationEquipmentCreateManyInput | Prisma.GenerationEquipmentCreateManyInput[] +} + +/** + * GenerationEquipment createManyAndReturn + */ +export type GenerationEquipmentCreateManyAndReturnArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the GenerationEquipment + */ + select?: Prisma.GenerationEquipmentSelectCreateManyAndReturn | null + /** + * Omit specific fields from the GenerationEquipment + */ + omit?: Prisma.GenerationEquipmentOmit | null + /** + * The data used to create many GenerationEquipments. + */ + data: Prisma.GenerationEquipmentCreateManyInput | Prisma.GenerationEquipmentCreateManyInput[] + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GenerationEquipmentIncludeCreateManyAndReturn | null +} + +/** + * GenerationEquipment update + */ +export type GenerationEquipmentUpdateArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the GenerationEquipment + */ + select?: Prisma.GenerationEquipmentSelect | null + /** + * Omit specific fields from the GenerationEquipment + */ + omit?: Prisma.GenerationEquipmentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GenerationEquipmentInclude | null + /** + * The data needed to update a GenerationEquipment. + */ + data: Prisma.XOR< + Prisma.GenerationEquipmentUpdateInput, + Prisma.GenerationEquipmentUncheckedUpdateInput + > + /** + * Choose, which GenerationEquipment to update. + */ + where: Prisma.GenerationEquipmentWhereUniqueInput +} + +/** + * GenerationEquipment updateMany + */ +export type GenerationEquipmentUpdateManyArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * The data used to update GenerationEquipments. + */ + data: Prisma.XOR< + Prisma.GenerationEquipmentUpdateManyMutationInput, + Prisma.GenerationEquipmentUncheckedUpdateManyInput + > + /** + * Filter which GenerationEquipments to update + */ + where?: Prisma.GenerationEquipmentWhereInput + /** + * Limit how many GenerationEquipments to update. + */ + limit?: number +} + +/** + * GenerationEquipment updateManyAndReturn + */ +export type GenerationEquipmentUpdateManyAndReturnArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the GenerationEquipment + */ + select?: Prisma.GenerationEquipmentSelectUpdateManyAndReturn | null + /** + * Omit specific fields from the GenerationEquipment + */ + omit?: Prisma.GenerationEquipmentOmit | null + /** + * The data used to update GenerationEquipments. + */ + data: Prisma.XOR< + Prisma.GenerationEquipmentUpdateManyMutationInput, + Prisma.GenerationEquipmentUncheckedUpdateManyInput + > + /** + * Filter which GenerationEquipments to update + */ + where?: Prisma.GenerationEquipmentWhereInput + /** + * Limit how many GenerationEquipments to update. + */ + limit?: number + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GenerationEquipmentIncludeUpdateManyAndReturn | null +} + +/** + * GenerationEquipment upsert + */ +export type GenerationEquipmentUpsertArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the GenerationEquipment + */ + select?: Prisma.GenerationEquipmentSelect | null + /** + * Omit specific fields from the GenerationEquipment + */ + omit?: Prisma.GenerationEquipmentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GenerationEquipmentInclude | null + /** + * The filter to search for the GenerationEquipment to update in case it exists. + */ + where: Prisma.GenerationEquipmentWhereUniqueInput + /** + * In case the GenerationEquipment found by the `where` argument doesn't exist, create a new GenerationEquipment with this data. + */ + create: Prisma.XOR< + Prisma.GenerationEquipmentCreateInput, + Prisma.GenerationEquipmentUncheckedCreateInput + > + /** + * In case the GenerationEquipment was found with the provided `where` argument, update it with this data. + */ + update: Prisma.XOR< + Prisma.GenerationEquipmentUpdateInput, + Prisma.GenerationEquipmentUncheckedUpdateInput + > +} + +/** + * GenerationEquipment delete + */ +export type GenerationEquipmentDeleteArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the GenerationEquipment + */ + select?: Prisma.GenerationEquipmentSelect | null + /** + * Omit specific fields from the GenerationEquipment + */ + omit?: Prisma.GenerationEquipmentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GenerationEquipmentInclude | null + /** + * Filter which GenerationEquipment to delete. + */ + where: Prisma.GenerationEquipmentWhereUniqueInput +} + +/** + * GenerationEquipment deleteMany + */ +export type GenerationEquipmentDeleteManyArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Filter which GenerationEquipments to delete + */ + where?: Prisma.GenerationEquipmentWhereInput + /** + * Limit how many GenerationEquipments to delete. + */ + limit?: number +} + +/** + * GenerationEquipment without action + */ +export type GenerationEquipmentDefaultArgs< + ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, +> = { + /** + * Select specific fields to fetch from the GenerationEquipment + */ + select?: Prisma.GenerationEquipmentSelect | null + /** + * Omit specific fields from the GenerationEquipment + */ + omit?: Prisma.GenerationEquipmentOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GenerationEquipmentInclude | null +} diff --git a/src/index.ts b/src/index.ts index 3191383..bf0c2fa 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,9 @@ import { Hono } from 'hono' +import { serveStatic } from 'hono/bun' +import asset from './api/asset' +import character from './api/character' +import equipment from './api/equipment' +import generation from './api/generation' const app = new Hono() @@ -6,4 +11,12 @@ app.get('/', (c) => { return c.text('Hello Hono!') }) +// Serve static files from data/files +app.use('/files/*', serveStatic({ root: './data' })) + +app.route('/assets', asset) +app.route('/characters', character) +app.route('/equipments', equipment) +app.route('/generations', generation) + export default app diff --git a/src/lib/fileSystem.ts b/src/lib/fileSystem.ts new file mode 100644 index 0000000..fa72b20 --- /dev/null +++ b/src/lib/fileSystem.ts @@ -0,0 +1,7 @@ +export const writeFile = async ( + path: string, + content: Blob | string | ArrayBuffer | ArrayBufferView, +) => { + // @ts-expect-error - Bun.write accepts string path + return Bun.write(path, content) +} diff --git a/src/services/asset.test.ts b/src/services/asset.test.ts new file mode 100644 index 0000000..a06ccf8 --- /dev/null +++ b/src/services/asset.test.ts @@ -0,0 +1,48 @@ +import { describe, it, expect, mock, afterEach } from 'bun:test' + +const mockPrisma = { + asset: { + create: mock(), + findUnique: mock(), + }, +} + +const mockFileSystem = { + writeFile: mock(), +} + +mock.module('../db', () => ({ + prisma: mockPrisma, +})) + +mock.module('../lib/fileSystem', () => mockFileSystem) + +describe('AssetService', () => { + afterEach(() => { + mockPrisma.asset.create.mockClear() + mockPrisma.asset.findUnique.mockClear() + mockFileSystem.writeFile.mockClear() + }) + + it('createAsset should save file and create db record', async () => { + // @ts-ignore + const { AssetService } = await import(`./asset?v=${Date.now()}`) + const file = new File(['content'], 'test.png', { type: 'image/png' }) + const meta = { name: 'Test Asset', type: 'image/png' } + + mockPrisma.asset.create.mockResolvedValue({ + id: '01HRKV...', + name: meta.name, + type: meta.type, + path: 'data/files/01HRKV....png', + createdAt: new Date(), + updatedAt: new Date(), + }) + + const result = await AssetService.createAsset(file, meta) + + expect(mockFileSystem.writeFile).toHaveBeenCalled() + expect(mockPrisma.asset.create).toHaveBeenCalled() + expect(result.name).toBe(meta.name) + }) +}) diff --git a/src/services/asset.ts b/src/services/asset.ts new file mode 100644 index 0000000..0b334a6 --- /dev/null +++ b/src/services/asset.ts @@ -0,0 +1,32 @@ +import { ulid } from 'ulidx' +import { prisma } from '../db' +import { join, extname } from 'path' +import { writeFile } from '../lib/fileSystem' + +export class AssetService { + static async createAsset(file: File, meta: { name: string; type: string }) { + const id = ulid() + const ext = extname(file.name) || '.bin' + const filename = `${id}${ext}` + const path = join('data/files', filename) + + await writeFile(path, file) + + const asset = await prisma.asset.create({ + data: { + id, + name: meta.name, + type: meta.type, + path, + }, + }) + + return asset + } + + static async getAsset(id: string) { + return prisma.asset.findUnique({ + where: { id }, + }) + } +} diff --git a/src/services/character.test.ts b/src/services/character.test.ts new file mode 100644 index 0000000..715ca2e --- /dev/null +++ b/src/services/character.test.ts @@ -0,0 +1,63 @@ +import { describe, it, expect, mock, afterEach } from 'bun:test' + +const mockPrisma = { + character: { + create: mock(), + findMany: mock(), + count: mock(), + update: mock(), + delete: mock(), + }, +} + +mock.module('../db', () => ({ + prisma: mockPrisma, +})) + +describe('CharacterService', () => { + afterEach(() => { + mockPrisma.character.create.mockClear() + mockPrisma.character.findMany.mockClear() + mockPrisma.character.count.mockClear() + mockPrisma.character.update.mockClear() + mockPrisma.character.delete.mockClear() + }) + + it('createCharacter should create character with image relation', async () => { + // @ts-ignore + const { CharacterService } = await import(`./character?v=${Date.now()}`) + const data = { name: 'Test Char', description: 'Desc', imageId: 'img1' } + mockPrisma.character.create.mockResolvedValue({ id: 'char1', ...data }) + + const result = await CharacterService.createCharacter(data) + + expect(mockPrisma.character.create).toHaveBeenCalledWith( + expect.objectContaining({ + data: expect.objectContaining({ + name: data.name, + imageId: data.imageId, + }), + include: { image: true }, + }), + ) + expect(result.id).toBe('char1') + }) + + it('listCharacters should return paginated list', async () => { + // @ts-ignore + const { CharacterService } = await import(`./character?v=${Date.now()}`) + mockPrisma.character.count.mockResolvedValue(10) + mockPrisma.character.findMany.mockResolvedValue([{ id: 'char1' }]) + + const result = await CharacterService.listCharacters({ page: 1, limit: 5 }) + + expect(mockPrisma.character.findMany).toHaveBeenCalledWith( + expect.objectContaining({ + skip: 0, + take: 5, + }), + ) + expect(result.total).toBe(10) + expect(result.items).toHaveLength(1) + }) +}) diff --git a/src/services/character.ts b/src/services/character.ts new file mode 100644 index 0000000..10123b0 --- /dev/null +++ b/src/services/character.ts @@ -0,0 +1,55 @@ +import { prisma } from '../db' +import { ulid } from 'ulidx' + +export class CharacterService { + static async createCharacter(data: { name: string; description?: string; imageId: string }) { + return prisma.character.create({ + data: { + id: ulid(), + ...data, + }, + include: { + image: true, + }, + }) + } + + static async listCharacters(pagination: { page: number; limit: number }) { + const { page, limit } = pagination + const skip = (page - 1) * limit + const [total, items] = await Promise.all([ + prisma.character.count(), + prisma.character.findMany({ + skip, + take: limit, + include: { + image: true, + }, + orderBy: { + createdAt: 'desc', + }, + }), + ]) + + return { total, items, page, limit, totalPages: Math.ceil(total / limit) } + } + + static async updateCharacter( + id: string, + data: { name?: string; description?: string; imageId?: string }, + ) { + return prisma.character.update({ + where: { id }, + data, + include: { + image: true, + }, + }) + } + + static async deleteCharacter(id: string) { + return prisma.character.delete({ + where: { id }, + }) + } +} diff --git a/src/services/equipment.test.ts b/src/services/equipment.test.ts new file mode 100644 index 0000000..36960ba --- /dev/null +++ b/src/services/equipment.test.ts @@ -0,0 +1,36 @@ +import { describe, it, expect, mock, afterEach } from 'bun:test' + +const mockPrisma = { + equipment: { + findMany: mock(), + count: mock(), + }, +} + +mock.module('../db', () => ({ + prisma: mockPrisma, +})) + +describe('EquipmentService', () => { + afterEach(() => { + mockPrisma.equipment.findMany.mockClear() + mockPrisma.equipment.count.mockClear() + }) + + it('listEquipments should filter by category', async () => { + // @ts-ignore + const { EquipmentService } = await import(`./equipment?v=${Date.now()}`) + mockPrisma.equipment.count.mockResolvedValue(5) + mockPrisma.equipment.findMany.mockResolvedValue([]) + + await EquipmentService.listEquipments({ page: 1, limit: 10 }, { categoryId: 'cat1' }) + + expect(mockPrisma.equipment.findMany).toHaveBeenCalledWith( + expect.objectContaining({ + where: expect.objectContaining({ + categoryId: 'cat1', + }), + }), + ) + }) +}) diff --git a/src/services/equipment.ts b/src/services/equipment.ts new file mode 100644 index 0000000..71c008e --- /dev/null +++ b/src/services/equipment.ts @@ -0,0 +1,39 @@ +import { prisma } from '../db' +import { Prisma } from '../generated/prisma/client' + +export class EquipmentService { + static async listEquipments( + pagination: { page: number; limit: number }, + filters?: { categoryId?: string; subCategoryId?: string }, + ) { + const { page, limit } = pagination + const skip = (page - 1) * limit + const where: Prisma.EquipmentWhereInput = {} + + if (filters?.categoryId) { + where.categoryId = filters.categoryId + } + if (filters?.subCategoryId) { + where.subCategoryId = filters.subCategoryId + } + + const [total, items] = await Promise.all([ + prisma.equipment.count({ where }), + prisma.equipment.findMany({ + where, + skip, + take: limit, + include: { + image: true, + category: true, + subCategory: true, + }, + orderBy: { + createdAt: 'desc', + }, + }), + ]) + + return { total, items, page, limit, totalPages: Math.ceil(total / limit) } + } +} diff --git a/src/services/generation.test.ts b/src/services/generation.test.ts new file mode 100644 index 0000000..406a783 --- /dev/null +++ b/src/services/generation.test.ts @@ -0,0 +1,40 @@ +import { describe, it, expect, mock, afterEach } from 'bun:test' + +const mockPrisma = { + generation: { + findMany: mock(), + count: mock(), + }, +} + +mock.module('../db', () => ({ + prisma: mockPrisma, +})) + +describe('GenerationService', () => { + afterEach(() => { + mockPrisma.generation.findMany.mockClear() + mockPrisma.generation.count.mockClear() + }) + + it('listGenerations should filter by equipment', async () => { + // @ts-ignore + const { GenerationService } = await import(`./generation?v=${Date.now()}`) + mockPrisma.generation.count.mockResolvedValue(2) + mockPrisma.generation.findMany.mockResolvedValue([]) + + await GenerationService.listGenerations({ page: 1, limit: 10 }, { equipmentId: 'eq1' }) + + expect(mockPrisma.generation.findMany).toHaveBeenCalledWith( + expect.objectContaining({ + where: expect.objectContaining({ + equipments: { + some: { + equipmentId: 'eq1', + }, + }, + }), + }), + ) + }) +}) diff --git a/src/services/generation.ts b/src/services/generation.ts new file mode 100644 index 0000000..99c9601 --- /dev/null +++ b/src/services/generation.ts @@ -0,0 +1,48 @@ +import { prisma } from '../db' +import { Prisma } from '../generated/prisma/client' + +export class GenerationService { + static async listGenerations( + pagination: { page: number; limit: number }, + filters?: { characterId?: string; equipmentId?: string }, + ) { + const { page, limit } = pagination + const skip = (page - 1) * limit + const where: Prisma.GenerationWhereInput = {} + + if (filters?.characterId) { + where.characterId = filters.characterId + } + + if (filters?.equipmentId) { + where.equipments = { + some: { + equipmentId: filters.equipmentId, + }, + } + } + + const [total, items] = await Promise.all([ + prisma.generation.count({ where }), + prisma.generation.findMany({ + where, + skip, + take: limit, + include: { + image: true, + character: true, + equipments: { + include: { + equipment: true, + }, + }, + }, + orderBy: { + createdAt: 'desc', + }, + }), + ]) + + return { total, items, page, limit, totalPages: Math.ceil(total / limit) } + } +} diff --git a/tsconfig.json b/tsconfig.json index c442b33..9fac596 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,6 +2,12 @@ "compilerOptions": { "strict": true, "jsx": "react-jsx", - "jsxImportSource": "hono/jsx" - } -} \ No newline at end of file + "jsxImportSource": "hono/jsx", + "module": "esnext", + "moduleResolution": "bundler", + "target": "esnext", + "allowImportingTsExtensions": true, + "noEmit": true + }, + "exclude": ["node_modules"] +}